1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.helger.schematron.svrl;
18
19 import javax.annotation.Nonnull;
20 import javax.annotation.concurrent.NotThreadSafe;
21 import javax.xml.bind.JAXBElement;
22
23 import org.oclc.purl.dsdl.svrl.ObjectFactory;
24 import org.oclc.purl.dsdl.svrl.SchematronOutputType;
25
26 import com.helger.commons.debug.GlobalDebug;
27 import com.helger.commons.io.resource.ClassPathResource;
28 import com.helger.jaxb.AbstractJAXBMarshaller;
29
30
31
32
33
34
35
36
37 @NotThreadSafe
38 public class SVRLMarshaller extends AbstractJAXBMarshaller <SchematronOutputType>
39 {
40 public SVRLMarshaller ()
41 {
42 super (SchematronOutputType.class, new ClassPathResource (CSVRL.SVRL_XSD_PATH));
43 setWriteFormatted (GlobalDebug.isDebugMode ());
44 }
45
46 @Override
47 @Nonnull
48 protected JAXBElement <SchematronOutputType> wrapObject (final SchematronOutputType aObject)
49 {
50 return new ObjectFactory ().createSchematronOutput (aObject);
51 }
52 }