|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.higgins.idas.impl.IBasicResource
public class IBasicResource
Constructor Summary | |
---|---|
IBasicResource(String name,
String type)
|
|
IBasicResource(String name,
String type,
Iterable<BasicAttribute> attrs)
|
|
IBasicResource(String name,
String type,
Vector<BasicAttribute> attrs)
|
Method Summary | |
---|---|
void |
addAttribute(IAttribute attribute)
|
void |
addMetadata(IMetadata metadata)
|
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. |
IMetadata |
createMetadata(URI type,
IPropertyValue value)
Creates a metadata item which can be added to metadata held by this Object. |
IAttribute |
getAttribute(URI attrID)
Return specified attribute of this Entity |
Iterable<IAttribute> |
getAttributes()
Return all attributes of this Entity |
Iterable<IMetadata> |
getMetadataSet()
Returns this Object's metadata elements as an Iterable. |
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)
|
void |
removeMetadata(IMetadata metadata)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IBasicResource(String name, String type)
public IBasicResource(String name, String type, Iterable<BasicAttribute> attrs)
public IBasicResource(String name, String type, Vector<BasicAttribute> 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
public IMetadata createMetadata(URI type, IPropertyValue value) throws IdASException
IHasMetadata
createMetadata
in interface IHasMetadata
type
- The type of metadata. This defines the datatype of the value.value
- The value of this metadata. The type of this is determined by the type arg.
IdASException
- TODO: Specify whether this also adds the produced IMetadata to this Object, or if addItem must subsequently be called.TODO: If this method also adds, note that updates to the returned IMetadata affect the added item (i.e. a reference, not a copy is stored).
IHasMetadata.createMetadata(URI, IPropertyValue)
public void addMetadata(IMetadata metadata) throws IdASException
addMetadata
in interface IHasMetadata
IdASException
IHasMetadata.addMetadata(IMetadata)
public void removeMetadata(IMetadata metadata) throws IdASException
removeMetadata
in interface IHasMetadata
IdASException
IHasMetadata.removeMetadata(IMetadata)
public Iterable<IMetadata> getMetadataSet() throws IdASException
IHasMetadata
getMetadataSet
in interface IHasMetadata
IdASException
IHasMetadata.getMetadataSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |