use of org.forgerock.openicf.connectors.xml.xsdparser.XSDAnnotationFactory in project openicf by Evolveum.
the class SchemaParserUtil method parseXSDSchema.
public static XSSchemaSet parseXSDSchema(File file) {
XSOMParser parser = new XSOMParser();
try {
parser.setAnnotationParser(new XSDAnnotationFactory());
parser.parse(file);
return parser.getResult();
} catch (SAXException e) {
String eMessage = "Failed to parse XSD-schema from file: " + file.getAbsolutePath();
log.error(e, eMessage);
throw new ConnectorIOException(eMessage, e);
} catch (IOException e) {
String eMessage = "Failed to read from file: " + file.getAbsolutePath();
log.error(e, eMessage);
throw new ConnectorIOException(eMessage, e);
}
}
Aggregations