org.topbraid.spin.util
Class SPLUtil

java.lang.Object
  extended by org.topbraid.spin.util.SPLUtil

public class SPLUtil
extends java.lang.Object

Utilities related to the spl namespace.

Author:
Holger Knublauch

Constructor Summary
SPLUtil()
           
 
Method Summary
static java.util.Map<Property,RDFNode> getDefaultValues(Resource subject)
          Creates a Map from Properties to RDFNodes based on declared spl:InferDefaultValues.
static RDFNode getObject(Resource subject, Property predicate)
          Same as getObject(subject, predicate, false).
static RDFNode getObject(Resource subject, Property predicate, boolean includeSubProperties)
          Gets the (first) value of a subject/predicate combination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPLUtil

public SPLUtil()
Method Detail

getDefaultValues

public static java.util.Map<Property,RDFNode> getDefaultValues(Resource subject)
Creates a Map from Properties to RDFNodes based on declared spl:InferDefaultValues.

Parameters:
subject -
Returns:
a Map from Properties to their default values (no null values)

getObject

public static RDFNode getObject(Resource subject,
                                Property predicate)
Same as getObject(subject, predicate, false).

See Also:
getObject(Resource, Property, boolean)

getObject

public static RDFNode getObject(Resource subject,
                                Property predicate,
                                boolean includeSubProperties)
Gets the (first) value of a subject/predicate combination. If no value exists, then it checks whether any spl:InferDefaultValue has been defined for the type(s) of the subject. No need to run inferences first.

Parameters:
subject - the subject to get the object of
predicate - the predicate
includeSubProperties - true to also check for sub-properties of predicate
Returns:
the object or null