public class SchemaUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NO_PREFIX_BINDING
Binding name for output with schema namespace as default (no prefix).
|
private static java.lang.String[] |
s_indents
Pregenerated indentation strings.
|
private static java.lang.String |
s_indentText
String used as basis for indentation.
|
static Logger |
s_logger
Logger for class.
|
static java.lang.String |
XS_PREFIX_BINDING
Binding name for output with schema namespace prefix 'xs'.
|
Constructor and Description |
---|
SchemaUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
componentPath(OpenAttrBase comp)
Get path to component.
|
static java.lang.String |
describeComponent(SchemaBase comp)
Get string description of component for use in logging.
|
static java.lang.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).
|
public static final java.lang.String XS_PREFIX_BINDING
public static final java.lang.String NO_PREFIX_BINDING
public static final Logger s_logger
private static final java.lang.String s_indentText
private static final java.lang.String[] s_indents
public static boolean isRepeated(IArity part)
part
- particle to be checkedtrue
if repeated, false
if notpublic static boolean isProhibited(IArity part)
part
- particle to be checkedtrue
if prohibited, false
if notpublic static boolean isOptional(IArity part)
part
- particle to be checkedtrue
if optional, false
if notpublic static boolean isOptionalElement(ElementElement elem)
elem
- element to be checkedtrue
if optional, false
if notpublic static boolean isOptionalAttribute(AttributeElement attr)
attr
- attribute to be checkedtrue
if optional, false
if notpublic static boolean isSingleton(IArity part)
part
- particle to be checkedtrue
if singleton, false
if notpublic static boolean isSingletonElement(ElementElement elem)
elem
- element to be checkedtrue
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 java.lang.String getIndentation(int depth)
depth
- public static java.lang.String describeComponent(SchemaBase comp)
comp
- schema componentpublic static java.lang.String componentPath(OpenAttrBase comp)
comp
- schema componentpublic 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