Package com.xmlit.project.engine.struct

Examples of com.xmlit.project.engine.struct.StructSequence


public class Test {
 
  static String msg = "xxxxxx1111144444444455555555\r\nxxxxxxxxYYYYYYYYY\r\nxxxxxx1111144444444455555555\r\nxxxxxxxxYYYYYYYYY\r\nxxxxxxxxxxxxyyyyy";
  public static void main1(String[] args) throws ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException {
    StructSequence root = new StructSequenceImpl("root");
    root.setDelimiter("\r\n");
    StructSequenceImpl ab = new StructSequenceImpl("ab");
    ab.setDelimiter("\r\n");
    ab.setMinOccurrences(1).setMaxOccurrences(2);
    StructSequence a = new StructSequenceImpl("a");
    StructSequence b = new StructSequenceImpl("b");
    StructSequence c = new StructSequenceImpl("c");

    root.addChild(ab).addChild(c);
    ab.addChild(a).addChild(b);
    StructSimple x1 = new StructSimpleImpl("x1").setSimplePattern("[a-z]{6,9}")
    StructSimple y1 = new StructSimpleImpl("y1").setSimplePattern("[0-9]{5,9}");
    y1.setMaxOccurrences(10).setMinOccurrences(2);
    a.addChild(x1).addChild(y1);
   
    StructSimple x2 = new StructSimpleImpl("x2").setSimplePattern("[a-z]{6,9}")
    StructSimple y2 = new StructSimpleImpl("y2").setSimplePattern("[A-Z]{5,9}");
    b.addChild(x2).addChild(y2);
   
    StructSimple n = new StructSimpleImpl("n").setSimplePattern("[a-z]{6,9}")
    StructSimple m = new StructSimpleImpl("m").setSimplePattern("[a-z]{5,9}");
    c.addChild(n).addChild(m);
   
  //  n.setMinOccurrences(0);

    DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
View Full Code Here


    }*/
  }

 
  public static void main(String[] args) throws ClassCastException, ClassNotFoundException, InstantiationException, IllegalAccessException {
    StructSequence root = new StructSequenceImpl("root");
    root.setDelimiter("/");
    StructSimple x1 = (StructSimple) new StructSimpleImpl("a").setSimplePattern("aaa").setMinOccurrences(1).setMaxOccurrences(1)
    StructSimple y1 = (StructSimple) new StructSimpleImpl("b").setSimplePattern("bbb").setMinOccurrences(1).setMaxOccurrences(1);
    root.addChild(x1).addChild(y1);

    DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();

    DOMImplementationLS impl =
        (DOMImplementationLS)registry.getDOMImplementation("LS");
View Full Code Here

TOP

Related Classes of com.xmlit.project.engine.struct.StructSequence

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.