Package com.betfair.cougar.codegen

Examples of com.betfair.cougar.codegen.IDLReader


   * @param args
   */
  public static void main(String[] args) throws Exception {
     
    Transformations transform = new CougarTransformations();
    IDLReader reader = new IDLReader();
    Log log = new SystemStreamLog();
   
    File idd = new File("src\\main\\resources\\BaselineService.xml");
    InterceptingResolver resolver = new InterceptingResolver();
   
    Document iddDoc = XmlUtil.parse(idd, resolver);
   
    File ext = new File("src\\main\\resources\\BaselineService-Extensions.xml");
    Document extDoc = null;
    if (ext.exists()) {
      extDoc = XmlUtil.parse(ext, resolver);
    }
   
    reader.init(iddDoc, extDoc, "BaselineService",
            "com.betfair.baseline", ".", "/target/generated-sources", log,
            new Service().getOutputDir(), true, true);
   
        // First let's mangle the document if need be.
        if (transform.getManglers() != null) {
          log.debug("mangling IDL using "+transform.getManglers().size()+" pre validations");
          for(DocumentMangler m : transform.getManglers()) {
            log.debug(m.getName());
                reader.mangle(m);
            }
        log.debug(reader.serialize());
        }
        
    for (Validator v: transform.getPreValidations()) {
      reader.validate(v);
    }
    log.debug(reader.serialize());
    reader.runMerge(transform.getTransformations());
   
    reader.writeResult();
   
  }
View Full Code Here

TOP

Related Classes of com.betfair.cougar.codegen.IDLReader

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.