@Override public List<OWLAnnotation> handleConflict(OWLAnnotationProperty property, Collection<OWLAnnotation> ontologyAnnotations) { if (ontologyAnnotations.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple ontolgy annotations with, tag: {}", tag); return listOfFirst(ontologyAnnotations); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); } };
@Override public List<OWLAnnotation> handleConflict(OWLAnnotationProperty property, Collection<OWLAnnotation> ontologyAnnotations) { if (ontologyAnnotations.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple ontolgy annotations with, tag: {}", tag); return listOfFirst(ontologyAnnotations); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); } };
@Override public List<OWLAnnotation> handleConflict(OWLAnnotationProperty property, Collection<OWLAnnotation> ontologyAnnotations) { if (ontologyAnnotations.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple ontolgy annotations with, tag: {}", tag); return listOfFirst(ontologyAnnotations); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); } };
@Override public List<OWLAnnotation> handleConflict(OWLAnnotationProperty property, Collection<OWLAnnotation> ontologyAnnotations) { if (ontologyAnnotations.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple ontolgy annotations with, tag: {}", tag); return listOfFirst(ontologyAnnotations); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); } };
@Override public List<OWLAnnotationAssertionAxiom> handleConflict(OWLEntity entity, OWLAnnotationProperty property, Collection<OWLAnnotationAssertionAxiom> axioms) { if (axioms.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple {} tags for entity: {}", tag, entity.getIRI()); return listOfFirst(axioms); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); }
@Override public List<OWLAnnotationAssertionAxiom> handleConflict(OWLEntity entity, OWLAnnotationProperty property, Collection<OWLAnnotationAssertionAxiom> axioms) { if (axioms.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple {} tags for entity: {}", tag, entity.getIRI()); return listOfFirst(axioms); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); }
@Override public List<OWLAnnotationAssertionAxiom> handleConflict(OWLEntity entity, OWLAnnotationProperty property, Collection<OWLAnnotationAssertionAxiom> axioms) { if (axioms.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple {} tags for entity: {}", tag, entity.getIRI()); return listOfFirst(axioms); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); }
@Override public List<OWLAnnotationAssertionAxiom> handleConflict(OWLEntity entity, OWLAnnotationProperty property, Collection<OWLAnnotationAssertionAxiom> axioms) { if (axioms.size() > 1) { String tag = OWLAPIOwl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.info("Fixing multiple {} tags for entity: {}", tag, entity.getIRI()); return listOfFirst(axioms); } throw new AnnotationCardinalityException( "Could not resolve conflict for property: " + property); }
clause.setXrefs(new ArrayList<Xref>()); for (OWLAnnotation aan : qualifiers) { String propId = owlObjectToTag(aan.getProperty()); if (OboFormatTag.TAG_XREF.getTag().equals(propId)) { OWLAnnotationValue v = aan.getValue();
clause.setXrefs(new ArrayList<Xref>()); for (OWLAnnotation aan : qualifiers) { String propId = owlObjectToTag(aan.getProperty()); if (OboFormatTag.TAG_XREF.getTag().equals(propId)) { OWLAnnotationValue v = aan.getValue();
clause.setXrefs(new ArrayList<Xref>()); for (OWLAnnotation aan : qualifiers) { String propId = owlObjectToTag(aan.getProperty()); if (OboFormatTag.TAG_XREF.getTag().equals(propId)) { OWLAnnotationValue v = aan.getValue();
clause.setXrefs(new ArrayList<Xref>()); for (OWLAnnotation aan : qualifiers) { String propId = owlObjectToTag(aan.getProperty()); if (OboFormatTag.TAG_XREF.getTag().equals(propId)) { OWLAnnotationValue v = aan.getValue();
/** * Adds the qualifiers. * * @param c the c * @param qualifier the qualifier */ protected static void addQualifiers(Clause c, OWLAnnotation qualifier) { String prop = owlObjectToTag(qualifier.getProperty()); if (prop == null) { prop = qualifier.getProperty().getIRI().toString(); } if (SKIPPED_QUALIFIERS.contains(prop)) { return; } String value = qualifier.getValue().toString(); if (qualifier.getValue() instanceof OWLLiteral) { value = ((OWLLiteral) qualifier.getValue()).getLiteral(); } else if (qualifier.getValue().isIRI()) { value = getIdentifier((IRI) qualifier.getValue()); } QualifierValue qv = new QualifierValue(prop, value); c.addQualifierValue(qv); }
/** * Adds the qualifiers. * * @param c the c * @param qualifier the qualifier */ protected static void addQualifiers(Clause c, OWLAnnotation qualifier) { String prop = owlObjectToTag(qualifier.getProperty()); if (prop == null) { prop = qualifier.getProperty().getIRI().toString(); } if (SKIPPED_QUALIFIERS.contains(prop)) { return; } String value = qualifier.getValue().toString(); if (qualifier.getValue() instanceof OWLLiteral) { value = ((OWLLiteral) qualifier.getValue()).getLiteral(); } else if (qualifier.getValue().isIRI()) { value = getIdentifier((IRI) qualifier.getValue()); } QualifierValue qv = new QualifierValue(prop, value); c.addQualifierValue(qv); }
/** * Adds the qualifiers. * * @param c the c * @param qualifier the qualifier */ protected static void addQualifiers(Clause c, OWLAnnotation qualifier) { String prop = owlObjectToTag(qualifier.getProperty()); if (prop == null) { prop = qualifier.getProperty().getIRI().toString(); } if (SKIPPED_QUALIFIERS.contains(prop)) { return; } String value = qualifier.getValue().toString(); if (qualifier.getValue() instanceof OWLLiteral) { value = ((OWLLiteral) qualifier.getValue()).getLiteral(); } else if (qualifier.getValue().isIRI()) { value = getIdentifier((IRI) qualifier.getValue()); } QualifierValue qv = new QualifierValue(prop, value); c.addQualifierValue(qv); }
/** * Adds the qualifiers. * * @param c the c * @param qualifier the qualifier */ protected static void addQualifiers(Clause c, OWLAnnotation qualifier) { String prop = owlObjectToTag(qualifier.getProperty()); if (prop == null) { prop = qualifier.getProperty().getIRI().toString(); } if (SKIPPED_QUALIFIERS.contains(prop)) { return; } String value = qualifier.getValue().toString(); if (qualifier.getValue() instanceof OWLLiteral) { value = ((OWLLiteral) qualifier.getValue()).getLiteral(); } else if (qualifier.getValue().isIRI()) { value = getIdentifier((IRI) qualifier.getValue()); } QualifierValue qv = new QualifierValue(prop, value); c.addQualifierValue(qv); }
for (OWLAnnotation ann : collect) { OWLAnnotationProperty property = ann.getProperty(); String tagString = owlObjectToTag(property); if (OboFormatTag.TAG_COMMENT.getTag().equals(tagString)) { property = df.getOWLAnnotationProperty(
for (OWLAnnotation ann : collect) { OWLAnnotationProperty property = ann.getProperty(); String tagString = owlObjectToTag(property); if (OboFormatTag.TAG_COMMENT.getTag().equals(tagString)) { property = df.getOWLAnnotationProperty(
for (OWLAnnotation ann : collect) { OWLAnnotationProperty property = ann.getProperty(); String tagString = owlObjectToTag(property); if (OboFormatTag.TAG_COMMENT.getTag().equals(tagString)) { property = df.getOWLAnnotationProperty(
for (OWLAnnotation ann : collect) { OWLAnnotationProperty property = ann.getProperty(); String tagString = owlObjectToTag(property); if (OboFormatTag.TAG_COMMENT.getTag().equals(tagString)) { property = df.getOWLAnnotationProperty(