public boolean equals(Object obj) { if (super.equals(obj)) { if (obj instanceof OWLDatatype) { return ((OWLDatatype) obj).getIRI().equals(getIRI()); } } return false; }
/** * Gets an entity that has the same IRI as this entity but is of the specified type. * @param entityType The type of the entity to obtain. This entity is not affected in any way. * @return An entity that has the same IRI as this entity and is of the specified type */ public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType) { return getOWLDataFactory().getOWLEntity(entityType, getIRI()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OWLDatatype) { return ((OWLDatatype) obj).getIRI().equals(getIRI()); } return false; }
public OWLDatatypeImpl(OWLDataFactory dataFactory, IRI iri) { super(dataFactory); this.iri = iri; top = getURI().equals(OWLRDFVocabulary.RDFS_LITERAL.getURI()); builtin = OWL2Datatype.isBuiltIn(getIRI()) | top; }
public static void serialize(SerializationStreamWriter streamWriter, OWLDatatypeImpl instance) throws SerializationException { streamWriter.writeString(instance.getIRI().toString()); }
@Override public boolean equals(Object obj) { if (super.equals(obj) && obj instanceof OWLDatatype) { return ((OWLDatatype) obj).getIRI().equals(getIRI()); } return false; }
public OWL2Datatype getBuiltInDatatype() { if (!isBuiltIn()) { throw new OWLRuntimeException("Not a built in datatype. The getBuiltInDatatype() method should only be called on built in datatypes."); } else { return OWL2Datatype.getDatatype(getIRI()); } }