/** * creates an annotation property assertion (without checking any vocabulary) * * */ @Override public AnnotationAssertion createAnnotationAssertion(String propertyName, ObjectConstant o, Constant v) { AnnotationProperty ap = new AnnotationPropertyImpl(propertyName); return ofac.createAnnotationAssertion(ap, o, v); }
/** * creates a class assertion (without checking any vocabulary) * * @return null if it is top class ([C4], @see OntologyFactoryImpl) * @throws InconsistentOntologyException if it is the bottom class ([C4], @see OntologyFactoryImpl) */ @Override public ClassAssertion createClassAssertion(String className, ObjectConstant o) throws InconsistentOntologyException { OClass oc = new ClassImpl(className); return ofac.createClassAssertion(oc, o); }
/** * creates a data property assertion (without checking any vocabulary) * * @return null if it is top data property ([D4], @see OntologyFactoryImpl) * @throws InconsistentOntologyException if it is the bottom data property ([D4], @see OntologyFactoryImpl) */ @Override public DataPropertyAssertion createDataPropertyAssertion(String propertyName, ObjectConstant o1, ValueConstant o2) throws InconsistentOntologyException { DataPropertyExpression dpe = new DataPropertyExpressionImpl(propertyName); return ofac.createDataPropertyAssertion(dpe, o1, o2); }
public QuestDBClassicStore(String name, String tboxFile, QuestPreferences config) throws Exception { super(name); Ontology tbox = null; if (tboxFile == null) { OntologyVocabulary voc = ofac.createVocabulary(); tbox = ofac.createOntology(voc); } else { tbox = readOntology(tboxFile); } setup(tbox, config); }
public Ontology getOntology() { return ofac.createOntology(vb); }
/** * creates an object property assertion (without checking any vocabulary) * * @return null if it is top object property ([O4], @see OntologyFactoryImpl) * @throws InconsistentOntologyException if it is the bottom object property ([O4], @see OntologyFactoryImpl) */ @Override public ObjectPropertyAssertion createObjectPropertyAssertion(String propertyName, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { ObjectPropertyExpression ope = new ObjectPropertyExpressionImpl(propertyName); return ofac.createObjectPropertyAssertion(ope, o1, o2); }
private Ontology getTBox(Dataset dataset) throws Exception { // Merge default and named graphs to filter duplicates Set<URI> graphURIs = new HashSet<>(); graphURIs.addAll(dataset.getDefaultGraphs()); graphURIs.addAll(dataset.getNamedGraphs()); OntologyVocabulary vb = ofac.createVocabulary(); for (URI graphURI : graphURIs) { Ontology o = getOntology(graphURI, graphURI); vb.merge(o.getVocabulary()); // TODO: restore copying ontology axioms (it was copying from result into result, at least since July 2013) //for (SubPropertyOfAxiom ax : result.getSubPropertyAxioms()) // result.add(ax); //for (SubClassOfAxiom ax : result.getSubClassAxioms()) // result.add(ax); } Ontology result = ofac.createOntology(vb); return result; }
OntologyVocabulary voc = OntologyFactoryImpl.getInstance().createVocabulary(); tbox = OntologyFactoryImpl.getInstance().createOntology(voc); if (obdaModel.getSources().size() == 0) obdaModel.addSource(getMemOBDADataSource("MemH2"));