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