Package com.complexible.stardog.jena

# Class JenaSesameUtils

java.lang.Object
com.complexible.stardog.jena.JenaSesameUtils

public final class JenaSesameUtils extends Object

Utility methods for converting between the Jena and Sesame APIs

Since:
  0.6.9
Version:
  6.0
Author:
  Michael Grove

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Function<Value,Node>`
  `TO_NODE`
  `static final Function<Node,Value>`
  `TO_VALUE`
  `static final Function<Statement,Quad>`
  `TOQUAD`
  `static final Function<Triple,Statement>`
  `TOSTMT`
  `static final Function<Statement,Triple>`
  `TOTRIPLE`
  Function which will convert sesame statements to Jena graph Triples on the fly

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Node`
  `anonNode(BNode theBNode)`
  Create a Jena anonymous Graph Node from the Sesame BNode
  `static BNode`
  `bnode(Node theNode)`
  `static PrefixMap`
  `createPrefixMap(Optional<Connection> conn)`
  `static PrefixMapping`
  `createPrefixMapping(Optional<Connection> conn)`
  `static IRI`
  `iri(Node theNode)`
  `static boolean`
  `isAnyOrNull(Node theNode)`
  `static Literal`
  `literal(Node theNode)`
  `static Node`
  `literalNode(Literal theLiteral)`
  Return a Jena Literal Graph Node from the Sesame Literal
  `static Model`
  `model(Set<Statement> theGraph)`
  `static Node`
  `node(Value theValue)`
  Return the equivalent Jena Graph Node for the provided Sesame Value
  `static Resource`
  `resource(Node theNode)`
  `static Statement`
  `statement(Statement theStatement)`
  `static Statement`
  `statement(Triple theTriple)`
  `static StmtIterator`
  `stmtIterator(Iterator<Statement> theIterator)`
  `static Triple`
  `triple(Statement theStatement)`
  `static Node`
  `uriNode(IRI theURI)`
  `static Value`
  `value(Node theNode)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### TOTRIPLE

    public static final Function<Statement,Triple> TOTRIPLE
    Function which will convert sesame statements to Jena graph Triples on the fly

  - ### TOQUAD

    public static final Function<Statement,Quad> TOQUAD

  - ### TOSTMT

    public static final Function<Triple,Statement> TOSTMT

  - ### TO_NODE

    public static final Function<Value,Node> TO_NODE

  - ### TO_VALUE

    public static final Function<Node,Value> TO_VALUE

- ## Method Details

  - ### stmtIterator

    public static StmtIterator stmtIterator(Iterator<Statement> theIterator)

  - ### statement

    public static Statement statement(Statement theStatement)

  - ### triple

    public static Triple triple(Statement theStatement)

  - ### model

    public static Model model(Set<Statement> theGraph)

  - ### node

    public static Node node(Value theValue)
    Return the equivalent Jena Graph Node for the provided Sesame Value
    Parameters:
      `theValue` - the value
    Returns:
      the Jena Node equivalent to the Sesame Value

  - ### literalNode

    public static Node literalNode(Literal theLiteral)
    Return a Jena Literal Graph Node from the Sesame Literal
    Parameters:
      `theLiteral` - the literal
    Returns:
      the equivalent Jena graph node for the Sesame Literal

  - ### anonNode

    public static Node anonNode(BNode theBNode)
    Create a Jena anonymous Graph Node from the Sesame BNode
    Parameters:
      `theBNode` - the bnode
    Returns:
      the equivalent Jena Graph node for the Sesame BNode

  - ### uriNode

    public static Node uriNode(IRI theURI)

  - ### value

    public static Value value(Node theNode)

  - ### isAnyOrNull

    public static boolean isAnyOrNull(Node theNode)

  - ### resource

    public static Resource resource(Node theNode)

  - ### iri

    public static IRI iri(Node theNode)

  - ### bnode

    public static BNode bnode(Node theNode)

  - ### literal

    public static Literal literal(Node theNode)

  - ### statement

    public static Statement statement(Triple theTriple)

  - ### createPrefixMapping

    public static PrefixMapping createPrefixMapping(Optional<Connection> conn)

  - ### createPrefixMap

    public static PrefixMap createPrefixMap(Optional<Connection> conn)