ilog.views.appframe.settings
Class IlvSettingsAttribute

java.lang.Object
  extended by ilog.views.appframe.settings.IlvSettingsNode
      extended by ilog.views.appframe.settings.IlvSettingsAttribute
All Implemented Interfaces:
Comparable, Attr, Node

public class IlvSettingsAttribute
extends IlvSettingsNode
implements Attr, Comparable

Settings nodes that are associated with the attributes of objects of settings models.

See Also:
IlvSettings

Field Summary
 
Fields inherited from class ilog.views.appframe.settings.IlvSettingsNode
ATTRIBUTE_NODE, ELEMENT_NODE, ROOT_ELEMENT_NODE
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Method Summary
 Node appendChild(Node newChild)
          Adds the node newChild to the end of the list of children of this node.
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 short compareDocumentPosition(Node other)
          
 int compareTo(Object o)
          Compares this object with the specified object for order.
 NamedNodeMap getAttributes()
          A NamedNodeMap containing the attributes of this node.
 String getBaseURI()
          
 NodeList getChildNodes()
          A NodeList that contains all children of this node.
 Object getFeature(String feature, String version)
          
 Node getFirstChild()
          Returns the first child of this node.
 Node getLastChild()
          The last child of this node.
 String getLocalName()
          Returns the local part of the qualified name of this node.
 String getName()
          Returns the name of the attribute.
 String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 Node getNextSibling()
          The node immediately following this node.
 String getNodeName()
          The name of the attribute given by the method getName().
 short getNodeType()
          Returns IlvSettingsNode.ATTRIBUTE_NODE to specify that this node is an attribute node.
 String getNodeValue()
          The value of this attribute.
 Object getObjectValue()
          Returns the object value of this attribute.
 Document getOwnerDocument()
          The Document object associated with this node.
 Element getOwnerElement()
          Returns the DOM element that contains this attribute.
 String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 Node getPreviousSibling()
          The node immediately preceding this node.
 TypeInfo getSchemaTypeInfo()
          
 boolean getSpecified()
          If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false.
 String getString()
          Returns the string value of this settings attribute.
 String getTextContent()
          
 Object getUserData(String key)
          
 String getValue()
          On retrieval, the value of the attribute is returned as a string.
 boolean hasAttributes()
          Returns whether this node (if it is an element) has any attributes.
 boolean hasChildNodes()
          This is a convenience method to allow easy determination of whether a node has any children.
 Node insertBefore(Node newChild, Node refChild)
          Inserts the node newChild before the existing child node refChild.
 boolean isDefaultNamespace(String namespaceURI)
          
 boolean isEqualNode(Node arg)
          
 boolean isId()
          
 boolean isSameNode(Node other)
          
 boolean isSupported(String feature, String version)
          Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
 String lookupNamespaceURI(String prefix)
          
 String lookupPrefix(String namespaceURI)
          
 boolean matchType(String name)
          Determines whether the name of the attribute matches the specified name.
 void normalize()
          The implementation of this method is empty as attributes do not have child node.
 Node removeChild(Node oldChild)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 Node replaceChild(Node newChild, Node oldChild)
          Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 void setNodeValue(String nodeValue)
          Sets the value of this attribute to the specified nodeValue.
 void setPrefix(String prefix)
          Sets the prefix of the attribute.
 void setString(String value)
          Sets a string value to this settings attribute.
 void setTextContent(String textContent)
          
 Object setUserData(String key, Object data, UserDataHandler handler)
          
 void setValue(Object value)
          Sets the specified object value to this settings attribute.
 void setValue(String value)
          Sets the value of this attribute.
 
Methods inherited from class ilog.views.appframe.settings.IlvSettingsNode
getParent, getParentNode, getSettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
getParentNode
 

Method Detail

getBaseURI

public String getBaseURI()

Specified by:
getBaseURI in interface Node
Overrides:
getBaseURI in class IlvSettingsNode

compareDocumentPosition

public short compareDocumentPosition(Node other)
                              throws DOMException

Specified by:
compareDocumentPosition in interface Node
Overrides:
compareDocumentPosition in class IlvSettingsNode
Throws:
DOMException

getTextContent

public String getTextContent()
                      throws DOMException

Specified by:
getTextContent in interface Node
Overrides:
getTextContent in class IlvSettingsNode
Throws:
DOMException

setTextContent

public void setTextContent(String textContent)
                    throws DOMException

