public List<OWLAnnotation> handleConflict(OWLAnnotationProperty property, Collection<OWLAnnotation> ontologyAnnotations) throws AnnotationCardinalityException { if (ontologyAnnotations.size() > 1) { String tag = Owl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.log(Level.WARNING, "Fixing multiple ontolgy annotations with, tag: " + tag); return Collections.singletonList(ontologyAnnotations.iterator().next()); } 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<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<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<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); } };
public List<OWLAnnotationAssertionAxiom> handleConflict(OWLEntity entity, OWLAnnotationProperty property, Collection<OWLAnnotationAssertionAxiom> annotations) throws AnnotationCardinalityException { if (annotations.size() > 1) { String tag = Owl2Obo.owlObjectToTag(property); if (tag == null) { tag = property.getIRI().toString(); } // take the first one in the collection // (may be random) LOGGER.log(Level.WARNING, "Fixing multiple " + tag + " tags for entity: " + entity.getIRI()); return Collections.singletonList(annotations.iterator().next()); } throw new AnnotationCardinalityException("Could not resolve conflict for property: "+property); }