org.codehaus.cargo.module
Class AbstractDescriptorType

java.lang.Object
  extended by org.jdom.DefaultJDOMFactory
      extended by 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 org.jdom.JDOMFactory, DescriptorType

Version:
$Id: AbstractDescriptorType.java 1705 2008-09-02 13:14:55Z adriana $

Constructor Summary
protected AbstractDescriptorType(DescriptorType parent, java.lang.Class descriptorClass, Grammar grammar)
          Constructor.
 
Method Summary
 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(java.lang.String arg0)
          
 org.jdom.Element element(java.lang.String name, org.jdom.Namespace namespace)
          
 java.util.Collection 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(java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdom.JDOMFactory
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,
                                 java.lang.Class descriptorClass,
                                 Grammar grammar)
Constructor.

Parameters:
parent - the parent of this type
descriptorClass - the class that implements this descriptor
grammar - 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 interface DescriptorType
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 interface DescriptorType
Returns:
grammar

addTag

public void addTag(DescriptorTag tag)
Add a descriptor tag to this descriptor type.

Specified by:
addTag in interface DescriptorType
Parameters:
tag - the tag to add.

getTagByName

public DescriptorTag getTagByName(java.lang.String name)
Description copied from interface: DescriptorType
Get a descriptor tag by name.

Specified by:
getTagByName in interface DescriptorType
Parameters:
name - name of the tag
Returns:
the matching descriptor tag

getAllTags

public java.util.Collection getAllTags()
Description copied from interface: DescriptorType
Get all defined tags for this descriptor.

Specified by:
getAllTags in interface DescriptorType
Returns:
a collection of all tags

element

public org.jdom.Element element(java.lang.String arg0)

Specified by:
element in interface org.jdom.JDOMFactory
Overrides:
element in class org.jdom.DefaultJDOMFactory
See Also:
JDOMFactory.element(java.lang.String)

element

public org.jdom.Element element(java.lang.String name,
                                org.jdom.Namespace namespace)

Specified by:
element in interface org.jdom.JDOMFactory
Overrides:
element in class org.jdom.DefaultJDOMFactory

document

public org.jdom.Document document(org.jdom.Element rootElement)
Create a JDOM Document.

Specified by:
document in interface org.jdom.JDOMFactory
Overrides:
document in class org.jdom.DefaultJDOMFactory
Parameters:
rootElement - the root element for the document
Returns:
the document created

getJDOMFactory

public org.jdom.JDOMFactory getJDOMFactory()

Specified by:
getJDOMFactory in interface DescriptorType
Returns:
JDOM Factory that can create typed descriptor elements.
See Also:
DescriptorType.getJDOMFactory()


Copyright © 2004-2011 Codehaus. All Rights Reserved.