|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbind.xml.facade.JBindFacade
Facade of the JBind framework that provides easy access to its core functionalities.
Field Summary | |
static java.lang.String |
DEFAULT_ENCODING
Default encoding ("UTF-8"). |
Method Summary | |
static IApplicationCode |
createApplicationCode(org.xml.sax.InputSource anInputSource,
IDataContext aContext)
|
static IApplicationCode |
createApplicationCode(java.net.URL aUrl,
IDataContext aContext)
|
static IConfigurationCode |
createConfigurationCode(org.xml.sax.InputSource anInputSource,
IDataContext aContext)
|
static IConfigurationCode |
createConfigurationCode(java.net.URL aUrl,
IDataContext aContext)
|
static IImplBuilder |
createImplBuilder(IDataContext aContext)
Creates a data builder. |
static IImplBuilder |
createImplBuilder(IDataContext aContext,
boolean aUseBuiltInClassesOnly)
|
static javax.xml.transform.sax.SAXSource |
createSaxSource(IAnyTypeData aData)
Creates a SAXSource that can be supplied to a stylesheet processor. |
static ISchemaReader |
createSchemaReader()
Creates a schema reader. |
static int |
execute(org.xml.sax.InputSource anInputSource,
IDataContext aContext)
|
static int |
execute(java.net.URL aUrl,
IDataContext aContext)
|
static java.lang.String |
marshal(IAnyTypeData aData,
java.util.Map aNamespaceToPrefixMapping,
java.util.Map aTopLevelAttributes)
Marshals a data object. |
static void |
marshal(java.io.OutputStream anOutputStream,
java.lang.String anEncoding,
boolean anOutputXmlDeclaration,
IAnyTypeData aData,
java.util.Map aNamespaceToPrefixMapping,
java.util.Map aTopLevelAttributes)
Marshals a data object. |
static void |
marshal(java.io.Writer aWriter,
IAnyTypeData aData,
java.util.Map aNamespaceToPrefixMapping,
java.util.Map aTopLevelAttributes)
Marshals a data object. |
static void |
outputSaxEvents(IAnyTypeData aData,
org.xml.sax.ContentHandler aHandler)
|
static void |
outputXmlDeclaration(java.io.Writer aWriter,
java.lang.String anEncoding)
Outputs the XML declaration " |
static ISchema |
readSchema(java.net.URL aUrl)
Reads a schema. |
static IAnyTypeData |
unmarshal(org.xml.sax.InputSource anInputSource,
IDataContext aContext)
Unmarshals an instance document. |
static java.util.List |
unmarshal(java.util.List aUrls,
IDataContext aContext)
Unmarshals a list of instance documents. |
static IAnyTypeData |
unmarshal(java.net.URL aUrl,
IDataContext aContext)
Unmarshals an instance document. |
static void |
validateData(IAnyTypeData aData,
IDataContext aContext)
Validates a data object. |
static boolean |
valueEquals(IAnyTypeData aData1,
IAnyTypeData aData2)
Check value equality of two data objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_ENCODING
Method Detail |
public static ISchemaReader createSchemaReader()
public static ISchema readSchema(java.net.URL aUrl) throws XmlException
The schema will use generated classes and their package must
be configured in the schema itself or by the Config
class.
aUrl
- (required).
XmlException
public static IImplBuilder createImplBuilder(IDataContext aContext)
aContext
- (optional).
public static IImplBuilder createImplBuilder(IDataContext aContext, boolean aUseBuiltInClassesOnly)
public static void validateData(IAnyTypeData aData, IDataContext aContext) throws XmlException
aData
- (required).aContext
- (optional).
XmlException
- Raised iff the data object is not valid.public static java.util.List unmarshal(java.util.List aUrls, IDataContext aContext) throws XmlException
aUrls
- (required). A list of URL
s.aContext
- (optional).
IAnyTypeData
-
the root data of the unmarshalled documents in the same sequence as the supplied URLs.
XmlException
- Raised iff an instance document could not be unmarshalled.public static IAnyTypeData unmarshal(java.net.URL aUrl, IDataContext aContext) throws XmlException
aUrl
- (required).aContext
- (optional).
XmlException
- Raised iff the instance document could not be unmarshalled.public static IAnyTypeData unmarshal(org.xml.sax.InputSource anInputSource, IDataContext aContext) throws XmlException
anInputSource
- (required).aContext
- (optional).
XmlException
- Raised iff the instance document could not be unmarshalled.public static IConfigurationCode createConfigurationCode(java.net.URL aUrl, IDataContext aContext)
public static IConfigurationCode createConfigurationCode(org.xml.sax.InputSource anInputSource, IDataContext aContext)
public static IApplicationCode createApplicationCode(org.xml.sax.InputSource anInputSource, IDataContext aContext)
public static IApplicationCode createApplicationCode(java.net.URL aUrl, IDataContext aContext)
public static int execute(org.xml.sax.InputSource anInputSource, IDataContext aContext) throws XmlException
XmlException
public static int execute(java.net.URL aUrl, IDataContext aContext) throws XmlException
XmlException
public static void marshal(java.io.Writer aWriter, IAnyTypeData aData, java.util.Map aNamespaceToPrefixMapping, java.util.Map aTopLevelAttributes) throws XmlException
aData
- (required).aWriter
- (required).aNamespaceToPrefixMapping
- (optional). An initial mapping that
is output as "xmlns" attributes. If the data object that is unmarshalled
uses namespaces that are not contained in the initial mapping then new mappings
are created.aTopLevelAttributes
- (optional). A set of attributes that is
output as additional attributes of the root element. This feature can be used
to supply schema location attributes.
XmlException
- Raised iff the data object could not be unmarshalled.public static java.lang.String marshal(IAnyTypeData aData, java.util.Map aNamespaceToPrefixMapping, java.util.Map aTopLevelAttributes) throws XmlException
aData
- (required). The data that is marshalled.aNamespaceToPrefixMapping
- (optional). (cf. marshal(Writer, IAnyTypeData, Map, Map)
)aTopLevelAttributes
- (optional). (cf. marshal(Writer, IAnyTypeData, Map, Map)
)
XmlException
public static void marshal(java.io.OutputStream anOutputStream, java.lang.String anEncoding, boolean anOutputXmlDeclaration, IAnyTypeData aData, java.util.Map aNamespaceToPrefixMapping, java.util.Map aTopLevelAttributes) throws XmlException
anOutputStream
- (required). The stream that is used for output.anEncoding
- (optional). If no encoding is specified then
the DEFAULT_ENCODING
is used.anOutputXmlDeclaration
- Controls whether the initial XML declaration
<?xml version="1.0" encoding="..."?> or not.aData
- (required). The data that is marshalled.aNamespaceToPrefixMapping
- (optional). (cf. marshal(Writer, IAnyTypeData, Map, Map)
)aTopLevelAttributes
- (optional). (cf. marshal(Writer, IAnyTypeData, Map, Map)
)
XmlException
public static void outputXmlDeclaration(java.io.Writer aWriter, java.lang.String anEncoding) throws XmlException
aWriter
- (required).anEncoding
- (required).
XmlException
public static void outputSaxEvents(IAnyTypeData aData, org.xml.sax.ContentHandler aHandler) throws XmlException
XmlException
public static boolean valueEquals(IAnyTypeData aData1, IAnyTypeData aData2)
aData1
- (optional).aData2
- (optional).
true
if the two data objects have the same value.public static javax.xml.transform.sax.SAXSource createSaxSource(IAnyTypeData aData)
aData
- (required). The data that is output by SAX.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |