@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<>(); 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 = VALUEPATTERN.matcher(value); if (matcher.matches()) { OWLDataFactory df = getDataFactory(); OWLAnnotationProperty property = getSynonymAnnotationProperty(matcher); Set<OWLAnnotation> annotations = new HashSet<>(); 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 = VALUEPATTERN.matcher(value); if (matcher.matches()) { OWLDataFactory df = getDataFactory(); OWLAnnotationProperty property = getSynonymAnnotationProperty(matcher); Set<OWLAnnotation> annotations = new HashSet<>(); 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)); }
@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) { getConsumer().setCurrentId(value); OWLEntity entity = getConsumer().getCurrentEntity(); applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { getConsumer().setCurrentId(value); OWLEntity entity = getConsumer().getCurrentEntity(); applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { getConsumer().setCurrentId(value); OWLEntity entity = getConsumer().getCurrentEntity(); applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { HasIRI subject = getConsumer().getCurrentEntity(); OWLAnnotationProperty property = getDataFactory() .getOWLAnnotationProperty(OBOVocabulary.ALT_ID); IRI object = getIRIFromOBOId(value); OWLAnnotationAssertionAxiom ax = getDataFactory() .getOWLAnnotationAssertionAxiom(property, subject.getIRI(), object); applyChange(new AddAxiom(getOntology(), ax)); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { HasIRI subject = getConsumer().getCurrentEntity(); OWLAnnotationProperty property = getDataFactory() .getOWLAnnotationProperty(OBOVocabulary.ALT_ID); IRI object = getIRIFromOBOId(value); OWLAnnotationAssertionAxiom ax = getDataFactory() .getOWLAnnotationAssertionAxiom(property, subject.getIRI(), object); applyChange(new AddAxiom(getOntology(), ax)); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { HasIRI subject = getConsumer().getCurrentEntity(); OWLAnnotationProperty property = getDataFactory() .getOWLAnnotationProperty(OBOVocabulary.ALT_ID); IRI object = getIRIFromOBOId(value); OWLAnnotationAssertionAxiom ax = getDataFactory() .getOWLAnnotationAssertionAxiom(property, subject.getIRI(), object); applyChange(new AddAxiom(getOntology(), ax)); } }