Package org.eclipse.rdf4j.model.util
Class Configurations
java.lang.Object
org.eclipse.rdf4j.model.util.Configurations
Utility functions for working with RDF4J Models representing configuration settings.
- Author:
- Jeen Broekstra
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetIRIValue
(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve a property value for the supplied subject as aIRI
if present, falling back to a supplied legacy property .getLiteralValue
(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve a property value for the supplied subject as aLiteral
if present, falling back to a supplied legacy property .getPropertyValues
(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve all property values for the supplied subject as a Set of values and include all values for any legacy property.getResourceValue
(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve a property value for the supplied subject as aResource
if present, falling back to a supplied legacy property .
-
Constructor Details
-
Configurations
public Configurations()
-
-
Method Details
-
getResourceValue
@InternalUseOnly public static Optional<Resource> getResourceValue(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve a property value for the supplied subject as aResource
if present, falling back to a supplied legacy property .This method allows querying repository config models with a mix of old and new namespaces.
- Parameters:
model
- the model to retrieve property values from.subject
- the subject of the property.property
- the property to retrieve the value of.legacyProperty
- legacy property to use if the supplied property has no value in the model.- Returns:
- the resource value for supplied subject and property (or the legacy property ), if present.
-
getLiteralValue
@InternalUseOnly public static Optional<Literal> getLiteralValue(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve a property value for the supplied subject as aLiteral
if present, falling back to a supplied legacy property .This method allows querying repository config models with a mix of old and new namespaces.
- Parameters:
model
- the model to retrieve property values from.subject
- the subject of the property.property
- the property to retrieve the value of.legacyProperty
- legacy property to use if the supplied property has no value in the model.- Returns:
- the literal value for supplied subject and property (or the legacy property ), if present.
-
getPropertyValues
@InternalUseOnly public static Set<Value> getPropertyValues(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve all property values for the supplied subject as a Set of values and include all values for any legacy property.This method allows querying repository config models with a mix of old and new namespaces.
- Parameters:
model
- the model to retrieve property values from.subject
- the subject of the property.property
- the property to retrieve the values of.legacyProperty
- legacy property to retrieve values of.- Returns:
- the set of values for supplied subject and property (and/or legacy property).
-
getIRIValue
@InternalUseOnly public static Optional<IRI> getIRIValue(Model model, Resource subject, IRI property, IRI legacyProperty) Retrieve a property value for the supplied subject as aIRI
if present, falling back to a supplied legacy property .This method allows querying repository config models with a mix of old and new namespaces.
- Parameters:
model
- the model to retrieve property values from.subject
- the subject of the property.property
- the property to retrieve the value of.legacyProperty
- legacy property to use if the supplied property has no value in the model.- Returns:
- the IRI value for supplied subject and property (or the legacy property ), if present.
-