Class Content


  • public class Content
    extends java.lang.Object
    Either contains or links to the content of the entry.
    • Field Detail

      • externalRef

        private volatile Reference externalRef
        Reference to the external representation.
      • externalType

        private volatile MediaType externalType
        Expected media type of the external content.
      • inlineContent

        private volatile Representation inlineContent
        Representation for inline content.
      • toEncode

        private boolean toEncode
        Must the content be encoded or not?
    • Constructor Detail

      • Content

        public Content()
        Constructor.
    • Method Detail

      • getExternalRef

        public Reference getExternalRef()
        Returns the reference to the external representation.
        Returns:
        The reference to the external representation.
      • getExternalType

        public MediaType getExternalType()
        Returns the expected media type of the external content.
        Returns:
        The expected media type of the external content.
      • getInlineContent

        public Representation getInlineContent()
        Returns the representation for inline content.
        Returns:
        The representation for inline content.
      • isExternal

        public boolean isExternal()
        Indicates if the content is available externally.
        Returns:
        True if the content is available externally.
      • isInline

        public boolean isInline()
        Indicates if the content is available inline.
        Returns:
        True if the content is available inline.
      • isToEncode

        public boolean isToEncode()
        Returns true if the content is to be encoded.
        Returns:
        True if the content is to be encoded.
      • setExternalRef

        public void setExternalRef​(Reference externalRef)
        Sets the reference to the external representation.
        Parameters:
        externalRef - The reference to the external representation.
      • setExternalType

        public void setExternalType​(MediaType externalType)
        Sets the expected media type of the external content.
        Parameters:
        externalType - The expected media type of the external content.
      • setInlineContent

        public void setInlineContent​(Representation inlineContent)
        Sets the representation for inline content.
        Parameters:
        inlineContent - The representation for inline content.
      • setToEncode

        public void setToEncode​(boolean toEncode)
        Indicates if the content is to be encoded.
        Parameters:
        toEncode - True if the content is to be encoded.
      • writeElement

        public void writeElement​(XmlWriter writer)
                          throws org.xml.sax.SAXException
        Writes the current object as an XML element using the given SAX writer.
        Parameters:
        writer - The SAX writer.
        Throws:
        org.xml.sax.SAXException