submarine.util
Class Tools

java.lang.Object
  |
  +--submarine.util.Tools
Direct Known Subclasses:
EAISystem.Tools

public class Tools
extends java.lang.Object


Field Summary
protected static javax.xml.parsers.DocumentBuilder db
           
protected static javax.xml.parsers.DocumentBuilderFactory dbf
           
 
Constructor Summary
Tools()
           
 
Method Summary
static void archiveXML(java.io.OutputStream os, org.w3c.dom.Document message)
           
static void bindToJNDI(java.lang.String name, java.lang.Object obj)
           
static java.lang.String buildXPathString(org.w3c.dom.Element content, org.w3c.dom.Node context)
           
static java.lang.String buildXPathString(org.w3c.dom.Element content, org.w3c.dom.Node context, java.util.Properties attrs)
           
static java.util.List findNodes(org.w3c.dom.Element ctx, java.lang.String xp)
           
static void flush(java.io.InputStream in, java.io.OutputStream out)
           
static void flush(java.io.Reader in, java.io.Writer out)
           
static java.lang.String getDate(java.util.Date date, java.lang.String format)
           
protected static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
           
static org.w3c.dom.Element getTag(org.w3c.dom.Element ctx, java.lang.String tag)
           
static org.w3c.dom.Element getTagEx(org.w3c.dom.Element ctx, java.lang.String tag)
           
static java.lang.String getTagValue(org.w3c.dom.Element ctx, java.lang.String tag)
           
static java.lang.String getTagValueEx(org.w3c.dom.Element ctx, java.lang.String tag)
           
static java.lang.String getTextValue(org.w3c.dom.Node node)
           
static void manageInterruptException(java.lang.Exception e)
           
static org.w3c.dom.Document newDocument()
           
static org.w3c.dom.Document parseXML(java.io.File f)
           
static org.w3c.dom.Document parseXML(org.xml.sax.InputSource src)
           
static org.w3c.dom.Document parseXML(java.io.InputStream is)
           
static void printList(javax.naming.Context context, java.io.PrintWriter pout, java.lang.String prefix)
          recursive
static java.lang.String replaceVars(java.lang.String select, java.util.Properties atts)
           
static void unbindFromJNDI(java.lang.String name)
           
static void writeXML(java.io.Writer w, org.w3c.dom.Document message, java.lang.String encoding, boolean xmldecl)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

dbf

protected static javax.xml.parsers.DocumentBuilderFactory dbf

db

protected static javax.xml.parsers.DocumentBuilder db
Constructor Detail

Tools

public Tools()
Method Detail

getTextValue

public static java.lang.String getTextValue(org.w3c.dom.Node node)
Parameters:
node -  
Returns:
String

getTag

public static org.w3c.dom.Element getTag(org.w3c.dom.Element ctx,
                                         java.lang.String tag)
Parameters:
ctx -  
tag -  
Returns:
org.w3c.dom.Element

findNodes

public static java.util.List findNodes(org.w3c.dom.Element ctx,
                                       java.lang.String xp)

getTagEx

public static org.w3c.dom.Element getTagEx(org.w3c.dom.Element ctx,
                                           java.lang.String tag)
Parameters:
ctx -  
tag -  
Returns:
org.w3c.dom.Element

getTagValue

public static java.lang.String getTagValue(org.w3c.dom.Element ctx,
                                           java.lang.String tag)
Parameters:
ctx -  
tag -  
Returns:
String

getTagValueEx

public static java.lang.String getTagValueEx(org.w3c.dom.Element ctx,
                                             java.lang.String tag)
Parameters:
ctx -  
tag -  
Returns:
String

archiveXML

public static void archiveXML(java.io.OutputStream os,
                              org.w3c.dom.Document message)
                       throws java.io.IOException
Parameters:
os -  
message -  
Throws:
java.io.IOException -  

writeXML

public static void writeXML(java.io.Writer w,
                            org.w3c.dom.Document message,
                            java.lang.String encoding,
                            boolean xmldecl)
                     throws java.io.IOException

getDocumentBuilder

protected static javax.xml.parsers.DocumentBuilder getDocumentBuilder()

newDocument

public static org.w3c.dom.Document newDocument()

parseXML

public static org.w3c.dom.Document parseXML(java.io.File f)
                                     throws java.lang.Exception

parseXML

public static org.w3c.dom.Document parseXML(org.xml.sax.InputSource src)
                                     throws java.lang.Exception

parseXML

public static org.w3c.dom.Document parseXML(java.io.InputStream is)
                                     throws java.lang.Exception

flush

public static void flush(java.io.InputStream in,
                         java.io.OutputStream out)
                  throws java.io.IOException
Parameters:
in -  
out -  
Throws:
java.io.IOException -  

flush

public static void flush(java.io.Reader in,
                         java.io.Writer out)
                  throws java.io.IOException
Parameters:
in -  
out -  
Throws:
java.io.IOException -  

buildXPathString

public static java.lang.String buildXPathString(org.w3c.dom.Element content,
                                                org.w3c.dom.Node context)
                                         throws java.lang.Exception

getDate

public static java.lang.String getDate(java.util.Date date,
                                       java.lang.String format)

replaceVars

public static java.lang.String replaceVars(java.lang.String select,
                                           java.util.Properties atts)

buildXPathString

public static java.lang.String buildXPathString(org.w3c.dom.Element content,
                                                org.w3c.dom.Node context,
                                                java.util.Properties attrs)
                                         throws java.lang.Exception

manageInterruptException

public static void manageInterruptException(java.lang.Exception e)

printList

public static void printList(javax.naming.Context context,
                             java.io.PrintWriter pout,
                             java.lang.String prefix)
recursive

bindToJNDI

public static void bindToJNDI(java.lang.String name,
                              java.lang.Object obj)

unbindFromJNDI

public static void unbindFromJNDI(java.lang.String name)

Submarine project. free distribution of this software must include the opensource licence.
Guénolé de Cadoudal.