Class ApplicationXmlVersion
- java.lang.Object
-
- org.codehaus.cargo.module.application.ApplicationXmlVersion
-
- All Implemented Interfaces:
Comparable<ApplicationXmlVersion>
public final class ApplicationXmlVersion extends Object implements Comparable<ApplicationXmlVersion>
Enumerated type that represents the version of the deployment descriptor of a enterprise application (application.xml).
-
-
Field Summary
Fields Modifier and Type Field Description static ApplicationXmlVersion
V1_2
Instance for version 1.2.static ApplicationXmlVersion
V1_3
Instance for version 1.3.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ApplicationXmlVersion other)
String
getPublicId()
Returns the public ID of the document type corresponding to the descriptor version.String
getSystemId()
Returns the system ID of the document type corresponding to the descriptor version.String
getVersion()
Returns the tag name.String
toString()
static ApplicationXmlVersion
valueOf(String thePublicId)
Returns the version corresponding to the given public ID.static ApplicationXmlVersion
valueOf(org.jdom2.DocType theDocType)
Returns the version corresponding to the given document type.
-
-
-
Field Detail
-
V1_2
public static final ApplicationXmlVersion V1_2
Instance for version 1.2.
-
V1_3
public static final ApplicationXmlVersion V1_3
Instance for version 1.3.
-
-
Method Detail
-
compareTo
public int compareTo(ApplicationXmlVersion other)
- Specified by:
compareTo
in interfaceComparable<ApplicationXmlVersion>
-
getVersion
public String getVersion()
Returns the tag name.- Returns:
- The tag name
-
getPublicId
public String getPublicId()
Returns the public ID of the document type corresponding to the descriptor version.- Returns:
- The public ID
-
getSystemId
public String getSystemId()
Returns the system ID of the document type corresponding to the descriptor version.- Returns:
- The system ID
-
valueOf
public static ApplicationXmlVersion valueOf(org.jdom2.DocType theDocType) throws NullPointerException
Returns the version corresponding to the given document type.- Parameters:
theDocType
- The document type- Returns:
- The version that matches the document type, or
null
if the doctype is not recognized - Throws:
NullPointerException
- If the document type isnull
-
valueOf
public static ApplicationXmlVersion valueOf(String thePublicId)
Returns the version corresponding to the given public ID.- Parameters:
thePublicId
- The public ID- Returns:
- The version that matches the public ID, or
null
if the ID is not recognized
-
-