Package org.codehaus.cargo.module
Class AbstractDescriptorType
- java.lang.Object
-
- org.jdom2.DefaultJDOMFactory
-
- org.codehaus.cargo.module.AbstractDescriptorType
-
- All Implemented Interfaces:
DescriptorType,org.jdom2.JDOMFactory
- Direct Known Subclasses:
ApplicationXmlType,EjbJarXmlType,IbmEjbJarBndXmiType,IbmWebBndXmiType,JBossWebXmlType,JBossXmlType,OrionEjbJarXmlType,OrionWebXmlType,ResinWebXmlType,TomcatContextXmlType,WeblogicEjbJarXmlType,WeblogicXmlType,WebXmlType
public class AbstractDescriptorType extends org.jdom2.DefaultJDOMFactory implements DescriptorType
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDescriptorType(DescriptorType parent, Class descriptorClass, Grammar grammar)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTag(DescriptorTag tag)Add a descriptor tag to this descriptor type.org.jdom2.Documentdocument(org.jdom2.Element rootElement)Create a JDOM Document.org.jdom2.Elementelement(int line, int col, String name)org.jdom2.Elementelement(int line, int col, String name, org.jdom2.Namespace namespace)Collection<DescriptorTag>getAllTags()Get all defined tags for this descriptor.DescriptorIogetDescriptorIo()Get the IO class for this descriptor type.GrammargetGrammar()Get the grammar for this descriptor type.org.jdom2.JDOMFactorygetJDOMFactory()DescriptorTaggetTagByName(String name)Get a descriptor tag by name.protected voidsetDescriptorIo(DescriptorIo descriptorIo)Set the IO class for this descriptor type.-
Methods inherited from class org.jdom2.DefaultJDOMFactory
addContent, addNamespaceDeclaration, attribute, attribute, attribute, attribute, attribute, attribute, cdata, cdata, comment, comment, docType, docType, docType, docType, docType, docType, document, document, element, element, element, element, element, element, entityRef, entityRef, entityRef, entityRef, entityRef, entityRef, processingInstruction, processingInstruction, processingInstruction, processingInstruction, processingInstruction, processingInstruction, setAttribute, setRoot, text, 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:
getDescriptorIoin 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:
getGrammarin interfaceDescriptorType- Returns:
- grammar
-
addTag
public void addTag(DescriptorTag tag)
Add a descriptor tag to this descriptor type.- Specified by:
addTagin interfaceDescriptorType- Parameters:
tag- the tag to add.
-
getTagByName
public DescriptorTag getTagByName(String name)
Description copied from interface:DescriptorTypeGet a descriptor tag by name.- Specified by:
getTagByNamein interfaceDescriptorType- Parameters:
name- name of the tag- Returns:
- the matching descriptor tag
-
getAllTags
public Collection<DescriptorTag> getAllTags()
Description copied from interface:DescriptorTypeGet all defined tags for this descriptor.- Specified by:
getAllTagsin interfaceDescriptorType- Returns:
- a collection of all tags
-
element
public org.jdom2.Element element(int line, int col, String name)- Specified by:
elementin interfaceorg.jdom2.JDOMFactory- Overrides:
elementin classorg.jdom2.DefaultJDOMFactory
-
element
public org.jdom2.Element element(int line, int col, String name, org.jdom2.Namespace namespace)- Specified by:
elementin interfaceorg.jdom2.JDOMFactory- Overrides:
elementin classorg.jdom2.DefaultJDOMFactory
-
document
public org.jdom2.Document document(org.jdom2.Element rootElement)
Create a JDOM Document.- Specified by:
documentin interfaceorg.jdom2.JDOMFactory- Overrides:
documentin classorg.jdom2.DefaultJDOMFactory- Parameters:
rootElement- the root element for the document- Returns:
- the document created
-
getJDOMFactory
public org.jdom2.JDOMFactory getJDOMFactory()
- Specified by:
getJDOMFactoryin interfaceDescriptorType- Returns:
- JDOM Factory that can create typed descriptor elements.
-
-