This class can be used to validate the implicit catalog entries. It reads
the catalog.wsdl and checks if the wsdl/xsd imports in the catalog.wsdl have a
valid uri reference for their system id (location/schemaLocation). It first
will locate the file object corresponding to the uri reference and then
optionally load xdm model also to validate the contents.
Report error, warning and info level messages to the print output (defaults
to the system.out). This print output can be redirected by setting the ResultPrinter
on the validator.
Project prj = ... // get the project
ImplicitCatalogValidator validator = new ImplicitCatalogValidator(prj);
StringResult out = new StringResult(); // results printed to a string.
validator.setResultPrinter(out);
boolean validated = validator.validate();
if (validated) {
// continue.
} else {
System.out.println("Validation Failed:" + out.toString());
}
See Also: ResultPrinter author: chikkala
Inner Class :public static class ResultPrinter
Inner Class :public static class StringResult extends ResultPrinter
newInstance(Project prj) This method creates a new ImplicitCatalogValidator using the
ImplicitCatalogSupport and the Catalog wsdl file loaded from the project.
Parameters: prj - project on which the validation should be performed.
validate() validates the catalog.wsdl entries by checking the correpsonding entries
in the catalog.xml and also existance of the actual file and optionally
its valid contents (checks if the xam model is valid or not).
This method creates a new ImplicitCatalogValidator using the
ImplicitCatalogSupport and the Catalog wsdl file loaded from the project.
Parameters: prj - project on which the validation should be performed. validator throws: java.io.IOException - on error
prints out the result of validating an entry in catalog.wsdl
Parameters: entry - entry in the catalog.wsdl Parameters: fo - resolved file corresponding to that entry.
validates the catalog.wsdl entries by checking the correpsonding entries
in the catalog.xml and also existance of the actual file and optionally
its valid contents (checks if the xam model is valid or not).
true if the validation is successful or false if any of the validationis failed with errors.