Package org.daisy.dotify.api.writer
Class MetaDataItem
- java.lang.Object
-
- org.daisy.dotify.api.writer.MetaDataItem
-
public class MetaDataItem extends Object
Provides a simple meta data item. A meta data item can contain an element name, text content and an attribute key/value. Thereby, this model supports the two most common types of meta data elements in XML-formats while remaining reasonably well-defined:- Specific element with content, for example:
<dc:title>Example</dc:title>
- Generic element + specific attribute key and value, for example:
<meta name="dc:title" value="Example"/>
- Specific element with content, for example:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetaDataItem.Builder
Provides a meta data item builder.
-
Constructor Summary
Constructors Constructor Description MetaDataItem(QName key, String value)
Creates a new meta data item with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeItem
getAttribute()
Gets the attribute, if specified or null.QName
getKey()
Gets the element name.String
getValue()
Gets the text contents of this meta data item.
-
-
-
Method Detail
-
getKey
public QName getKey()
Gets the element name.- Returns:
- returns the name of the meta data item
-
getValue
public String getValue()
Gets the text contents of this meta data item.- Returns:
- returns the text contents
-
getAttribute
public AttributeItem getAttribute()
Gets the attribute, if specified or null.- Returns:
- the attribute
-
-