org.opennms.netmgt.config.modelimport
Class ModelImport

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

public class ModelImport
extends java.lang.Object
implements java.io.Serializable

Use this configuration file as an import of nodes, interfaces, and services to OpenNMS by-passing several phases of discovery and capabilities polling.

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

Constructor Summary
ModelImport()
           
 
Method Summary
 void addNode(int index, Node vNode)
          Method addNode
 void addNode(Node vNode)
          Method addNode
 void clearNode()
          Method clearNode
 java.util.Enumeration enumerateNode()
          Method enumerateNode
 java.util.Date getDateStamp()
          Returns the value of field 'dateStamp'.
 java.lang.String getForeignSource()
          Returns the value of field 'foreignSource'.
 java.util.Date getLastImport()
          Returns the value of field 'lastImport'.
 Node[] getNode()
          Method getNode
 Node getNode(int index)
          Method getNode
 java.util.ArrayList getNodeCollection()
          Method getNodeCollection Returns a reference to 'node'.
 int getNodeCount()
          Method getNodeCount
 boolean isValid()
          Method isValid
 void marshal(org.xml.sax.ContentHandler handler)
          Method marshal
 void marshal(java.io.Writer out)
          Method marshal
 boolean removeNode(Node vNode)
          Method removeNode
 void setDateStamp(java.util.Date dateStamp)
          Sets the value of field 'dateStamp'.
 void setForeignSource(java.lang.String foreignSource)
          Sets the value of field 'foreignSource'.
 void setLastImport(java.util.Date lastImport)
          Sets the value of field 'lastImport'.
 void setNode(java.util.ArrayList nodeCollection)
          Method setNode Sets the value of 'node' by copying the given ArrayList.
 void setNode(int index, Node vNode)
          Method setNode
 void setNode(Node[] nodeArray)
          Method setNode
 void setNodeCollection(java.util.ArrayList nodeCollection)
          Method setNodeCollection Sets the value of 'node' by setting it to the given ArrayList.
static java.lang.Object unmarshal(java.io.Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelImport

public ModelImport()
Method Detail

addNode

public void addNode(Node vNode)
             throws java.lang.IndexOutOfBoundsException
Method addNode

Parameters:
vNode -
Throws:
java.lang.IndexOutOfBoundsException

addNode

public void addNode(int index,
                    Node vNode)
             throws java.lang.IndexOutOfBoundsException
Method addNode

Parameters:
index -
vNode -
Throws:
java.lang.IndexOutOfBoundsException

clearNode

public void clearNode()
Method clearNode


enumerateNode

public java.util.Enumeration enumerateNode()
Method enumerateNode

Returns:
Enumeration

getDateStamp

public java.util.Date getDateStamp()
Returns the value of field 'dateStamp'.

Returns:
Date

getForeignSource

public java.lang.String getForeignSource()
Returns the value of field 'foreignSource'.

Returns:
String

getLastImport

public java.util.Date getLastImport()
Returns the value of field 'lastImport'.

Returns:
Date

getNode

public Node getNode(int index)
             throws java.lang.IndexOutOfBoundsException
Method getNode

Parameters:
index -
Returns:
Node
Throws:
java.lang.IndexOutOfBoundsException

getNode

public Node[] getNode()
Method getNode

Returns:
Node

getNodeCollection

public java.util.ArrayList getNodeCollection()
Method getNodeCollection Returns a reference to 'node'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getNodeCount

public int getNodeCount()
Method getNodeCount

Returns:
int

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
handler -
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

removeNode

public boolean removeNode(Node vNode)
Method removeNode

Parameters:
vNode -
Returns:
boolean

setDateStamp

public void setDateStamp(java.util.Date dateStamp)
Sets the value of field 'dateStamp'.

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

setForeignSource

public void setForeignSource(java.lang.String foreignSource)
Sets the value of field 'foreignSource'.

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

setLastImport

public void setLastImport(java.util.Date lastImport)
Sets the value of field 'lastImport'.

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

setNode

public void setNode(int index,
                    Node vNode)
             throws java.lang.IndexOutOfBoundsException
Method setNode

Parameters:
index -
vNode -
Throws:
java.lang.IndexOutOfBoundsException

setNode

public void setNode(Node[] nodeArray)
Method setNode

Parameters:
nodeArray -

setNode

public void setNode(java.util.ArrayList nodeCollection)
Method setNode Sets the value of 'node' by copying the given ArrayList.

Parameters:
nodeCollection - the Vector to copy.

setNodeCollection

public void setNodeCollection(java.util.ArrayList nodeCollection)
Method setNodeCollection Sets the value of 'node' by setting it to the given ArrayList. No type checking is performed.

Parameters:
nodeCollection - the ArrayList to copy.

unmarshal

public static java.lang.Object unmarshal(java.io.Reader reader)
                                  throws org.exolab.castor.xml.MarshalException,
                                         org.exolab.castor.xml.ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Method validate

Throws:
org.exolab.castor.xml.ValidationException


Copyright © 2007. All Rights Reserved.