com.sun.msv.relaxns.verifier
Class IslandSchemaImpl

java.lang.Object
  extended by com.sun.msv.relaxns.verifier.IslandSchemaImpl
All Implemented Interfaces:
Serializable, IslandSchema
Direct Known Subclasses:
RELAXIslandSchema, TREXIslandSchema

public abstract class IslandSchemaImpl
extends Object
implements IslandSchema, Serializable

base implementation of IslandSchema for MSV. the iso_relax package doesn't have the distinction between AGM and VGM. For the safety, the implementation of the createNewVerifier method creates a new VGM everytime it is called. Fortunately, when all island schemas are from MSV, the application can simply treat RELAXGrammar as a normal Grammar object; there is no need to use Dispatcher nor any divide-and-validate framework. So createNewVerifier method is called only when

In that case, the current createNewVerifier method causes a performance problem.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Nested Class Summary
static class IslandSchemaImpl.Binder
          replaces all ExternalElementExp and ExternalAttributeExp by actual definitions.
 
Field Summary
protected  Map attributesDecls
          map from name to DeclImpl.
protected  Map elementDecls
          map from name to DeclImpl.
 
Constructor Summary
IslandSchemaImpl()
           
 
Method Summary
protected  void bind(ReferenceContainer con, IslandSchemaImpl.Binder binder)
           
 AttributesVerifier createNewAttributesVerifier(String namespaceURI, AttributesDecl[] decls)
           
 IslandVerifier createNewVerifier(String namespace, ElementDecl[] rules)
           
 AttributesDecl getAttributesDeclByName(String name)
           
 AttributesDecl[] getAttributesDecls()
           
 ElementDecl getElementDeclByName(String name)
           
 ElementDecl[] getElementDecls()
           
protected abstract  Grammar getGrammar()
          get the grammar object that represents this island.
 Iterator iterateAttributesDecls()
           
 Iterator iterateElementDecls()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.iso_relax.dispatcher.IslandSchema
bind
 

Field Detail

elementDecls

protected final Map elementDecls
map from name to DeclImpl.


attributesDecls

protected final Map attributesDecls
map from name to DeclImpl.

Constructor Detail

IslandSchemaImpl

public IslandSchemaImpl()
Method Detail

createNewVerifier

public IslandVerifier createNewVerifier(String namespace,
                                        ElementDecl[] rules)
Specified by:
createNewVerifier in interface IslandSchema

getGrammar

protected abstract Grammar getGrammar()
get the grammar object that represents this island.


getElementDeclByName

public ElementDecl getElementDeclByName(String name)
Specified by:
getElementDeclByName in interface IslandSchema

iterateElementDecls

public Iterator iterateElementDecls()
Specified by:
iterateElementDecls in interface IslandSchema

getElementDecls

public ElementDecl[] getElementDecls()
Specified by:
getElementDecls in interface IslandSchema

getAttributesDeclByName

public AttributesDecl getAttributesDeclByName(String name)
Specified by:
getAttributesDeclByName in interface IslandSchema

iterateAttributesDecls

public Iterator iterateAttributesDecls()
Specified by:
iterateAttributesDecls in interface IslandSchema

getAttributesDecls

public AttributesDecl[] getAttributesDecls()
Specified by:
getAttributesDecls in interface IslandSchema

createNewAttributesVerifier

public AttributesVerifier createNewAttributesVerifier(String namespaceURI,
                                                      AttributesDecl[] decls)
Specified by:
createNewAttributesVerifier in interface IslandSchema

bind

protected void bind(ReferenceContainer con,
                    IslandSchemaImpl.Binder binder)


MSV