Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.tools.ejbjar
Class EjbJarXMLDocument

java.lang.Object
  extended byoracle.toplink.tools.ejbjar.EjbJarXMLDocument


public class EjbJarXMLDocument
extends java.lang.Object

Root object that stores all deployment descriptor info contained in an ejb-jar.xml file. This includes the following:

  1. PI (Processing Instructions)
  2. DOCTYPE declarations
  3. EjbJar java object

Constructor Summary
EjbJarXMLDocument()
EjbJarXMLDocument(java.lang.String ejbXmlFile)
Constructor

Method Summary
EjbJar getEjbJar()
boolean isModified(java.lang.String xmlFileLocation)
boolean isSameXmlFile(java.lang.String xmlFileLocation)
static void printAllNodes(org.w3c.dom.Node node)
This method prints all subnodes of a node.
static void printNodeType(org.w3c.dom.Node node)
Given a DOM node, it prints the type of that node.
void readAndLoad()
void setXmlFileLocation(java.lang.String file)

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EjbJarXMLDocument

public EjbJarXMLDocument()

EjbJarXMLDocument

public EjbJarXMLDocument(java.lang.String ejbXmlFile)
                  throws java.io.FileNotFoundException,
                         EJBJarXMLException
Constructor

Method Detail

getEjbJar

public EjbJar getEjbJar()
Returns:
EjbJar the DOM model representation of ejb-jar.xml file

isSameXmlFile

public boolean isSameXmlFile(java.lang.String xmlFileLocation)

isModified

public boolean isModified(java.lang.String xmlFileLocation)

printAllNodes

public static void printAllNodes(org.w3c.dom.Node node)
This method prints all subnodes of a node. It is intended to take a document node (EjbJar document Node) Each EjbJar document node contains:
  1. zero or more COMMENT and PROCESSING INSTRUCTION (PI) nodes
  2. zero or one DOCTYPE node
  3. one root element node
Parameters:
node - the parent node

printNodeType

public static void printNodeType(org.w3c.dom.Node node)
Given a DOM node, it prints the type of that node. It uses the following node definitions to figure out the node type.
 
         public static final short ELEMENT_NODE                = 1;
         public static final short ATTRIBUTE_NODE              = 2;
         public static final short TEXT_NODE                   = 3;
         public static final short CDATA_SECTION_NODE          = 4;
         public static final short ENTITY_REFERENCE_NODE       = 5;
         public static final short ENTITY_NODE                 = 6;
         public static final short PROCESSING_INSTRUCTION_NODE = 7;
         public static final short COMMENT_NODE                = 8;
         public static final short DOCUMENT_NODE               = 9;
         public static final short DOCUMENT_TYPE_NODE          = 10;
         public static final short DOCUMENT_FRAGMENT_NODE      = 11;
         public static final short NOTATION_NODE               = 12;
 
Parameters:
node - the parent node

readAndLoad

public void readAndLoad()
                 throws java.io.FileNotFoundException,
                        EJBJarXMLException
Throws:
java.io.FileNotFoundException
EJBJarXMLException

setXmlFileLocation

public void setXmlFileLocation(java.lang.String file)

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.