Package org.codehaus.cargo.module
Class AbstractDescriptorType
- java.lang.Object
-
- org.jdom.DefaultJDOMFactory
-
- org.codehaus.cargo.module.AbstractDescriptorType
-
- All Implemented Interfaces:
DescriptorType
,org.jdom.JDOMFactory
- Direct Known Subclasses:
ApplicationXmlType
,EjbJarXmlType
,IbmEjbJarBndXmiType
,IbmWebBndXmiType
,JBossWebXmlType
,JBossXmlType
,OrionEjbJarXmlType
,OrionWebXmlType
,ResinWebXmlType
,TomcatContextXmlType
,WeblogicEjbJarXmlType
,WeblogicXmlType
,WebXmlType
public class AbstractDescriptorType extends org.jdom.DefaultJDOMFactory implements DescriptorType
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDescriptorType(DescriptorType parent, Class descriptorClass, Grammar grammar)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTag(DescriptorTag tag)
Add a descriptor tag to this descriptor type.org.jdom.Document
document(org.jdom.Element rootElement)
Create a JDOM Document.org.jdom.Element
element(String name)
org.jdom.Element
element(String name, org.jdom.Namespace namespace)
Collection<DescriptorTag>
getAllTags()
Get all defined tags for this descriptor.DescriptorIo
getDescriptorIo()
Get the IO class for this descriptor type.Grammar
getGrammar()
Get the grammar for this descriptor type.org.jdom.JDOMFactory
getJDOMFactory()
DescriptorTag
getTagByName(String name)
Get a descriptor tag by name.protected void
setDescriptorIo(DescriptorIo descriptorIo)
Set the IO class for this descriptor type.-
Methods inherited from class org.jdom.DefaultJDOMFactory
addContent, addNamespaceDeclaration, attribute, attribute, attribute, attribute, cdata, comment, docType, docType, docType, document, document, element, element, entityRef, entityRef, entityRef, processingInstruction, processingInstruction, setAttribute, text
-
-
-
-
Constructor Detail
-
AbstractDescriptorType
protected AbstractDescriptorType(DescriptorType parent, Class descriptorClass, Grammar grammar)
Constructor.- Parameters:
parent
- the parent of this typedescriptorClass
- the class that implements this descriptorgrammar
- grammar for this type (or null if none).
-
-
Method Detail
-
getDescriptorIo
public DescriptorIo getDescriptorIo()
Get the IO class for this descriptor type.- Specified by:
getDescriptorIo
in interfaceDescriptorType
- Returns:
- the IO class
-
setDescriptorIo
protected void setDescriptorIo(DescriptorIo descriptorIo)
Set the IO class for this descriptor type.- Parameters:
descriptorIo
- the IO class
-
getGrammar
public Grammar getGrammar()
Get the grammar for this descriptor type.- Specified by:
getGrammar
in interfaceDescriptorType
- Returns:
- grammar
-
addTag
public void addTag(DescriptorTag tag)
Add a descriptor tag to this descriptor type.- Specified by:
addTag
in interfaceDescriptorType
- Parameters:
tag
- the tag to add.
-
getTagByName
public DescriptorTag getTagByName(String name)
Description copied from interface:DescriptorType
Get a descriptor tag by name.- Specified by:
getTagByName
in interfaceDescriptorType
- Parameters:
name
- name of the tag- Returns:
- the matching descriptor tag
-
getAllTags
public Collection<DescriptorTag> getAllTags()
Description copied from interface:DescriptorType
Get all defined tags for this descriptor.- Specified by:
getAllTags
in interfaceDescriptorType
- Returns:
- a collection of all tags
-
element
public org.jdom.Element element(String name)
- Specified by:
element
in interfaceorg.jdom.JDOMFactory
- Overrides:
element
in classorg.jdom.DefaultJDOMFactory
-
element
public org.jdom.Element element(String name, org.jdom.Namespace namespace)
- Specified by:
element
in interfaceorg.jdom.JDOMFactory
- Overrides:
element
in classorg.jdom.DefaultJDOMFactory
-
document
public org.jdom.Document document(org.jdom.Element rootElement)
Create a JDOM Document.- Specified by:
document
in interfaceorg.jdom.JDOMFactory
- Overrides:
document
in classorg.jdom.DefaultJDOMFactory
- Parameters:
rootElement
- the root element for the document- Returns:
- the document created
-
getJDOMFactory
public org.jdom.JDOMFactory getJDOMFactory()
- Specified by:
getJDOMFactory
in interfaceDescriptorType
- Returns:
- JDOM Factory that can create typed descriptor elements.
-
-