com.ldodds.foaf.thinlet.model
Class AnnotableObject

java.lang.Object
  |
  +--com.ldodds.foaf.thinlet.model.AnnotableObject
All Implemented Interfaces:
Annotable
Direct Known Subclasses:
FOAFObject

public class AnnotableObject
extends java.lang.Object
implements Annotable

Base class for Annotable objects. Implements the Annotable interface

Author:
ccslrd
See Also:
com.ldodds.foaf.thinlet.Annotable

Field Summary
protected  java.util.Map _properties
           
 
Constructor Summary
AnnotableObject()
           
 
Method Summary
 void add(Annotable other)
          Copies properties from one Annotable object into another.
 void add(java.lang.String property, java.lang.Object value)
          Adds a property to this object.
 void addAsList(java.lang.String property, java.lang.Object value)
          Adds a list property to this object.
 java.lang.Object get(java.lang.String property)
          Gets a named property.
 java.util.List getAsList(java.lang.String property)
          Gets a named property as a List.
 java.util.Map getProperties()
          Get the list of properties defined in this object
 boolean has(java.lang.String property)
          Tests whether this Annotable has a given property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_properties

protected java.util.Map _properties
Constructor Detail

AnnotableObject

public AnnotableObject()
Method Detail

add

public void add(java.lang.String property,
                java.lang.Object value)
Description copied from interface: Annotable
Adds a property to this object. Existing entries are overwritten.
Specified by:
add in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#add(String, Object)

addAsList

public void addAsList(java.lang.String property,
                      java.lang.Object value)
Description copied from interface: Annotable
Adds a list property to this object.
Specified by:
addAsList in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#addAsList(String, Object)

add

public void add(Annotable other)
Description copied from interface: Annotable
Copies properties from one Annotable object into another. Existing properties in this object will be overwritten from those defined in the other.
Specified by:
add in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#add(Annotable)

get

public java.lang.Object get(java.lang.String property)
Description copied from interface: Annotable
Gets a named property.
Specified by:
get in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#get(String)

has

public boolean has(java.lang.String property)
Description copied from interface: Annotable
Tests whether this Annotable has a given property
Specified by:
has in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#has(String)

getProperties

public java.util.Map getProperties()
Description copied from interface: Annotable
Get the list of properties defined in this object
Specified by:
getProperties in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#getProperties()

getAsList

public java.util.List getAsList(java.lang.String property)
Description copied from interface: Annotable
Gets a named property as a List.
Specified by:
getAsList in interface Annotable
See Also:
com.ldodds.foaf.thinlet.Annotable#getAsList(String)