Class PDFEmbeddedFileAttachment

  • All Implemented Interfaces:
    ExtensionAttachment, org.apache.xmlgraphics.util.XMLizable

    public class PDFEmbeddedFileAttachment
    extends PDFExtensionAttachment
    This is the pass-through value object for the PDF extension.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String ATT_DESC
      a description of the file to be embedded
      private static java.lang.String ATT_NAME
      name of file to be embedded
      private static java.lang.String ATT_SRC
      source of file to be embedded (URI)
      private java.lang.String desc
      description attribute (optional)
      protected static java.lang.String ELEMENT
      element name
      private java.lang.String filename
      filename attribute
      private static long serialVersionUID  
      private java.lang.String src
      source name attribute
      private java.lang.String unicodeFilename
      unicode filename attribute
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCategory()
      This method returns a category URI that allows a processor (layout manager or renderer) to determine if it supports this object.
      java.lang.String getDesc()
      Returns the file description.
      protected java.lang.String getElement()  
      java.lang.String getFilename()
      Returns the file name.
      java.lang.String getSrc()
      Returns the source URI of the file.
      java.lang.String getUnicodeFilename()
      Returns the unicode file name.
      void setDesc​(java.lang.String desc)
      Sets the description of the file.
      void setFilename​(java.lang.String name)
      Sets the file name.
      void setSrc​(java.lang.String src)
      Sets the source URI of the file.
      void toSAX​(org.xml.sax.ContentHandler handler)
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ATT_NAME

        private static final java.lang.String ATT_NAME
        name of file to be embedded
        See Also:
        Constant Field Values
      • ATT_SRC

        private static final java.lang.String ATT_SRC
        source of file to be embedded (URI)
        See Also:
        Constant Field Values
      • ATT_DESC

        private static final java.lang.String ATT_DESC
        a description of the file to be embedded
        See Also:
        Constant Field Values
      • filename

        private java.lang.String filename
        filename attribute
      • unicodeFilename

        private java.lang.String unicodeFilename
        unicode filename attribute
      • desc

        private java.lang.String desc
        description attribute (optional)
      • src

        private java.lang.String src
        source name attribute
    • Constructor Detail

      • PDFEmbeddedFileAttachment

        public PDFEmbeddedFileAttachment()
        No-argument contructor.
      • PDFEmbeddedFileAttachment

        public PDFEmbeddedFileAttachment​(java.lang.String filename,
                                         java.lang.String src,
                                         java.lang.String desc)
        Default constructor.
        Parameters:
        filename - the name of the file
        src - the location of the file
        desc - the description of the file
    • Method Detail

      • getFilename

        public java.lang.String getFilename()
        Returns the file name.
        Returns:
        the file name
      • getUnicodeFilename

        public java.lang.String getUnicodeFilename()
        Returns the unicode file name.
        Returns:
        the file name
      • setFilename

        public void setFilename​(java.lang.String name)
        Sets the file name.
        Parameters:
        name - The file name to set.
      • getDesc

        public java.lang.String getDesc()
        Returns the file description.
        Returns:
        the description
      • setDesc

        public void setDesc​(java.lang.String desc)
        Sets the description of the file.
        Parameters:
        desc - the description to set
      • getSrc

        public java.lang.String getSrc()
        Returns the source URI of the file.
        Returns:
        the source URI
      • setSrc

        public void setSrc​(java.lang.String src)
        Sets the source URI of the file.
        Parameters:
        src - the source URI
      • getCategory

        public java.lang.String getCategory()
        This method returns a category URI that allows a processor (layout manager or renderer) to determine if it supports this object.
        Specified by:
        getCategory in interface ExtensionAttachment
        Overrides:
        getCategory in class PDFExtensionAttachment
        Returns:
        the category URI
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getElement

        protected java.lang.String getElement()
        Returns:
        the element name
      • toSAX

        public void toSAX​(org.xml.sax.ContentHandler handler)
                   throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException