T
- the expected typepublic class JBossXBHelper<T> extends Object implements FeatureAware
Constructor and Description |
---|
JBossXBHelper(Class<T> output)
Create a new SchemaResolverDeployer.
|
Modifier and Type | Method and Description |
---|---|
static void |
addClassBinding(String namespace,
Class<?> metadata)
Deprecated.
|
void |
addTypeBinding(String namespace,
Class<?> metadata)
Add class binding.
|
static String |
findNamespace(Class<?> metadata)
Find the namespace on class/package
|
protected MutableSchemaResolver |
getResolver()
Get the schema resolver.
|
boolean |
isUseSchemaValidation()
Get the useSchemaValidation.
|
boolean |
isUseValidation()
Get the useValidation.
|
boolean |
isWarnOnParserErrors()
This property controls whether the (underlying) parser errors should be
logged as warnings or should they terminate parsing with errors.
|
<U> U |
parse(Class<U> expectedType,
InputSource source)
Parse the file to create metadata instance.
|
<U> U |
parse(Class<U> expectedType,
InputSource source,
U root,
ObjectModelFactory omf)
Parse the file using object model factory.
|
T |
parse(InputSource source)
Parse file to output metadata.
|
T |
parse(InputSource source,
T root,
ObjectModelFactory omf)
Parse the file using object model factory.
|
static void |
removeClassBinding(String namespace)
Deprecated.
|
void |
removeTypeBinding(String namespace)
Remove class binding.
|
void |
setFeature(String featureName,
boolean flag)
Apply feature.
|
void |
setUseSchemaValidation(boolean useSchemaValidation)
Set the useSchemaValidation.
|
void |
setUseValidation(boolean useValidation)
Set the useValidation.
|
void |
setWarnOnParserErrors(boolean value)
This property controls whether the (underlying) parser errors should be
logged as warnings or should they terminate parsing with errors.
|
public JBossXBHelper(Class<T> output)
output
- the outputIllegalArgumentException
- for a null outputpublic void setFeature(String featureName, boolean flag) throws Exception
FeatureAware
setFeature
in interface FeatureAware
featureName
- the feature nameflag
- the feature flagException
- for any errorpublic boolean isUseSchemaValidation()
public void setUseSchemaValidation(boolean useSchemaValidation)
useSchemaValidation
- the useSchemaValidation.public boolean isUseValidation()
public void setUseValidation(boolean useValidation)
useValidation
- the useValidation.public boolean isWarnOnParserErrors()
public void setWarnOnParserErrors(boolean value)
public static void addClassBinding(String namespace, Class<?> metadata)
addTypeBinding(String, Class)
namespace
- the namespacemetadata
- the metadatapublic static void removeClassBinding(String namespace)
removeTypeBinding(String)
namespace
- the namespacepublic void addTypeBinding(String namespace, Class<?> metadata)
namespace
- the namespacemetadata
- the metadatapublic void removeTypeBinding(String namespace)
namespace
- the namespaceprotected MutableSchemaResolver getResolver()
public static String findNamespace(Class<?> metadata)
metadata
- the metadata classpublic T parse(InputSource source) throws Exception
source
- the source to parseException
- for any errorpublic <U> U parse(Class<U> expectedType, InputSource source) throws Exception
U
- the expect typeexpectedType
- the expected typesource
- the sourceException
- for any errorpublic T parse(InputSource source, T root, ObjectModelFactory omf) throws Exception
source
- the source to parseroot
- the previous rootomf
- the object model factoryException
- for any errorpublic <U> U parse(Class<U> expectedType, InputSource source, U root, ObjectModelFactory omf) throws Exception
U
- the expect typeexpectedType
- the expected typesource
- the source to parseroot
- the previous rootomf
- the object model factoryException
- for any errorCopyright © 2016 JBoss by Red Hat. All rights reserved.