org.opennms.netmgt.config.modelimport
Class Node

java.lang.Object
  extended by org.opennms.netmgt.config.modelimport.Node
All Implemented Interfaces:
Serializable

public class Node
extends Object
implements Serializable

A node in OpenNMS is a network entity that is used to contain network interfaces and those interface's services.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Node()
           
 
Method Summary
 void addAsset(Asset vAsset)
           
 void addAsset(int index, Asset vAsset)
           
 void addCategory(Category vCategory)
           
 void addCategory(int index, Category vCategory)
           
 void addInterface(Interface vInterface)
           
 void addInterface(int index, Interface vInterface)
           
 Enumeration<Asset> enumerateAsset()
          Method enumerateAsset.
 Enumeration<Category> enumerateCategory()
          Method enumerateCategory.
 Enumeration<Interface> enumerateInterface()
          Method enumerateInterface.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 Asset[] getAsset()
          Method getAsset.Returns the contents of the collection in an Array.
 Asset getAsset(int index)
          Method getAsset.
 List<Asset> getAssetCollection()
          Method getAssetCollection.Returns a reference to '_assetList'.
 int getAssetCount()
          Method getAssetCount.
 String getBuilding()
          Returns the value of field 'building'.
 Category[] getCategory()
          Method getCategory.Returns the contents of the collection in an Array.
 Category getCategory(int index)
          Method getCategory.
 List<Category> getCategoryCollection()
          Method getCategoryCollection.Returns a reference to '_categoryList'.
 int getCategoryCount()
          Method getCategoryCount.
 String getCity()
          Returns the value of field 'city'.
 String getForeignId()
          Returns the value of field 'foreignId'.
 Interface[] getInterface()
          Method getInterface.Returns the contents of the collection in an Array.
 Interface getInterface(int index)
          Method getInterface.
 List<Interface> getInterfaceCollection()
          Method getInterfaceCollection.Returns a reference to '_interfaceList'.
 int getInterfaceCount()
          Method getInterfaceCount.
 String getNodeLabel()
          Returns the value of field 'nodeLabel'.
 String getParentForeignId()
          Returns the value of field 'parentForeignId'.
 String getParentNodeLabel()
          Returns the value of field 'parentNodeLabel'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<Asset> iterateAsset()
          Method iterateAsset.
 Iterator<Category> iterateCategory()
          Method iterateCategory.
 Iterator<Interface> iterateInterface()
          Method iterateInterface.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllAsset()
           
 void removeAllCategory()
           
 void removeAllInterface()
           
 boolean removeAsset(Asset vAsset)
          Method removeAsset.
 Asset removeAssetAt(int index)
          Method removeAssetAt.
 boolean removeCategory(Category vCategory)
          Method removeCategory.
 Category removeCategoryAt(int index)
          Method removeCategoryAt.
 boolean removeInterface(Interface vInterface)
          Method removeInterface.
 Interface removeInterfaceAt(int index)
          Method removeInterfaceAt.
 void setAsset(Asset[] vAssetArray)
           
 void setAsset(int index, Asset vAsset)
           
 void setAsset(List<Asset> vAssetList)
          Sets the value of '_assetList' by copying the given Vector.
 void setAssetCollection(List<Asset> assetList)
          Deprecated.  
 void setBuilding(String building)
          Sets the value of field 'building'.
 void setCategory(Category[] vCategoryArray)
           
 void setCategory(int index, Category vCategory)
           
 void setCategory(List<Category> vCategoryList)
          Sets the value of '_categoryList' by copying the given Vector.
 void setCategoryCollection(List<Category> categoryList)
          Deprecated.  
 void setCity(String city)
          Sets the value of field 'city'.
 void setForeignId(String foreignId)
          Sets the value of field 'foreignId'.
 void setInterface(Interface[] vInterfaceArray)
           
 void setInterface(int index, Interface vInterface)
           
 void setInterface(List<Interface> vInterfaceList)
          Sets the value of '_interfaceList' by copying the given Vector.
 void setInterfaceCollection(List<Interface> _interfaceList)
          Deprecated.  
 void setNodeLabel(String nodeLabel)
          Sets the value of field 'nodeLabel'.
 void setParentForeignId(String parentForeignId)
          Sets the value of field 'parentForeignId'.
 void setParentNodeLabel(String parentNodeLabel)
          Sets the value of field 'parentNodeLabel'.
static Node unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node()
Method Detail

addAsset

