public abstract class DataElement extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,String> |
attributes
The (name, value) attribute pairs
|
| Constructor and Description |
|---|
DataElement() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAttribute(String attrName)
Deletes an attribute of the DataElement.
|
abstract void |
destroy() |
Map<String,String> |
getAllAttributes()
Returns a
Map which contains all the attributes of the DataElement. |
String |
getAttributeValue(String attrName)
Returns the value of the attribute with name attrName.
|
abstract InputStream |
getContent()
Abstract method which returns the content of the DataElement in a stream.
|
ContentType |
getContentType()
Returns the
ContentType of the DataElement. |
String |
getId()
Returns the id of the DataElement.
|
void |
setAttribute(String attrName,
String attrVal)
Puts an attribute in the DataElement.
|
void |
setContentType(ContentType contentType)
Sets the
ContentType of the DataElement. |
void |
setId(String id)
Sets the id of the DataElement.
|
public String getId()
public void setId(String id)
id - the id of the DataElement.public ContentType getContentType()
ContentType of the DataElement.ContentType of the DataElement.public void setContentType(ContentType contentType)
ContentType of the DataElement.contentType - The ContentType of the DataElement.public void setAttribute(String attrName, String attrVal)
attrName - The name of the attribute.attrVal - The value of the attribute.public void deleteAttribute(String attrName)
attrName - The name of the attribute which will be deleted.public String getAttributeValue(String attrName)
attrName - The name of the attribute whose value will be returned.public Map<String,String> getAllAttributes()
Map which contains all the attributes of the DataElement.Map with all the attributes of the DataElement.public abstract InputStream getContent()
public abstract void destroy()
Copyright © 2014. All Rights Reserved.