NIHVIVO-1983 code change to add vitro:Link class while ABox extraction.
This commit is contained in:
parent
a5ed018e66
commit
080f0a818c
1 changed files with 7 additions and 5 deletions
|
@ -257,8 +257,8 @@ private final OntModelSpec DEFAULT_ONT_MODEL_SPEC = OntModelSpec.OWL_MEM;
|
||||||
//OntModel ontModel = ( inputModel instanceof OntModel )
|
//OntModel ontModel = ( inputModel instanceof OntModel )
|
||||||
//? (OntModel)inputModel
|
//? (OntModel)inputModel
|
||||||
//: ModelFactory.createOntologyModel( DEFAULT_ONT_MODEL_SPEC, inputModel );
|
//: ModelFactory.createOntologyModel( DEFAULT_ONT_MODEL_SPEC, inputModel );
|
||||||
OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
//OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
|
||||||
Model model = ModelFactory.createDefaultModel();
|
/*Model model = ModelFactory.createDefaultModel();
|
||||||
String getStatements =
|
String getStatements =
|
||||||
"CONSTRUCT " +
|
"CONSTRUCT " +
|
||||||
"{ ?p ?o ?a \n" +
|
"{ ?p ?o ?a \n" +
|
||||||
|
@ -274,7 +274,8 @@ private final OntModelSpec DEFAULT_ONT_MODEL_SPEC = OntModelSpec.OWL_MEM;
|
||||||
finally{
|
finally{
|
||||||
dataset.getLock().leaveCriticalSection();
|
dataset.getLock().leaveCriticalSection();
|
||||||
}
|
}
|
||||||
ontModel.add(model.listStatements());
|
ontModel.add(model.listStatements());*/
|
||||||
|
OntModel ontModel = extractTBox(dataset, null, graphURI);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -284,8 +285,9 @@ private final OntModelSpec DEFAULT_ONT_MODEL_SPEC = OntModelSpec.OWL_MEM;
|
||||||
while ( classIt.hasNext() ) {
|
while ( classIt.hasNext() ) {
|
||||||
|
|
||||||
OntClass ontClass = (OntClass) classIt.next();
|
OntClass ontClass = (OntClass) classIt.next();
|
||||||
if ( !(ontClass.getNameSpace().startsWith(OWL.getURI()) )
|
//if ( !(ontClass.getNameSpace().startsWith(OWL.getURI()) )
|
||||||
&& !(ontClass.getNameSpace().startsWith(VitroVocabulary.vitroURI)) ) {
|
// && !(ontClass.getNameSpace().startsWith(VitroVocabulary.vitroURI)) ) {
|
||||||
|
if(!(ontClass.getNameSpace().startsWith(OWL.getURI()))){
|
||||||
|
|
||||||
String queryStr = makeDescribeQueryStr( ontClass.getURI(), null, graphURI );
|
String queryStr = makeDescribeQueryStr( ontClass.getURI(), null, graphURI );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue