org.opennms.netmgt.config.rancid.adapter
Class Mapping

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

public class Mapping
extends Object
implements Serializable

A map from sysoids masks and rancid device type.

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

Constructor Summary
Mapping()
           
 
Method Summary
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getSysoidMask()
          Returns the value of field 'sysoidMask'.
 String getType()
          Returns the value of field 'type'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setSysoidMask(String sysoidMask)
          Sets the value of field 'sysoidMask'.
 void setType(String type)
          Sets the value of field 'type'.
static Mapping 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

Mapping

public Mapping()
Method Detail

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.

getSysoidMask

public String getSysoidMask()
Returns the value of field 'sysoidMask'. The field 'sysoidMask' has the following description: sysoid to match.

Returns:
the value of field 'SysoidMask'.

getType

public String getType()
Returns the value of field 'type'. The field 'type' has the following description: The rancid device type for the specified sysoid mask.

Returns:
the value of field 'Type'.

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

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

setSysoidMask

public void setSysoidMask(String sysoidMask)
Sets the value of field 'sysoidMask'. The field 'sysoidMask' has the following description: sysoid to match.

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

setType

public void setType(String type)
Sets the value of field 'type'. The field 'type' has the following description: The rancid device type for the specified sysoid mask.

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

unmarshal

public static Mapping 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.rancid.adapter.Mapping
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.