Package eu.europa.esig.xmldsig
Class XSDAbstractUtils
java.lang.Object
eu.europa.esig.xmldsig.XSDAbstractUtils
- Direct Known Subclasses:
ASiCManifestUtils,MRAUtils,SAMLAssertionUtils,SoapEnvelopeUtils,TrustedListUtils,ValidationReportUtils,XAdES111Utils,XAdES122Utils,XAdES319132Utils,XAdESUtils,XmlDSigUtils,XMLEncUtils
Abstract class for XSD Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract JAXBContextReturns a JAXBContextReturns a default moduleSchema.Returns a Schema with custom sourcesReturns a list of module-specific XSDSourcesvoidThis method allows to validate an XML against the module-default XSD schema plus custom sources.validateAgainstXSD(Source xmlSource) This method allows to validate an XML against the module-default XSD schema.validateAgainstXSD(Source xmlSource, Source... schemaSources) This method allows to validate an XML against the module-default XSD schema plus custom sources.
-
Constructor Details
-
XSDAbstractUtils
public XSDAbstractUtils()
-
-
Method Details
-
getJAXBContext
Returns a JAXBContext- Returns:
- the created
JAXBContext - Throws:
JAXBException- in case of an exception
-
getXSDSources
Returns a list of module-specific XSDSources- Returns:
- list of XSD
Sources
-
getSchema
Returns a default moduleSchema. The result is cached- Returns:
- the created
Schema - Throws:
SAXException- in case of an exception
-
getSchema
Returns a Schema with custom sources- Parameters:
sources- an array of customSources- Returns:
Schema- Throws:
SAXException- in case of an exception
-
validateAgainstXSD
This method allows to validate an XML against the module-default XSD schema.- Parameters:
xmlSource-SourceXML to validate- Returns:
- empty list if the XSD validates the XML, error messages otherwise
-
validateAgainstXSD
This method allows to validate an XML against the module-default XSD schema plus custom sources.- Parameters:
xmlSource-SourceXML to validateschemaSources-Sources to validate against (custom schemas)- Returns:
- empty list if the XSD validates the XML, error messages otherwise
-
validate
This method allows to validate an XML against the module-default XSD schema plus custom sources.- Parameters:
xmlSource- theSources to validate against (custom schemas)schema- the usedSchemato validatesecureValidation- enable/disable the secure validation (protection against XXE)- Throws:
IOException- if an exception occurs
-