org.jsxp.framework
Interface Element

All Known Subinterfaces:
InternalElement
All Known Implementing Classes:
DefaultElement, ElementDom

public interface Element

The Interface Element. Basic interface for jsxp elements. Elements are the basic parts a view is composed of.


Method Summary
 void addElement(Element e)
          Adds the element.
 void addElements(Element[] elements)
          Adds the elements.
 void addText(java.lang.String text)
          Adds the text.
 Element addXmlAsElements(java.lang.String xml)
          Adds the as elements.
 Element copy()
          Copy.
 Element copy(java.lang.String idPrefix, java.lang.String idSuffix)
          Copy.
 void exchange(Element e)
          Exchange.
 void exchange(Element[] elements)
          Exchange.
 Element findElementById(java.lang.String id)
          Find element by id.
 Element findElementByName(java.lang.String name, java.lang.String namespaceURI)
          Find element by name.
 java.lang.String getAttribute(java.lang.String key)
          Gets the attribute.
 java.lang.String getAttribute(java.lang.String namespace, java.lang.String key)
          Gets the attribute.
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          Gets the attributes.
 Element[] getElements()
          Gets the elements.
 java.lang.String getId()
          Gets the id.
 java.lang.String getIdPrefix()
          Gets the id prefix.
 java.lang.String getIdSuffix()
          Gets the id suffix.
 java.lang.String getName()
          Gets the name.
 java.lang.String getNamespaceURI()
          Gets the namespace uri.
 Element getParent()
          Gets the parent.
 ViewController getSourceViewController()
          Gets the source view controller.
 java.lang.String getValue()
          Gets the value.
 boolean hasAttribute(java.lang.String key)
          Checks for attribute.
 boolean hasAttribute(java.lang.String namespace, java.lang.String key)
          Checks for attribute.
 boolean isText()
          Checks if is text.
 void remove()
          Removes the.
 void removeAttribute(java.lang.String name)
          Removes the attribute.
 void removeAttribute(java.lang.String namespace, java.lang.String name)
          Removes the attribute.
 void removeElement(Element e)
          Removes the element.
 void removeElements()
          Removes the elements.
 void setAttribute(java.lang.String key, java.lang.String value)
          Sets the attribute.
 void setAttribute(java.lang.String namespace, java.lang.String key, java.lang.String value)
          Sets the attribute.
 void setValue(java.lang.String value)
          Sets the value.
 void setValues(java.lang.String[] values)
          Sets the values.
 void setVariable(java.lang.String name, java.lang.String value)
          Sets the variable.
 void setVariablesWithBean(java.lang.Object bean)
          Fill variables.
 

Method Detail

addElement

void addElement(Element e)
Adds the element.

Parameters:
e - the e

addElements

void addElements(Element[] elements)
Adds the elements.

Parameters:
elements - the elements

addText

void addText(java.lang.String text)
Adds the text.

Parameters:
text - the text

addXmlAsElements

Element addXmlAsElements(java.lang.String xml)
Adds the as elements.

Parameters:
xml - the xml
Returns:
the element

copy

Element copy()
Copy.

Returns:
the element

copy

Element copy(java.lang.String idPrefix,
             java.lang.String idSuffix)
Copy.

Parameters:
idPrefix - the id prefix
idSuffix - the id suffix
Returns:
the element

exchange

void exchange(Element e)
Exchange.

Parameters:
e - the e

exchange

void exchange(Element[] elements)
Exchange.

Parameters:
elements - the elements

findElementById

Element findElementById(java.lang.String id)
Find element by id.

Parameters:
id - the id
Returns:
the element

findElementByName

Element findElementByName(java.lang.String name,
                          java.lang.String namespaceURI)
Find element by name.

Parameters:
name - the name
namespaceURI - the namespace uri
Returns:
the element

getAttribute

java.lang.String getAttribute(java.lang.String key)
Gets the attribute.

Parameters:
key - the key
Returns:
the attribute

getAttribute

java.lang.String getAttribute(java.lang.String namespace,
                              java.lang.String key)
Gets the attribute.

Parameters:
namespace - the namespace
key - the key
Returns:
the attribute

getAttributes

java.util.Map<java.lang.String,java.lang.String> getAttributes()
Gets the attributes.

Returns:
the attributes

getElements

Element[] getElements()
Gets the elements.

Returns:
the elements

getId

java.lang.String getId()
Gets the id.

Returns:
the id

getIdPrefix

java.lang.String getIdPrefix()
Gets the id prefix.

Returns:
the id prefix

getIdSuffix

java.lang.String getIdSuffix()
Gets the id suffix.

Returns:
the id suffix

getName

java.lang.String getName()
Gets the name.

Returns:
the name

getNamespaceURI

java.lang.String getNamespaceURI()
Gets the namespace uri.

Returns:
the namespace uri

getParent

Element getParent()
Gets the parent.

Returns:
the parent

getSourceViewController

ViewController getSourceViewController()
Gets the source view controller.

Returns:
the source view controller

getValue

java.lang.String getValue()
Gets the value.

Returns:
the value

hasAttribute

boolean hasAttribute(java.lang.String key)
Checks for attribute.

Parameters:
key - the key
Returns:
true, if successful

hasAttribute

boolean hasAttribute(java.lang.String namespace,
                     java.lang.String key)
Checks for attribute.

Parameters:
namespace - the namespace
key - the key
Returns:
true, if successful

isText

boolean isText()
Checks if is text.

Returns:
true, if is text

remove

void remove()
Removes the.


removeAttribute

void removeAttribute(java.lang.String name)
Removes the attribute.

Parameters:
name - the name

removeAttribute

void removeAttribute(java.lang.String namespace,
                     java.lang.String name)
Removes the attribute.

Parameters:
namespace - the namespace
name - the name

removeElement

void removeElement(Element e)
Removes the element.

Parameters:
e - the e

removeElements

void removeElements()
Removes the elements.


setAttribute

void setAttribute(java.lang.String key,
                  java.lang.String value)
Sets the attribute.

Parameters:
key - the key
value - the value

setAttribute

void setAttribute(java.lang.String namespace,
                  java.lang.String key,
                  java.lang.String value)
Sets the attribute.

Parameters:
namespace - the namespace
key - the key
value - the value

setValue

void setValue(java.lang.String value)
Sets the value.

Parameters:
value - the new value

setValues

void setValues(java.lang.String[] values)
Sets the values.

Parameters:
values - the new values

setVariable

void setVariable(java.lang.String name,
                 java.lang.String value)
Sets the variable.

Parameters:
name - the name
value - the value

setVariablesWithBean

void setVariablesWithBean(java.lang.Object bean)
Fill variables. Use a bean to match get/setter of the bean and the element-variables to fill the variables with values.

Parameters:
bean - the bean used to fill the variables of an element


Copyright © 2012 Oliver Szymanski & David Tanzer