org.topbraid.core.model
Class RDFLists

java.lang.Object
  extended by org.topbraid.core.model.RDFLists

public class RDFLists
extends java.lang.Object


Constructor Summary
RDFLists()
           
 
Method Summary
static java.util.List extract(com.hp.hpl.jena.rdf.model.Resource list)
          Collects all elements inside an rdf:List and deletes all link nodes, i.e.
static com.hp.hpl.jena.rdf.model.Resource getHead(com.hp.hpl.jena.rdf.model.Resource list)
          Gets the head element of a list, by following the rdf:rest references to a given list element upwards.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFLists

public RDFLists()
Method Detail

extract

public static java.util.List extract(com.hp.hpl.jena.rdf.model.Resource list)
Collects all elements inside an rdf:List and deletes all link nodes, i.e. the list itself.

Parameters:
list - the head of the list to extract
Returns:
a List of the rdf:first nodes in the list

getHead

public static com.hp.hpl.jena.rdf.model.Resource getHead(com.hp.hpl.jena.rdf.model.Resource list)
Gets the head element of a list, by following the rdf:rest references to a given list element upwards.

Parameters:
list - a member of the list
Returns:
the head element (may be list)