PAJES 2.3.9

org.pajes.html
Class DocType

java.lang.Object
  extended byorg.pajes.html.DocType
All Implemented Interfaces:
java.lang.Cloneable

public class DocType
extends java.lang.Object
implements java.lang.Cloneable

Represents a Document Type Declaration.


Field Summary
static DocType HTML_3_0
          HTML 3.0
static DocType HTML_3_2
          HTML 3.2
static DocType HTML_4_01_FRAMESET
          HTML 4.01 Frameset
static DocType HTML_4_01_STRICT
          HTML 4.01 Strict
static DocType HTML_4_01_TRANSITIONAL
          HTML 4.01 Transitional
static DocType XHTML_1_0_FRAMESET
          XHTML 1.0 Frameset
static DocType XHTML_1_0_STRICT
          XHTML 1.0 Strict
static DocType XHTML_1_0_TRANSITIONAL
          XHTML 1.0 Transitional
 
Constructor Summary
DocType(java.lang.String string)
          Parses a String and create a Document Type Declaration.
DocType(java.lang.String element, java.lang.String availability, java.lang.String fpi)
          Creates a Document Type Declaration.
DocType(java.lang.String element, java.lang.String availability, java.lang.String fpi, java.lang.String url)
          Creates a Document Type Declaration.
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getElement()
          Returns the top level element type declared in the DTD.
 java.lang.String getFPI()
          Returns the Formal Public Identifier.
 java.lang.String getURL()
          Returns the URL to the DTD being referenced.
 boolean isPublic()
          Returns true if the identifier is a publicly accessible object (PUBLIC).
 void setAvailability(java.lang.String availability)
          Sets whether the identifier is a publicly accessible object (PUBLIC) or a system resource (SYSTEM) such as a local file or URL.
 void setElement(java.lang.String string)
          Sets the top level element type declared in the DTD.
 void setFPI(java.lang.String fpi)
          Sets the Formal Public Identifier.
 void setPublic()
          Specifies that the identifier is a publicly accessible object.
 void setURL(java.lang.String url)
          Sets the optional explicit URL to the DTD being referenced.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HTML_3_0

public static final DocType HTML_3_0
HTML 3.0


HTML_3_2

public static final DocType HTML_3_2
HTML 3.2


HTML_4_01_STRICT

public static final DocType HTML_4_01_STRICT
HTML 4.01 Strict


HTML_4_01_TRANSITIONAL

public static final DocType HTML_4_01_TRANSITIONAL
HTML 4.01 Transitional


HTML_4_01_FRAMESET

public static final DocType HTML_4_01_FRAMESET
HTML 4.01 Frameset


XHTML_1_0_STRICT

public static final DocType XHTML_1_0_STRICT
XHTML 1.0 Strict


XHTML_1_0_TRANSITIONAL

public static final DocType XHTML_1_0_TRANSITIONAL
XHTML 1.0 Transitional


XHTML_1_0_FRAMESET

public static final DocType XHTML_1_0_FRAMESET
XHTML 1.0 Frameset

Constructor Detail

DocType

public DocType(java.lang.String element,
               java.lang.String availability,
               java.lang.String fpi)
Creates a Document Type Declaration.

Parameters:
element - the top level element type declared in the DTD.
availability - indicates whether the identifier is a publicly accessible object (PUBLIC) or a system resource (SYSTEM) such as a local file or URL.
fpi - the Formal Public Identifier.

DocType

public DocType(java.lang.String element,
               java.lang.String availability,
               java.lang.String fpi,
               java.lang.String url)
Creates a Document Type Declaration.

Parameters:
element - the top level element type declared in the DTD.
availability - indicates whether the identifier is a publicly accessible object (PUBLIC) or a system resource (SYSTEM) such as a local file or URL.
fpi - the Formal Public Identifier.
url - the optional explicit URL to the DTD being referenced.

DocType

public DocType(java.lang.String string)
        throws java.text.ParseException
Parses a String and create a Document Type Declaration.

Parameters:
string - the String containing a DOCTYPE.
Throws:
java.text.ParseException - if an error occurs parsing the String.
Method Detail

setAvailability

public void setAvailability(java.lang.String availability)
Sets whether the identifier is a publicly accessible object (PUBLIC) or a system resource (SYSTEM) such as a local file or URL.

Parameters:
availability - either PUBLIC or SYSTEM.
Throws:
java.lang.IllegalArgumentException - if an invalid availability is specified.

setElement

public void setElement(java.lang.String string)
Sets the top level element type declared in the DTD.

Parameters:
string - the top level element type declared in the DTD.

getElement

public java.lang.String getElement()
Returns the top level element type declared in the DTD.

Returns:
the top level element type declared in the DTD.

setFPI

public void setFPI(java.lang.String fpi)
Sets the Formal Public Identifier.

Parameters:
fpi - the Formal Public Identifier.
Throws:
java.lang.NullPointerException - if the FPI is null.

getFPI

public java.lang.String getFPI()
Returns the Formal Public Identifier.

Returns:
the Formal Public Identifier.

setPublic

public void setPublic()
Specifies that the identifier is a publicly accessible object.


isPublic

public boolean isPublic()
Returns true if the identifier is a publicly accessible object (PUBLIC).

Returns:
true if the identifier is a publicly accessible object

setURL

public void setURL(java.lang.String url)
Sets the optional explicit URL to the DTD being referenced.

Parameters:
url - the URL to the DTD being referenced.

getURL

public java.lang.String getURL()
Returns the URL to the DTD being referenced.

Returns:
the URL to the DTD being referenced, or null if no explicit URL is defined.

clone

public java.lang.Object clone()
See Also:
Object.clone()

toString

public java.lang.String toString()
See Also:
Object.toString()

PAJES 2.3.9

Copyright © 2002-2003 Viridian Pty Limited. All Rights Reserved.