Class MemoryDocumentMetaData
- java.lang.Object
-
- org.pentaho.reporting.libraries.docbundle.MemoryDocumentMetaData
-
- All Implemented Interfaces:
Serializable
,Cloneable
,DocumentMetaData
,WriteableDocumentMetaData
public class MemoryDocumentMetaData extends Object implements WriteableDocumentMetaData
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MemoryDocumentMetaData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
Object
getBundleAttribute(String namespace, String attributeName)
Returns a single document-meta-data attribute.String
getBundleType()
Returns the bundle's defined mime-type.String
getEntryAttribute(String entryName, String attributeName)
String[]
getEntryAttributeNames(String entryName)
String
getEntryMimeType(String entry)
Returns the declared mime-type for the given entry.String[]
getManifestEntryNames()
String[]
getMetaDataNames(String namespace)
String[]
getMetaDataNamespaces()
boolean
removeEntry(String entry)
void
setBundleAttribute(String namespace, String name, Object value)
void
setBundleType(String type)
void
setEntryAttribute(String entryName, String attributeName, String value)
void
setEntryMimeType(String entry, String type)
-
-
-
Method Detail
-
setBundleType
public void setBundleType(String type)
- Specified by:
setBundleType
in interfaceWriteableDocumentMetaData
-
setBundleAttribute
public void setBundleAttribute(String namespace, String name, Object value)
- Specified by:
setBundleAttribute
in interfaceWriteableDocumentMetaData
-
getBundleType
public String getBundleType()
Returns the bundle's defined mime-type. This value is read from the "/mimetype" entry (if existent) else from the manifest's "/" entry. The bundle type acts as a hint for the content processor on what content the main document contains. This entry is declarative - if the actual main document does not match the declared bundle type, parsing is allowed to fail.- Specified by:
getBundleType
in interfaceDocumentMetaData
- Returns:
- the bundle type.
-
getEntryMimeType
public String getEntryMimeType(String entry)
Returns the declared mime-type for the given entry. The mime-type is declarative - if it does not match the actual content of the entry, the content processor may raise an error.- Specified by:
getEntryMimeType
in interfaceDocumentMetaData
- Parameters:
entry
- the entry path.- Returns:
- the mime-type.
-
getBundleAttribute
public Object getBundleAttribute(String namespace, String attributeName)
Returns a single document-meta-data attribute. Each attribute is specified by a namespace and attribute name and contains a single string value.- Specified by:
getBundleAttribute
in interfaceDocumentMetaData
- Parameters:
namespace
- the namespace uriattributeName
- the attribute name- Returns:
- the attribute value.
-
getManifestEntryNames
public String[] getManifestEntryNames()
- Specified by:
getManifestEntryNames
in interfaceDocumentMetaData
-
setEntryMimeType
public void setEntryMimeType(String entry, String type)
- Specified by:
setEntryMimeType
in interfaceWriteableDocumentMetaData
-
setEntryAttribute
public void setEntryAttribute(String entryName, String attributeName, String value)
- Specified by:
setEntryAttribute
in interfaceWriteableDocumentMetaData
-
removeEntry
public boolean removeEntry(String entry)
- Specified by:
removeEntry
in interfaceWriteableDocumentMetaData
-
getMetaDataNamespaces
public String[] getMetaDataNamespaces()
- Specified by:
getMetaDataNamespaces
in interfaceDocumentMetaData
-
getMetaDataNames
public String[] getMetaDataNames(String namespace)
- Specified by:
getMetaDataNames
in interfaceDocumentMetaData
-
getEntryAttribute
public String getEntryAttribute(String entryName, String attributeName)
- Specified by:
getEntryAttribute
in interfaceDocumentMetaData
-
getEntryAttributeNames
public String[] getEntryAttributeNames(String entryName)
- Specified by:
getEntryAttributeNames
in interfaceDocumentMetaData
-
clone
public Object clone() throws CloneNotSupportedException
- Specified by:
clone
in interfaceDocumentMetaData
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-