Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CLEREZZA-974: removed depndency on slf4j
  • Loading branch information
retog committed Mar 22, 2015
1 parent 1f6819e commit e046fadec1223508da088d40ff06f6dbd8d6d71f
Showing 3 changed files with 11 additions and 17 deletions.
@@ -80,12 +80,6 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
<type>jar</type>
</dependency>
</dependencies>

</project>
@@ -20,19 +20,20 @@

import java.lang.ref.WeakReference;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.apache.commons.rdf.event.GraphEvent;
import org.apache.commons.rdf.event.GraphListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
*
* @author reto
*/
class DelayedNotificator {

private static final Logger log = LoggerFactory.getLogger(DelayedNotificator.class);
private static final Logger log = Logger.getLogger(DelayedNotificator.class.getName());
private static Timer timer = new Timer("Event delivery timer",true);

static class ListenerHolder {
@@ -62,12 +63,12 @@ public void run() {
}
GraphListener listener = listenerRef.get();
if (listener == null) {
log.debug("Ignoring garbage collected listener");
log.fine("Ignoring garbage collected listener");
} else {
try {
listener.graphChanged(eventsLocal);
} catch (Exception e) {
log.warn("Exception delivering ImmutableGraph event", e);
log.log(Level.WARNING, "Exception delivering ImmutableGraph event", e);
}
}
}
@@ -24,15 +24,15 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.rdf.BlankNode;
import org.apache.commons.rdf.BlankNodeOrIri;
import org.apache.commons.rdf.Graph;
import org.apache.commons.rdf.RdfTerm;
import org.apache.commons.rdf.Triple;
import org.apache.commons.rdf.impl.utils.TripleImpl;
import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author reto
@@ -41,7 +41,7 @@
public class GraphMatcher {


private final static Logger log = LoggerFactory.getLogger(GraphMatcher.class);
private final static Logger log = Logger.getLogger(GraphMatcher.class.getName());

/**
* get a mapping from g1 to g2 or null if the graphs are not isomorphic. The
@@ -100,10 +100,9 @@ public static Map<BlankNode, BlankNode> getValidMapping(Graph og1, Graph og2) {

private static Map<BlankNode, BlankNode> trialAndErrorMatching(Graph g1, Graph g2,
Map<Set<BlankNode>, Set<BlankNode>> matchingGroups) {
if (log.isDebugEnabled()) {
if (log.isLoggable(Level.FINE)) {
Set<BlankNode> bn1 = Utils.getBNodes(g1);
log.debug("doing trial and error matching for {} bnodes, " +
"in graphs of size: {}.", bn1.size(), g1.size());
log.log(Level.FINE,"doing trial and error matching for {0}"+" bnodes, "+"in graphs of size: {1}.", new Object[]{bn1.size(), g1.size()});
}
Iterator<Map<BlankNode, BlankNode>> mappingIter
= GroupMappingIterator.create(matchingGroups);

0 comments on commit e046fad

Please sign in to comment.