private void checkSignature(AnnotationProperty prop) { if (!annotationProperties.contains(prop.getName())) throw new IllegalArgumentException(ANNOTATION_PROPERTY_NOT_FOUND + prop); }
private static Statement createStatement(AnnotationAssertion assertion) { Constant constant = assertion.getValue(); if (constant instanceof ValueConstant) { return fact.createStatement(getResource(assertion.getSubject()), createURI(assertion.getProperty().getIRI().getIRIString()), getLiteral((ValueConstant) constant)); } else if (constant instanceof ObjectConstant) { return fact.createStatement(getResource(assertion.getSubject()), createURI(assertion.getProperty().getIRI().getIRIString()), getResource((ObjectConstant) constant)); } else { throw new RuntimeException("Unsupported constant for an annotation property!" + constant); } }
private static Statement createStatement(AnnotationAssertion assertion) { Constant constant = assertion.getValue(); if (constant instanceof ValueConstant) { return fact.createStatement(getResource(assertion.getSubject()), createURI(assertion.getProperty().getPredicate().getName()), getLiteral((ValueConstant) constant)); } else if (constant instanceof ObjectConstant) { return fact.createStatement(getResource(assertion.getSubject()), createURI(assertion.getProperty().getPredicate().getName()), getResource((ObjectConstant) constant)); } else { throw new RuntimeException("Unsupported constant for an annotation property!" + constant); } }
IRI propertyIRI = aa.getProperty().getIRI();
Predicate p = aa.getProperty().getPredicate();
private void checkSignature(AnnotationProperty prop) { if (!annotationProperties.contains(prop.getName())) throw new IllegalArgumentException(ANNOTATION_PROPERTY_NOT_FOUND + prop); }
public OWLAnnotationAssertionAxiom translate(AnnotationAssertion opa) { IRI roleIRI = IRI.create(opa.getProperty().getName()); OWLAnnotationProperty property = dataFactory.getOWLAnnotationProperty(roleIRI); OWLAnnotationSubject subject = translateAnnotationSubject(opa.getSubject()); OWLAnnotationValue object = translateAnnotationValue(opa.getValue()); return dataFactory.getOWLAnnotationAssertionAxiom(property, subject, object); }