Class 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"/>
       
    • Constructor Detail

      • MetaDataItem

        public MetaDataItem​(QName key,
                            String value)
        Creates a new meta data item with the specified parameters.
        Parameters:
        key - the element name
        value - the text contents of the element
    • 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