public void addAsset(Asset vAsset)
              throws IndexOutOfBoundsException
Parameters:
vAsset -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAsset

public void addAsset(int index,
                     Asset vAsset)
              throws IndexOutOfBoundsException
Parameters:
index -
vAsset -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCategory

public void addCategory(Category vCategory)
                 throws IndexOutOfBoundsException
Parameters:
vCategory -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCategory

public void addCategory(int index,
                        Category vCategory)
                 throws IndexOutOfBoundsException
Parameters:
index -
vCategory -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInterface

public void addInterface(Interface vInterface)
                  throws IndexOutOfBoundsException
Parameters:
vInterface -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInterface

public void addInterface(int index,
                         Interface vInterface)
                  throws IndexOutOfBoundsException
Parameters:
index -
vInterface -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateAsset

public Enumeration<Asset> enumerateAsset()
Method enumerateAsset.

Returns:
an Enumeration over all possible elements of this collection

enumerateCategory

public Enumeration<Category> enumerateCategory()
Method enumerateCategory.

Returns:
an Enumeration over all possible elements of this collection

enumerateInterface

public Enumeration<Interface> enumerateInterface()
Method enumerateInterface.

Returns:
an Enumeration over all possible elements of this collection

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getAsset

public Asset getAsset(int index)
               throws IndexOutOfBoundsException
Method getAsset.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.modelimport.Asset at the given inde
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getAsset

public Asset[] getAsset()
Method getAsset.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getAssetCollection

public List<Asset> getAssetCollection()
Method getAssetCollection.Returns a reference to '_assetList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getAssetCount

public int getAssetCount()
Method getAssetCount.

Returns:
the size of this collection

getBuilding

public String getBuilding()
Returns the value of field 'building'. The field 'building' has the following description: This optional attribute can be used to persist an asset value to the building column in the OpenNMS DB.

Returns:
the value of field 'Building'.

getCategory

public Category getCategory(int index)
                     throws IndexOutOfBoundsException
Method getCategory.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.modelimport.Category at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getCategory

public Category[] getCategory()
Method getCategory.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getCategoryCollection

public List<Category> getCategoryCollection()
Method getCategoryCollection.Returns a reference to '_categoryList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getCategoryCount

public int getCategoryCount()
Method getCategoryCount.

Returns:
the size of this collection

getCity

public String getCity()
Returns the value of field 'city'. The field 'city' has the following description: This optional attribute can be used to persist an asset value to the building column in the OpenNMS DB.

Returns:
the value of field 'City'.

getForeignId

public String getForeignId()
Returns the value of field 'foreignId'. The field 'foreignId' has the following description: This optional attribute can be used to facilitate integration by making the key from the integrating DB available adjacent to the OpenNMS key.

Returns:
the value of field 'ForeignId'.

getInterface

public Interface getInterface(int index)
                       throws IndexOutOfBoundsException
Method getInterface.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.modelimport.Interface at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getInterface

public Interface[] getInterface()
Method getInterface.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getInterfaceCollection

public List<Interface> getInterfaceCollection()
Method getInterfaceCollection.Returns a reference to '_interfaceList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getInterfaceCount

public int getInterfaceCount()
Method getInterfaceCount.

Returns:
the size of this collection

getNodeLabel

public String getNodeLabel()
Returns the value of field 'nodeLabel'.

Returns:
the value of field 'NodeLabel'.

getParentForeignId

public String getParentForeignId()
Returns the value of field 'parentForeignId'. The field 'parentForeignId' has the following description: This optional attribute can be used to facilitate building node relationships.

Returns:
the value of field 'ParentForeignId'.

getParentNodeLabel

public String getParentNodeLabel()
Returns the value of field 'parentNodeLabel'. The field 'parentNodeLabel' has the following description: This optional attribute can be used to facilitate building node relationships.

Returns:
the value of field 'ParentNodeLabel'.

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateAsset

public Iterator<Asset> iterateAsset()
Method iterateAsset.

Returns:
an Iterator over all possible elements in this collection

iterateCategory

public Iterator<Category> iterateCategory()
Method iterateCategory.

Returns:
an Iterator over all possible elements in this collection

iterateInterface

public Iterator<Interface> iterateInterface()
Method iterateInterface.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllAsset

public void removeAllAsset()

removeAllCategory

public void removeAllCategory()

removeAllInterface

public void removeAllInterface()

removeAsset

public boolean removeAsset(Asset vAsset)
Method removeAsset.

