com.vhosting.netconf.frame
Class Container

java.lang.Object
  extended by com.vhosting.netconf.frame.Identity
      extended by com.vhosting.netconf.frame.ContainerReference
          extended by com.vhosting.netconf.frame.Container
All Implemented Interfaces:
Clearable, Node

public class Container
extends ContainerReference
implements Node, Clearable

This class represents a container in the PRC structure. A container is a special element that can be linked to any other element to create complex structures. Can be connected to a container elements such as:

 Leaf, LeafList, Anyxml, Container, List.
 

Version:
1.00, 09/10/2010
Author:
Giuseppe Palmeri

Field Summary
 
Fields inherited from class com.vhosting.netconf.frame.Identity
name, namespaceURI, prefix
 
Constructor Summary
protected Container(Capability cap, java.lang.String name)
          Create a Container.
 
Method Summary
 void assignAnyxml(Anyxml a, org.w3c.dom.Document e)
          Allows you to assign an XML document to an Anyxml element previously linked to this.
 void assignLeaf(Leaf l, java.lang.String canonicalValue)
          Allows you to assign a value to a leaf element previously linked to this.
 void assignLeafList(LeafList l, java.lang.String[] canonicalValues)
          Allows you to assign values to a leaf list element previously linked to this.
 void clear()
          Remove all assignments of values made up for himself or on their sub elements in a recursive manner.
 java.util.List<Attribute> getAnyxmlAttributes(Anyxml a)
          Get the list of attributes of the specified Anyxml element previously linked to this.
 org.w3c.dom.Document getAnyxmlValue(Anyxml a)
          Get the XML Document of the specified Anyxml element previously linked to this.
 java.lang.Object getElemetByUniqueName(java.lang.String uniqueName)
          Get an element of the PRC structure previously linked to this through its unique name.
 java.util.List<Attribute> getLeafAttributes(Leaf l)
          Get the list of attributes of the specified leaf element previously linked to this.
 java.lang.String getLeafCanonicalValue(Leaf l)
          Get the value of the specified leaf element previously linked to this.
 java.util.List<Attribute>[] getLeafListAttributes(LeafList l)
          Get the lists of attributes of the specified leaf list element previously linked to this.
 java.lang.String[] getLeafListCanonicalValues(LeafList l)
          Get the values of the specified leaf list element previously linked to this.
 java.util.Set<java.lang.String> getUniqueNanes()
          Get all the unique names of the elements previously linked to this.
 boolean hasValues()
          Check if assignments were made up for himself or on their sub elements in a recursive manner.
 void unsetAnyxml(Anyxml a)
          Unset the XML document associated with the specified Anyxml element previously linked to this.
 void unsetLeaf(Leaf l)
          Unset the value associated with the specified leaf element previously linked to this.
 void unsetLeafList(LeafList l)
          Unset the values associated with the specified leaf list element previously linked to this.
 
Methods inherited from class com.vhosting.netconf.frame.ContainerReference
linkAnyxml, linkContainer, linkLeaf, linkLeafList, linkList, setPresence
 
Methods inherited from class com.vhosting.netconf.frame.Identity
getName, getNamespaceURI, getPrefix, getUniqueNane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vhosting.netconf.frame.Node
linkAnyxml, linkLeaf, linkLeafList
 

Constructor Detail

Container

protected Container(Capability cap,
                    java.lang.String name)
Create a Container.

Parameters:
cap - The capability that this container belongs.
name - The name of the container.
Method Detail

clear

public void clear()
Description copied from interface: Clearable
Remove all assignments of values made up for himself or on their sub elements in a recursive manner.

Specified by:
clear in interface Clearable

hasValues

public boolean hasValues()
Description copied from interface: Clearable
Check if assignments were made up for himself or on their sub elements in a recursive manner.

Specified by:
hasValues in interface Clearable

assignLeaf

public void assignLeaf(Leaf l,
                       java.lang.String canonicalValue)
Description copied from interface: Assignable
Allows you to assign a value to a leaf element previously linked to this. The value is the canonical value in a YANG context. See RFC6020

