org.drools.builder.help
Interface DroolsJaxbHelperProvider


public interface DroolsJaxbHelperProvider

DroolsJaxbHelperProvider is used by the DroolsJaxbHelperFactory to "provide" it's concrete implementation. This class is not considered stable and may change, the user is protected from this change by using the Factory api, which is considered stable.

This api is experimental and thus the classes and the interfaces returned are subject to change.


Method Summary
 String[] addXsdModel(Resource resource, KnowledgeBuilder kbuilder, com.sun.tools.xjc.Options xjcOpts, String systemId)
          Deprecated. This is now deprecated, as we now support XSD as a standard ResourceType. Although you'll still need the newJAXBContext method to create a JAXBContext from the KnowledgeBase.
 javax.xml.bind.JAXBContext newJAXBContext(String[] classNames, Map<String,?> properties, KnowledgeBase kbase)
          Creates a new JAXBContext, from which the Marshaller and Unmarshaller can be created, which are used by the Transformer pipeline stage.
 

Method Detail

addXsdModel

String[] addXsdModel(Resource resource,
                     KnowledgeBuilder kbuilder,
                     com.sun.tools.xjc.Options xjcOpts,
                     String systemId)
                     throws IOException
Deprecated. This is now deprecated, as we now support XSD as a standard ResourceType. Although you'll still need the newJAXBContext method to create a JAXBContext from the KnowledgeBase.

Generates pojos for a given XSD using XJC and adds them to the specified KnowlegeBase.

Parameters:
resource - The resource to the XSD model
kbuilder - the KnowledgeBuilder where the generated .class files will be placed
xjcOpts - XJC Options
systemId - XJC systemId
Returns:
Returns an array of class names that where generated by the XSD.
Throws:
IOException

newJAXBContext

javax.xml.bind.JAXBContext newJAXBContext(String[] classNames,
                                          Map<String,?> properties,
                                          KnowledgeBase kbase)
                                          throws javax.xml.bind.JAXBException
Creates a new JAXBContext, from which the Marshaller and Unmarshaller can be created, which are used by the Transformer pipeline stage.

Parameters:
classNames - An array of class names that can be resolved by this JAXBContext
properties - JAXB properties
kbase - The KnowledgeBase
Returns:
The JAXB Context
Throws:
javax.xml.bind.JAXBException


Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.