Class TempNodeCache

java.lang.Object
org.apache.jena.reasoner.rulesys.impl.TempNodeCache

public class TempNodeCache extends 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.
  • Constructor Details

    • 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 Details

    • 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 applies
      prop - the property node whose value is being inferred
      pclass - the (optional, can be null) class for the inferred value.
      Returns:
      the bNode representing the property value