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
-
Method Summary
Modifier and TypeMethodDescriptionabstract JAXBContext
Returns a JAXBContextReturns a default moduleSchema
.Returns a Schema with custom sourcesReturns a list of module-specific XSDSource
svoid
This 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 XSDSource
s- Returns:
- list of XSD
Source
s
-
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 customSource
s- 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
-Source
XML 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
-Source
XML to validateschemaSources
-Source
s 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
- theSource
s to validate against (custom schemas)schema
- the usedSchema
to validatesecureValidation
- enable/disable the secure validation (protection against XXE)- Throws:
IOException
- if an exception occurs
-