Class CommonEnhNodeFactoryImpl

java.lang.Object
org.apache.jena.enhanced.Implementation
org.apache.jena.ontapi.common.BaseEnhNodeFactoryImpl
org.apache.jena.ontapi.common.CommonEnhNodeFactoryImpl
All Implemented Interfaces:
EnhNodeFactory

public class CommonEnhNodeFactoryImpl extends BaseEnhNodeFactoryImpl
Default implementation of EnhNodeFactory. This is a kind of constructor that consists of three modules:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canCreateInGraph(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
    Answers true iff the modifying of the graph is allowed by this implementation for the encapsulated object's interface.
    boolean
    canWrap(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
    Checks that the wrapping (node, eg) would succeed.
    org.apache.jena.enhanced.EnhNode
    createInGraph(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
    Makes interface-defined changes in the given graph and returns a new enhanced node, wrapping the given Node.
    org.apache.jena.enhanced.EnhNode
    createInstance(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
    Wraps the given pair of node and graph to a fresh EnhNode instance without any checking or throwing any exception.
     
     
     
    org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.enhanced.EnhNode>
    iterator(org.apache.jena.enhanced.EnhGraph eg)
    Returns an Extended Iterator over the nodes found in the EnhGraph in the form of EnhNode with the interface that this factory encapsulates.
    org.apache.jena.enhanced.EnhNode
    wrap(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
    Creates a new EnhNode wrapping the given Node node in the context of the graph EnhGraph.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.jena.ontapi.common.EnhNodeFactory

    find
  • Constructor Details

  • Method Details

    • getMaker

      public EnhNodeProducer getMaker()
    • getFinder

      public EnhNodeFinder getFinder()
    • getFilter

      public EnhNodeFilter getFilter()
    • wrap

      public org.apache.jena.enhanced.EnhNode wrap(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
      Description copied from class: BaseEnhNodeFactoryImpl
      Creates a new EnhNode wrapping the given Node node in the context of the graph EnhGraph.
      Specified by:
      wrap in interface EnhNodeFactory
      Overrides:
      wrap in class BaseEnhNodeFactoryImpl
      Parameters:
      node - the node to be wrapped
      eg - the graph containing the node
      Returns:
      A new enhanced node which wraps node but presents the interface(s) that this factory encapsulates.
    • canWrap

      public boolean canWrap(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
      Description copied from interface: EnhNodeFactory
      Checks that the wrapping (node, eg) would succeed.
      Specified by:
      canWrap in interface EnhNodeFactory
      Specified by:
      canWrap in class org.apache.jena.enhanced.Implementation
      Parameters:
      node - node the node to test for suitability
      eg - the enhanced graph the node appears in
      Returns:
      true iff the node can represent the type in the graph
    • createInGraph

      public org.apache.jena.enhanced.EnhNode createInGraph(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
      Description copied from interface: EnhNodeFactory
      Makes interface-defined changes in the given graph and returns a new enhanced node, wrapping the given Node.
      Parameters:
      node - Node, the node to be wrapped as EnhNode, not null
      eg - EnhGraph, the graph which would contain the result EnhNode, not null
      Returns:
      a new enhanced node
    • canCreateInGraph

      public boolean canCreateInGraph(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
      Description copied from interface: EnhNodeFactory
      Answers true iff the modifying of the graph is allowed by this implementation for the encapsulated object's interface.
      Parameters:
      node - Node the node to test that changes are permitted.
      eg - EnhGraph the graph to be changed.
      Returns:
      true if creation is allowed.
    • iterator

      public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.enhanced.EnhNode> iterator(org.apache.jena.enhanced.EnhGraph eg)
      Description copied from interface: EnhNodeFactory
      Returns an Extended Iterator over the nodes found in the EnhGraph in the form of EnhNode with the interface that this factory encapsulates. It is assumed that the returned iterator is distinct (does not answer with duplicates). At least, it must be distinct if the EnhGraph encapsulates the distinct graph (see also Graphs.isDistinct(Graph)).
      Parameters:
      eg - EnhGraph
      Returns:
      ExtendedIterator of EnhNodes
    • createInstance

      public org.apache.jena.enhanced.EnhNode createInstance(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph eg)
      Description copied from interface: EnhNodeFactory
      Wraps the given pair of node and graph to a fresh EnhNode instance without any checking or throwing any exception. Some implementations may return null if the EnhNodeFactory.canWrap(Node, EnhGraph) returns false. Unlike the method EnhNodeFactory.createInGraph(Node, EnhGraph), this method does not make any changes to the graph.
      Parameters:
      node - Node, not null
      eg - EnhGraph, not null
      Returns:
      EnhNode or null