|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.schema.impl.SchemaImpl
public final class SchemaImpl
Implements the Schema
interface.
Field Summary | |
---|---|
ComputeInsertLists |
computeInsertLists
Computation of insertlists, that are insertable into element's content. |
IValidationContextP |
context
Validation context. |
com.sun.msv.grammar.IDContextProvider2 |
contextProvider
Wrapper around context . |
DelNodesComputer |
delElementsComputer
Computes the elements that needs to be deleted along with given elements. |
com.sun.msv.verifier.regexp.REDocumentDeclaration |
docDecl
Instance of generated elements getter. |
EncloseDecloseElements |
encloseDecloseElements
Provides enclose/declose functionality. |
ExpFinder |
expFinder
Accessor to element's definition. |
ExpTools |
expTools
DomTools used for processing Expression. |
com.sun.msv.grammar.Grammar |
grammar
MSV Grammar. |
InsertableContentChecker |
insertableContentChecker
Detects places for insertable nodes. |
NameClassTools |
ncTools
DomTools used for processing NameClass. |
ValidatorImpl |
validator
Instance of validator. |
Method Summary | |
---|---|
IElementRuleP |
getElementRule(Element element)
Returns rule representing given existing element. |
INameListP<IAttributeRuleP> |
getExportedAttributes()
Computes all attributes defined in this schema, regardless of element, which they are bound to. |
String |
getNamespaceUri()
Returns URI for which the Schema works. |
INameListP<INewElementRuleP> |
getRootElements()
Returns list of possible local names of the root elements. |
Iterator<String> |
getWarnings()
Returns warnings that occured during schema loading. |
RulePool |
newTemporaryPool()
Returns pool, that can be used to store temporary NewElementRuleImpl or AttributeRuleImpl . |
void |
validate(Element element)
Validates given root element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final ExpTools expTools
public final ExpFinder expFinder
public final NameClassTools ncTools
public final com.sun.msv.grammar.Grammar grammar
public final ValidatorImpl validator
public final ComputeInsertLists computeInsertLists
public final DelNodesComputer delElementsComputer
public final EncloseDecloseElements encloseDecloseElements
public final com.sun.msv.verifier.regexp.REDocumentDeclaration docDecl
public final IValidationContextP context
public final com.sun.msv.grammar.IDContextProvider2 contextProvider
context
.
public final InsertableContentChecker insertableContentChecker
Method Detail |
---|
public INameListP<IAttributeRuleP> getExportedAttributes()
ISchema
Computes all attributes defined in this schema, regardless of element, which they are bound to. Returned array must NOT be modifed in any way. These attributes are called exported - they can be inserted into other namespaces.
This list serves for purpose of adding attributes of this namespace to elements from another namespace. Thus, if there are 2 or more attributes defined with same QName in schema, they cannot be returned here. That would raise ambiguity, because attributes are denoted only by QName, and we would have to select from more rules.
Local attributes have empty URI instead of its own namespace URI, so empty URI must be replaced by its namespace URI.
Result should be computed when object is created.
getExportedAttributes
in interface ISchema
AttributeRule
instances.ISchema.getExportedAttributes()
public INameListP<INewElementRuleP> getRootElements()
ISchema
getNamespaceUri()
- root
element automatically belongs to the bounded URI. Caller guarantees that
it won't modify this set. In exchange, Schema must cache this set.
getRootElements
in interface ISchema
ISchema.getRootElements()
public String getNamespaceUri()
ISchema
getNamespaceUri
in interface ISchema
ISchema.getNamespaceUri()
public Iterator<String> getWarnings()
ISchema
getWarnings
in interface ISchema
Iterator
of String
representing
warnings, or null
if there were no warnings.ISchema.getWarnings()
public void validate(Element element) throws SchemaException
ISchema
Validates given root element. It must be full validation, no elements nor texts must not be skipped. If this element is not valid, exception must be thrown.
When element from another namespace uri is encountered in the process of
validation, just call ValidationContextP.validate()
to
validate this unknown element.
The only exception to this rule is emp:id
attribute, which
the schema must ignore.
validate
in interface ISchema
element
- element to be validated, always one of possible root
elements from this namespace.
SchemaException
- if something goes wrong in the process of
validation. The Schema
instance must provide as much
information as possible about error. It should display path to errorneous
element with getPathToRoot()
method of
EuromathSchemaProvider
class.ISchema.validate(org.w3c.dom.Element)
public RulePool newTemporaryPool()
NewElementRuleImpl
or AttributeRuleImpl
.
public IElementRuleP getElementRule(Element element)
ISchema
getElementRule
in interface ISchema
element
- the element. It must stay unchanged while returned
instance is used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |