Package org.appng.xml
Class MarshallService
- java.lang.Object
-
- org.appng.xml.MarshallService
-
public class MarshallService extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MarshallService.AppNGSchema
-
Field Summary
Fields Modifier and Type Field Description static String
NS_APPLICATION
the namespace for a application-info.xml filestatic String
NS_PLATFORM
The namespace for appNG application XML-resources
-
Constructor Summary
Constructors Constructor Description MarshallService()
-
Method Summary
-
-
-
Field Detail
-
NS_PLATFORM
public static final String NS_PLATFORM
The namespace for appNG application XML-resources- See Also:
- Constant Field Values
-
NS_APPLICATION
public static final String NS_APPLICATION
the namespace for a application-info.xml file- See Also:
- Constant Field Values
-
-
Method Detail
-
getSchema
public MarshallService.AppNGSchema getSchema()
-
setSchema
public void setSchema(MarshallService.AppNGSchema schema)
-
isUseSchema
public boolean isUseSchema()
-
setUseSchema
public void setUseSchema(boolean useSchema)
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
-
getMarshaller
protected Marshaller getMarshaller() throws JAXBException
- Throws:
JAXBException
-
getUnmarshaller
protected Unmarshaller getUnmarshaller() throws JAXBException
- Throws:
JAXBException
-
init
public void init()
-
getApplicationMarshallService
public static MarshallService getApplicationMarshallService() throws JAXBException
- Throws:
JAXBException
-
marshal
public void marshal(Object data, OutputStream out) throws ParserConfigurationException, JAXBException, TransformerException
-
marshal
public String marshal(Object data) throws ParserConfigurationException, JAXBException, TransformerException
-
marshalNoValidation
public void marshalNoValidation(Object data, Writer writer) throws JAXBException
- Throws:
JAXBException
-
marshallNonRoot
public <T> String marshallNonRoot(Object data) throws JAXBException
- Throws:
JAXBException
-
marshallNonRoot
public <T,E extends T> String marshallNonRoot(E data, Class<T> clazz) throws JAXBException
- Throws:
JAXBException
-
marshallNonRoot
public <T> void marshallNonRoot(T data, OutputStream out) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public <T> T unmarshall(Source source, Class<T> clazz) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public <T> T unmarshall(File f, Class<T> clazz) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public <T> T unmarshall(InputStream is, Class<T> clazz) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public <T> T unmarshall(String data, Class<T> clazz) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public Object unmarshall(File f) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public Object unmarshall(InputStream is) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public Object unmarshall(String data) throws JAXBException
- Throws:
JAXBException
-
unmarshall
public Object unmarshall(InputSource inputSource) throws JAXBException
- Throws:
JAXBException
-
getMarshallService
public static MarshallService getMarshallService() throws JAXBException
- Throws:
JAXBException
-
getSchemaLocation
public String getSchemaLocation()
-
setSchemaLocation
public void setSchemaLocation(String schemaLocation)
-
getDocumentBuilderFactory
public DocumentBuilderFactory getDocumentBuilderFactory()
-
setDocumentBuilderFactory
public void setDocumentBuilderFactory(DocumentBuilderFactory documentBuilderFactory)
-
getTransformerFactory
public TransformerFactory getTransformerFactory()
-
setTransformerFactory
public void setTransformerFactory(TransformerFactory transformerFactory)
-
isThrowMarshallingError
public boolean isThrowMarshallingError()
-
setThrowMarshallingError
public void setThrowMarshallingError(boolean throwMarshallingError)
-
isThrowUnmarshallingError
public boolean isThrowUnmarshallingError()
-
setThrowUnmarshallingError
public void setThrowUnmarshallingError(boolean throwUnmarshallingError)
-
-