/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1.2.1</a>, using an XML
* Schema.
* $Id$
*/
package org.opennms.netmgt.config.xmpDataCollection;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* a grouping of XMP related RRD parms, MIB object groups
* and sysoid based system definitions.
*
* @version $Revision$ $Date$
*/
@SuppressWarnings("all") public class XmpCollection implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* collectoion name
*/
private java.lang.String _name;
/**
* indicates if collected XMP data is to be stored for
* "all" interfaces or only for the "primary" interface.
* Currently ignored.
*/
private java.lang.String _xmpStorageFlag;
/**
* RRD parms
*/
private org.opennms.netmgt.config.xmpDataCollection.Rrd _rrd;
/**
* MIB object groups
*/
private org.opennms.netmgt.config.xmpDataCollection.Groups _groups;
//----------------/
//- Constructors -/
//----------------/
public XmpCollection() {
super();
}
//-----------/
//- Methods -/
//-----------/
/**
* Overrides the java.lang.Object.equals method.
*
* @param obj
* @return true if the objects are equal.
*/
@Override()
public boolean equals(
final java.lang.Object obj) {
if ( this == obj )
return true;
if (obj instanceof XmpCollection) {
XmpCollection temp = (XmpCollection)obj;
if (this._name != null) {
if (temp._name == null) return false;
else if (!(this._name.equals(temp._name)))
return false;
}
else if (temp._name != null)
return false;
if (this._xmpStorageFlag != null) {
if (temp._xmpStorageFlag == null) return false;
else if (!(this._xmpStorageFlag.equals(temp._xmpStorageFlag)))
return false;
}
else if (temp._xmpStorageFlag != null)
return false;
if (this._rrd != null) {
if (temp._rrd == null) return false;
else if (!(this._rrd.equals(temp._rrd)))
return false;
}
else if (temp._rrd != null)
return false;
if (this._groups != null) {
if (temp._groups == null) return false;
else if (!(this._groups.equals(temp._groups)))
return false;
}
else if (temp._groups != null)
return false;
return true;
}
return false;
}
/**
* Returns the value of field 'groups'. The field 'groups' has
* the following description: MIB object groups
*
* @return the value of field 'Groups'.
*/
public org.opennms.netmgt.config.xmpDataCollection.Groups getGroups(
) {
return this._groups;
}
/**
* Returns the value of field 'name'. The field 'name' has the
* following description: collectoion name
*
* @return the value of field 'Name'.
*/
public java.lang.String getName(
) {
return this._name;
}
/**
* Returns the value of field 'rrd'. The field 'rrd' has the
* following description: RRD parms
*
* @return the value of field 'Rrd'.
*/
public org.opennms.netmgt.config.xmpDataCollection.Rrd getRrd(
) {
return this._rrd;
}
/**
* Returns the value of field 'xmpStorageFlag'. The field
* 'xmpStorageFlag' has the following description: indicates if
* collected XMP data is to be stored for
* "all" interfaces or only for the "primary" interface.
* Currently ignored.
*
* @return the value of field 'XmpStorageFlag'.
*/
public java.lang.String getXmpStorageFlag(
) {
return this._xmpStorageFlag;
}
/**
* Overrides the java.lang.Object.hashCode method.
* <p>
* The following steps came from <b>Effective Java Programming
* Language Guide</b> by Joshua Bloch, Chapter 3
*
* @return a hash code value for the object.
*/
public int hashCode(
) {
int result = 17;
long tmp;
if (_name != null) {
result = 37 * result + _name.hashCode();
}
if (_xmpStorageFlag != null) {
result = 37 * result + _xmpStorageFlag.hashCode();
}
if (_rrd != null) {
result = 37 * result + _rrd.hashCode();
}
if (_groups != null) {
result = 37 * result + _groups.hashCode();
}
return result;
}
/**
* Method isValid.
*
* @return true if this object is valid according to the schema
*/
public boolean isValid(
) {
try {
validate();
} catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
}
/**
*
*
* @param out
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*/
public void marshal(
final java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
}
/**
*
*
* @param handler
* @throws java.io.IOException if an IOException occurs during
* marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
*/
public void marshal(
final org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, handler);
}
/**
* Sets the value of field 'groups'. The field 'groups' has the
* following description: MIB object groups
*
* @param groups the value of field 'groups'.
*/
public void setGroups(
final org.opennms.netmgt.config.xmpDataCollection.Groups groups) {
this._groups = groups;
}
/**
* Sets the value of field 'name'. The field 'name' has the
* following description: collectoion name
*
* @param name the value of field 'name'.
*/
public void setName(
final java.lang.String name) {
this._name = name;
}
/**
* Sets the value of field 'rrd'. The field 'rrd' has the
* following description: RRD parms
*
* @param rrd the value of field 'rrd'.
*/
public void setRrd(
final org.opennms.netmgt.config.xmpDataCollection.Rrd rrd) {
this._rrd = rrd;
}
/**
* Sets the value of field 'xmpStorageFlag'. The field
* 'xmpStorageFlag' has the following description: indicates if
* collected XMP data is to be stored for
* "all" interfaces or only for the "primary" interface.
* Currently ignored.
*
* @param xmpStorageFlag the value of field 'xmpStorageFlag'.
*/
public void setXmpStorageFlag(
final java.lang.String xmpStorageFlag) {
this._xmpStorageFlag = xmpStorageFlag;
}
/**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
* @return the unmarshaled
* org.opennms.netmgt.config.xmpDataCollection.XmpCollection
*/
public static org.opennms.netmgt.config.xmpDataCollection.XmpCollection unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.opennms.netmgt.config.xmpDataCollection.XmpCollection) Unmarshaller.unmarshal(org.opennms.netmgt.config.xmpDataCollection.XmpCollection.class, reader);
}
/**
*
*
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*/
public void validate(
)
throws org.exolab.castor.xml.ValidationException {
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
}
}