class: XmlHelper

public class: XmlHelper
Author: vmakarenko (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 1712 $ $LastChangedDate: 2009-03-13 14:; Complexity: 1
Dates: Created: 16.07.2009 15:12:29; Modified: 16.07.2009 15:12:29;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {BB5AA1E1-7919-4599-8D81-3E712310833C}
XML processing helper
 

Goto: Custom Properties, Fields, Methods

See also: TestCitationManager

Appears in: utils

Connections
 
Custom Properties
 
XmlHelper Attributes
Attribute Details
public static const String
  CDATAElements
Initial: "valid-if max-count max-length variable " + // CitationStyle definition "{http://purl.org/dc/terms/}bibliographicCitation"
Notes: List of CDATA elemetns
public static const String
  CITATIONSTYLE_XML_SCHEMA_FILE
Initial: "citation-style.xsd"
public static const String
  DATASOURCES_XML_SCHEMA_FILE
Initial: "escidoc/soap/item/0.3/item-list.xsd"
private static const Logger
  logger
Initial: Logger.getLogger(XmlHelper.class)
public static const String
  SCHEMATRON_DIRECTORY
Initial: "Schematron/"
public static const String
  SCHEMATRON_FILE
Initial: SCHEMATRON_DIRECTORY + "layout-element.sch"
 
XmlHelper Methods
Operation Details
public static
createDocument():Document
Sequential
Tags: throws=CitationStyleManagerException
Notes: Creates new org.w3c.dom.Document
@return org.w3c.dom.Document
public static
createDocumentBuilder():DocumentBuilder
Sequential
Tags: throws=CitationStyleManagerException
Notes: Builds new DocumentBuilder
@return DocumentBuilder
public static
getExplainDocument():Document
Sequential
Tags: throws=CitationStyleManagerException
private static
getFilteredNodes(
   NodeFilter nodeFilter,
   Document doc):NodeIterator
Sequential
Tags: throws=CitationStyleManagerException
Notes: Returns <code>org.w3c.dom.traversal.NodeIterator</code> for org.w3c.dom.Document traversing
public static
getListOfStyles():String
Sequential
Tags: throws=CitationStyleManagerException
Notes: Returns list of Citation Styles
public static
getMimeType(
   String csName,
   String outFormat):String
Sequential
Tags: throws=CitationStyleManagerException
Notes: Returns the mime-type for output format of the citation style
@return mime-type, or <code>null</code>, if no <code>mime-type</code> has been found
public static
getOutputFormatList(
   String csName):List
Sequential
Tags: throws=CitationStyleManagerException
Notes: Returns the list of the output formats (first element of the array) and mime-types (second element) for the citation style <code>csName</code>.
@return list of the output formats
public static
getOutputFormats(
   String csName):String
Sequential
Tags: throws=CitationStyleManagerException
Notes: Returns the list of the output formats for the citation style <code>csName</code>
@return list of the output formats
public static
isCitationStyle(
   String csName):boolean
Sequential
Tags: throws=CitationStyleManagerException
Notes: Checks whether the csName is in the list of Citation Styles
public static
output(
   Document doc,
   String xmlFileName):void
Sequential
Tags: throws=CitationStyleManagerException,IOException
Notes: Writes org.w3c.dom.Document to XML file
public static
output(
   Document doc):OutputStream
Sequential
Tags: throws=IOException
Notes: Writes org.w3c.dom.Document to OutputStream
public static
output(
   Document doc,
   OutputStream os):void
Sequential
Tags: throws=IOException
Notes: Writes org.w3c.dom.Document to OutputStream
public static
outputBase(
   Document doc,
   StreamResult streamResult):void
Sequential
Tags: throws=IOException
Notes: Base procedure for xml serialization
public static
outputString(
   Document doc):String
Sequential
Tags: throws=IOException
Notes: Writes org.w3c.dom.Document to String
public static
parseDocumentForTraversing(
   InputSource is):Document
Sequential
Tags: throws=CitationStyleManagerException
Notes: Creates new org.w3c.dom.Document with Traversing possibility
@return org.w3c.dom.Document
public
validateCitationStyleXML(
   String xmlDocumentUrl):void
Sequential
Tags: throws=CitationStyleManagerException,IOException
Notes: Validation of CitationStyle XML against 1) XML schema 2) Schematron schema
public
validateDataSourceXML(
   String xmlDocumentUrl):void
Sequential
Tags: throws=CitationStyleManagerException,IOException
Notes: Validation of DataSource XML against the XML schema
public
validateSchema(
   String schemaUrl,
   String xmlDocumentUrl):void
Sequential
Tags: throws=CitationStyleManagerException
Notes: XML Schema validation (JAVAX)