Specified by:
setTextContent in interface Node
Overrides:
setTextContent in class IlvSettingsNode
Throws:
DOMException

isSameNode

public boolean isSameNode(Node other)

Specified by:
isSameNode in interface Node
Overrides:
isSameNode in class IlvSettingsNode

lookupPrefix

public String lookupPrefix(String namespaceURI)

Specified by:
lookupPrefix in interface Node
Overrides:
lookupPrefix in class IlvSettingsNode

isDefaultNamespace

public boolean isDefaultNamespace(String namespaceURI)

Specified by:
isDefaultNamespace in interface Node
Overrides:
isDefaultNamespace in class IlvSettingsNode

lookupNamespaceURI

public String lookupNamespaceURI(String prefix)

Specified by:
lookupNamespaceURI in interface Node
Overrides:
lookupNamespaceURI in class IlvSettingsNode

isEqualNode

public boolean isEqualNode(Node arg)

Specified by:
isEqualNode in interface Node
Overrides:
isEqualNode in class IlvSettingsNode

getFeature

public Object getFeature(String feature,
                         String version)

Specified by:
getFeature in interface Node
Overrides:
getFeature in class IlvSettingsNode

setUserData

public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler)

Specified by:
setUserData in interface Node
Overrides:
setUserData in class IlvSettingsNode

getUserData

public Object getUserData(String key)

Specified by:
getUserData in interface Node
Overrides:
getUserData in class IlvSettingsNode

getSchemaTypeInfo

public TypeInfo getSchemaTypeInfo()

Specified by:
getSchemaTypeInfo in interface Attr

isId

public boolean isId()

Specified by:
isId in interface Attr

getNodeType

public short getNodeType()
Returns IlvSettingsNode.ATTRIBUTE_NODE to specify that this node is an attribute node.

Specified by:
getNodeType in interface Node
Specified by:
getNodeType in class IlvSettingsNode
Returns:
The type of this node.

getName

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

Specified by:
getName in interface Attr

setString

public void setString(String value)
Sets a string value to this settings attribute.

Parameters:
value - The new value of this attribute
See Also:
getString()

getString

public String getString()
Returns the string value of this settings attribute.

See Also:
setString(java.lang.String)

getObjectValue

public Object getObjectValue()
Returns the object value of this attribute.

See Also:
setValue(java.lang.Object)

setValue

public void setValue(Object value)
Sets the specified object value to this settings attribute.

Parameters:
value - The new value of this attribute.
See Also:
getValue()

matchType

public boolean matchType(String name)
Determines whether the name of the attribute matches the specified name.

Specified by:
matchType in class IlvSettingsNode
Parameters:
name - The name to compare.
Returns:
true if names are equal or if the specified name is equal to null or "*"; false otherwise.

compareTo

public int compareTo(Object o)
Compares this object with the specified object for order.
Returns a negative integer, zero, or a positive integer depending whether this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable
Parameters:
o - The object to be compared.
Returns:
A negative integer, zero, or a positive integer depending whether this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the type of the specified object prevents it from being compared with this Object.

getNodeName

public String getNodeName()
The name of the attribute given by the method getName().

Specified by:
getNodeName in interface Node

getNodeValue

public String getNodeValue()
                    throws DOMException
The value of this attribute.

Specified by:
getNodeValue in interface Node
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
See Also:
setNodeValue(java.lang.String)

setNodeValue

public void setNodeValue(String nodeValue)
                  throws DOMException
Sets the value of this attribute to the specified nodeValue. This method has the same behavior than setString(java.lang.String).

Specified by:
setNodeValue in interface Node
Parameters:
nodeValue - The new value of this attribute.
Throws:
DOMException

getChildNodes

public NodeList getChildNodes()
A NodeList that contains all children of this node. As attributes do not have child nodes, this method returns an empty node list.

Specified by:
getChildNodes in interface Node

getFirstChild

public Node getFirstChild()
Returns the first child of this node.

Specified by:
getFirstChild in interface Node
Returns:
null as attributes do not have child nodes.

getLastChild

public Node getLastChild()
The last child of this node.

Specified by:
getLastChild in interface Node
Returns:
null as attributes do not have child nodes.

getPreviousSibling

public Node getPreviousSibling()
The node immediately preceding this node. If there is no such node, this returns null.

Specified by:
getPreviousSibling in interface Node

getNextSibling

public Node getNextSibling()
The node immediately following this node. If there is no such node, this returns null.

