java.lang.Object
java.lang.Enum<ConceptType>
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.ConceptType
All Implemented Interfaces:
Serializable, Comparable<ConceptType>, java.lang.constant.Constable

public enum ConceptType extends Enum<ConceptType>
This enum represents different resource types that may occur in an ontology. In addition, it offers services to determine the resource type given a model and a URI.
Author:
Sven Hertling, Jan Portisch
  • Enum Constant Details

    • CLASS

      public static final ConceptType CLASS
    • RDF_PROPERTY

      public static final ConceptType RDF_PROPERTY
    • DATATYPE_PROPERTY

      public static final ConceptType DATATYPE_PROPERTY
    • OBJECT_PROPERTY

      public static final ConceptType OBJECT_PROPERTY
    • ANNOTATION_PROPERTY

      public static final ConceptType ANNOTATION_PROPERTY
    • INSTANCE

      public static final ConceptType INSTANCE
    • UNKNOWN

      public static final ConceptType UNKNOWN
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
      Default Logger
    • classTypes

      private static org.apache.jena.graph.Node[] classTypes
    • objectPropertyTypes

      private static org.apache.jena.graph.Node[] objectPropertyTypes
    • rdfPropertyTypes

      private static org.apache.jena.graph.Node[] rdfPropertyTypes
  • Constructor Details

    • ConceptType

      private ConceptType()
  • Method Details

    • values

      public static ConceptType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ConceptType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • analyze

      public static ConceptType analyze(org.apache.jena.rdf.model.Model model, String resourceURI)
      Returns the most precise/specific resource type. This method implements its own simplistic reasoning for determining the type of the resource. For more sophisticated reasoning use analyzeWithInference(InfModel, String) } .
      Parameters:
      model - any model
      resourceURI - The URI for which the resource type shall be determined.
      Returns:
      The most specify resource type available (like ObjectProperty)
    • allTypes

      private static Set<org.apache.jena.graph.Node> allTypes(org.apache.jena.graph.Node n, org.apache.jena.graph.Graph g)
    • intersect

      private static boolean intersect(Set<org.apache.jena.graph.Node> prefetchedTypes, org.apache.jena.graph.Node[] requestedTypes)
    • analyzeWithJena

      public static ConceptType analyzeWithJena(org.apache.jena.ontology.OntModel model, String resourceURI)
      Returns the most precise/specific resource type. This method implements the jena way of determmin the concept type. Without inference, it may yield not perfect result and is usually slower than analyze(org.apache.jena.rdf.model.Model, java.lang.String).
      Parameters:
      model - any ont model
      resourceURI - The URI for which the resource type shall be determined.
      Returns:
      The most specify resource type available (like ObjectProperty)
    • analyzeWithInference

      public static ConceptType analyzeWithInference(org.apache.jena.rdf.model.InfModel model, String resourceURI)
      Anlyze the type of the resource. This heavily depends on the attached reasoner. To have same good results, use at least an rdfs reasoner.
      Parameters:
      model - any model
      resourceURI - The URI for which the resource type shall be determined.
      Returns:
      The resource category of the URI in question.
    • subsumeProperties

      public static ConceptType subsumeProperties(ConceptType resourceType)
      This method returns only CLASS, RDF_PROPERTY, INSTANCE or UNKNOWN and, thus, subsumes all different property types like DATATYPE_PROPERTY, OBJECT_PROPERTY, ANNOTATION_PROPERTY, and RDF_PROPERTY.
      Parameters:
      resourceType - The resource type for which the parent shall be returned.
      Returns:
      The parent type. If there is no parent, the resource type itself will be returned.