Oxygen XML Editor 11.2 Author API

ro.sync.ecss.extensions.api
Class AuthorDocumentType

java.lang.Object
  extended by ro.sync.ecss.extensions.api.AuthorDocumentType

public class AuthorDocumentType
extends Object

Author structure representing DOCTYPE information as present in the Author document.


Constructor Summary
AuthorDocumentType(String name, String systemID, String publicID, String doctypeContent)
          Constructor.
 
Method Summary
 AuthorDocumentType clone()
          Clones this doctype.
 boolean equals(Object obj)
           
static StringBuffer extractDoctypeContentFromDoctypeInfo(String name, String publicID, String systemID, String internalSubset)
          Recreate DOCTYPE content from the Document Type information.
 String getContent()
           
 String getName()
           
 String getPublicId()
           
 String getSystemId()
           
 String serializeDoctype()
          Serialize the doctype
 String toString()
           
static boolean verifyEquals(String o1, String o2)
          Verify if the two objects are equal, including the cases when they are null.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthorDocumentType

public AuthorDocumentType(String name,
                          String systemID,
                          String publicID,
                          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 String getName()
Returns:
The name of DTD; i.e., the name immediately following the DOCTYPE keyword.

getPublicId

public String getPublicId()
Returns:
The public identifier of the external subset.

getSystemId

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

getContent

public 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(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

verifyEquals

public static boolean verifyEquals(String o1,
                                   String o2)
Verify if the two objects are equal, including the cases when they are null.

Parameters:
o1 - First object to be compared.
o2 - Second object to be compared.
Returns:
True if objects are equal or both null, false otherwise.

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

serializeDoctype

public String serializeDoctype()
Serialize the doctype

Returns:
The serialized doctype

extractDoctypeContentFromDoctypeInfo

public static StringBuffer extractDoctypeContentFromDoctypeInfo(String name,
                                                                String publicID,
                                                                String systemID,
                                                                String internalSubset)
Recreate DOCTYPE content from the Document Type information.

Parameters:
name - DOCYTPE name
publicID - DOCTYPE public ID
systemID - DOCTYPE System ID
internalSubset - Internal subset
Returns:
The document type content if could not extract precisely from file.

clone

public AuthorDocumentType clone()
Clones this doctype.

Overrides:
clone in class Object
See Also:
Object.clone()

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.