Package com.sun.msv.grammar

Examples of com.sun.msv.grammar.ExpressionPool


    protected Schema getSchemaForSchema() {
        return XMLSchemaReader.getXmlSchemaForXmlSchema();
    }

    protected GrammarReader getReader() {
        return new XMLSchemaReader( createController(), factory, new ExpressionPool() );
    }
View Full Code Here


    protected Schema getSchemaForSchema() {
        return RELAXNGCompReader.getRELAXNGSchema4Schema();
    }
   
    protected GrammarReader getReader() {
        return new RELAXNGCompReader( createController(), factory, new ExpressionPool() );
    }
View Full Code Here

public class TXMLSchemaReader extends XMLSchemaReader implements TahitiGrammarReader {
 
  public TXMLSchemaReader(
    GrammarReaderController controller,
    SAXParserFactory parserFactory ) {
    super( controller, parserFactory, new StateFactory(), new ExpressionPool() );
   
    // ignore the body of ur-type.
    complexUrType.exp = new IgnoreItem(complexUrType.exp);
    // ignore the schema location attribute
    xsiSchemaLocationExp.exp = new IgnoreItem( xsiSchemaLocationExp.exp );
View Full Code Here

*     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
*/
public class SerialTest {
    public static void main(String[] args) throws Exception {
        if( args[0].equals("write") ) {
          ExpressionPool pool = new ExpressionPool();
            pool.createAnyString();
            pool.createChoice( pool.createData(StringType.theInstance), pool.createEpsilon() );
       
            ObjectOutputStream oos = new ObjectOutputStream(System.out);
            oos.writeObject(pool);
            oos.close();
        } else {
            ObjectInputStream ois = new ObjectInputStream(System.in);
            ExpressionPool pool = (ExpressionPool)ois.readObject();
            System.out.println(pool);
        }
    }
View Full Code Here

        if( args[0].equals("trex") ) {
            TREXGrammarReader reader = new TREXGrammarReader(
                new com.sun.msv.driver.textui.DebugController(false,false),
                factory,
                new TypedTREXGrammarInterceptor(),
                new ExpressionPool() );
            ((XMLFilter)reader).parse(args[1]);
            grammar = reader.getResult();
        } else {
            grammar = GrammarLoader.loadSchema( args[1],
                new com.sun.msv.driver.textui.DebugController(false,false),
View Full Code Here

import com.sun.msv.reader.dtd.DTDReader;

public class DTDValidator extends AbstractValidatorExImpl {

    public Grammar parseSchema( InputSource is, GrammarReaderController controller ) throws Exception {
        Grammar g = DTDReader.parse(is,controller,new ExpressionPool() );
        if(g==null)        return null;
        return g;
    }
View Full Code Here

    return reader.getResult();
  }

  /** easy-to-use constructor. */
  public SRELAXNGReader( GrammarReaderController controller, SAXParserFactory parserFactory) {
    this( controller, parserFactory, new ExpressionPool() );
  }
View Full Code Here

     * Computes the union of two grammars.
     */
    private Grammar union( Grammar g1, Grammar g2 ) {
        // either g1.getPool() or g2.getPool() is OK.
        // this is just a metter of performance problem.
        final ExpressionPool pool = g1.getPool();
        final Expression top = pool.createChoice(g1.getTopLevel(),g2.getTopLevel());
       
        return new Grammar() {
            public ExpressionPool getPool() {
                return pool;
            }
View Full Code Here

        this.pool = pool;
        this.parentGrammar = parentGrammar;
    }
   
    public TREXGrammar( ExpressionPool pool )    { this(pool,null); }
    public TREXGrammar() { this(new ExpressionPool(),null); }
View Full Code Here

* @author <a href="mailto:kohsuke.kawaguchi@eng.sun.com">Kohsuke KAWAGUCHI</a>
*/
public class RELAXCoreFactoryImpl extends FactoryImpl
{
    protected Grammar parse( InputSource is, GrammarReaderController controller ) {
        return RELAXCoreReader.parse(is,factory,controller,new ExpressionPool());
    }
View Full Code Here

TOP

Related Classes of com.sun.msv.grammar.ExpressionPool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.