public void handle(String currentId, String value, String qualifierBlock, String comment) { Matcher matcher = valuePattern.matcher(value); if(matcher.matches()) { OWLDataFactory df = getDataFactory(); OWLAnnotationProperty property = getSynonymAnnotationProperty(matcher); Set<OWLAnnotation> annotations = new HashSet<OWLAnnotation>(); annotations.addAll(getSynonymTypeAnnotations(matcher)); annotations.addAll(getXRefAnnotations(matcher, df)); OWLEntity subject = getConsumer().getCurrentEntity(); String synonym = matcher.group(VALUE_GROUP); OWLLiteral synonymLiteral = df.getOWLLiteral(synonym); OWLAnnotationAssertionAxiom annoAssertion = df.getOWLAnnotationAssertionAxiom(property, subject.getIRI(), synonymLiteral, annotations); applyChange(new AddAxiom(getOntology(), annoAssertion)); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { Matcher matcher = valuePattern.matcher(value); if(matcher.matches()) { OWLDataFactory df = getDataFactory(); OWLAnnotationProperty property = getSynonymAnnotationProperty(matcher); Set<OWLAnnotation> annotations = new HashSet<OWLAnnotation>(); annotations.addAll(getSynonymTypeAnnotations(matcher)); annotations.addAll(getXRefAnnotations(matcher)); OWLEntity subject = getConsumer().getCurrentEntity(); String synonym = matcher.group(VALUE_GROUP); OWLLiteral synonymLiteral = df.getOWLLiteral(synonym); OWLAnnotationAssertionAxiom annoAssertion = df.getOWLAnnotationAssertionAxiom(property, subject.getIRI(), synonymLiteral, annotations); applyChange(new AddAxiom(getOntology(), annoAssertion)); } }
@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)); }
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, df); } 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)); }
public void handle(String id, String value) { getConsumer().setCurrentId(value); final OWLEntity entity = getConsumer().getCurrentEntity(); if (entity != null){ applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { getConsumer().setCurrentId(value); final OWLEntity entity = getConsumer().getCurrentEntity(); if (entity != null){ applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } } }
public void handle(String currentId, String value, String qualifierBlock, String comment) { getConsumer().setCurrentId(value); final OWLEntity entity = getConsumer().getCurrentEntity(); if (entity != null){ applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { IRI subject = getConsumer().getCurrentEntity().getIRI(); IRI annotationPropertyIRI = OBOVocabulary.ALT_ID.getIRI(); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(annotationPropertyIRI); IRI object = getIRIFromOBOId(value); OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(property, subject, object); applyChange(new AddAxiom(getOntology(), ax)); } }
public void handle(String currentId, String value, String qualifierBlock, String comment) { IRI subject = getConsumer().getCurrentEntity().getIRI(); IRI annotationPropertyIRI = OBOVocabulary.ALT_ID.getIRI(); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(annotationPropertyIRI); IRI object = getIRIFromOBOId(value); OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(property, subject, object); applyChange(new AddAxiom(getOntology(), ax)); } }