Class AuthorDocumentType

  • All Implemented Interfaces:
    java.lang.Cloneable

    @API(type=EXTENDABLE,
         src=PUBLIC)
    public class AuthorDocumentType
    extends java.lang.Object
    implements java.lang.Cloneable
    Author structure representing DOCTYPE information as present in the Author document.
    • Constructor Detail

      • AuthorDocumentType

        public AuthorDocumentType​(java.lang.String name,
                                  java.lang.String systemID,
                                  java.lang.String publicID,
                                  java.lang.String doctypeContent)
        Constructor.
        Parameters:
        name - The DOCTYPE name.
        systemID - The systemID.
        publicID - Public id.
        doctypeContent - The DOCTYPE content Example for creating a Docbook AuthorDocumentType:
         AuthorDocumentType doctype = new AuthorDocumentType(
             "article", 
             "http://www.docbook.org/xml/4.4/docbookx.dtd", 
             "-//OASIS//DTD DocBook XML V4.4//EN",
             "<!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook XML V4.4//EN\"\n" + 
             "             \"http://www.docbook.org/xml/4.4/docbookx.dtd\"[\n" + 
             " <!ENTITY ent 'this is an entity'>\n" + 
             "]>");
         
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
      • getPublicId

        public java.lang.String getPublicId()
        Returns:
        The public identifier of the external subset.
      • getSystemId

        public java.lang.String getSystemId()
        Returns:
        The system identifier of the external subset. This may be an absolute URI or not.
      • getContent

        public java.lang.String getContent()
        Returns:
        The whole content of the DOCTYPE for serialization Example:
         <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                              "http://www.docbook.org/xml/4.4/docbookx.dtd"[
           <!ENTITY ent 'this is an entity'>
         ]>
         
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • serializeDoctype

        public java.lang.String serializeDoctype()
        Serialize the doctype
        Returns:
        The serialized doctype
      • clone

        public AuthorDocumentType clone()
        Clones this doctype.
        Overrides:
        clone in class java.lang.Object
        See Also:
        Object.clone()