org.faktorips.runtime.jaxb
Class IpsJAXBContext

java.lang.Object
  extended by javax.xml.bind.JAXBContext
      extended by org.faktorips.runtime.jaxb.IpsJAXBContext

public class IpsJAXBContext
extends JAXBContext

Wraps a given JAXBContext and provides marshallers/unmarshallers that resolve the reference from configurable model objects to product components. Additionally it provides the marshalling of Faktor-IPS enumerations that defer their values to an enumeration content that is hold by a Faktor-IPS IRuntimeRepository. See createMarshaller() and createUnmarshaller() for more details. All other methods just delegate to the wrapped context.

Author:
Jan Ortmann

Field Summary
 
Fields inherited from class javax.xml.bind.JAXBContext
JAXB_CONTEXT_FACTORY
 
Constructor Summary
IpsJAXBContext(JAXBContext wrappedCtx, List<? extends XmlAdapter<?,?>> enumXmlAdapters, IRuntimeRepository repository)
           
 
Method Summary
 Binder<Node> createBinder()
           
<T> Binder<T>
createBinder(Class<T> domType)
           
 JAXBIntrospector createJAXBIntrospector()
           
 Marshaller createMarshaller()
           
 Unmarshaller createUnmarshaller()
           
 Validator createValidator()
           
 void generateSchema(SchemaOutputResolver outputResolver)
           
 IRuntimeRepository getRepository()
          Returns the Faktor-IPS runtime repository.
 
Methods inherited from class javax.xml.bind.JAXBContext
newInstance, newInstance, newInstance, newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IpsJAXBContext

public IpsJAXBContext(JAXBContext wrappedCtx,
                      List<? extends XmlAdapter<?,?>> enumXmlAdapters,
                      IRuntimeRepository repository)
Method Detail

getRepository

public IRuntimeRepository getRepository()
Returns the Faktor-IPS runtime repository.


createMarshaller

public Marshaller createMarshaller()
                            throws JAXBException
Specified by:
createMarshaller in class JAXBContext
Throws:
JAXBException

createUnmarshaller

public Unmarshaller createUnmarshaller()
                                throws JAXBException
Specified by:
createUnmarshaller in class JAXBContext
Throws:
JAXBException

createValidator

public Validator createValidator()
                          throws JAXBException
Specified by:
createValidator in class JAXBContext
Throws:
JAXBException

createBinder

public Binder<Node> createBinder()
Overrides:
createBinder in class JAXBContext

createBinder

public <T> Binder<T> createBinder(Class<T> domType)
Overrides:
createBinder in class JAXBContext

createJAXBIntrospector

public JAXBIntrospector createJAXBIntrospector()
Overrides:
createJAXBIntrospector in class JAXBContext

generateSchema

public void generateSchema(SchemaOutputResolver outputResolver)
                    throws IOException
Overrides:
generateSchema in class JAXBContext
Throws:
IOException


Copyright © 2015. All rights reserved.