public class ValidationHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ValidationHelper.XSD |
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSPATH_URI_LINGUISTICS_XSD
Can be used in schemaLocation attribute to import xsd groups to define complex types like:
<xs:group ref="fal:linguistics.value"/> |
| Constructor and Description |
|---|
ValidationHelper() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
fromXML(Reader xml,
Class<T> clazz) |
static JAXBContext |
getJAXBCONTEXT() |
static Schema |
getSchema() |
static void |
main(String[] args)
validate xml in first url argument (no exceptions => ok)
|
static String |
toXML(Object teiObject) |
static void |
toXML(Object teiObject,
Writer w) |
static void |
validateXml(InputStream xml) |
static void |
validateXml(Reader xml) |
static void |
validateXml(String xml) |
static void |
validateXml(URL xml) |
public static final String CLASSPATH_URI_LINGUISTICS_XSD
public static <T> T fromXML(Reader xml, Class<T> clazz) throws JAXBException
JAXBExceptionpublic static String toXML(Object teiObject) throws JAXBException
JAXBExceptionpublic static void toXML(Object teiObject, Writer w) throws JAXBException
JAXBExceptionpublic static JAXBContext getJAXBCONTEXT()
public static Schema getSchema()
public static void validateXml(InputStream xml) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void validateXml(Reader xml) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void validateXml(URL xml) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void validateXml(String xml) throws SAXException, IOException
SAXExceptionIOExceptionpublic static void main(String[] args) throws IOException, SAXException
args - IOExceptionSAXExceptionCopyright © 2018–2019 Fryske Akademy. All rights reserved.