Parameters:
l - The leaf element.
canonicalValue - The value of the leaf.
See Also:
Node

assignLeafList

public void assignLeafList(LeafList l,
                           java.lang.String[] canonicalValues)
Description copied from interface: Assignable
Allows you to assign values to a leaf list element previously linked to this. The values are the canonical values in a YANG context. See RFC6020

Parameters:
l - The leaf list element.
canonicalValues - The values of the leaf list.
See Also:
Node

assignAnyxml

public void assignAnyxml(Anyxml a,
                         org.w3c.dom.Document e)
Description copied from interface: Assignable
Allows you to assign an XML document to an Anyxml element previously linked to this. The XML document should be made in advance through the method:
Anyxml.createEmptyDocument();
of an instance of the Anyxml element.

Parameters:
a - The Anyxml element.
e - The XML Document.
See Also:
Anyxml.createEmptyDocument()

getLeafCanonicalValue

public java.lang.String getLeafCanonicalValue(Leaf l)
Description copied from interface: Assignable
Get the value of the specified leaf element previously linked to this. The value is the canonical value in a YANG context. See RFC6020

Parameters:
l - The leaf element.
Returns:
The value of the leaf element or null if not exists.

getLeafListCanonicalValues

public java.lang.String[] getLeafListCanonicalValues(LeafList l)
Description copied from interface: Assignable
Get the values of the specified leaf list element previously linked to this. The values are the canonical values in a YANG context. See RFC6020

Parameters:
l - The leaf list element.
Returns:
The values of the leaf list element or an empty array if not exist.

getAnyxmlValue

public org.w3c.dom.Document getAnyxmlValue(Anyxml a)
Description copied from interface: Assignable
Get the XML Document of the specified Anyxml element previously linked to this.

Parameters:
a - The Anyxml element.
Returns:
The XML document of the Anyxml element or null if not exists.

unsetLeaf

public void unsetLeaf(Leaf l)
Description copied from interface: Assignable
Unset the value associated with the specified leaf element previously linked to this. If no value was previously assigned to the element, the method does not perform any action.

Parameters:
l - The leaf element.

unsetLeafList

public void unsetLeafList(LeafList l)
Description copied from interface: Assignable
Unset the values associated with the specified leaf list element previously linked to this. If no values was previously assigned to the element, the method does not perform any action.

Parameters:
l - The leaf list element.

unsetAnyxml

public void unsetAnyxml(Anyxml a)
Description copied from interface: Assignable
Unset the XML document associated with the specified Anyxml element previously linked to this.

Parameters:
a - The Anyxml element.

getUniqueNanes

public java.util.Set<java.lang.String> getUniqueNanes()
Get all the unique names of the elements previously linked to this.

Returns:
The set of unique names.

getElemetByUniqueName

public java.lang.Object getElemetByUniqueName(java.lang.String uniqueName)
Get an element of the PRC structure previously linked to this through its unique name.

Parameters:
uniqueName - The unique name of the element.
Returns:
The PRC structure element previously linked to this through its unique name.

getLeafAttributes

public java.util.List<Attribute> getLeafAttributes(Leaf l)
Description copied from interface: Assignable
Get the list of attributes of the specified leaf element previously linked to this. The list can be populated with new attributes.

Parameters:
l - The leaf element.
Returns:
The list of attributes.

getLeafListAttributes

public java.util.List<Attribute>[] getLeafListAttributes(LeafList l)
Description copied from interface: Assignable
Get the lists of attributes of the specified leaf list element previously linked to this. Each list contained in the array refers to the corresponding value assigned to the leaf list. The lists can be populated with new attributes.

Parameters:
l - The leaf list element.
Returns:
The array of lists of attributes.

getAnyxmlAttributes

public java.util.List<Attribute> getAnyxmlAttributes(Anyxml a)
Description copied from interface: Assignable
Get the list of attributes of the specified Anyxml element previously linked to this. The list can be populated with new attributes.

Parameters:
a - The Anyxml element.
Returns:
The list of attributes.