public class WSSchemaUtils extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
checkCustomNamespace(String targetNS,
String checkNS)
Checks whether given a targetNS and other regular schema namespaces,
the passed "checkNS" is a custom namespace
|
void |
copyXSModel(XSModel xsmodel,
JBossXSModel jb) |
JBossXSElementDeclaration |
createGlobalXSElementDeclaration(String name,
XSTypeDefinition xstype,
String targetNS)
Create a global XSElementDeclaration object
|
JBossXSComplexTypeDefinition |
createXSComplexTypeDefinition(String name,
XSTypeDefinition baseType,
List<XSParticle> xsparts,
String typens) |
JBossXSElementDeclaration |
createXSElementDeclaration(String name,
XSTypeDefinition xstype,
boolean isNillable)
Create a local XSElementDeclaration object
|
JBossXSModel |
createXSModel()
Generate a Schema Model for a namespace
|
JBossXSParticle |
createXSParticle(String targetNS,
boolean isArray,
XSTerm xsterm) |
JBossXSTypeDefinition |
createXSTypeDefinition(QName qname)
Creates a XSTypeDefinition object given a QName
|
XSComplexTypeDefinition |
getExceptionType(String exname,
String ns)
Generate a complex type for a custom exception
|
static WSSchemaUtils |
getInstance(org.jboss.xb.binding.NamespaceRegistry namespaceRegistry,
String targetNamespace) |
JBossXSModel |
getJBossXSModel(XSModel xsmodel)
Convert the read-only Xerces implementation of XSModel
into JBossXSModel.
|
boolean |
isEmptySchema(JBossXSModel xsmodel,
String namespace)
Checks if the XSModel is empty given a namespace
|
void |
serialize(XSModel xsmodel,
Writer writer)
Serialize the SchemaModel into a Writer
|
void |
serializeEmptySchema(XSModel xsmodel,
Writer writer)
Serialize the SchemaModel (with no types and elements) into a Writer
|
String |
write(XSAttributeDeclaration decl) |
String |
write(XSElementDeclaration xsel)
Return a string for the global element declaration
|
String |
write(XSElementDeclaration xsel,
XSParticle xsp)
Return a string for the element declaration
|
String |
write(XSModelGroup xsm)
Return a string for the xs model group
|
String |
write(XSTypeDefinition xstype)
Return a string for the xs type
|
public static WSSchemaUtils getInstance(org.jboss.xb.binding.NamespaceRegistry namespaceRegistry, String targetNamespace)
public boolean checkCustomNamespace(String targetNS, String checkNS)
targetNS
- Target Namespace of the schemacheckNS
- Namespace that needs to be checked if its a custom namespacepublic JBossXSElementDeclaration createGlobalXSElementDeclaration(String name, XSTypeDefinition xstype, String targetNS)
name
- xstype
- targetNS
- public JBossXSModel createXSModel()
public JBossXSComplexTypeDefinition createXSComplexTypeDefinition(String name, XSTypeDefinition baseType, List<XSParticle> xsparts, String typens)
public JBossXSElementDeclaration createXSElementDeclaration(String name, XSTypeDefinition xstype, boolean isNillable)
name
- xstype
- targetNS
- isNillable
- public JBossXSParticle createXSParticle(String targetNS, boolean isArray, XSTerm xsterm)
public JBossXSTypeDefinition createXSTypeDefinition(QName qname)
qname
- public XSComplexTypeDefinition getExceptionType(String exname, String ns)
exname
- ns
- public JBossXSModel getJBossXSModel(XSModel xsmodel)
xsmodel
- XSModel objectpublic boolean isEmptySchema(JBossXSModel xsmodel, String namespace)
xsmodel
- Schema Model to checknamespace
- namespace to check components forpublic void serialize(XSModel xsmodel, Writer writer) throws IOException
xsmodel
- Schema Model which needs to be serializedwriter
- a Writer to which serialization should happenIOException
public void serializeEmptySchema(XSModel xsmodel, Writer writer) throws IOException
xsmodel
- Schema Model which needs to be serializedwriter
- a Writer to which serialization should happenIOException
public String write(XSElementDeclaration xsel, XSParticle xsp)
xsel
- xsp
- public String write(XSAttributeDeclaration decl)
public String write(XSElementDeclaration xsel)
xsel
- xsp
- public String write(XSModelGroup xsm)
xstype
- public String write(XSTypeDefinition xstype)
xstype
- public void copyXSModel(XSModel xsmodel, JBossXSModel jb)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.