org.codehaus.cargo.module.ejb
Class EjbJarXmlVersion

java.lang.Object
  extended by org.codehaus.cargo.module.ejb.EjbJarXmlVersion
All Implemented Interfaces:
java.lang.Comparable

public final class EjbJarXmlVersion
extends java.lang.Object
implements java.lang.Comparable

Enumerated type that represents the version of the deployment descriptor of a ejb descriptor (ejb-jar.xml).

Version:
$Id: EjbJarXmlVersion.java 1088 2006-07-15 19:37:00Z vmassol $

Field Summary
static EjbJarXmlVersion V2_0
          Instance for version 2.0.
 
Method Summary
 int compareTo(java.lang.Object other)
          
 boolean equals(java.lang.Object other)
          
 java.lang.String getPublicId()
          Returns the public ID of the document type corresponding to the descriptor version.
 java.lang.String getSystemId()
          Returns the system ID of the document type corresponding to the descriptor version.
 java.lang.String getVersion()
          Returns the tag name.
 int hashCode()
          
 java.lang.String toString()
          
static EjbJarXmlVersion valueOf(org.w3c.dom.DocumentType docType)
          Returns the version corresponding to the given document type.
static EjbJarXmlVersion valueOf(java.lang.String publicId)
          Returns the version corresponding to the given public ID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

V2_0

public static final EjbJarXmlVersion V2_0
Instance for version 2.0.

Method Detail

compareTo

public int compareTo(java.lang.Object other)

Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(T)

equals

public boolean equals(java.lang.Object other)

Overrides:
equals in class java.lang.Object
See Also:
Object.toString()

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

getVersion

public java.lang.String getVersion()
Returns the tag name.

Returns:
The tag name

getPublicId

public java.lang.String getPublicId()
Returns the public ID of the document type corresponding to the descriptor version.

Returns:
The public ID

getSystemId

public java.lang.String getSystemId()
Returns the system ID of the document type corresponding to the descriptor version.

Returns:
The system ID

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

valueOf

public static EjbJarXmlVersion valueOf(org.w3c.dom.DocumentType docType)
                                throws java.lang.NullPointerException
Returns the version corresponding to the given document type.

Parameters:
docType - The document type
Returns:
The version that matches the document type, or null if the doctype is not recognized
Throws:
java.lang.NullPointerException - If the document type is null

valueOf

public static EjbJarXmlVersion valueOf(java.lang.String publicId)
Returns the version corresponding to the given public ID.

Parameters:
publicId - The public ID
Returns:
The version that matches the public ID, or null if the ID is not recognized


Copyright © 2004-2010 Codehaus. All Rights Reserved.