Class StatementTermImpl

All Implemented Interfaces:
FrontsNode, RDFNode, StatementTerm

public class StatementTermImpl extends EnhNode implements StatementTerm
An implementation of statement terms (RDf 1.2 triple terms).
  • Field Details

  • Constructor Details

    • StatementTermImpl

      public StatementTermImpl(Statement stmt)
    • StatementTermImpl

      public StatementTermImpl(Statement statement, ModelCom m)
    • StatementTermImpl

      public StatementTermImpl(Node n, EnhGraph m)
  • Method Details

    • asResource

      public Resource asResource()
      Description copied from interface: RDFNode
      If this node is a Resource, answer that resource; otherwise throw an exception.
      Specified by:
      asResource in interface RDFNode
    • asLiteral

      public Literal asLiteral()
      Description copied from interface: RDFNode
      If this node is a Literal, answer that literal; otherwise throw an exception.
      Specified by:
      asLiteral in interface RDFNode
    • asStatementTerm

      public StatementTerm asStatementTerm()
      Description copied from interface: RDFNode
      If this node is a StatementTerm, answer that statement term; otherwise throw an exception.
      Specified by:
      asStatementTerm in interface RDFNode
    • getStatement

      public Statement getStatement()
      Description copied from interface: StatementTerm
      Return the Statement that this StatementTerm represents.
      Specified by:
      getStatement in interface StatementTerm
    • getModel

      public Model getModel()
      Description copied from interface: RDFNode
      Return the model associated with this resource. If the Resource was not created by a Model, the result may be null.
      Specified by:
      getModel in interface RDFNode
      Returns:
      The model associated with this resource.
    • visitWith

      public Object visitWith(RDFVisitor rv)
      Description copied from interface: RDFNode
      Apply the appropriate method of the visitor to this node's content and return the result.
      Specified by:
      visitWith in interface RDFNode
      Parameters:
      rv - an RDFVisitor with a method for URI/blank/literal nodes
      Returns:
      the result returned by the selected method
    • inModel

      public StatementTerm inModel(Model m)
      Description copied from interface: RDFNode
      Answer a .equals() version of this node, except that it's in the model m.
      Specified by:
      inModel in interface RDFNode
      Parameters:
      m - a model to move the node to
      Returns:
      this, if it's already in m (or no model), a copy in m otherwise