SMACS

smacs.xngr.browser.properties
Class ServicePropertiesXml

java.lang.Object
  extended bysmacs.xngr.browser.properties.ServicePropertiesXml
All Implemented Interfaces:
ServiceProperties

public class ServicePropertiesXml
extends Object
implements ServiceProperties

Handles the properties for a Service.

Author:
Edwin Dankert

Constructor Summary
ServicePropertiesXml(Element element)
          Constructor for the service properties.
ServicePropertiesXml(String name, String description, String iconPath, String location, String argument)
          Constructor for the service element.
 
Method Summary
 ElementTypeProperties addElementType(boolean isdefault, String localname, String namespace)
          Adds an association to the service.
 String getArgument()
          Returns the argument of the service.
 String getDescription()
          Returns the description of the service.
 Element getElement()
          Returns the Element representation of this services element.
 Vector getElementTypes()
          Returns a vector of associations.
 String getIconLocation()
          Returns the location of the icon.
 String getLocation()
          Returns the location of the service.
 String getName()
          Returns the name of the service.
 String[][] getProperties()
          Gets the properties for this service.
 ServiceProperties newServiceProperties(Element element)
          Constructor for the service properties.
 ServiceProperties newServiceProperties(String name, String description, String iconPath, String location, String argument)
          Constructor for the service element.
 void removeElementType(ElementTypeProperties elementType)
          Removes an association from the service.
 void setArgument(String argument)
          Changes the argument for the service.
 void setDescription(String description)
          Changes the description of the service.
 void setIconLocation(String location)
          Sets the location of the icon.
 void setName(String name)
          Changes the name of the service.
 void setProperties(String[][] strings)
          Sets the properties for this service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServicePropertiesXml

public ServicePropertiesXml(Element element)
Constructor for the service properties.


ServicePropertiesXml

public ServicePropertiesXml(String name,
                            String description,
                            String iconPath,
                            String location,
                            String argument)
Constructor for the service element.

Method Detail

newServiceProperties

public ServiceProperties newServiceProperties(Element element)
Description copied from interface: ServiceProperties
Constructor for the service properties.

Specified by:
newServiceProperties in interface ServiceProperties

newServiceProperties

public ServiceProperties newServiceProperties(String name,
                                              String description,
                                              String iconPath,
                                              String location,
                                              String argument)
Description copied from interface: ServiceProperties
Constructor for the service element.

Specified by:
newServiceProperties in interface ServiceProperties

getName

public String getName()
Returns the name of the service.

Specified by:
getName in interface ServiceProperties
Returns:
the name.

setName

public void setName(String name)
Changes the name of the service.

Specified by:
setName in interface ServiceProperties
Parameters:
name - the name of the service.

getDescription

public String getDescription()
Returns the description of the service.

Specified by:
getDescription in interface ServiceProperties
Returns:
the description.

setDescription

public void setDescription(String description)
Changes the description of the service.

Specified by:
setDescription in interface ServiceProperties
Parameters:
description - the description of the service.

getArgument

public String getArgument()
Returns the argument of the service.

Specified by:
getArgument in interface ServiceProperties
Returns:
the argument.

setArgument

public void setArgument(String argument)
Changes the argument for the service.

Specified by:
setArgument in interface ServiceProperties
Parameters:
argument - the argument for the service.

getLocation

public String getLocation()
Returns the location of the service.

Specified by:
getLocation in interface ServiceProperties
Returns:
the location.

getIconLocation

public String getIconLocation()
Returns the location of the icon.

Specified by:
getIconLocation in interface ServiceProperties
Returns:
the icon location.

setIconLocation

public void setIconLocation(String location)
Sets the location of the icon.

Specified by:
setIconLocation in interface ServiceProperties
Parameters:
location - the icon location.

setProperties

public void setProperties(String[][] strings)
Sets the properties for this service. String[X][0] = name String[X][1] = value

Specified by:
setProperties in interface ServiceProperties
Parameters:
strings - the properties.

getProperties

public String[][] getProperties()
Gets the properties for this service. String[X][0] = name String[X][1] = value

Specified by:
getProperties in interface ServiceProperties
Returns:
the properties.

getElement

public Element getElement()
Returns the Element representation of this services element.

Specified by:
getElement in interface ServiceProperties
Returns:
the element.

getElementTypes

public Vector getElementTypes()
Returns a vector of associations.

Specified by:
getElementTypes in interface ServiceProperties
Returns:
the list.

addElementType

public ElementTypeProperties addElementType(boolean isdefault,
                                            String localname,
                                            String namespace)
Adds an association to the service.

Specified by:
addElementType in interface ServiceProperties
Parameters:
isdefault - wether this is the default association.
localname - the (local) name of the element-type.
namespace - the namespace (URI) of the element-type.
Returns:
the newly created element type properties.

removeElementType

public void removeElementType(ElementTypeProperties elementType)
Removes an association from the service.

Specified by:
removeElementType in interface ServiceProperties
Parameters:
elementType - the associated element.

SMACS