| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.jaxme.xs.impl.XSLogicalParser
org.apache.ws.jaxme.xs.util.DTDParser
A SAX parser converting a DTD into an instance of XML Schema.
| Nested Class Summary | |
| protected static class | DTDParser.ChildToken | 
|  class | DTDParser.DTDAttributeThis class is used to collect the attributes in the DTD temporarily. | 
|  class | DTDParser.DtdDeclHandlerImplementation of a DeclHandlerfor reading
 the element and attribute declarations. | 
|  class | DTDParser.DTDElementThis class is used to collect the elements in the DTD temporarily. | 
| static class | DTDParser.StringBufferReaderThis class is similar to a StringReader, except that it allows to extend the input dynamically. | 
| Nested classes inherited from class org.apache.ws.jaxme.xs.impl.XSLogicalParser | 
| XSLogicalParser.AddedImport | 
| Constructor Summary | |
| DTDParser() | |
| Method Summary | |
| protected  void | addChildren(XsTTopLevelElement pElement,
            XsTExplicitGroup pGroup,
            DTDParser.ChildToken pToken,
            org.xml.sax.Locator pLocator)Adds the childs to a group. | 
| protected  void | createAttribute(XsGAttrDecls pAttrDecls,
                DTDParser.DTDAttribute pAttribute)Creates a new attribute. | 
| protected  XsTTopLevelElement | createElement(XsESchema pSchema,
              java.lang.String pName,
              java.lang.String pModel,
              DTDParser.DTDAttribute[] pAttributes,
              org.xml.sax.Locator pLocator)Creates an element named pNamewith the
 content modelpModeland the attribute
 listpAttrsin the schemapSchema. | 
|  XSContext | getData() | 
| protected  java.lang.String | getDummyElementName() | 
|  org.xml.sax.Locator | getLocator()Returns the document locator. | 
| protected  java.lang.String | getMultiplicity(java.lang.String pToken)Returns a tokens multiplicity. | 
|  XsAnyURI | getTargetNamespace()Returns the created schemas target namespace. | 
|  XSSchema | parse(org.xml.sax.InputSource pInputSource)This is the logical parsers frontend for parsing the given InputSource. | 
| protected  void | parse(XsESchema pSchema,
      org.xml.sax.InputSource pSource)Parses the given InputSourceand
 converts it into an instance ofXsESchema. | 
| protected  DTDParser.ChildToken | parseChildren(java.lang.String pModel,
              org.xml.sax.Locator pLocator)Converts a list of children into its tokens. | 
| protected  XsGAttrDecls | parseChildren(XsTTopLevelElement pElement,
              java.lang.String pModel,
              org.xml.sax.Locator pLocator)Parses a content model with children. | 
| protected  XsGAttrDecls | parseMixed(XsTTopLevelElement pElement,
           java.lang.String pModel,
           org.xml.sax.Locator pLocator,
           boolean pHasAttributes)Parses a mixed content model. | 
| protected  void | runXMLReader(org.xml.sax.InputSource pSource)Parses the given DTD, filling the parsers temporary map of elements. | 
|  void | setLocator(org.xml.sax.Locator pLocator)Sets the document locator. | 
| protected  void | setMultiplicity(XsAGOccurs pOccurs,
                java.lang.String pMultiplicity)Sets the objects multiplicity. | 
|  void | setTargetNamespace(XsAnyURI pTargetNamespace)Sets the created schemas target namespace. | 
| Methods inherited from class org.apache.ws.jaxme.xs.impl.XSLogicalParser | 
| add, addImport, addImport, addSyntaxSchema, clearSyntaxSchemas, createSubstitutionGroups, getAddedImports, getCurrentSyntaxSchema, getInputSource, getSchema, getSyntaxSchemas, getXSContentHandler, importSchema, importSchema, includeSchema, isValidating, parse, parse, parseSyntax, parseSyntax, parseSyntax, redefine, redefineSchema, removeSyntaxSchema, setSchema, setValidating | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public DTDParser()
| Method Detail | 
public XSContext getData()
getData in class XSLogicalParserpublic org.xml.sax.Locator getLocator()
public void setLocator(org.xml.sax.Locator pLocator)
protected java.lang.String getDummyElementName()
protected void runXMLReader(org.xml.sax.InputSource pSource)
                     throws javax.xml.parsers.ParserConfigurationException,
                            java.io.IOException,
                            org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXExceptionprotected java.lang.String getMultiplicity(java.lang.String pToken)
protected DTDParser.ChildToken parseChildren(java.lang.String pModel,
                                             org.xml.sax.Locator pLocator)
                                      throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void setMultiplicity(XsAGOccurs pOccurs,
                               java.lang.String pMultiplicity)
protected void addChildren(XsTTopLevelElement pElement,
                           XsTExplicitGroup pGroup,
                           DTDParser.ChildToken pToken,
                           org.xml.sax.Locator pLocator)
                    throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected XsGAttrDecls parseChildren(XsTTopLevelElement pElement,
                                     java.lang.String pModel,
                                     org.xml.sax.Locator pLocator)
                              throws org.xml.sax.SAXException
   children ::= (choice | seq) ('?' | '*' | '+')?
   cp ::= (Name | choice | seq) ('?' | '*' | '+')?
   choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'
   seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
 
org.xml.sax.SAXException
protected XsGAttrDecls parseMixed(XsTTopLevelElement pElement,
                                  java.lang.String pModel,
                                  org.xml.sax.Locator pLocator,
                                  boolean pHasAttributes)
                           throws org.xml.sax.SAXException
   Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
       | '(' S? '#PCDATA' S? ')' 
 
org.xml.sax.SAXException
protected void createAttribute(XsGAttrDecls pAttrDecls,
                               DTDParser.DTDAttribute pAttribute)
                        throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected XsTTopLevelElement createElement(XsESchema pSchema,
                                           java.lang.String pName,
                                           java.lang.String pModel,
                                           DTDParser.DTDAttribute[] pAttributes,
                                           org.xml.sax.Locator pLocator)
                                    throws org.xml.sax.SAXException
pName with the
 content model pModel and the attribute
 list pAttrs in the schema pSchema.
org.xml.sax.SAXException
protected void parse(XsESchema pSchema,
                     org.xml.sax.InputSource pSource)
              throws javax.xml.parsers.ParserConfigurationException,
                     java.io.IOException,
                     org.xml.sax.SAXException
InputSource and
 converts it into an instance of
 XsESchema.
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
public XSSchema parse(org.xml.sax.InputSource pInputSource)
               throws javax.xml.parsers.ParserConfigurationException,
                      java.io.IOException,
                      org.xml.sax.SAXException
XSLogicalParserThis is the logical parsers frontend for parsing the given
 InputSource. If the parsed schema includes or imports other
 schemas, they are also parsed and added to the parsers object
 tree.
parse in class XSLogicalParserjavax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException#getXSContentHandler()public void setTargetNamespace(XsAnyURI pTargetNamespace)
public XsAnyURI getTargetNamespace()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||