Class Content


  • public class Content
    extends java.lang.Object
    Either contains or links to the content of the entry.
    Author:
    Jerome Louvel
    • Constructor Summary

      Constructors 
      Constructor Description
      Content()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.restlet.data.Reference getExternalRef()
      Returns the reference to the external representation.
      org.restlet.data.MediaType getExternalType()
      Returns the expected media type of the external content.
      org.restlet.representation.Representation getInlineContent()
      Returns the representation for inline content.
      boolean isExternal()
      Indicates if the content is available externally.
      boolean isInline()
      Indicates if the content is available inline.
      boolean isToEncode()
      Returns true if the content is to be encoded.
      void setExternalRef​(org.restlet.data.Reference externalRef)
      Sets the reference to the external representation.
      void setExternalType​(org.restlet.data.MediaType externalType)
      Sets the expected media type of the external content.
      void setInlineContent​(org.restlet.representation.Representation inlineContent)
      Sets the representation for inline content.
      void setToEncode​(boolean toEncode)
      Indicates if the content is to be encoded.
      void writeElement​(XmlWriter writer)
      Writes the current object as an XML element using the given SAX writer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Content

        public Content()
        Constructor.
    • Method Detail

      • getExternalRef

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

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

        public org.restlet.representation.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​(org.restlet.data.Reference externalRef)
        Sets the reference to the external representation.
        Parameters:
        externalRef - The reference to the external representation.
      • setExternalType

        public void setExternalType​(org.restlet.data.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​(org.restlet.representation.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