Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Jena 3.8.0
-
None
-
None
Description
Classes that extend AdhocDatatype (or Basedatatype) and want to allow multiple instances of the datatype class to be considered equal must do the following:
- Override BaseDatatype.isEqual(LiteralLabel litLabel1, LiteralLabel litLabel2) to call isEqualByTerm(LiteralLabel litLabel1, LiteralLabel litLabel2).
- Override Object.equals(Object obj)
- Override Object.hashCode(), potentially calling BaseDatatype.getHashCode( LiteralLabel lit )
There should be a warning in the log if TypeMapper.register(RDFDatatype type ) is called and there is an existing datatype registered for the type.getJavaClass()