public class SPLUtil extends Object
| Constructor and Description |
|---|
SPLUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Argument |
getArgument(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Gets any declared spl:Argument that is attached to the types of a given
subject (or its superclasses) via spin:constraint, that has a given predicate
as its spl:predicate.
|
static Map<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode> |
getDefaultValues(org.apache.jena.rdf.model.Resource subject)
Creates a Map from Properties to RDFNodes based on declared
spl:InferDefaultValues.
|
static org.apache.jena.rdf.model.RDFNode |
getObject(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Same as
getObject(subject, predicate, false). |
static org.apache.jena.rdf.model.RDFNode |
getObject(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate,
boolean includeSubProperties)
Gets the (first) value of a subject/predicate combination.
|
static org.apache.jena.rdf.model.Property |
getPrimaryKeyProperty(org.apache.jena.rdf.model.Resource cls) |
static org.apache.jena.rdf.model.Property |
getPrimaryKeyPropertyHelper(org.apache.jena.rdf.model.Resource cls,
Set<org.apache.jena.rdf.model.Resource> reached) |
static String |
getPrimaryKeyURIStart(org.apache.jena.rdf.model.Resource cls) |
static boolean |
hasPrimaryKey(org.apache.jena.rdf.model.Resource cls) |
static boolean |
isArgument(org.apache.jena.rdf.model.Resource resource)
Checks whether a given Resource is an instance of spl:Argument (or a subclass
thereof.
|
static boolean |
isArgumentPredicate(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Checks if a given Property is a defined spl:Argument of a given subject Resource.
|
static boolean |
isOnProperty(TemplateCall templateCall,
org.apache.jena.rdf.model.Property onProperty)
Checks if a given template call is about a specific property.
|
public static Argument getArgument(org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
subject - the instance to get an Argument ofpredicate - the predicate to matchpublic static Map<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode> getDefaultValues(org.apache.jena.rdf.model.Resource subject)
subject - public static org.apache.jena.rdf.model.RDFNode getObject(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
getObject(subject, predicate, false).getObject(Resource, Property, boolean)public static org.apache.jena.rdf.model.RDFNode getObject(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate,
boolean includeSubProperties)
subject - the subject to get the object ofpredicate - the predicateincludeSubProperties - true to also check for sub-properties of predicatepublic static org.apache.jena.rdf.model.Property getPrimaryKeyProperty(org.apache.jena.rdf.model.Resource cls)
public static org.apache.jena.rdf.model.Property getPrimaryKeyPropertyHelper(org.apache.jena.rdf.model.Resource cls,
Set<org.apache.jena.rdf.model.Resource> reached)
public static String getPrimaryKeyURIStart(org.apache.jena.rdf.model.Resource cls)
public static boolean hasPrimaryKey(org.apache.jena.rdf.model.Resource cls)
public static boolean isArgument(org.apache.jena.rdf.model.Resource resource)
resource - the Resource to testpublic static boolean isArgumentPredicate(org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
subject - the subjectpredicate - the Property to testpublic static boolean isOnProperty(TemplateCall templateCall, org.apache.jena.rdf.model.Property onProperty)
templateCall - the template call to checkonProperty - the property to be used in the constraintCopyright © 2017 TopQuadrant, Inc.. All rights reserved.