com.vhosting.netconf.frame
Class Attribute
java.lang.Object
com.vhosting.netconf.frame.Identity
com.vhosting.netconf.frame.Attribute
public class Attribute
- extends Identity
This class represents a generic attribute
in a Netconf context.
- Version:
- 1.00, 02/11/2010
- Author:
- Giuseppe Palmeri
Constructor Summary |
Attribute(Capability cap,
java.lang.String name,
java.lang.String value)
Create an attribute with the namespace of the specified capability. |
Attribute(java.lang.String name,
java.lang.String value)
Create an attribute with the default namespace. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Attribute
public Attribute(Capability cap,
java.lang.String name,
java.lang.String value)
- Create an attribute with the namespace of the specified capability.
- Parameters:
cap
- The capability.name
- The name of the attribute.value
- The value of the attribute.
Attribute
public Attribute(java.lang.String name,
java.lang.String value)
- Create an attribute with the default namespace.
The default namespace in this implementation of Netconf is
never used.
When you use this constructor, you may need to define
the default namespace with another Attribute instance
assigned to the same scope or a higher scope.
You can use the method createDefaultNamespaceAttribute(Capability cap)
to create an attribute to be used in conjunction with this.
As it is, this attribute does not have its own identity.
Methods getUniqueName() and getPrefix() will return null.
- Parameters:
name
- The name of the attribute.value
- The value of the attribute.- See Also:
createDefaultNamespaceAttribute(Capability cap)
,
Identity.getUniqueNane()
,
Identity.getPrefix()
createDefaultNamespaceAttribute
public static Attribute createDefaultNamespaceAttribute(Capability cap)
- Convenience methods to create an attribute
declaring the default namespace definition.
The attribute generated is to be used in
conjunction with attributes whose namespace
is not defined.
Example:
If the namespace is 'http://www.example.com/example' then the
attribute is:
xmlns='http://www.example.com/example'
- Parameters:
cap
- The default capability namespace to declare.
- Returns:
- The attribute with the default namespace definition.
- See Also:
Attribute(String name, String value)
getValue
public final java.lang.String getValue()
- Get the attribute value.
- Returns:
- The attribute value.