cometa.translator
Class ValidateXML

java.lang.Object
  extended by cometa.translator.ValidateXML

public class ValidateXML
extends java.lang.Object

This class verifies the validity of a given XML file, checking it against its corresponding XML Schema. It uses the xerces library (for more information, see the xerces documentation).


Constructor Summary
ValidateXML(org.xmldb.api.modules.XMLResource standardMethod, org.xmldb.api.modules.XMLResource standardProduct)
          The ValidateXML constructor has two parameters: the product schema and the method schema.
 
Method Summary
static java.io.File getStandardMethod()
           
static java.io.File getStandardProduct()
           
static boolean isValidMethod(org.xmldb.api.modules.XMLResource method)
          This method is used to verify the correctness of a given method XMLResource.
static boolean isValidProduct(org.xmldb.api.modules.XMLResource product)
          This method is used to verify the correctness of a given product XMLResource.
static void setStandardMethod(java.io.File standardMethod)
           
static void setStandardProduct(java.io.File standardProduct)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidateXML

public ValidateXML(org.xmldb.api.modules.XMLResource standardMethod,
                   org.xmldb.api.modules.XMLResource standardProduct)
The ValidateXML constructor has two parameters: the product schema and the method schema.

Parameters:
standardMethod - The XML Schema that validates a method metadata.
standardProduct - The XML Schema that validates a product metadata.
Method Detail

isValidProduct

public static boolean isValidProduct(org.xmldb.api.modules.XMLResource product)
This method is used to verify the correctness of a given product XMLResource.

Parameters:
product - The product to be checked for validity.
Returns:
True, if the product metadata is valid, false otherwise.

isValidMethod

public static boolean isValidMethod(org.xmldb.api.modules.XMLResource method)
This method is used to verify the correctness of a given method XMLResource.

Parameters:
method - The method to be checked for validity.
Returns:
True, if the method metadata is valid, false otherwise.

getStandardMethod

public static java.io.File getStandardMethod()

setStandardMethod

public static void setStandardMethod(java.io.File standardMethod)

getStandardProduct

public static java.io.File getStandardProduct()

setStandardProduct

public static void setStandardProduct(java.io.File standardProduct)