Class TypeMapperUtils

java.lang.Object
org.aksw.jenax.arq.util.type.TypeMapperUtils

public class TypeMapperUtils extends Object
  • Constructor Details

    • TypeMapperUtils

      public TypeMapperUtils()
  • Method Details

    • getTypesBySubClassOf

      public static List<org.apache.jena.datatypes.RDFDatatype> getTypesBySubClassOf(org.apache.jena.datatypes.TypeMapper tm, Class<?> cls)
      Find all RDFDatatypes in a TypeMapper whose backing Java type is a sub class (reflexive) of 'cls'. The motivation for implementing this method was to detect that xsd:string (backed by String) is a suitable type for wherever CharSequence is required. However, the TypeMapper (by default) already also contains a mapping from xsd:normalizedString to String. Hence, for this use case this method is not suitable because the result is not unique.