org.openrdf.repository.object.composition.helpers
Class RemotePropertySet

java.lang.Object
  extended by org.openrdf.repository.object.composition.helpers.RemotePropertySet
Type Parameters:
E -
All Implemented Interfaces:
Iterable<Object>, Collection<Object>, Set<Object>, PropertySet, Refreshable
Direct Known Subclasses:
CachedPropertySet

public class RemotePropertySet
extends Object
implements PropertySet, Set<Object>

A set for a given getResource(), predicate.

Author:
James Leigh

Field Summary
protected  PropertySetModifier property
           
 
Fields inherited from interface org.openrdf.repository.object.composition.helpers.PropertySet
ADD_ALL, ADD_SINGLE, GET_ALL, GET_SINGLE, SET_ALL, SET_SINGLE
 
Constructor Summary
RemotePropertySet(ManagedRDFObject bean, PropertySetModifier property)
           
 
Method Summary
 boolean add(Object o)
          This method always returns true
 boolean addAll(Collection<?> c)
          Append all values with the values given.
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
protected  Object createInstance(Value value)
           
 boolean equals(Object o)
           
 Set<Object> getAll()
          Get all values for property.
protected  ObjectIterator<?,Object> getObjectIterator()
           
protected  CloseableIteration<?,?> getObjects()
           
 Object getSingle()
          Assumes there is zero or one value and return null or the value.
protected  RepositoryResult<Statement> getStatements()
           
protected  Value getValue(Object instance)
           
protected  CloseableIteration<Value,RepositoryException> getValues()
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<Object> iterator()
           
 void refresh()
          Flushes the local state of the entity forcing it to refresh.
protected  void refresh(Object o)
           
protected  void refreshEntity()
           
 boolean remove(Object o)
          This method always returns true
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 void setAll(Set<?> set)
          Replaces all values with the values given.
 void setSingle(Object o)
          Replace all values with this value
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

property

protected PropertySetModifier property
Constructor Detail

RemotePropertySet

public RemotePropertySet(ManagedRDFObject bean,
                         PropertySetModifier property)
Method Detail

refresh

public void refresh()
Description copied from interface: Refreshable
Flushes the local state of the entity forcing it to refresh.

Specified by:
refresh in interface Refreshable

add

public boolean add(Object o)
This method always returns true

Specified by:
add in interface Collection<Object>
Specified by:
add in interface Set<Object>
Specified by:
add in interface PropertySet
Returns:
true

addAll

public boolean addAll(Collection<?> c)
Description copied from interface: PropertySet
Append all values with the values given.

Specified by:
addAll in interface Collection<Object>
Specified by:
addAll in interface Set<Object>
Specified by:
addAll in interface PropertySet

clear

public void clear()
Specified by:
clear in interface Collection<Object>
Specified by:
clear in interface Set<Object>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Object>
Specified by:
contains in interface Set<Object>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<Object>
Specified by:
containsAll in interface Set<Object>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<Object>
Specified by:
equals in interface Set<Object>
Overrides:
equals in class Object

getAll

public Set<Object> getAll()
Description copied from interface: PropertySet
Get all values for property.

Specified by:
getAll in interface PropertySet
Returns:
set of all values

getSingle

public Object getSingle()
Description copied from interface: PropertySet
Assumes there is zero or one value and return null or the value.

Specified by:
getSingle in interface PropertySet
Returns:
null or the single value

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<Object>
Specified by:
hashCode in interface Set<Object>
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Object>
Specified by:
isEmpty in interface Set<Object>

remove

public boolean remove(Object o)
This method always returns true

Specified by:
remove in interface Collection<Object>
Specified by:
remove in interface Set<Object>
Returns:
true

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<Object>
Specified by:
removeAll in interface Set<Object>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<Object>
Specified by:
retainAll in interface Set<Object>

setAll

public void setAll(Set<?> set)
Description copied from interface: PropertySet
Replaces all values with the values given.

Specified by:
setAll in interface PropertySet

setSingle

public void setSingle(Object o)
Description copied from interface: PropertySet
Replace all values with this value

Specified by:
setSingle in interface PropertySet

size

public int size()
Specified by:
size in interface Collection<Object>
Specified by:
size in interface Set<Object>

iterator

public Iterator<Object> iterator()
Specified by:
iterator in interface Iterable<Object>
Specified by:
iterator in interface Collection<Object>
Specified by:
iterator in interface Set<Object>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Object>
Specified by:
toArray in interface Set<Object>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<Object>
Specified by:
toArray in interface Set<Object>

toString

public String toString()
Overrides:
toString in class Object

createInstance

protected Object createInstance(Value value)
                         throws RepositoryException
Throws:
RepositoryException

getStatements

protected RepositoryResult<Statement> getStatements()
                                             throws RepositoryException
Throws:
RepositoryException

getValues

protected CloseableIteration<Value,RepositoryException> getValues()
                                                           throws RepositoryException
Throws:
RepositoryException

getValue

protected Value getValue(Object instance)
                  throws RepositoryException
Throws:
RepositoryException

refresh

protected void refresh(Object o)

refreshEntity

protected void refreshEntity()

getObjects

protected CloseableIteration<?,?> getObjects()
                                      throws RepositoryException,
                                             QueryEvaluationException
Throws:
RepositoryException
QueryEvaluationException

getObjectIterator

protected ObjectIterator<?,Object> getObjectIterator()


Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.