|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.higgins.idas.impl.BasicEntity
public class BasicEntity
Basic implementation used by basic implementations of subinterfaces of IEntity
(i.e. BasicResource
).
May also be used by providers to help implement IDigitalSubject
.
This class uses a HashMap
of URI
and String
to hold the attributes.
Constructor Summary | |
---|---|
BasicEntity(String name,
String type)
|
|
BasicEntity(String name,
String type,
Iterable<IAttribute> attrs)
|
Method Summary | |
---|---|
void |
addAttribute(IAttribute attribute)
|
IAttribute |
createAttribute(URI type,
IPropertyValue value)
Creates and adds an attribute for this Entity. |
IAttribute |
createAttribute(URI type,
Iterable<IPropertyValue> values)
Creates and adds an attribute for this Entity. |
IAttribute |
getAttribute(URI attrID)
Return specified attribute of this Entity |
Iterable<IAttribute> |
getAttributes()
Return all attributes of this Entity |
String |
getName()
|
String |
getType()
Returns the type of this Entity. As all Entities are required to have a type attribute, this is a shortcut for calling getAttribute("<URI of type attrID>"). |
void |
removeAttribute(IAttribute attribute)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicEntity(String name, String type)
public BasicEntity(String name, String type, Iterable<IAttribute> attrs)
Method Detail |
---|
public String getName() throws IdASException
getName
in interface IEntity
IdASException
public String getType() throws IdASException
IEntity
getType
in interface IEntity
IdASException
public IAttribute createAttribute(URI type, IPropertyValue value) throws IdASException
IEntity
createAttribute
in interface IEntity
type
- The attribute's type.value
- The attribute's value.
IdASException
public IAttribute createAttribute(URI type, Iterable<IPropertyValue> values) throws IdASException
IEntity
createAttribute
in interface IEntity
type
- The attribute's type.values
- The attribute's values.
IdASException
public void addAttribute(IAttribute attribute) throws IdASException
addAttribute
in interface IEntity
IdASException
public void removeAttribute(IAttribute attribute) throws IdASException
removeAttribute
in interface IEntity
IdASException
public Iterable<IAttribute> getAttributes() throws IdASException
IEntity
getAttributes
in interface IEntity
Iterable
object of IAttribute
s.
IdASException
public IAttribute getAttribute(URI attrID) throws IdASException
IEntity
getAttribute
in interface IEntity
attrID
- The identifier of the attribute to be returned.
IAttribute
or null
if none exits.
IdASException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |