|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.schema.SchemaUtils
public class SchemaUtils
Utility methods for working with schema structures.
| Field Summary | |
|---|---|
static String |
NO_PREFIX_BINDING
Binding name for output with schema namespace as default (no prefix). |
static org.apache.log4j.Logger |
s_logger
Logger for class. |
static String |
XS_PREFIX_BINDING
Binding name for output with schema namespace prefix 'xs'. |
| Constructor Summary | |
|---|---|
SchemaUtils()
|
|
| Method Summary | |
|---|---|
static String |
componentPath(OpenAttrBase comp)
Get path to component. |
static String |
describeComponent(SchemaBase comp)
Get string description of component for use in logging. |
static String |
getIndentation(int depth)
Get indentation string. |
static boolean |
isEnumeration(AnnotatedBase comp)
Check if a particular schema definition component is an enumeration type definition. |
static boolean |
isNamed(OpenAttrBase comp)
Check if a definition component has a name. |
static boolean |
isNillable(OpenAttrBase comp)
Check if a definition component is nillable (an element with nillable='true'). |
static boolean |
isOptional(IArity part)
Check if a particle is optional (zero instances allowed). |
static boolean |
isOptionalAttribute(AttributeElement attr)
Check if an attribute is optional (zero instances allowed). |
static boolean |
isOptionalElement(ElementElement elem)
Check if an element is optional (zero instances allowed). |
static boolean |
isProhibited(IArity part)
Check if a particle is prohibited (no instances allowed). |
static boolean |
isRepeated(IArity part)
Check if a particle is a repeated value. |
static boolean |
isSingleton(IArity part)
Check if a particle is a singleton (one, and only one, instance allowed). |
static boolean |
isSingletonElement(ElementElement elem)
Check if an element is a singleton (one, and only one, instance allowed). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XS_PREFIX_BINDING
public static final String NO_PREFIX_BINDING
public static final org.apache.log4j.Logger s_logger
| Constructor Detail |
|---|
public SchemaUtils()
| Method Detail |
|---|
public static boolean isRepeated(IArity part)
part - particle to be checked
true if repeated, false if notpublic static boolean isProhibited(IArity part)
part - particle to be checked
true if prohibited, false if notpublic static boolean isOptional(IArity part)
part - particle to be checked
true if optional, false if notpublic static boolean isOptionalElement(ElementElement elem)
elem - element to be checked
true if optional, false if notpublic static boolean isOptionalAttribute(AttributeElement attr)
attr - attribute to be checked
true if optional, false if notpublic static boolean isSingleton(IArity part)
part - particle to be checked
true if singleton, false if notpublic static boolean isSingletonElement(ElementElement elem)
elem - element to be checked
true if singleton, false if notpublic static boolean isNillable(OpenAttrBase comp)
comp -
true if nillable, false if notpublic static boolean isNamed(OpenAttrBase comp)
comp -
true if named, false if notpublic static String getIndentation(int depth)
depth -
public static String describeComponent(SchemaBase comp)
comp - schema component
public static String componentPath(OpenAttrBase comp)
comp - schema component
public static boolean isEnumeration(AnnotatedBase comp)
true if and only if the component is a <simpleType> element which is a restriction using one or
more <enumeration> facets.
comp -
true if an enumeration definition, false if not
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||