Class SimpleLiteral

java.lang.Object
org.docx4j.docProps.core.dc.elements.SimpleLiteral
Direct Known Subclasses:
Box, DCMIType, DDC, IMT, ISO3166, ISO6392, LCC, LCSH, MESH, Period, Point, RFC1766, RFC3066, TGN, UDC, URI, W3CDTF

public class SimpleLiteral
extends java.lang.Object
This is the default type for all of the DC elements. It permits text content only with optional xml:lang attribute. Text is allowed because mixed="true", but sub-elements are disallowed because minOccurs="0" and maxOccurs="0" are on the xs:any tag. This complexType allows for restriction or extension permitting child elements.

Java class for SimpleLiteral complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="SimpleLiteral">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <any/>
       </sequence>
       <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
     </restriction>
   </complexContent>
 </complexType>
 
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected java.util.List<java.lang.String> content  
    protected java.lang.String lang  
  • Constructor Summary

    Constructors
    Constructor Description
    SimpleLiteral()  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<java.lang.String> getContent()
    This is the default type for all of the DC elements.
    java.lang.String getLang()
    Gets the value of the lang property.
    void setLang​(java.lang.String value)
    Sets the value of the lang property.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • content

      protected java.util.List<java.lang.String> content
    • lang

      protected java.lang.String lang
  • Constructor Details

    • SimpleLiteral

      public SimpleLiteral()
  • Method Details

    • getContent

      public java.util.List<java.lang.String> getContent()
      This is the default type for all of the DC elements. It permits text content only with optional xml:lang attribute. Text is allowed because mixed="true", but sub-elements are disallowed because minOccurs="0" and maxOccurs="0" are on the xs:any tag. This complexType allows for restriction or extension permitting child elements. Gets the value of the content property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the content property.

      For example, to add a new item, do as follows:

          getContent().add(newItem);
       

      Objects of the following type(s) are allowed in the list String

    • getLang

      public java.lang.String getLang()
      Gets the value of the lang property.
      Returns:
      possible object is String
    • setLang

      public void setLang​(java.lang.String value)
      Sets the value of the lang property.
      Parameters:
      value - allowed object is String