|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thaiopensource.validate.AbstractSchema
com.oxygenxml.validate.nvdl.SchemaImpl
class SchemaImpl
Schema implementation for NVDL scripts.
Nested Class Summary | |
---|---|
private class |
SchemaImpl.Handler
This class is registered as content handler on the XMLReader that parses the NVDL script. |
private static class |
SchemaImpl.MustSupportOption
Stores information about options that must be supported by the validator. |
private static class |
SchemaImpl.WrappedIOException
Wrapps an IOException as a RuntimeException. |
Field Summary | |
---|---|
private boolean |
attributesSchema
Flag indicating if the schema needs to be changed to handle attributes only, the element in this case is a placeholder. |
private Mode |
defaultBaseMode
Default base mode, rejects everything. |
private static String |
IMPLICIT_MODE_NAME
Mode name used when the script does not define modes and just enters namespace and anyNamespace mappings directly inside rules. |
private Hashtable |
modeMap
A hash with the modes. |
(package private) static String |
NVDL_URI
The NVDL URI. |
private Mode |
startMode
The start mode. |
private Triggers |
triggers
A hash with the triggers on namespace. |
private static String |
WRAPPER_MODE_NAME
Mode name used when we have to use this script as an attributes schema. |
Constructor Summary | |
---|---|
SchemaImpl(PropertyMap properties)
Creates a NVDL schema implementation. |
Method Summary | |
---|---|
Validator |
createValidator(PropertyMap properties)
Creates a Validator for validating XML documents against this NVDL script. |
private Mode |
getModeAttribute(Attributes attributes,
String localName)
Get the mode specified by an attribute from no namespace. |
(package private) SchemaFuture |
installHandlers(XMLReader in,
SchemaReceiverImpl sr)
Installs the schema handler on the reader. |
private Mode |
lookupCreateMode(String name)
Gets a mode with the given name from the mode map. |
private Mode |
makeBuiltinMode(String name,
Class cls)
Makes a built in mode. |
Methods inherited from class com.thaiopensource.validate.AbstractSchema |
---|
filterProperties, getProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String IMPLICIT_MODE_NAME
private static final String WRAPPER_MODE_NAME
static final String NVDL_URI
private final Hashtable modeMap
private final Triggers triggers
private Mode startMode
private final Mode defaultBaseMode
private final boolean attributesSchema
Constructor Detail |
---|
SchemaImpl(PropertyMap properties)
properties
- Properties.Method Detail |
---|
private Mode makeBuiltinMode(String name, Class cls)
name
- The mode name.cls
- The action class.
SchemaFuture installHandlers(XMLReader in, SchemaReceiverImpl sr)
in
- The reader.sr
- The schema receiver.
public Validator createValidator(PropertyMap properties)
properties
- properties.
Validator
that can be used to validate an XML document
with respect to this schema; never null
ValidateProperty.ERROR_HANDLER
private Mode getModeAttribute(Attributes attributes, String localName)
attributes
- The attributes.localName
- The attribute name.
private Mode lookupCreateMode(String name)
name
- The mode to look for or create if it does not exist.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |