Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
szeke committed Dec 21, 2013
2 parents 89630a4 + ea27d7b commit d9e1267
Show file tree
Hide file tree
Showing 38 changed files with 4,409 additions and 728 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ src/main/scripts/Lib/IDCTClassifier$py.class
nbactions.xml
*.n3
*.ttl

*.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ public UpdateContainer doIt(Workspace workspace) throws CommandException {
try {
semanticModel.writeJson(ModelingConfiguration.getModelsJsonDir() +
semanticModel.getName() +
".json");
".model.json");
} catch (Exception e) {
logger.error("error in exporting the model to JSON!");
// e.printStackTrace();
}
try {
semanticModel.writeGraphviz(ModelingConfiguration.getModelsGraphvizDir() +
semanticModel.getName() +
".dot", false, false);
".model.dot", false, false);
} catch (Exception e) {
logger.error("error in exporting the model to GRAPHVIZ!");
// e.printStackTrace();
Expand Down Expand Up @@ -194,12 +194,11 @@ public UpdateContainer doIt(Workspace workspace) throws CommandException {

// Generate the KR2RML data structures for the RDF generation
final ErrorReport errorReport = new ErrorReport();
OntologyManager ontMgr = workspace.getOntologyManager();
KR2RMLMappingGenerator mappingGen = new KR2RMLMappingGenerator(ontMgr, alignment,
KR2RMLMappingGenerator mappingGen = new KR2RMLMappingGenerator(workspace, alignment,
worksheet.getSemanticTypes(), prefix, namespace, true, errorReport);

// Write the model
writeModel(workspace, ontMgr, mappingGen, worksheet, modelFileLocalPath);
writeModel(workspace, workspace.getOntologyManager(), mappingGen, worksheet, modelFileLocalPath);

// Write the model to the triple store
TripleStoreUtil utilObj = new TripleStoreUtil();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import edu.isi.karma.modeling.Prefixes;
import edu.isi.karma.modeling.alignment.Alignment;
import edu.isi.karma.modeling.alignment.AlignmentManager;
import edu.isi.karma.modeling.ontology.OntologyManager;
import edu.isi.karma.rep.Worksheet;
import edu.isi.karma.rep.Workspace;
import edu.isi.karma.util.HTTPUtil;
Expand Down Expand Up @@ -200,12 +199,11 @@ public UpdateContainer doIt(Workspace workspace) throws CommandException {
Worksheet worksheet = workspace.getWorksheet(worksheetId);
// Generate the KR2RML data structures for the RDF generation
final ErrorReport errorReport = new ErrorReport();
OntologyManager ontMgr = workspace.getOntologyManager();
KR2RMLMappingGenerator mappingGen = new KR2RMLMappingGenerator(ontMgr, alignment,
KR2RMLMappingGenerator mappingGen = new KR2RMLMappingGenerator(workspace, alignment,
worksheet.getSemanticTypes(), prefix, namespace, true, errorReport);

SPARQLGeneratorUtil genObj = new SPARQLGeneratorUtil();
String query = genObj.get_query(mappingGen.getR2RMLMapping(), this.modelContext);
String query = genObj.get_query(mappingGen.getKR2RMLMapping(), this.modelContext);

// execute the query on the triple store
TripleStoreUtil utilObj = new TripleStoreUtil();
Expand Down
Loading

0 comments on commit d9e1267

Please sign in to comment.