public ObjectPropertyAssertion translate(OWLObjectPropertyAssertionAxiom ax, OntologyVocabularyCategory<ObjectPropertyExpression> objectProperties) throws TranslationException, InconsistentOntologyException { IRIConstant c1 = getIndividual(ax.getSubject()); IRIConstant c2 = getIndividual(ax.getObject()); ObjectPropertyExpression ope = getPropertyExpression(ax.getProperty(), objectProperties); return OntologyBuilderImpl.createObjectPropertyAssertion(ope, c1, c2); }
public ClassAssertion translate(OWLClassAssertionAxiom ax, OntologyVocabularyCategory<OClass> classes) throws TranslationException, InconsistentOntologyException { OWLClassExpression classExpression = ax.getClassExpression(); if (!(classExpression instanceof OWLClass)) throw new OWLAPITranslatorOWL2QL.TranslationException("complex class expressions are not supported"); OClass concept = getOClass((OWLClass) classExpression, classes); IRIConstant c = getIndividual(ax.getIndividual()); return OntologyBuilderImpl.createClassAssertion(concept, c); }
public DataPropertyAssertion translate(OWLDataPropertyAssertionAxiom ax, OntologyVocabularyCategory<DataPropertyExpression> dataProperties) throws TranslationException, InconsistentOntologyException { IRIConstant c1 = getIndividual(ax.getSubject()); ValueConstant c2 = getValueOfLiteral(ax.getObject()); DataPropertyExpression dpe = getPropertyExpression(ax.getProperty(), dataProperties); return OntologyBuilderImpl.createDataPropertyAssertion(dpe, c1, c2); }
public AnnotationAssertion translate(OWLAnnotationAssertionAxiom ax, OntologyVocabularyCategory<AnnotationProperty> annotationProperties) throws TranslationException, InconsistentOntologyException { IRIConstant c1 = getIndividual(ax.getSubject()); Constant c2 = getValue(ax.getValue()); AnnotationProperty ap = getPropertyExpression(ax.getProperty(), annotationProperties); return OntologyBuilderImpl.createAnnotationAssertion(ap, c1, c2); }