Package org.eclipse.rdf4j.model.util
Class Configurations
- java.lang.Object
-
- org.eclipse.rdf4j.model.util.Configurations
-
@InternalUseOnly public class Configurations extends Object
Utility functions for working with RDF4J Models representing configuration settings.- Author:
- Jeen Broekstra
-
-
Constructor Summary
Constructors Constructor Description Configurations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 .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 .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.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 .
-
-
-
Method Detail
-
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.
-
-