Permalink
Browse files

merging wikier code and updating jena

  • Loading branch information...
1 parent 9c2826b commit d4fc7224b444d82e62cc2abb0be119b5860af55c fadmaa committed May 14, 2012
View
@@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/grefine-all/server/lib/servlet-api-2.5.jar" sourcepath="/grefine-all/server/lib-src/servlet-api-2.5-sources.jar"/>
<classpathentry kind="lib" path="/grefine-all/main/webapp/WEB-INF/lib/butterfly-trunk.jar" sourcepath="/grefine-all/main/webapp/WEB-INF/lib-src/butterfly-trunk.jar"/>
<classpathentry kind="lib" path="/grefine-all/main/tests/server/lib/testng-5.12.1.jar"/>
@@ -41,23 +40,25 @@
<classpathentry kind="lib" path="/grefine-all/server/lib/jetty-6.1.22.jar"/>
<classpathentry kind="lib" path="/grefine-all/server/lib/jetty-util-6.1.22.jar"/>
<classpathentry kind="lib" path="/grefine-all/main/tests/server/lib/mockito-all-1.8.4.jar"/>
- <classpathentry kind="lib" path="test-libs/org.springframework.core-3.0.4.RELEASE.jar"/>
- <classpathentry kind="lib" path="test-libs/org.springframework.test-3.0.4.RELEASE.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/lucene-core-3.0.1.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/guava-r07.jar"/>
<classpathentry kind="lib" path="/grefine-all/main/webapp/WEB-INF/lib/jackson-core-asl-1.8.6.jar"/>
- <classpathentry kind="lib" path="module/MOD-INF/lib/iri-0.8.jar"/>
- <classpathentry kind="lib" path="module/MOD-INF/lib/icu4j-3.4.4.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/simmetrics_jar_v1_6_2_d07_02_07.jar"/>
- <classpathentry kind="lib" path="module/MOD-INF/lib/fadmaa-ngram-arq-2.8.5.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/apache-mime4j-0.6.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/lucene-analyzers-3.0.1.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/java-rdfa-0.4.1.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/htmlparser-1.3.jar"/>
<classpathentry kind="lib" path="/grefine-all/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar"/>
<classpathentry kind="lib" path="module/MOD-INF/lib/jackson-mapper-asl-1.8.6.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/grefine-all"/>
- <classpathentry kind="lib" path="module/MOD-INF/lib/hacked-jena-2.6.4.jar"/>
- <classpathentry kind="lib" path="module/MOD-INF/lib/hacked-xercesImpl-2.7.1.jar"/>
+ <classpathentry kind="lib" path="module/MOD-INF/lib/jena-arq-2.9.0-incubating.jar"/>
+ <classpathentry kind="lib" path="module/MOD-INF/lib/jena-core-2.7.0-incubating.jar"/>
+ <classpathentry kind="lib" path="module/MOD-INF/lib/jena-iri-0.9.0-incubating.jar"/>
+ <classpathentry kind="lib" path="module/MOD-INF/lib/jena-larq-1.0.0-incubating.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="output" path="module/MOD-INF/classes"/>
</classpath>
View
@@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@@ -13,5 +18,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,9 @@
import java.io.FileOutputStream;
import java.io.IOException;
+import org.apache.jena.larq.IndexBuilderString;
+import org.apache.jena.larq.IndexLARQ;
+import org.apache.jena.larq.LARQ;
import org.json.JSONException;
import org.json.JSONWriter;
@@ -13,9 +16,6 @@
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.query.Syntax;
-import com.hp.hpl.jena.query.larq.IndexBuilderString;
-import com.hp.hpl.jena.query.larq.IndexLARQ;
-import com.hp.hpl.jena.query.larq.LARQ;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
@@ -63,15 +63,14 @@ public DumpQueryExecutor(Model m){
public DumpQueryExecutor(Model m, String propertyUri, boolean ngramIndex,int minGram, int maxGram){
loaded = true;
- LARQ.setMinGram(minGram);LARQ.setMaxGram(maxGram);
this.model = m;
this.propertyUri = propertyUri;
IndexBuilderString larqBuilder;
if(propertyUri != null){
Property p = model.getProperty(propertyUri);
- larqBuilder= new IndexBuilderString(p,ngramIndex?LARQ.NGRAM_INDEX:LARQ.STANDARD_INDEX) ;
+ larqBuilder= new IndexBuilderString(p) ;
}else{
- larqBuilder= new IndexBuilderString(ngramIndex?LARQ.NGRAM_INDEX:LARQ.STANDARD_INDEX) ;
+ larqBuilder= new IndexBuilderString() ;
}
larqBuilder.indexStatements(model.listStatements()) ;
larqBuilder.closeWriter() ;
@@ -118,7 +117,7 @@ public synchronized void initialize(FileInputStream in) {
larqBuilder = new IndexBuilderString() ;
}else{
Property p = model.getProperty(propertyUri);
- larqBuilder = new IndexBuilderString(p,LARQ.STANDARD_INDEX) ;
+ larqBuilder = new IndexBuilderString(p);
}
larqBuilder.indexStatements(model.listStatements()) ;
@@ -137,4 +136,4 @@ public void save(String serviceId, FileOutputStream out) throws IOException {
model.write(out, "TTL");
out.close();
}
-}
+}

0 comments on commit d4fc722

Please sign in to comment.