Parameters:
vAsset -
Returns:
true if the object was removed from the collection.

removeAssetAt

public Asset removeAssetAt(int index)
Method removeAssetAt.

Parameters:
index -
Returns:
the element removed from the collection

removeCategory

public boolean removeCategory(Category vCategory)
Method removeCategory.

Parameters:
vCategory -
Returns:
true if the object was removed from the collection.

removeCategoryAt

public Category removeCategoryAt(int index)
Method removeCategoryAt.

Parameters:
index -
Returns:
the element removed from the collection

removeInterface

public boolean removeInterface(Interface vInterface)
Method removeInterface.

Parameters:
vInterface -
Returns:
true if the object was removed from the collection.

removeInterfaceAt

public Interface removeInterfaceAt(int index)
Method removeInterfaceAt.

Parameters:
index -
Returns:
the element removed from the collection

setAsset

public void setAsset(int index,
                     Asset vAsset)
              throws IndexOutOfBoundsException
Parameters:
index -
vAsset -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setAsset

public void setAsset(Asset[] vAssetArray)
Parameters:
vAssetArray -

setAsset

public void setAsset(List<Asset> vAssetList)
Sets the value of '_assetList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAssetList - the Vector to copy.

setAssetCollection

public void setAssetCollection(List<Asset> assetList)
Deprecated. 

Sets the value of '_assetList' by setting it to the given Vector. No type checking is performed.

Parameters:
assetList - the Vector to set.

setBuilding

public void setBuilding(String building)
Sets the value of field 'building'. The field 'building' has the following description: This optional attribute can be used to persist an asset value to the building column in the OpenNMS DB.

Parameters:
building - the value of field 'building'.

setCategory

public void setCategory(int index,
                        Category vCategory)
                 throws IndexOutOfBoundsException
Parameters:
index -
vCategory -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setCategory

public void setCategory(Category[] vCategoryArray)
Parameters:
vCategoryArray -

setCategory

public void setCategory(List<Category> vCategoryList)
Sets the value of '_categoryList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCategoryList - the Vector to copy.

setCategoryCollection

public void setCategoryCollection(List<Category> categoryList)
Deprecated. 

Sets the value of '_categoryList' by setting it to the given Vector. No type checking is performed.

Parameters:
categoryList - the Vector to set.

setCity

public void setCity(String city)
Sets the value of field 'city'. The field 'city' has the following description: This optional attribute can be used to persist an asset value to the building column in the OpenNMS DB.

Parameters:
city - the value of field 'city'.

setForeignId

public void setForeignId(String foreignId)
Sets the value of field 'foreignId'. The field 'foreignId' has the following description: This optional attribute can be used to facilitate integration by making the key from the integrating DB available adjacent to the OpenNMS key.

Parameters:
foreignId - the value of field 'foreignId'.

setInterface

public void setInterface(int index,
                         Interface vInterface)
                  throws IndexOutOfBoundsException
Parameters:
index -
vInterface -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setInterface

public void setInterface(Interface[] vInterfaceArray)
Parameters:
vInterfaceArray -

setInterface

public void setInterface(List<Interface> vInterfaceList)
Sets the value of '_interfaceList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vInterfaceList - the Vector to copy.

setInterfaceCollection

public void setInterfaceCollection(List<Interface> _interfaceList)
Deprecated. 

Sets the value of '_interfaceList' by setting it to the given Vector. No type checking is performed.

Parameters:
_interfaceList - the Vector to set.

setNodeLabel

public void setNodeLabel(String nodeLabel)
Sets the value of field 'nodeLabel'.

Parameters:
nodeLabel - the value of field 'nodeLabel'.

setParentForeignId

public void setParentForeignId(String parentForeignId)
Sets the value of field 'parentForeignId'. The field 'parentForeignId' has the following description: This optional attribute can be used to facilitate building node relationships.

Parameters:
parentForeignId - the value of field 'parentForeignId'.

setParentNodeLabel

public void setParentNodeLabel(String parentNodeLabel)
Sets the value of field 'parentNodeLabel'. The field 'parentNodeLabel' has the following description: This optional attribute can be used to facilitate building node relationships.

Parameters:
parentNodeLabel - the value of field 'parentNodeLabel'.

unmarshal

public static Node unmarshal(Reader reader)
                      throws org.exolab.castor.xml.MarshalException,
                             org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.modelimport.Node
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2011. All Rights Reserved.