org.opennms.netmgt.config.map.adapter
Class Cmap

java.lang.Object
  extended by org.opennms.netmgt.config.map.adapter.Cmap
All Implemented Interfaces:
Serializable

public class Cmap
extends Object
implements Serializable

This represents a map in the opennms system.

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

Constructor Summary
Cmap()
           
 
Method Summary
 void addCelement(Celement vCelement)
           
 void addCelement(int index, Celement vCelement)
           
 void addCsubmap(Csubmap vCsubmap)
           
 void addCsubmap(int index, Csubmap vCsubmap)
           
 void deleteMapHeight()
           
 void deleteMapWidth()
           
 Enumeration<Celement> enumerateCelement()
          Method enumerateCelement.
 Enumeration<Csubmap> enumerateCsubmap()
          Method enumerateCsubmap.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 Celement[] getCelement()
          Method getCelement.Returns the contents of the collection in an Array.
 Celement getCelement(int index)
          Method getCelement.
 List<Celement> getCelementCollection()
          Method getCelementCollection.Returns a reference to '_celementList'.
 int getCelementCount()
          Method getCelementCount.
 Csubmap[] getCsubmap()
          Method getCsubmap.Returns the contents of the collection in an Array.
 Csubmap getCsubmap(int index)
          Method getCsubmap.
 List<Csubmap> getCsubmapCollection()
          Method getCsubmapCollection.Returns a reference to '_csubmapList'.
 int getCsubmapCount()
          Method getCsubmapCount.
 String getMapAccess()
          Returns the value of field 'mapAccess'.
 String getMapBG()
          Returns the value of field 'mapBG'.
 String getMapGroup()
          Returns the value of field 'mapGroup'.
 int getMapHeight()
          Returns the value of field 'mapHeight'.
 String getMapName()
          Returns the value of field 'mapName'.
 String getMapOwner()
          Returns the value of field 'mapOwner'.
 int getMapWidth()
          Returns the value of field 'mapWidth'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasMapHeight()
          Method hasMapHeight.
 boolean hasMapWidth()
          Method hasMapWidth.
 boolean isValid()
          Method isValid.
 Iterator<Celement> iterateCelement()
          Method iterateCelement.
 Iterator<Csubmap> iterateCsubmap()
          Method iterateCsubmap.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllCelement()
           
 void removeAllCsubmap()
           
 boolean removeCelement(Celement vCelement)
          Method removeCelement.
 Celement removeCelementAt(int index)
          Method removeCelementAt.
 boolean removeCsubmap(Csubmap vCsubmap)
          Method removeCsubmap.
 Csubmap removeCsubmapAt(int index)
          Method removeCsubmapAt.
 void setCelement(Celement[] vCelementArray)
           
 void setCelement(int index, Celement vCelement)
           
 void setCelement(List<Celement> vCelementList)
          Sets the value of '_celementList' by copying the given Vector.
 void setCelementCollection(List<Celement> celementList)
          Deprecated.  
 void setCsubmap(Csubmap[] vCsubmapArray)
           
 void setCsubmap(int index, Csubmap vCsubmap)
           
 void setCsubmap(List<Csubmap> vCsubmapList)
          Sets the value of '_csubmapList' by copying the given Vector.
 void setCsubmapCollection(List<Csubmap> csubmapList)
          Deprecated.  
 void setMapAccess(String mapAccess)
          Sets the value of field 'mapAccess'.
 void setMapBG(String mapBG)
          Sets the value of field 'mapBG'.
 void setMapGroup(String mapGroup)
          Sets the value of field 'mapGroup'.
 void setMapHeight(int mapHeight)
          Sets the value of field 'mapHeight'.
 void setMapName(String mapName)
          Sets the value of field 'mapName'.
 void setMapOwner(String mapOwner)
          Sets the value of field 'mapOwner'.
 void setMapWidth(int mapWidth)
          Sets the value of field 'mapWidth'.
static Cmap 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

Cmap

public Cmap()
Method Detail

addCelement

public void addCelement(Celement vCelement)
                 throws IndexOutOfBoundsException
Parameters:
vCelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCelement

public void addCelement(int index,
                        Celement vCelement)
                 throws IndexOutOfBoundsException
Parameters:
index -
vCelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCsubmap

public void addCsubmap(Csubmap vCsubmap)
                throws IndexOutOfBoundsException
Parameters:
vCsubmap -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCsubmap

public void addCsubmap(int index,
                       Csubmap vCsubmap)
                throws IndexOutOfBoundsException
Parameters:
index -
vCsubmap -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteMapHeight

public void deleteMapHeight()

deleteMapWidth

public void deleteMapWidth()

enumerateCelement

public Enumeration<Celement> enumerateCelement()
Method enumerateCelement.

Returns:
an Enumeration over all possible elements of this collection

enumerateCsubmap

public Enumeration<Csubmap> enumerateCsubmap()
Method enumerateCsubmap.

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.

getCelement

public Celement getCelement(int index)
                     throws IndexOutOfBoundsException
Method getCelement.

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

getCelement

public Celement[] getCelement()
Method getCelement.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

getCelementCollection

public List<Celement> getCelementCollection()
Method getCelementCollection.Returns a reference to '_celementList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getCelementCount

