@Override public OWLAnnotation getAnnotatedAnnotation(Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(getProperty(), getValue(), Stream.concat(annotations(), annotations)); }
@Override public OWLAnnotation getOWLAnnotation(OWLAnnotationProperty property, OWLAnnotationValue value, Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(property, value, annotations); } }
@Override protected int compareObjectOfSameType(OWLObject object) { OWLAnnotation other = (OWLAnnotation) object; int diff = getProperty().compareTo(other.getProperty()); if (diff != 0) { return diff; } else { return getValue().compareTo(other.getValue()); } }
public static void serialize(SerializationStreamWriter streamWriter, OWLAnnotationImpl instance) throws SerializationException { streamWriter.writeObject(instance.getProperty()); streamWriter.writeObject(instance.getValue()); CustomFieldSerializerUtil.serializeSet(instance.getAnnotations(), streamWriter); }
@Override public OWLAnnotation getAnnotatedAnnotation(Collection<OWLAnnotation> annotations) { if (annotations.isEmpty()) { return this; } return getAnnotatedAnnotation(annotations.stream()); }
/** * Gets an annotation * * @param property the annotation property * @param value The annotation value * @param annotations Annotations on the annotation * @return The annotation on the specified property with the specified value */ public OWLAnnotation getOWLAnnotation(OWLAnnotationProperty property, OWLAnnotationValue value, Set<? extends OWLAnnotation> annotations) { return new OWLAnnotationImpl(this, property, value, annotations); }
@Override protected int compareObjectOfSameType(OWLObject object) { OWLAnnotation other = (OWLAnnotation) object; int diff = getProperty().compareTo(other.getProperty()); if (diff != 0) { return diff; } else { return getValue().compareTo(other.getValue()); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof OWLAnnotationImpl) { OWLAnnotationImpl other = (OWLAnnotationImpl) obj; return other.getProperty().equals(property) && other.getValue().equals(value) && other.anns.equals(anns); } if (obj instanceof OWLAnnotation) { OWLAnnotation other = (OWLAnnotation) obj; return other.getProperty().equals(property) && other.getValue().equals(value) && other.getAnnotations().equals(getAnnotations()); } return false; }
@Override public OWLAnnotation getAnnotatedAnnotation(Collection<OWLAnnotation> annotations) { if (annotations.isEmpty()) { return this; } return getAnnotatedAnnotation(annotations.stream()); }
@Override public OWLAnnotation getAnnotatedAnnotation(Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(getProperty(), getValue(), Stream.concat(annotations(), annotations)); }
@Override public OWLAnnotation getOWLAnnotation(OWLAnnotationProperty property, OWLAnnotationValue value, Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(property, value, annotations); } }
protected int compareObjectOfSameType(OWLObject object) { OWLAnnotation other = (OWLAnnotation) object; int diff = getProperty().compareTo(other.getProperty()); if (diff != 0) { return diff; } else { return getValue().compareTo(other.getValue()); } }
@Override public OWLAnnotation getAnnotatedAnnotation(Collection<OWLAnnotation> annotations) { if (annotations.isEmpty()) { return this; } return getAnnotatedAnnotation(annotations.stream()); }
@Override public OWLAnnotation getAnnotatedAnnotation(Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(getProperty(), getValue(), Stream.concat(annotations(), annotations)); }
@Override public OWLAnnotation getOWLAnnotation(OWLAnnotationProperty property, OWLAnnotationValue value, Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(property, value, annotations); } }
@Override public OWLAnnotation getAnnotatedAnnotation(Collection<OWLAnnotation> annotations) { if (annotations.isEmpty()) { return this; } return getAnnotatedAnnotation(annotations.stream()); }
@Override public OWLAnnotation getAnnotatedAnnotation(Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(getProperty(), getValue(), Stream.concat(annotations(), annotations)); }
@Override public OWLAnnotation getAnnotatedAnnotation(Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(property, value, annotations); }
@Override public OWLAnnotation getAnnotation() { return new OWLAnnotationImpl(property, value, NO_ANNOTATIONS); }
@Override public OWLAnnotation getOWLAnnotation(OWLAnnotationProperty property, OWLAnnotationValue value, Stream<OWLAnnotation> annotations) { return new OWLAnnotationImpl(property, value, annotations); } }