net.ontopia.topicmaps.schema.impl.osl
Class OSLSchemaContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by net.ontopia.topicmaps.schema.impl.osl.OSLSchemaContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class OSLSchemaContentHandler
extends org.xml.sax.helpers.DefaultHandler

INTERNAL: SAX2 content handler used for importing OSL topic map schemas into the schema object model.


Field Summary
protected  LocatorIF base_address
           
protected  java.lang.String curelem
           
protected  java.util.List forwardrefs
           
protected  java.util.Stack openElements
           
protected  java.util.Stack openObjects
           
protected  org.xml.sax.Locator saxlocator
           
protected  OSLSchema schema
           
protected  XMLReaderFactoryIF xrfactory
           
 
Constructor Summary
OSLSchemaContentHandler(XMLReaderFactoryIF xrfactory, LocatorIF base_address)
           
 
Method Summary
 void beginElement(java.lang.String name, org.xml.sax.Attributes attrs)
           
 void endDocument()
           
 void endElement(java.lang.String name)
           
 void endElement(java.lang.String uri, java.lang.String lname, java.lang.String qname)
           
protected  AssociationClass getAssociationClass()
           
protected  AssociationRoleConstraint getAssociationRoleConstraint()
           
protected  org.xml.sax.SAXException getException(java.lang.String message)
           
 OSLSchema getSchema()
           
protected  ScopedConstraintIF getScopedConstraint()
           
protected  ScopeSpecification getScopeSpecification()
           
protected  TopicClass getTopicClass()
           
protected  TopicConstraintCollection getTopicConstraintCollection()
           
protected  TopicNameConstraint getTopicNameConstraint()
           
protected  TopicRoleConstraint getTopicRoleConstraint()
           
protected  boolean getTrueFalse(java.lang.String value, java.lang.String tvalue, java.lang.String fvalue)
           
protected  TypedConstraintIF getTypedConstraint()
           
protected  TypeSpecification getTypeSpecification()
           
protected  VariantConstraint getVariantConstraint()
           
protected  void inheritScope(ScopedConstraintIF parent, ScopedConstraintIF child)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
protected  void setMinMax(CardinalityConstraintIF constraint, org.xml.sax.Attributes attrs)
           
 void startDocument()
           
 void startElement(java.lang.String name, org.xml.sax.Attributes attrs)
           
 void startElement(java.lang.String uri, java.lang.String lname, java.lang.String qname, org.xml.sax.Attributes attrs)
           
 void stopElement(java.lang.String name)
           
protected  void verifyParent(java.lang.String name)
           
protected  void verifyParent(java.lang.String[] names)
           
protected  void verifyParent(java.lang.String name1, java.lang.String name2)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xrfactory

protected XMLReaderFactoryIF xrfactory

base_address

protected LocatorIF base_address

schema

protected OSLSchema schema

curelem

protected java.lang.String curelem

saxlocator

protected org.xml.sax.Locator saxlocator

openElements

protected java.util.Stack openElements

openObjects

protected java.util.Stack openObjects

forwardrefs

protected java.util.List forwardrefs
Constructor Detail

OSLSchemaContentHandler

public OSLSchemaContentHandler(XMLReaderFactoryIF xrfactory,
                               LocatorIF base_address)
Method Detail

beginElement

public void beginElement(java.lang.String name,
                         org.xml.sax.Attributes attrs)
                  throws java.net.MalformedURLException,
                         org.xml.sax.SAXException
Throws:
java.net.MalformedURLException
org.xml.sax.SAXException

stopElement

public void stopElement(java.lang.String name)
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

startDocument

public void startDocument()
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String name)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String lname,
                         java.lang.String qname,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String lname,
                       java.lang.String qname)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

getSchema

public OSLSchema getSchema()

getTopicConstraintCollection

protected TopicConstraintCollection getTopicConstraintCollection()
                                                          throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTopicClass

protected TopicClass getTopicClass()
                            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getAssociationClass

protected AssociationClass getAssociationClass()
                                        throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTopicRoleConstraint

protected TopicRoleConstraint getTopicRoleConstraint()
                                              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getAssociationRoleConstraint

protected AssociationRoleConstraint getAssociationRoleConstraint()
                                                          throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTopicNameConstraint

protected TopicNameConstraint getTopicNameConstraint()
                                              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getVariantConstraint

protected VariantConstraint getVariantConstraint()
                                          throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getScopedConstraint

protected ScopedConstraintIF getScopedConstraint()
                                          throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTypedConstraint

protected TypedConstraintIF getTypedConstraint()
                                        throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getScopeSpecification

protected ScopeSpecification getScopeSpecification()
                                            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTypeSpecification

protected TypeSpecification getTypeSpecification()
                                          throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler

verifyParent

protected void verifyParent(java.lang.String name)
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

verifyParent

protected void verifyParent(java.lang.String name1,
                            java.lang.String name2)
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

verifyParent

protected void verifyParent(java.lang.String[] names)
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getException

protected org.xml.sax.SAXException getException(java.lang.String message)

inheritScope

protected void inheritScope(ScopedConstraintIF parent,
                            ScopedConstraintIF child)

setMinMax

protected void setMinMax(CardinalityConstraintIF constraint,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTrueFalse

protected boolean getTrueFalse(java.lang.String value,
                               java.lang.String tvalue,
                               java.lang.String fvalue)
                        throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException


Copyright © 2000-2012 Ontopia.