org.apache.cocoon.components.serializers.util
Class DocType

java.lang.Object
  extended by org.apache.cocoon.components.serializers.util.DocType
Direct Known Subclasses:
SGMLDocType

public class DocType
extends Object

The DocType class encapsulates informations regarding the document type public and system IDs and root element name.

Version:
CVS $Id: DocType.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Pier Fumagalli, February 2003

Field Summary
protected  String public_id
          The configured system identifier.
protected  String root_name
          The name of the root element.
protected  String system_id
          The configured public identifier.
 
Constructor Summary
DocType(String root_name)
          Create a new DocType instance.
DocType(String root_name, String system_id)
          Create a new DocType instance.
DocType(String root_name, String public_id, String system_id)
          Create a new DocType instance.
 
Method Summary
 boolean equals(Object object)
          Check if the specified object is equal to this DocType instance.
 String getName()
          Return the document root element name.
 String getPublicId()
          Return the document type public identifier or null if none configured..
 String getSystemId()
          Return the document type system identifier or null if none configured..
 int hashCode()
          Returns the hash code value for this docType
 String toString()
          Return the document type declaration as a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

root_name

protected String root_name
The name of the root element.


public_id

protected String public_id
The configured system identifier.


system_id

protected String system_id
The configured public identifier.

Constructor Detail

DocType

public DocType(String root_name)
Create a new DocType instance.

Parameters:
root_name - The document root element name.

DocType

public DocType(String root_name,
               String system_id)
Create a new DocType instance.

Parameters:
root_name - The document root element name.
system_id - The document type system identifier.

DocType

public DocType(String root_name,
               String public_id,
               String system_id)
Create a new DocType instance.

Parameters:
root_name - The document root element name.
public_id - The document type public identifier.
system_id - The document type system identifier.
Method Detail

getName

public String getName()
Return the document root element name.


getPublicId

public String getPublicId()
Return the document type public identifier or null if none configured..


getSystemId

public String getSystemId()
Return the document type system identifier or null if none configured..


toString

public String toString()
Return the document type declaration as a string

Overrides:
toString in class Object

equals

public boolean equals(Object object)
Check if the specified object is equal to this DocType instance.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hash code value for this docType

Overrides:
hashCode in class Object


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.