various fixes
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1128 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
762a9f13eb
commit
f28c1607f7
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>rdf-exporter</name>
|
<name>gridworks-rdf-exporter</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
|
@ -20,7 +20,6 @@ import com.metaweb.gridworks.browsing.RowVisitor;
|
|||||||
import com.metaweb.gridworks.commands.Command;
|
import com.metaweb.gridworks.commands.Command;
|
||||||
import com.metaweb.gridworks.model.Project;
|
import com.metaweb.gridworks.model.Project;
|
||||||
import com.metaweb.gridworks.model.Row;
|
import com.metaweb.gridworks.model.Row;
|
||||||
import com.metaweb.gridworks.rdf.ConstantBlankNode;
|
|
||||||
import com.metaweb.gridworks.rdf.Node;
|
import com.metaweb.gridworks.rdf.Node;
|
||||||
import com.metaweb.gridworks.rdf.RdfSchema;
|
import com.metaweb.gridworks.rdf.RdfSchema;
|
||||||
import com.metaweb.gridworks.util.ParsingUtilities;
|
import com.metaweb.gridworks.util.ParsingUtilities;
|
||||||
@ -47,11 +46,10 @@ public class PreviewRdfCommand extends Command {
|
|||||||
Node root = schema.getRoot();
|
Node root = schema.getRoot();
|
||||||
|
|
||||||
Resource[] blanks = new Resource[schema.get_blanks().size()];
|
Resource[] blanks = new Resource[schema.get_blanks().size()];
|
||||||
int i=0;
|
for (int i = 0; i < blanks.length; i++) {
|
||||||
for (ConstantBlankNode b : schema.get_blanks()){
|
|
||||||
blanks[i] = model.createResource();
|
blanks[i] = model.createResource();
|
||||||
i +=1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowVisitor visitor = new RdfRowVisitor(model, baseUri, root,blanks,20);
|
RowVisitor visitor = new RdfRowVisitor(model, baseUri, root,blanks,20);
|
||||||
|
|
||||||
filteredRows.accept(project, visitor);
|
filteredRows.accept(project, visitor);
|
||||||
|
@ -6,7 +6,6 @@ import java.io.Writer;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
import com.hp.hpl.jena.rdf.model.Resource;
|
import com.hp.hpl.jena.rdf.model.Resource;
|
||||||
@ -16,7 +15,6 @@ import com.metaweb.gridworks.browsing.RowVisitor;
|
|||||||
import com.metaweb.gridworks.exporters.Exporter;
|
import com.metaweb.gridworks.exporters.Exporter;
|
||||||
import com.metaweb.gridworks.model.Project;
|
import com.metaweb.gridworks.model.Project;
|
||||||
import com.metaweb.gridworks.model.Row;
|
import com.metaweb.gridworks.model.Row;
|
||||||
import com.metaweb.gridworks.rdf.ConstantBlankNode;
|
|
||||||
import com.metaweb.gridworks.rdf.Node;
|
import com.metaweb.gridworks.rdf.Node;
|
||||||
import com.metaweb.gridworks.rdf.RdfSchema;
|
import com.metaweb.gridworks.rdf.RdfSchema;
|
||||||
import com.metaweb.gridworks.rdf.Util;
|
import com.metaweb.gridworks.rdf.Util;
|
||||||
@ -37,11 +35,10 @@ public class RdfExporter implements Exporter{
|
|||||||
Node root = schema.getRoot();
|
Node root = schema.getRoot();
|
||||||
|
|
||||||
Resource[] blanks = new Resource[schema.get_blanks().size()];
|
Resource[] blanks = new Resource[schema.get_blanks().size()];
|
||||||
int i=0;
|
for (int i = 0; i < blanks.length; i++) {
|
||||||
for (ConstantBlankNode b : schema.get_blanks()){
|
|
||||||
blanks[i] = model.createResource();
|
blanks[i] = model.createResource();
|
||||||
i +=1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowVisitor visitor = new RdfRowVisitor(model, baseUri, root,blanks);
|
RowVisitor visitor = new RdfRowVisitor(model, baseUri, root,blanks);
|
||||||
FilteredRows filteredRows = engine.getAllFilteredRows();
|
FilteredRows filteredRows = engine.getAllFilteredRows();
|
||||||
filteredRows.accept(project, visitor);
|
filteredRows.accept(project, visitor);
|
||||||
@ -57,12 +54,10 @@ public class RdfExporter implements Exporter{
|
|||||||
Node root = schema.getRoot();
|
Node root = schema.getRoot();
|
||||||
|
|
||||||
Resource[] blanks = new Resource[schema.get_blanks().size()];
|
Resource[] blanks = new Resource[schema.get_blanks().size()];
|
||||||
int i = 0;
|
for (int i = 0; i < blanks.length; i++) {
|
||||||
|
|
||||||
for (ConstantBlankNode b : schema.get_blanks()){
|
|
||||||
blanks[i] = model.createResource();
|
blanks[i] = model.createResource();
|
||||||
i +=1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowVisitor visitor = new RdfRowVisitor(model, baseUri, root,blanks);
|
RowVisitor visitor = new RdfRowVisitor(model, baseUri, root,blanks);
|
||||||
FilteredRows filteredRows = engine.getAllFilteredRows();
|
FilteredRows filteredRows = engine.getAllFilteredRows();
|
||||||
filteredRows.accept(project, visitor);
|
filteredRows.accept(project, visitor);
|
||||||
|
Loading…
Reference in New Issue
Block a user