Examples of Generator


Examples of org.eclipse.persistence.jaxb.compiler.Generator

                jModel.setMetadataCompletePackageMap(metadataComplete);
            }

            JavaModelInputImpl inputImpl = new JavaModelInputImpl(typesToBeBound, jModel);
            try {
                Generator generator = new Generator(inputImpl, typesToBeBound, inputImpl.getJavaClasses(), null, xmlBindings, classLoader, defaultTargetNamespace, enableXmlAccessorFactory);
                JAXBContextState contextState = createContextState(generator, loader, typesToBeBound, properties);               
                return contextState;
            } catch (Exception ex) {
                throw new javax.xml.bind.JAXBException(ex.getMessage(), ex);
            }
View Full Code Here

Examples of org.eclipse.xpand2.Generator

        cleaner.addExclude("gen.properties");

        /*
         * Create Database Generator
         */
        Generator databaseGen = new Generator();
        databaseGen.setExpand(EXPAND_DATABASE);
        databaseGen.setFileEncoding(config.getFileEncoding());
        databaseGen.addMetaModel(emfMetaModel);
        databaseGen.addOutlet(javaOutlet);
        databaseGen.setPrDefaultExcludes(true);
        databaseGen.setPrSrcPaths(config.getGenPath());

        /*
         * Create Content Provider Generator
         */
        Generator contentProviderGen = new Generator();
        contentProviderGen.setExpand(EXPAND_CONTENT_PROVIDER);
        contentProviderGen.setFileEncoding(config.getFileEncoding());
        contentProviderGen.addMetaModel(emfMetaModel);
        contentProviderGen.addOutlet(javaOutlet);

        /*
         * Create Model Generator
         */
        Generator modelGen = new Generator();
        modelGen.setExpand(EXPAND_MODEL);
        modelGen.setFileEncoding(config.getFileEncoding());
        modelGen.addMetaModel(emfMetaModel);
        modelGen.addOutlet(javaOutlet);

        /*
         * Create Code Snippet Generator
         */
        Generator snippetGen = new Generator();
        snippetGen.setExpand(EXPAND_CODE_SNIPPET);
        snippetGen.setFileEncoding(config.getFileEncoding());
        snippetGen.addMetaModel(emfMetaModel);
        snippetGen.addOutlet(propertiesOutlet);

        /*
         * Execute Reader and Generators
         */
        reader.invoke(ctx, monitor, issues);
        cleaner.invoke(ctx, monitor, issues);
        databaseGen.invoke(ctx, monitor, issues);
        contentProviderGen.invoke(ctx, monitor, issues);
        modelGen.invoke(ctx, monitor, issues);
        snippetGen.invoke(ctx, monitor, issues);
    }
View Full Code Here

Examples of org.fnlp.ml.feature.Generator



      InstanceSet instset = new InstanceSet(pipe,factory);
      instset.loadThruStagePipes(new SimpleFileReader(trainFile," ",true,Type.LabelData));
      Generator gen = new SFGenerator();
      ZeroOneLoss l = new ZeroOneLoss();
      Inferencer ms = new LinearMax(gen, factory.getLabelSize());
      Update update = new LinearMaxPAUpdate(l);
      OnlineTrainer trainer = new OnlineTrainer(ms, update,l, factory.getFeatureSize(), 50,0.005f);
      Linear pclassifier = trainer.train(instset,instset);
View Full Code Here

Examples of org.geotools.caching.util.Generator

     * @throws ClassNotFoundException
     * @throws IllegalAttributeException
     */
    public void testMarshall()
        throws IOException, ClassNotFoundException, IllegalAttributeException {
        Generator gen = new Generator(1000, 1000);
        SimpleFeature f = gen.createFeature(0);
        SimpleFeatureMarshaller m = new SimpleFeatureMarshaller();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        m.marshall(f, oos);

View Full Code Here

Examples of org.granite.generator.Generator

            // Transformer
            Transformer<?, ?, ?> transformerImpl = createTransformer( classLoader, configuration );

            // Create the generator.
            Generator generator = new Generator( configuration );
            generator.add( transformerImpl );

            // Call the generator for each class
            getLogger().info( "Calling the generator for each Java class." );
            int count = generateClass( classLoader, generator );
            getLogger().info( "Files affected: " + count + ( count == 0 ? " (nothing to do)." : "." ) );
View Full Code Here

Examples of org.graylog2.rest.documentation.generator.Generator

    @GET
    @Timed
    @ApiOperation(value = "Get API documentation")
    @Produces(MediaType.APPLICATION_JSON)
    public Response overview() {
        return buildSuccessfulCORSResponse(new Generator(RESOURCE_PACKAGE, objectMapper).generateOverview());
    }
View Full Code Here

Examples of org.graylog2.rest.documentation.generator.Generator

    @ApiOperation(value = "Get detailed API documentation of a single resource")
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/{route: .+}")
    public Response route(
            @ApiParam(name = "route", value = "Route to fetch. For example /system", required = true) @PathParam("route") String route) {        return buildSuccessfulCORSResponse(
                new Generator(RESOURCE_PACKAGE, objectMapper).generateForRoute(route, configuration.getRestTransportUri().toString())
        );
    }
View Full Code Here

Examples of org.hivedb.util.functional.Generator

import org.hivedb.util.functional.Generator;

public class MemoryKeyAuthority implements KeyAuthorityCreator {
 
  public  KeyAuthority create(Class keySpace, final Class returnType) {
    final Generator incrementor;
    if (returnType.equals(int.class) || returnType.equals(Integer.class))
       incrementor = new Generator<Integer>() {
        private int i=0;;
        public Integer generate() {
          return ++i;
        }
      };
    else if (returnType.equals(long.class) || returnType.equals(Long.class))
      incrementor = new Generator<Long>() {
        private long i=0;;
        public Long generate() {
          return ++i;
        }
      };
    else
      throw new RuntimeException("Only Integers and Longs are supported");
   
    return new KeyAuthority() {

      public Object nextAvailableKey() {
        return increment();
      }
      @SuppressWarnings("unchecked")
      private Object increment()
      {
        return incrementor.generate();
      }
    };
  }
View Full Code Here

Examples of org.jboleto.control.Generator

    jBoletoBean.setAgencia("2971");
    jBoletoBean.setContaCorrente("08690");
    jBoletoBean.setDvContaCorrente("1");
    jBoletoBean.setNossoNumero("0000003248437", 13);
    jBoletoBean.setNoDocumento("0324843");
    Generator generator = new PDFGenerator(jBoletoBean, JBoleto.SANTANDER);
    JBoleto jBoleto = new JBoleto(generator, jBoletoBean, JBoleto.SANTANDER);
    jBoleto.addBoleto();
    jBoleto.closeBoleto(fileName);
  }
View Full Code Here

Examples of org.jboleto.control.Generator

    jBoletoBean.setAgencia("2971");
    jBoletoBean.setContaCorrente("08690");
    jBoletoBean.setDvContaCorrente("1");
    jBoletoBean.setNossoNumero("102008044", 9);
    jBoletoBean.setNoDocumento("102008");
    Generator generator = new PDFGenerator(jBoletoBean, JBoleto.HSBC);
    JBoleto jBoleto = new JBoleto(generator, jBoletoBean, JBoleto.HSBC);
    jBoleto.addBoleto();
    jBoleto.closeBoleto(fileName);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.