Package org.entur.siri.validator
Class SiriValidator
- java.lang.Object
-
- org.entur.siri.validator.SiriValidator
-
public class SiriValidator extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSiriValidator.Version
-
Constructor Summary
Constructors Constructor Description SiriValidator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanvalidate(String xml, SiriValidator.Version version)Validates xml against xsd Result is printed to System.outstatic booleanvalidate(String xml, SiriValidator.Version version, PrintStream out)Validates xml against xsd Result is printed to provided PrintStreamstatic SiriValidationEventHandlervalidateAndGetHandler(String xml, SiriValidator.Version version)Validates xml against xsd Result is returned in EventHandler
-
-
-
Method Detail
-
validate
public static boolean validate(String xml, SiriValidator.Version version) throws JAXBException, SAXException
Validates xml against xsd Result is printed to System.out- Parameters:
xml-version-- Returns:
- Throws:
JAXBExceptionSAXException
-
validateAndGetHandler
public static SiriValidationEventHandler validateAndGetHandler(String xml, SiriValidator.Version version) throws JAXBException, SAXException
Validates xml against xsd Result is returned in EventHandler- Parameters:
xml- The XML string to be validated.version- The Siri validator version to be used when validating the xml.- Returns:
- SiriValidationEventHandler with the validation result.
- Throws:
JAXBExceptionSAXException
-
validate
public static boolean validate(String xml, SiriValidator.Version version, PrintStream out) throws JAXBException, SAXException
Validates xml against xsd Result is printed to provided PrintStream- Parameters:
xml-version-out-- Returns:
- Throws:
JAXBExceptionSAXException
-
-