public class FilesystemDataElement extends AbstractFileDataElement implements DataElement
Constructor and Description |
---|
FilesystemDataElement(FilesystemDigitalObject dobj,
java.io.File file,
java.lang.String elName) |
Modifier and Type | Method and Description |
---|---|
void |
deleteAttribute(java.lang.String name)
Deletes a particular attribute.
|
void |
deleteAttributes(java.util.List<java.lang.String> names)
Deletes multiple attributes.
|
java.lang.String |
getAttribute(java.lang.String name)
Returns the value for a particular attribute
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns a Map view of the attributes of the data element.
|
DigitalObject |
getDigitalObject()
Returns the digital object of this data element.
|
java.io.File |
getFile()
Returns a file for the data of the data element.
|
java.lang.String |
getName()
Returns the name of this data element.
|
java.lang.String |
getType()
Returns the MIME type of the given data.
|
CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
listAttributes()
Returns a CloseableIterator view of the attributes of the data element.
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets a particular attribute.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the value of multiple attributes.
|
getSize, read, write
delete, read, setType, write
public FilesystemDataElement(FilesystemDigitalObject dobj, java.io.File file, java.lang.String elName)
public DigitalObject getDigitalObject()
DataElement
getDigitalObject
in interface DataElement
public java.lang.String getName()
DataElement
getName
in interface DataElement
public java.util.Map<java.lang.String,java.lang.String> getAttributes() throws RepositoryException
DataElement
getAttributes
in interface DataElement
getAttributes
in class AbstractDataElement
RepositoryException
public CloseableIterator<java.util.Map.Entry<java.lang.String,java.lang.String>> listAttributes() throws RepositoryException
DataElement
listAttributes
in interface DataElement
listAttributes
in class AbstractDataElement
RepositoryException
public java.lang.String getAttribute(java.lang.String name) throws RepositoryException
DataElement
getAttribute
in interface DataElement
getAttribute
in class AbstractDataElement
name
- the attribute nameRepositoryException
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes) throws RepositoryException
DataElement
setAttributes
in interface DataElement
setAttributes
in class AbstractDataElement
attributes
- the attributes to set, mapped to their new valuesRepositoryException
public void setAttribute(java.lang.String name, java.lang.String value) throws RepositoryException
DataElement
setAttribute
in interface DataElement
name
- the attribute namevalue
- the attribute value; if null, the attribute will be deleted.RepositoryException
public void deleteAttributes(java.util.List<java.lang.String> names) throws RepositoryException
DataElement
deleteAttributes
in interface DataElement
deleteAttributes
in class AbstractDataElement
names
- the names of the attributes to deleteRepositoryException
public void deleteAttribute(java.lang.String name) throws RepositoryException
DataElement
deleteAttribute
in interface DataElement
name
- the name of the attribute to deleteRepositoryException
public java.lang.String getType() throws RepositoryException
DataElement
getType
in interface DataElement
getType
in class AbstractDataElement
RepositoryException
public java.io.File getFile()
FileDataElement
getFile
in interface FileDataElement