org.webdocwf.util.loader
Class OctopusXMLUtil

java.lang.Object
  extended by org.webdocwf.util.loader.OctopusXMLUtil

public class OctopusXMLUtil
extends java.lang.Object

Class has utility methods.

Version:
1.1
Author:
Zoran Milakovic

Constructor Summary
OctopusXMLUtil()
           
 
Method Summary
static java.util.Vector getAttributeValues(org.w3c.dom.NodeList tags, java.lang.String attrName, java.lang.String defaultValue)
          Gets attribute values from specified tags.
static org.w3c.dom.Element getDocumentFragment(org.w3c.dom.Document doc, java.lang.String tagName, int iCurrent, int iImportJobItem)
           
static java.lang.String importAttribute(org.w3c.dom.Document doc, java.lang.String strTagName, java.lang.String strAttrName, int iImportJobItem)
          Method importAttribute reads value for strAttrName attribute in strTagName tag.
static java.lang.String importAttributeValue(org.w3c.dom.Document doc, java.lang.String strTagName, java.lang.String strAttrName, int iImportJobItem)
          Method importAttributeValue reads value for strAttrName attribute in strTagName tag.
static java.util.Vector importValue(org.w3c.dom.Document doc, java.lang.String tagName, java.lang.String strAttrName, int iImportJobItem)
          Method importValue reads values from desired XML tag and puts them into Vector.
static java.util.Vector importValue(org.w3c.dom.Document doc, java.lang.String tagName, java.lang.String strAttrName, int iImportJobItem, java.lang.String defaultValue)
          Method importValue reads values from desired XML tag and puts them into Vector.
static java.util.Vector importValueForTransform(org.w3c.dom.Element docFragment, java.lang.String tagName, java.lang.String strAttrName)
          Method importValue reads values from desired XML tag and puts them into Vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OctopusXMLUtil

public OctopusXMLUtil()
Method Detail

getAttributeValues

public static java.util.Vector getAttributeValues(org.w3c.dom.NodeList tags,
                                                  java.lang.String attrName,
                                                  java.lang.String defaultValue)
Gets attribute values from specified tags.

Parameters:
tags - NodeList of tags to check for attribute
attrName - name of attribute
defaultValue - defaultValue if attribute is not defined
Returns:
vector which contains values

importAttributeValue

public static java.lang.String importAttributeValue(org.w3c.dom.Document doc,
                                                    java.lang.String strTagName,
                                                    java.lang.String strAttrName,
                                                    int iImportJobItem)
Method importAttributeValue reads value for strAttrName attribute in strTagName tag. This method return this value.

Parameters:
doc - Parsed import XML file.
strTagName - The name of tag where attribute is situated.
strAttrName - The name of tag attribute which reads input value.
iImportJobItem - Number of ImportDefinition tag which is processed.
Returns:
String - importing value.

importAttribute

public static java.lang.String importAttribute(org.w3c.dom.Document doc,
                                               java.lang.String strTagName,
                                               java.lang.String strAttrName,
                                               int iImportJobItem)
Method importAttribute reads value for strAttrName attribute in strTagName tag. This method return this value.

Parameters:
doc - Parsed import XML file.
strTagName - The name of tag where attribute is situated.
strAttrName - The name of tag attribute which reads input value.
iImportJobItem - Number of ImportDefinition tag which is processed.
Returns:
String - importing value.

importValue

public static java.util.Vector importValue(org.w3c.dom.Document doc,
                                           java.lang.String tagName,
                                           java.lang.String strAttrName,
                                           int iImportJobItem)
Method importValue reads values from desired XML tag and puts them into Vector.

Parameters:
doc - Parsed import XML file.
tagName - The name of XML tag.
strAttrName - The name of tag attribute which reads input strValue.
iImportJobItem - Number of ImportDefinition tag which is processed.
Returns:
Vector of importing values.

importValueForTransform

public static java.util.Vector importValueForTransform(org.w3c.dom.Element docFragment,
                                                       java.lang.String tagName,
                                                       java.lang.String strAttrName)
Method importValue reads values from desired XML tag and puts them into Vector.

Parameters:
docFragment - Parsed import XML file.
tagName - The name of XML tag.
strAttrName - The name of tag attribute which reads input strValue.
Returns:
Vector of importing values.

importValue

public static java.util.Vector importValue(org.w3c.dom.Document doc,
                                           java.lang.String tagName,
                                           java.lang.String strAttrName,
                                           int iImportJobItem,
                                           java.lang.String defaultValue)
Method importValue reads values from desired XML tag and puts them into Vector.

Parameters:
doc - Parsed import XML file.
tagName - The name of XML tag.
strAttrName - The name of tag attribute which reads input strValue.
iImportJobItem - Number of ImportDefinition tag which is processed.
defaultValue - The default value of strattrname attribute.
Returns:
Vector of importing values.

getDocumentFragment

public static org.w3c.dom.Element getDocumentFragment(org.w3c.dom.Document doc,
                                                      java.lang.String tagName,
                                                      int iCurrent,
                                                      int iImportJobItem)
Returns:
Vector of importing values.


Copyright © 2002-2007 Together - the Workgroup. All Rights Reserved.