Class TempNodeCache
- java.lang.Object
-
- org.apache.jena.reasoner.rulesys.impl.TempNodeCache
-
public class TempNodeCache extends java.lang.Object
In some rules we need to be able to create temporary property values which are inferred from ontology constraints but not present in the ground data. This structure is used to manage a pool of such temporary nodes. It is only needed in situations where the data can not be added directly to a deductions graph due to the risk of concurrent access.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TempNodeCache.NodePair
Inner class used to hold and hash a node pair.
-
Constructor Summary
Constructors Constructor Description TempNodeCache(InfGraph infgraph)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
getTemp(Node instance, Node prop, Node pclass)
Retrieve or create a bNode representing an inferred property value.
-
-
-
Constructor Detail
-
TempNodeCache
public TempNodeCache(InfGraph infgraph)
Constructor.- Parameters:
infgraph
- Parent inference graph, used to be needed for synchronization, don't think we need it any more
-
-
Method Detail
-
getTemp
public Node getTemp(Node instance, Node prop, Node pclass)
Retrieve or create a bNode representing an inferred property value.- Parameters:
instance
- the base instance node to which the property appliesprop
- the property node whose value is being inferredpclass
- the (optional, can be null) class for the inferred value.- Returns:
- the bNode representing the property value
-
-