org.openrdf.elmo.sesame
Class SesameProperty<E>

java.lang.Object
  extended by org.openrdf.elmo.sesame.SesameProperty<E>
Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>, ElmoProperty<E>, Refreshable
Direct Known Subclasses:
InverseSesameProperty, LocalizedSesameProperty

public class SesameProperty<E>
extends Object
implements ElmoProperty<E>, Set<E>

A set for a given getResource(), predicate.

Author:
James Leigh

Field Summary
protected  PropertyChanger property
           
 
Constructor Summary
SesameProperty(SesameEntity bean, PropertyChanger property)
           
 
Method Summary
 boolean add(E o)
          This method always returns true
 boolean addAll(Collection<? extends E> c)
          Append all values with the values given.
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 Set<E> getAll()
          Get all values for property.
 E getSingle()
          Assumes there is zero or one value and return null or the value.
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<E> iterator()
           
 void refresh()
          Flushes the local state of the entity forcing it to refresh.
protected  void refresh(Object o)
           
protected  void refreshCache()
           
protected  void refreshEntity()
           
 boolean remove(Object o)
          This method always returns true
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 void setAll(Set<E> set)
          Replaces all values with the values given.
 void setSingle(E 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 PropertyChanger property
Constructor Detail

SesameProperty

public SesameProperty(SesameEntity bean,
                      PropertyChanger 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(E o)
This method always returns true

Specified by:
add in interface Collection<E>
Specified by:
add in interface Set<E>
Specified by:
add in interface ElmoProperty<E>
Returns:
true

addAll

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

Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface Set<E>
Specified by:
addAll in interface ElmoProperty<E>

clear

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

contains

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

containsAll

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

equals

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

getAll

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

Specified by:
getAll in interface ElmoProperty<E>
Returns:
set of all values

getSingle

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

Specified by:
getSingle in interface ElmoProperty<E>
Returns:
null or the single value

hashCode

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

isEmpty

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

remove

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

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

removeAll

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

retainAll

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

setAll

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

Specified by:
setAll in interface ElmoProperty<E>

setSingle

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

Specified by:
setSingle in interface ElmoProperty<E>

size

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

iterator

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

toArray

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

toArray

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

toString

public String toString()
Overrides:
toString in class Object

refreshCache

protected void refreshCache()

refresh

protected void refresh(Object o)

refreshEntity

protected void refreshEntity()


Copyright © 2004-2008 Aduna. All Rights Reserved.