org.topbraid.spin.system
Class MagicPropertyPolicy
java.lang.Object
org.topbraid.spin.system.MagicPropertyPolicy
public class MagicPropertyPolicy
- extends java.lang.Object
A singleton used by the evaluation of magic properties
(SPINARQPFunction) to determine whether asserted values
and/or dynamically computed values shall be returned in
SPARQL queries. Applications can replace the singleton
and override the default behavior, which is to return
both the existing triples and the dynamically computed ones.
This allows applications to control caches of pre-computed
values to avoid costly function calls.
- Author:
- Holger Knublauch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MagicPropertyPolicy
public MagicPropertyPolicy()
get
public static MagicPropertyPolicy get()
set
public static void set(MagicPropertyPolicy value)
getPolicy
public MagicPropertyPolicy.Policy getPolicy(java.lang.String functionURI,
Graph graph,
Node matchSubject,
Node matchObject)
- Checks whether a given magic property call should return asserted
triples, dynamically computed query results, or both for a given
subject/object combination.
- Parameters:
functionURI
- the URI of the functiongraph
- the Graph to querymatchSubject
- the subject Node or nullmatchObject
- the object Node or null
- Returns:
- the Policy