Enum ConceptType
java.lang.Object
java.lang.Enum<ConceptType>
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.filter.ConceptType
- All Implemented Interfaces:
Serializable
,Comparable<ConceptType>
,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
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOTATION_PROPERTY
CLASS
DATATYPE_PROPERTY
INSTANCE
OBJECT_PROPERTY
RDF_PROPERTY
UNKNOWN
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.jena.graph.Node[]
classTypes
private static org.slf4j.Logger
LOGGER
Default Loggerprivate static org.apache.jena.graph.Node[]
objectPropertyTypes
private static org.apache.jena.graph.Node[]
rdfPropertyTypes
-
Constructor Summary
Constructors Modifier Constructor Description private
ConceptType()
-
Method Summary
Modifier and Type Method Description private static Set<org.apache.jena.graph.Node>
allTypes(org.apache.jena.graph.Node n, org.apache.jena.graph.Graph g)
static ConceptType
analyze(org.apache.jena.rdf.model.Model model, String resourceURI)
Returns the most precise/specific resource type.static ConceptType
analyzeWithInference(org.apache.jena.rdf.model.InfModel model, String resourceURI)
Anlyze the type of the resource.private static boolean
intersect(Set<org.apache.jena.graph.Node> prefetchedTypes, org.apache.jena.graph.Node[] requestedTypes)
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.static ConceptType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConceptType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Field Details
-
LOGGER
private static org.slf4j.Logger LOGGERDefault 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
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
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 nameNullPointerException
- if the argument is null
-
analyze
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 useanalyzeWithInference(InfModel, String)
} .- Parameters:
model
- any modelresourceURI
- 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) -
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 modelresourceURI
- The URI for which the resource type shall be determined.- Returns:
- The resource category of the URI in question.
-
subsumeProperties
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.
-