public class DefinitionContext extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
DefinitionContext(DefinitionContext outer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFormat(FormatElement def,
ValidationContext vctx)
Add format to set defined at this level.
|
ValidationProblem |
addImpliedNamespace(NamespaceElement def,
ElementBase ref)
Add namespace declaration to set defined at this level.
|
void |
addMappedName(NameAttributes name,
MappingElementBase def,
ValidationContext vctx)
Add mapped name to set defined at this level.
|
ValidationProblem |
addNamedStructure(ContainerElementBase def)
Add named structure to set defined in this context.
|
ValidationProblem |
addNamespace(NamespaceElement def)
Add namespace to set defined at this level.
|
void |
addTemplate(MappingElementBase def,
ValidationContext vctx)
Add template or mapping to set defined at this level.
|
NamespaceElement |
getAttributeNamespace(NameAttributes name)
Get namespace definition for attribute name.
|
FormatElement |
getBestFormat(IClass clas)
Get best format definition for class.
|
DefinitionContext |
getContaining()
Get containing context.
|
NamespaceElement |
getElementDefaultNamespace()
Get the default namespace applied to element definitions.
|
NamespaceElement |
getElementNamespace(NameAttributes name,
ValidationContext vctx)
Get namespace definition for element name.
|
FormatElement |
getNamedFormat(String name)
Get named format definition.
|
ContainerElementBase |
getNamedStructure(String label)
Get labeled structure definition within this context.
|
TemplateElementBase |
getNamedTemplate(String name)
Get named template definition.
|
NamespaceElement |
getNamespaceForPrefix(String prefix)
Get namespace for prefix.
|
ArrayList |
getNamespaces()
Get the namespaces defined in this context
|
FormatElement |
getSpecificFormat(String type)
Get specific format definition for type.
|
TemplateElementBase |
getSpecificTemplate(String type)
Get specific template definition for type.
|
boolean |
isCompatibleTemplateType(IClass clas)
Checks if a class is compatible with one or more templates.
|
protected DefinitionContext(DefinitionContext outer)
outer - containing definition context (null if
at root of tree)public DefinitionContext getContaining()
null if at root of
tree)public NamespaceElement getElementDefaultNamespace()
null if none)public NamespaceElement getNamespaceForPrefix(String prefix)
prefix - Prefixnull if nonepublic ValidationProblem addNamespace(NamespaceElement def)
def - namespace definition element to be added (duplicates ignored)null if no problempublic ValidationProblem addImpliedNamespace(NamespaceElement def, ElementBase ref)
def - namespace definition to be added (duplicates ignored)ref - binding element referencing the namespacenull if no problempublic NamespaceElement getElementNamespace(NameAttributes name, ValidationContext vctx)
name - attribute group defining namevctx - validation context in usenull if none that matchespublic NamespaceElement getAttributeNamespace(NameAttributes name)
name - attribute group defining namenull if none that matchespublic void addFormat(FormatElement def, ValidationContext vctx)
def - format definition element to be addedvctx - validation context in usepublic FormatElement getSpecificFormat(String type)
type - fully qualified class name to be convertednull if not
foundpublic FormatElement getNamedFormat(String name)
name - conversion name to be foundnull
if no conversion with that namepublic FormatElement getBestFormat(IClass clas)
clas - information for target conversion classnull if no
compatible conversion definedpublic void addMappedName(NameAttributes name, MappingElementBase def, ValidationContext vctx)
name - mapped namedef - mapping definitionvctx - validation contextpublic void addTemplate(MappingElementBase def, ValidationContext vctx)
def - template definition element to be addedvctx - validation context in usepublic TemplateElementBase getSpecificTemplate(String type)
type - fully qualified class name to be convertednull if not
foundpublic TemplateElementBase getNamedTemplate(String name)
name - conversion name to be foundnull if no
template with that namepublic boolean isCompatibleTemplateType(IClass clas)
clas - information for target classtrue if compatible type, false if notpublic ValidationProblem addNamedStructure(ContainerElementBase def)
def - structure definitionnull if no problempublic ContainerElementBase getNamedStructure(String label)
label - structure definition labelnull
if not definedpublic ArrayList getNamespaces()
null if none)Copyright © 2005–2016 jibx.org. All rights reserved.