@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { Matcher matcher = PATTERN.matcher(value); OWLDataFactory df = getDataFactory(); String annotationValue; Set<OWLAnnotation> xrefAnnotations = Collections.emptySet(); if (matcher.matches()) { annotationValue = matcher.group(QUOTED_STRING_CONTENT_GROUP); xrefAnnotations = getXRefAnnotations(matcher); } else { annotationValue = getUnquotedString(value); } IRI propertyIRI = getTagIRI(getTagName()); OWLAnnotationProperty property = df.getOWLAnnotationProperty(propertyIRI); OWLEntity currentEntity = getConsumer().getCurrentEntity(); OWLLiteral literal = df.getOWLLiteral(annotationValue); OWLAnnotationAssertionAxiom ax = df .getOWLAnnotationAssertionAxiom(property, currentEntity.getIRI(), literal, xrefAnnotations); applyChange(new AddAxiom(getOntology(), ax)); }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { Matcher matcher = PATTERN.matcher(value); OWLDataFactory df = getDataFactory(); String annotationValue; Set<OWLAnnotation> xrefAnnotations = Collections.emptySet(); if (matcher.matches()) { annotationValue = matcher.group(QUOTED_STRING_CONTENT_GROUP); xrefAnnotations = getXRefAnnotations(matcher); } else { annotationValue = getUnquotedString(value); } IRI propertyIRI = getTagIRI(getTagName()); OWLAnnotationProperty property = df.getOWLAnnotationProperty(propertyIRI); OWLEntity currentEntity = getConsumer().getCurrentEntity(); OWLLiteral literal = df.getOWLLiteral(annotationValue); OWLAnnotationAssertionAxiom ax = df .getOWLAnnotationAssertionAxiom(property, currentEntity.getIRI(), literal, xrefAnnotations); applyChange(new AddAxiom(getOntology(), ax)); }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { Matcher matcher = PATTERN.matcher(value); OWLDataFactory df = getDataFactory(); String annotationValue; Set<OWLAnnotation> xrefAnnotations = Collections.emptySet(); if (matcher.matches()) { annotationValue = matcher.group(QUOTED_STRING_CONTENT_GROUP); xrefAnnotations = getXRefAnnotations(matcher); } else { annotationValue = getUnquotedString(value); } IRI propertyIRI = getTagIRI(getTagName()); OWLAnnotationProperty property = df.getOWLAnnotationProperty(propertyIRI); OWLEntity currentEntity = getConsumer().getCurrentEntity(); OWLLiteral literal = df.getOWLLiteral(annotationValue); OWLAnnotationAssertionAxiom ax = df .getOWLAnnotationAssertionAxiom(property, currentEntity.getIRI(), literal, xrefAnnotations); applyChange(new AddAxiom(getOntology(), ax)); }