public int getCelementCount()
Method getCelementCount.

Returns:
the size of this collection

getCsubmap

public Csubmap getCsubmap(int index)
                   throws IndexOutOfBoundsException
Method getCsubmap.

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

getCsubmap

public Csubmap[] getCsubmap()
Method getCsubmap.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

getCsubmapCollection

public List<Csubmap> getCsubmapCollection()
Method getCsubmapCollection.Returns a reference to '_csubmapList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getCsubmapCount

public int getCsubmapCount()
Method getCsubmapCount.

Returns:
the size of this collection

getMapAccess

public String getMapAccess()
Returns the value of field 'mapAccess'. The field 'mapAccess' has the following description: The Access scheme of the map

Returns:
the value of field 'MapAccess'.

getMapBG

public String getMapBG()
Returns the value of field 'mapBG'. The field 'mapBG' has the following description: The Background of the map

Returns:
the value of field 'MapBG'.

getMapGroup

public String getMapGroup()
Returns the value of field 'mapGroup'. The field 'mapGroup' has the following description: The Group of the map

Returns:
the value of field 'MapGroup'.

getMapHeight

public int getMapHeight()
Returns the value of field 'mapHeight'. The field 'mapHeight' has the following description: The map height

Returns:
the value of field 'MapHeight'.

getMapName

public String getMapName()
Returns the value of field 'mapName'. The field 'mapName' has the following description: The Name of the map

Returns:
the value of field 'MapName'.

getMapOwner

public String getMapOwner()
Returns the value of field 'mapOwner'. The field 'mapOwner' has the following description: The Owner of the map

Returns:
the value of field 'MapOwner'.

getMapWidth

public int getMapWidth()
Returns the value of field 'mapWidth'. The field 'mapWidth' has the following description: The map width

Returns:
the value of field 'MapWidth'.

hasMapHeight

public boolean hasMapHeight()
Method hasMapHeight.

Returns:
true if at least one MapHeight has been added

hasMapWidth

public boolean hasMapWidth()
Method hasMapWidth.

Returns:
true if at least one MapWidth has been added

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

iterateCelement

public Iterator<Celement> iterateCelement()
Method iterateCelement.

Returns:
an Iterator over all possible elements in this collection

iterateCsubmap

public Iterator<Csubmap> iterateCsubmap()
Method iterateCsubmap.

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

removeAllCelement

public void removeAllCelement()

removeAllCsubmap

public void removeAllCsubmap()

removeCelement

public boolean removeCelement(Celement vCelement)
Method removeCelement.

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

removeCelementAt

public Celement removeCelementAt(int index)
Method removeCelementAt.

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

removeCsubmap

public boolean removeCsubmap(Csubmap vCsubmap)
Method removeCsubmap.

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

removeCsubmapAt

public Csubmap removeCsubmapAt(int index)
Method removeCsubmapAt.

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

setCelement

public void setCelement(int index,
                        Celement vCelement)
                 throws IndexOutOfBoundsException
Parameters:
index -
vCelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setCelement

public void setCelement(Celement[] vCelementArray)
Parameters:
vCelementArray -

setCelement

public void setCelement(List<Celement> vCelementList)
Sets the value of '_celementList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCelementList - the Vector to copy.

setCelementCollection

public void setCelementCollection(List<Celement> celementList)
Deprecated. 

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

Parameters:
celementList - the Vector to set.

setCsubmap

public void setCsubmap(int index,
                       Csubmap vCsubmap)
                throws IndexOutOfBoundsException
Parameters:
index -
vCsubmap -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setCsubmap

public void setCsubmap(Csubmap[] vCsubmapArray)
Parameters:
vCsubmapArray -

setCsubmap

public void setCsubmap(List<Csubmap> vCsubmapList)
Sets the value of '_csubmapList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCsubmapList - the Vector to copy.

setCsubmapCollection

public void setCsubmapCollection(List<Csubmap> csubmapList)
Deprecated. 

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

Parameters:
csubmapList - the Vector to set.

setMapAccess

public void setMapAccess(String mapAccess)
Sets the value of field 'mapAccess'. The field 'mapAccess' has the following description: The Access scheme of the map

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

setMapBG

public void setMapBG(String mapBG)
Sets the value of field 'mapBG'. The field 'mapBG' has the following description: The Background of the map

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

setMapGroup

public void setMapGroup(String mapGroup)
Sets the value of field 'mapGroup'. The field 'mapGroup' has the following description: The Group of the map

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

setMapHeight

public void setMapHeight(int mapHeight)
Sets the value of field 'mapHeight'. The field 'mapHeight' has the following description: The map height

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

setMapName

public void setMapName(String mapName)
Sets the value of field 'mapName'. The field 'mapName' has the following description: The Name of the map

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

setMapOwner

public void setMapOwner(String mapOwner)
Sets the value of field 'mapOwner'. The field 'mapOwner' has the following description: The Owner of the map

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

setMapWidth

public void setMapWidth(int mapWidth)
Sets the value of field 'mapWidth'. The field 'mapWidth' has the following description: The map width

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

unmarshal

public static Cmap 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.map.adapter.Cmap
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.