Class RDFLists


  • public final class RDFLists
    extends java.lang.Object

    Utilities for working with RDF lists.

    Author:
    Evren Sirin
    • Constructor Summary

      Constructors 
      Constructor Description
      RDFLists()
      No instances
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Resource create​(java.util.List<? extends Value> theList, java.util.Collection<Statement> theGraph)
      Creates an RDF list from the given values.
      static Resource create​(java.util.List<? extends Value> theList, java.util.function.Consumer<Statement> theGraph)  
      static java.util.List<Value> fromStatements​(Resource theResource, java.lang.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 Detail

      • RDFLists

        public RDFLists()
        No instances
    • Method Detail

      • create

        @Nonnull
        public static Resource create​(@Nonnull
                                      java.util.List<? extends Value> theList,
                                      @Nonnull
                                      java.util.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
                                      java.util.List<? extends Value> theList,
                                      @Nonnull
                                      java.util.function.Consumer<Statement> theGraph)
      • fromStatements

        @Nonnull
        public static java.util.List<Value> fromStatements​(@Nonnull
                                                           Resource theResource,
                                                           @Nonnull
                                                           java.lang.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