Specified by:
getNextSibling in interface Node

getAttributes

public NamedNodeMap getAttributes()
A NamedNodeMap containing the attributes of this node.

Specified by:
getAttributes in interface Node
Returns:
null as attributes do not have attributes.

getOwnerDocument

public Document getOwnerDocument()
The Document object associated with this node. This is also the Document object used to create new nodes.

Specified by:
getOwnerDocument in interface Node

normalize

public void normalize()
The implementation of this method is empty as attributes do not have child node.
Refer to the documentation of the method Node.normalize() for more details on the behavior of this method.

Specified by:
normalize in interface Node
Since:
DOM Level 2

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
                  throws DOMException
Inserts the node newChild before the existing child node refChild.

Specified by:
insertBefore in interface Node
Parameters:
newChild - The node to insert.
refChild - The reference node, i.e., the node before which the new node must be inserted.
Returns:
The node being inserted.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Always raised as attribute nodes cannot be added child nodes.

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
                  throws DOMException
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If the newChild is already in the tree, it is first removed.

Specified by:
replaceChild in interface Node
Parameters:
newChild - The new node to put in the child list.
oldChild - The node being replaced in the list.
Returns:
The node replaced.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Always raised as attribute nodes cannot be added child nodes.

removeChild

public Node removeChild(Node oldChild)
                 throws DOMException
Removes the child node indicated by oldChild from the list of children, and returns it.

Specified by:
removeChild in interface Node
Parameters:
oldChild - The node being removed.
Returns:
The node removed.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Always raised as attribute nodes cannot be added child nodes.

appendChild

public Node appendChild(Node newChild)
                 throws DOMException
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.

Specified by:
appendChild in interface Node
Parameters:
newChild - The node to add.If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node
Returns:
The node added.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Always raised as attribute nodes cannot be added child nodes.

hasChildNodes

public boolean hasChildNodes()
This is a convenience method to allow easy determination of whether a node has any children.

Specified by:
hasChildNodes in interface Node
Returns:
false as attributes cannot be added child nodes.

cloneNode

public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node.

Specified by:
cloneNode in interface Node
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.

getSpecified

public boolean getSpecified()
If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false.
Refer to the documentation of the method Attr.getSpecified() for more details on the behavior of this method.

Specified by:
getSpecified in interface Attr

getValue

public String getValue()
On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values.
On setting, this creates a Text node with the unparsed contents of the string. The implementation of this method returns the value given by the call to getString().

Specified by:
getValue in interface Attr
See Also:
setValue(java.lang.Object)

setValue

public void setValue(String value)
Sets the value of this attribute.
This method has the same effects than the method setString(java.lang.String).

Specified by:
setValue in interface Attr
Parameters:
value - The new value of the attribute.
See Also:
getValue()

getOwnerElement

public Element getOwnerElement()
Returns the DOM element that contains this attribute.

Specified by:
getOwnerElement in interface Attr

isSupported

public boolean isSupported(String feature,
                           String version)
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

Specified by:
isSupported in interface Node
Parameters:
feature - The name of the feature to test. This is the same name which can be passed to the method hasFeature on DOMImplementation.
version - This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return true.
Returns:
Returns true if the specified feature is supported on this node, false otherwise.
Since:
DOM Level 2

getNamespaceURI

public String getNamespaceURI()
The namespace URI of this node, or null if it is unspecified.
Refer to the documentation of the method Node.getNamespaceURI() for more details on the behavior of this method.

Specified by:
getNamespaceURI in interface Node
Since:
DOM Level 2

getPrefix

public String getPrefix()
The namespace prefix of this node, or null if it is unspecified.
Refer to the documentation of the method Node.getPrefix() for more details on the behavior of this method.

Specified by:
getPrefix in interface Node
Throws:
DOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from " http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" .
Since:
DOM Level 2
See Also:
setPrefix(java.lang.String)

setPrefix

public void setPrefix(String prefix)
               throws DOMException
Sets the prefix of the attribute.

Specified by:
setPrefix in interface Node
Parameters:
prefix -
Throws:
DOMException
See Also:
getPrefix()

getLocalName

public String getLocalName()
Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Specified by:
getLocalName in interface Node
Since:
DOM Level 2

hasAttributes

public boolean hasAttributes()
Returns whether this node (if it is an element) has any attributes.

Specified by:
hasAttributes in interface Node
Returns:
false as attributes do not have attributes.
Since:
DOM Level 2


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.