Author: reto
Date: Sun Sep 23 10:36:04 2012
New Revision: 1389004
URL: http://svn.apache.org/viewvc?rev=1389004&view=rev
Log:
Created issue branch after finding that it's hard to offert the required slf4j
1.7 as this is not provided by sling Log. A possible solutions would be to
switch to pax logging.
But it's hard to see why ldpath need that precise version of slf4j. It wouldn't
accept 1.7.1 either, so hoping they?ll make a new release that accepts a
broader ranger of slf4j version.
Added:
stanbol/branches/STANBOL-748/
- copied from r1389001, stanbol/trunk/
Modified:
stanbol/branches/STANBOL-748/commons/ldpath/clerezza/pom.xml
stanbol/branches/STANBOL-748/contenthub/ldpath/pom.xml
stanbol/branches/STANBOL-748/contenthub/servicesapi/pom.xml
stanbol/branches/STANBOL-748/enhancer/ldpath/pom.xml
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentFunction.java
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentItemFunction.java
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/PathFunction.java
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/SuggestionFunction.java
stanbol/branches/STANBOL-748/entityhub/jersey/pom.xml
stanbol/branches/STANBOL-748/entityhub/ldpath/pom.xml
stanbol/branches/STANBOL-748/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
stanbol/branches/STANBOL-748/parent/pom.xml
Modified: stanbol/branches/STANBOL-748/commons/ldpath/clerezza/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/commons/ldpath/clerezza/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/commons/ldpath/clerezza/pom.xml (original)
+++ stanbol/branches/STANBOL-748/commons/ldpath/clerezza/pom.xml Sun Sep 23
10:36:04 2012
@@ -79,7 +79,7 @@
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
+ <artifactId>ldpath-core</artifactId>
</dependency>
<!-- Commons -->
<dependency>
Modified: stanbol/branches/STANBOL-748/contenthub/ldpath/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/contenthub/ldpath/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/contenthub/ldpath/pom.xml (original)
+++ stanbol/branches/STANBOL-748/contenthub/ldpath/pom.xml Sun Sep 23 10:36:04
2012
@@ -90,7 +90,7 @@
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
+ <artifactId>ldpath-core</artifactId>
</dependency>
<dependency>
Modified: stanbol/branches/STANBOL-748/contenthub/servicesapi/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/contenthub/servicesapi/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/contenthub/servicesapi/pom.xml (original)
+++ stanbol/branches/STANBOL-748/contenthub/servicesapi/pom.xml Sun Sep 23
10:36:04 2012
@@ -56,7 +56,7 @@
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
+ <artifactId>ldpath-core</artifactId>
</dependency>
</dependencies>
</project>
Modified: stanbol/branches/STANBOL-748/enhancer/ldpath/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/enhancer/ldpath/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/enhancer/ldpath/pom.xml (original)
+++ stanbol/branches/STANBOL-748/enhancer/ldpath/pom.xml Sun Sep 23 10:36:04
2012
@@ -97,7 +97,7 @@
<dependency>
<groupId>org.apache.stanbol</groupId>
<artifactId>org.apache.stanbol.commons.ldpath.clerezza</artifactId>
- <version>0.9.0-incubating</version>
+ <version>0.10.0-incubating-SNAPSHOT</version>
</dependency>
<!-- Clerezza dependencies -->
@@ -117,7 +117,7 @@
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
+ <artifactId>ldpath-core</artifactId>
</dependency>
<!-- generic tax -->
@@ -160,7 +160,18 @@
<artifactId>rdf.jena.parser</artifactId>
<scope>test</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.1.2</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.htmlcleaner</groupId>
+ <artifactId>htmlcleaner</artifactId>
+ <version>2.2</version>
+ <type>jar</type>
+ </dependency>
</dependencies>
</project>
Modified:
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentFunction.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentFunction.java?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
---
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentFunction.java
(original)
+++
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentFunction.java
Sun Sep 23 10:36:04 2012
@@ -37,6 +37,7 @@ import org.apache.stanbol.enhancer.servi
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.newmedialab.ldpath.api.backend.RDFBackend;
import at.newmedialab.ldpath.api.functions.SelectorFunction;
/**
@@ -119,4 +120,20 @@ public class ContentFunction extends Con
return result;
}
+
+ @Override
+ public String getSignature() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+
+
}
Modified:
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentItemFunction.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentItemFunction.java?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
---
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentItemFunction.java
(original)
+++
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/ContentItemFunction.java
Sun Sep 23 10:36:04 2012
@@ -45,7 +45,10 @@ public abstract class ContentItemFunctio
this.name = name;
}
- public final Collection<Resource> apply(RDFBackend<Resource> backend,
Collection<Resource>... args) throws IllegalArgumentException {
+ @Override
+ public final Collection<Resource> apply(RDFBackend<Resource> backend,
+ Resource context, Collection<Resource>... args)
+ throws IllegalArgumentException {
if(backend instanceof ContentItemBackend){
return apply((ContentItemBackend)backend, args);
} else {
Modified:
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/PathFunction.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/PathFunction.java?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
---
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/PathFunction.java
(original)
+++
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/PathFunction.java
Sun Sep 23 10:36:04 2012
@@ -56,7 +56,7 @@ public class PathFunction<Node> implemen
}
@Override
- public Collection<Node> apply(RDFBackend<Node> backend,
Collection<Node>... args) throws IllegalArgumentException {
+ public Collection<Node> apply(RDFBackend<Node> backend, Node node,
Collection<Node>... args) throws IllegalArgumentException {
if(args == null || args.length < 1 || args[0] == null ||
args[0].isEmpty()){
throw new IllegalArgumentException("The 'fn:"+name+"' function " +
"requires at least a single none empty parameter (the
context). Use 'fn:" +
@@ -64,7 +64,7 @@ public class PathFunction<Node> implemen
}
Set<Node> selected = new HashSet<Node>();
for(Node context : args[0]){
- selected.addAll(selector.select(backend, context));
+ selected.addAll(selector.select(backend, context, null, null));
}
return selected;
}
@@ -74,4 +74,15 @@ public class PathFunction<Node> implemen
return name;
}
+
+ @Override
+ public String getSignature() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getDescription() {
+ return "Pathfunction "+name+" with selector "+selector;
+ }
+
}
Modified:
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/SuggestionFunction.java
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/SuggestionFunction.java?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
---
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/SuggestionFunction.java
(original)
+++
stanbol/branches/STANBOL-748/enhancer/ldpath/src/main/java/org/apache/stanbol/enhancer/ldpath/function/SuggestionFunction.java
Sun Sep 23 10:36:04 2012
@@ -18,6 +18,7 @@ package org.apache.stanbol.enhancer.ldpa
import static java.util.Collections.singletonMap;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -35,6 +36,7 @@ import at.newmedialab.ldpath.api.selecto
import at.newmedialab.ldpath.model.transformers.IntTransformer;
import at.newmedialab.ldpath.model.transformers.StringTransformer;
+
public class SuggestionFunction implements SelectorFunction<Resource> {
private static final Comparator<Entry<Double,Resource>>
SUGGESTION_COMPARATOR =
@@ -91,7 +93,7 @@ public class SuggestionFunction implemen
}
@Override
- public Collection<Resource> apply(final RDFBackend<Resource> backend,
Collection<Resource>... args) throws IllegalArgumentException {
+ public Collection<Resource> apply(final RDFBackend<Resource> backend,
Resource context, Collection<Resource>... args) throws IllegalArgumentException
{
Integer limit = parseParamLimit(backend, args,1);
// final String processingMode = parseParamProcessingMode(backend,
args,2);
final int missingConfidenceMode =
parseParamMissingConfidenceMode(backend, args,2);
@@ -125,8 +127,8 @@ public class SuggestionFunction implemen
List<Resource> result) {
List<Entry<Double,Resource>> suggestions = new
ArrayList<Entry<Double,Resource>>();
for(Resource annotation : annotations){
- for(Resource suggestion : suggestionSelector.select(backend,
annotation)){
- Collection<Resource> cs = confidenceSelector.select(backend,
suggestion);
+ for(Resource suggestion : suggestionSelector.select(backend,
annotation, null, null)){
+ Collection<Resource> cs = confidenceSelector.select(backend,
suggestion, null, null);
Double confidence = !cs.isEmpty() ?
backend.doubleValue(cs.iterator().next()) :
missingConfidenceMode == MISSING_CONFIDENCE_FILTER ?
null : missingConfidenceMode ==
MISSING_CONFIDENCE_FIRST ?
@@ -143,7 +145,7 @@ public class SuggestionFunction implemen
if(resultSelector == null){
result.add(suggestion.getValue());
} else {
- result.addAll(resultSelector.select(backend,
suggestion.getValue()));
+ result.addAll(resultSelector.select(backend,
suggestion.getValue(), null, null));
}
}
}
@@ -226,5 +228,16 @@ public class SuggestionFunction implemen
return name;
}
+ @Override
+ public String getSignature() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ @Override
+ public String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: stanbol/branches/STANBOL-748/entityhub/jersey/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/entityhub/jersey/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/entityhub/jersey/pom.xml (original)
+++ stanbol/branches/STANBOL-748/entityhub/jersey/pom.xml Sun Sep 23 10:36:04
2012
@@ -119,7 +119,7 @@
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
+ <artifactId>ldpath-core</artifactId>
</dependency>
<dependency>
Modified: stanbol/branches/STANBOL-748/entityhub/ldpath/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/entityhub/ldpath/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/entityhub/ldpath/pom.xml (original)
+++ stanbol/branches/STANBOL-748/entityhub/ldpath/pom.xml Sun Sep 23 10:36:04
2012
@@ -95,7 +95,7 @@
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
+ <artifactId>ldpath-core</artifactId>
</dependency>
<!-- generic tax -->
Modified:
stanbol/branches/STANBOL-748/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
---
stanbol/branches/STANBOL-748/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
(original)
+++
stanbol/branches/STANBOL-748/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
Sun Sep 23 10:36:04 2012
@@ -409,12 +409,12 @@
<bundle> <!-- LD Path -->
<groupId>at.newmedialab.ldpath</groupId>
<artifactId>ldpath-api</artifactId>
- <version>0.9.5</version>
+ <version>0.9.12</version>
</bundle>
<bundle>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
- <version>0.9.5</version>
+ <artifactId>ldpath-core</artifactId>
+ <version>0.9.12</version>
</bundle>
<bundle>
<groupId>org.apache.stanbol</groupId>
Modified: stanbol/branches/STANBOL-748/parent/pom.xml
URL:
http://svn.apache.org/viewvc/stanbol/branches/STANBOL-748/parent/pom.xml?rev=1389004&r1=1389001&r2=1389004&view=diff
==============================================================================
--- stanbol/branches/STANBOL-748/parent/pom.xml (original)
+++ stanbol/branches/STANBOL-748/parent/pom.xml Sun Sep 23 10:36:04 2012
@@ -1138,12 +1138,12 @@
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
<artifactId>ldpath-api</artifactId>
- <version>0.9.5</version>
+ <version>0.9.12</version>
</dependency>
<dependency>
<groupId>at.newmedialab.ldpath</groupId>
- <artifactId>ldpath-core-bundle</artifactId>
- <version>0.9.5</version>
+ <artifactId>ldpath-core</artifactId>
+ <version>0.9.12</version>
</dependency>
<!-- Apache Tika -->