Enum ResourceType
- All Implemented Interfaces:
Serializable
,Comparable<ResourceType>
,java.lang.constant.Constable
Deprecated.
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
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated. -
Field Summary
Modifier and TypeFieldDescriptionprivate static org.apache.jena.graph.Node[]
Deprecated.private static final org.slf4j.Logger
Deprecated.Default Loggerprivate static org.apache.jena.graph.Node[]
Deprecated.private static org.apache.jena.graph.Node[]
Deprecated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Set<org.apache.jena.graph.Node>
allTypes
(org.apache.jena.graph.Node n, org.apache.jena.graph.Graph g) Deprecated.static ResourceType
Deprecated.Returns the most precise/specific resource type.static ResourceType
analyzeWithInference
(org.apache.jena.rdf.model.InfModel model, String resourceURI) Deprecated.Anlyze the type of the resource.private static boolean
intersect
(Set<org.apache.jena.graph.Node> prefetchedTypes, org.apache.jena.graph.Node[] requestedTypes) Deprecated.static ResourceType
subsumeProperties
(ResourceType resourceType) Deprecated.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 ResourceType
Deprecated.Returns the enum constant of this type with the specified name.static ResourceType[]
values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CLASS
Deprecated. -
RDF_PROPERTY
Deprecated. -
DATATYPE_PROPERTY
Deprecated. -
OBJECT_PROPERTY
Deprecated. -
ANNOTATION_PROPERTY
Deprecated. -
INSTANCE
Deprecated. -
UNKNOWN
Deprecated.
-
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGERDeprecated.Default Logger -
classTypes
private static org.apache.jena.graph.Node[] classTypesDeprecated. -
objectPropertyTypes
private static org.apache.jena.graph.Node[] objectPropertyTypesDeprecated. -
rdfPropertyTypes
private static org.apache.jena.graph.Node[] rdfPropertyTypesDeprecated.
-
-
Constructor Details
-
ResourceType
private ResourceType()Deprecated.
-
-
Method Details
-
values
Deprecated.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
Deprecated.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
Deprecated.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) Deprecated. -
intersect
private static boolean intersect(Set<org.apache.jena.graph.Node> prefetchedTypes, org.apache.jena.graph.Node[] requestedTypes) Deprecated. -
analyzeWithInference
public static ResourceType analyzeWithInference(org.apache.jena.rdf.model.InfModel model, String resourceURI) Deprecated.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
Deprecated.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.
-
ConceptType
which has the same functionality.