Package com.stardog.stark

# Class RDFLists

java.lang.Object
com.stardog.stark.RDFLists

public final class RDFLists extends Object

Utilities for working with RDF lists.

Author:
  Evren Sirin

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RDFLists()`
  No instances

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Resource`
  `create(List<? extends Value> theList, Collection<Statement> theGraph)`
  Creates an RDF list from the given values.
  `static Resource`
  `create(List<? extends Value> theList, Consumer<Statement> theGraph)`
  `static List<Value>`
  `fromStatements(Resource theResource, Iterable<Statement> theGraph)`
  Create a list of values from an RDF list.

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

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

- ## Constructor Details

  - ### RDFLists

    public RDFLists()
    No instances

- ## Method Details

  - ### create

    @Nonnull public static Resource create(@Nonnull List<? extends Value> theList, @Nonnull Collection<Statement> theGraph)
    Creates an RDF list from the given values.
    Parameters:
      `theList` - list of values
      `theGraph` - graph where the triples for the list is written to
    Returns:
      the resource representing the list

  - ### create

    @Nonnull public static Resource create(@Nonnull List<? extends Value> theList, @Nonnull Consumer<Statement> theGraph)

  - ### fromStatements

    @Nonnull public static List<Value> fromStatements(@Nonnull Resource theResource, @Nonnull Iterable<Statement> theGraph)
    Create a list of values from an RDF list.
    Parameters:
      `theResource` - the resource representing the list
      `theGraph` - graph where the triples for the list is read from
    Returns:
      list of values