Class ExplainerResourceProperty
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.explainer.ExplainerResourceProperty
- All Implemented Interfaces:
IExplainerResource
,IExplainerResourceWithJenaOntology
A simple
IExplainerResource
which is capable of retrieving properties for given resources.- Author:
- Sven Hertling, Jan Portisch
-
Field Summary
Modifier and TypeFieldDescriptionprivate static org.slf4j.Logger
default loggerprivate org.apache.jena.ontology.OntModel
The ontModel that is used to explain resources.Data structure that holds the mapping of names to RDF properties.Names of the resource features in a list.private PrefixLookup
-
Constructor Summary
ConstructorDescriptionExplainerResourceProperty
(List<NamePropertyTuple> properties) ConstructorExplainerResourceProperty
(org.apache.jena.rdf.model.Property... properties) Use the given properties and choose the local name of the proeprty as the name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an RDF feature.Get the names of the resource features which will also appear in the result ofIExplainerResource.getResourceFeatures(String)
.Retrieves the features for the given URI.void
setOntModel
(org.apache.jena.ontology.OntModel ontModel) Set the ontology that is to be used for a lookup.void
setUriPrefixLookup
(PrefixLookup uriPrefixLookup)
-
Field Details
-
properties
Data structure that holds the mapping of names to RDF properties. -
resourceFeatureNames
Names of the resource features in a list. Not that there is an order. -
uriPrefixLookup
-
LOGGER
private static org.slf4j.Logger LOGGERdefault logger -
ontModel
private org.apache.jena.ontology.OntModel ontModelThe ontModel that is used to explain resources.
-
-
Constructor Details
-
ExplainerResourceProperty
public ExplainerResourceProperty() -
ExplainerResourceProperty
Constructor- Parameters:
properties
- Desired RDF properties together with their "feature names" in the order you desire.
-
ExplainerResourceProperty
public ExplainerResourceProperty(org.apache.jena.rdf.model.Property... properties) Use the given properties and choose the local name of the proeprty as the name.- Parameters:
properties
- Desired properties
-
-
Method Details
-
add
Add an RDF feature.- Parameters:
name
- Name of the RDF feature.property
- RDF property that shall be used to describe a resource.
-
getResourceFeatures
Retrieves the features for the given URI.- Specified by:
getResourceFeatures
in interfaceIExplainerResource
- Parameters:
uri
- the resource uri- Returns:
- A map with key = featureName and value = featureValue.
-
getResourceFeatureNames
Description copied from interface:IExplainerResource
Get the names of the resource features which will also appear in the result ofIExplainerResource.getResourceFeatures(String)
.- Specified by:
getResourceFeatureNames
in interfaceIExplainerResource
- Returns:
- A list of the resource feature names.
-
setOntModel
public void setOntModel(org.apache.jena.ontology.OntModel ontModel) Description copied from interface:IExplainerResourceWithJenaOntology
Set the ontology that is to be used for a lookup.- Specified by:
setOntModel
in interfaceIExplainerResourceWithJenaOntology
- Parameters:
ontModel
- The jena ont model to be used for the lookup.
-
getUriPrefixLookup
-
setUriPrefixLookup
-