Methods Summary |
---|
public static void | setEntityResolver(org.xml.sax.EntityResolver resolver)
This sets a SAX EntityResolver for this unmarshalling process.
entityResolver = resolver;
|
public static void | setErrorHandler(org.xml.sax.ErrorHandler handler)
This sets a SAX ErrorHandler for this unmarshalling process.
errorHandler = handler;
|
public static WebApp | unmarshal(java.io.File file)
// Delegate to the unmarshal(Reader) method
return unmarshal(new FileReader(file));
|
public static WebApp | unmarshal(java.io.File file, boolean validate)
// Delegate to the unmarshal(Reader) method
return unmarshal(new FileReader(file), validate);
|
public static WebApp | unmarshal(java.io.InputStream inputStream)
// Delegate to the unmarshal(Reader) method
return unmarshal(new InputStreamReader(inputStream));
|
public static WebApp | unmarshal(java.io.InputStream inputStream, boolean validate)
// Delegate to the unmarshal(Reader) method
return unmarshal(new InputStreamReader(inputStream), validate);
|
public static WebApp | unmarshal(java.io.Reader reader)
// See if validation set as system property
String property = System.getProperty("org.enhydra.zeus.validation", "false");
boolean validationState = false;
if (property.equalsIgnoreCase("true")) {
validationState = true;
}
// Delegate with validation state
return unmarshal(reader, validationState);
|
public static WebApp | unmarshal(java.io.Reader reader, boolean validate)
// Set the entity resolver, if needed
if (entityResolver != null) {
WebAppImpl.setEntityResolver(entityResolver);
}
// Set the error handler, if needed
if (errorHandler != null) {
WebAppImpl.setErrorHandler(errorHandler);
} else {
if (validate) {
WebAppImpl.setErrorHandler(new WebAppDefaultErrorHandler());
}
}
// Unmarshal using the implementation class
return WebAppImpl.unmarshal(reader, validate);
|