Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.schema
Class SOMSchemaFromDTD

    java.lang.Object
      com.bea.schema.SOMSchemaFromDTD

public class SOMSchemaFromDTD
extends Object

Creates an XML Schema from a DTD. This import utility creates a Schema Object Model from an XML DTD.

Nested Class Summary
`static class` | `SOMSchemaFromDTD.Macro` Structure for parameter ENTITYs.

Constructor Summary
`SOMSchemaFromDTD(BufferedReader dtd)` Create a DTD parser from a Reader.
`SOMSchemaFromDTD(String dtd)` Create a parser from a DTD String.

Method Summary
`void` | `debug(boolean val)`
`SOMSchema` | `getSchema()` Parse and return SOMSchema from a DTD.
`static int` | `indexOf(SOMSchemaFromDTD.Macro pattern, StringBuffer source)` naive Boyer-Moore search
`static void` | `main(String[] args)` Testing main method.
`void` | `parse()` Parse input DTD into SOMSchema.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SOMSchemaFromDTD

    public SOMSchemaFromDTD(BufferedReader dtd)

  Create a DTD parser from a Reader. Better performance can be obtained by using a BufferedReader

Parameters:
  `dtd` - DTD to be translated to XML Schema

### SOMSchemaFromDTD

    public SOMSchemaFromDTD(String dtd)

  Create a parser from a DTD String.

Parameters:
  `dtd` - DTD to be translated to XML Schema

Method Detail

### parse

    public void parse()
               throws IOException,
                      SOMDTDException

  Parse input DTD into SOMSchema.

  Throws:
    `IOException`
    `SOMDTDException`

### getSchema

    public SOMSchema getSchema()
                        throws IOException,
                               SOMDTDException

  Parse and return SOMSchema from a DTD.

  Returns:
    An XML Schema representation of an XML DTD
  Throws:
    `IOException`
    `SOMDTDException`

### indexOf

    public static int indexOf(SOMSchemaFromDTD.Macro pattern,
                              StringBuffer source)

  naive Boyer-Moore search

  Parameters:
    `pattern` - pattern to search for
    `source` - buffer to search for pattern in
  Returns:
    index of first pattern located, or -1 if not found

### main

    public static void main(String[] args)
                     throws IOException,
                            SOMDTDException

  Testing main method.

  Throws:
    `IOException`
    `SOMDTDException`

### debug

    public void debug(boolean val)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD