Package com.epimorphics.rdfutil
Class RichResourcesList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<org.apache.jena.rdf.model.Resource>
-
- com.epimorphics.rdfutil.RichResourcesList
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<org.apache.jena.rdf.model.Resource>,Collection<org.apache.jena.rdf.model.Resource>,List<org.apache.jena.rdf.model.Resource>,RandomAccess
public class RichResourcesList extends ArrayList<org.apache.jena.rdf.model.Resource>
A rich resource is an RDF resource with an attached model. A
RichResourcesListcontains an ordered list of resources, with a shared model containing their combined description.- Author:
- Ian Dickinson, Epimorphics (mailto:ian@epimorphics.com)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description RichResourcesList()RichResourcesList(org.apache.jena.rdf.model.Model m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(org.apache.jena.rdf.model.Resource r)Add a resource to the list.booleanadd(org.apache.jena.rdf.model.Resource r, org.apache.jena.rdf.model.Model rDescription)Add a resource to the list, and add the given description model to the combined description.voidaddDescription(org.apache.jena.rdf.model.Model m)Add a description model to the combined model for this list.org.apache.jena.rdf.model.Modeldescription()Return the combined description model for this list.-
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Method Detail
-
add
public boolean add(org.apache.jena.rdf.model.Resource r)
Add a resource to the list. Add the model that r is attached to to this list's description model, and ensure that the resource that is added to the list is attached to the combined model.
-
add
public boolean add(org.apache.jena.rdf.model.Resource r, org.apache.jena.rdf.model.Model rDescription)Add a resource to the list, and add the given description model to the combined description.- Parameters:
r- A resource to addrDescription- A description model to add- Returns:
-
addDescription
public void addDescription(org.apache.jena.rdf.model.Model m)
Add a description model to the combined model for this list.- Parameters:
m-
-
description
public org.apache.jena.rdf.model.Model description()
Return the combined description model for this list.- Returns:
-
-