de.cau.cs.kieler.kwebs
Class ServiceDataConfigurationElement

java.lang.Object
  extended by de.cau.cs.kieler.kwebs.ServiceDataConfigurationElement
All Implemented Interfaces:
IConfigurationElement

public class ServiceDataConfigurationElement
extends Object
implements IConfigurationElement

This class realizes the IConfigurationElement interface of the eclipse platform in order to provide the meta data of a layout service in a form processable by ExtensionLayoutDataService.

Rating red

Constructor Summary
ServiceDataConfigurationElement(String thename)
           
ServiceDataConfigurationElement(String thename, String thevalue)
           
ServiceDataConfigurationElement(String thename, String thevalue, Map<String,String> theattributes, List<IConfigurationElement> thechildren)
           
 
Method Summary
 void addAttribute(String name, String value)
          Adds an attribute to this configuration element.
 void addChild(IConfigurationElement child)
          Adds a child to this configuration element.
 Object createExecutableExtension(String propertyName)
          
 String getAttribute(String name)
          
 String getAttribute(String attrName, String locale)
          
 String getAttributeAsIs(String name)
          
 String[] getAttributeNames()
          
static ServiceDataConfigurationElement getCategoryElementFromModel(Category category)
          Returns a configuration element representing a category.
 IConfigurationElement[] getChildren()
          
 IConfigurationElement[] getChildren(String name)
          
 IContributor getContributor()
          
 IExtension getDeclaringExtension()
          
static ServiceDataConfigurationElement getLayoutAlgorithmElementFromModel(LayoutAlgorithm algorithm)
          Returns a configuration element representing a layout algorithm.
static ServiceDataConfigurationElement getLayoutOptionElementFromModel(LayoutOption option)
          Returns a configuration element representing a layout option.
static ServiceDataConfigurationElement getLayoutTypeElementFromModel(LayoutType type)
          Returns a configuration element representing a layout type.
 String getName()
          
 String getNamespace()
          
 String getNamespaceIdentifier()
          
 Object getParent()
          
 String getValue()
          
 String getValue(String locale)
          
 String getValueAsIs()
          
 boolean isValid()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IConfigurationElement
equals
 

Constructor Detail

ServiceDataConfigurationElement

public ServiceDataConfigurationElement(String thename)
Parameters:
thename -

ServiceDataConfigurationElement

public ServiceDataConfigurationElement(String thename,
                                       String thevalue)
Parameters:
thename -
thevalue -

ServiceDataConfigurationElement

public ServiceDataConfigurationElement(String thename,
                                       String thevalue,
                                       Map<String,String> theattributes,
                                       List<IConfigurationElement> thechildren)
Parameters:
thename -
thevalue -
theattributes -
thechildren -
Method Detail

addChild

public void addChild(IConfigurationElement child)
Adds a child to this configuration element.

Parameters:
child - the child element

addAttribute

public void addAttribute(String name,
                         String value)
Adds an attribute to this configuration element.

Parameters:
name - the name of the attribute
value - the value of the attribute

getCategoryElementFromModel

public static ServiceDataConfigurationElement getCategoryElementFromModel(Category category)
Returns a configuration element representing a category.

Parameters:
category - the service data model element of type Category
Returns:
a configuration element representing a category

getLayoutTypeElementFromModel

public static ServiceDataConfigurationElement getLayoutTypeElementFromModel(LayoutType type)
Returns a configuration element representing a layout type.

Parameters:
type - the service data model element of type LayoutType
Returns:
a configuration element representing a layout type

getLayoutOptionElementFromModel

public static ServiceDataConfigurationElement getLayoutOptionElementFromModel(LayoutOption option)
Returns a configuration element representing a layout option.

Parameters:
option - the service data model element of type LayoutOption
Returns:
a configuration element representing a layout option

getLayoutAlgorithmElementFromModel

public static ServiceDataConfigurationElement getLayoutAlgorithmElementFromModel(LayoutAlgorithm algorithm)
Returns a configuration element representing a layout algorithm.

Parameters:
algorithm - the service data model element of type LayoutAlgorithm
Returns:
a configuration element representing a layout algorithm

createExecutableExtension

public Object createExecutableExtension(String propertyName)
                                 throws CoreException

Specified by:
createExecutableExtension in interface IConfigurationElement
Throws:
CoreException

getAttribute

public String getAttribute(String name)

Specified by:
getAttribute in interface IConfigurationElement

getAttributeAsIs

public String getAttributeAsIs(String name)

Specified by:
getAttributeAsIs in interface IConfigurationElement

getAttributeNames

public String[] getAttributeNames()

Specified by:
getAttributeNames in interface IConfigurationElement

getChildren

public IConfigurationElement[] getChildren()

Specified by:
getChildren in interface IConfigurationElement

getChildren

public IConfigurationElement[] getChildren(String name)

Specified by:
getChildren in interface IConfigurationElement

getDeclaringExtension

public IExtension getDeclaringExtension()

Specified by:
getDeclaringExtension in interface IConfigurationElement

getName

public String getName()

Specified by:
getName in interface IConfigurationElement

getValue

public String getValue()

Specified by:
getValue in interface IConfigurationElement

getValueAsIs

public String getValueAsIs()

Specified by:
getValueAsIs in interface IConfigurationElement

toString

public String toString()

Overrides:
toString in class Object

getParent

public Object getParent()

Specified by:
getParent in interface IConfigurationElement

getNamespace

public String getNamespace()
                    throws InvalidRegistryObjectException

Specified by:
getNamespace in interface IConfigurationElement
Throws:
InvalidRegistryObjectException

isValid

public boolean isValid()

Specified by:
isValid in interface IConfigurationElement

getNamespaceIdentifier

public String getNamespaceIdentifier()
                              throws InvalidRegistryObjectException

Specified by:
getNamespaceIdentifier in interface IConfigurationElement
Throws:
InvalidRegistryObjectException

getContributor

public IContributor getContributor()
                            throws InvalidRegistryObjectException

Specified by:
getContributor in interface IConfigurationElement
Throws:
InvalidRegistryObjectException

getAttribute

public String getAttribute(String attrName,
                           String locale)
                    throws InvalidRegistryObjectException

Specified by:
getAttribute in interface IConfigurationElement
Throws:
InvalidRegistryObjectException

getValue

public String getValue(String locale)
                throws InvalidRegistryObjectException

Specified by:
getValue in interface IConfigurationElement
Throws:
InvalidRegistryObjectException