Examples of Generator


Examples of gdoku.generator.Generator

      System.out.printf("~~ DokuWiki Generator ~~\n") ;
      System.out.printf("Generating file '%s' ...\n", args[2]) ;
      Document source = IODocument.readFromFile(documentPath) ;

      /* Generate result file */
      Generator g = new Generator(new File(outputFile), source) ;
      g.generate() ;
      g.close() ;
      System.out.printf("File successfully generated.\n") ;
    } catch (KameleonException e) {
      System.exit(1) ;
    }// try
  }// Main(String, String)
View Full Code Here

Examples of kameleon.plugin.Generator

   * @throws   KameleonException
   *       if an error occurred while generating the file
   */
  public static void launchGenerator(PlugInInfo generator, Document document, String targetFile)
      throws KameleonException {
    Generator plugIn = getInstance(generator, GENERATOR_FOLDER, Generator.class) ;
    plugIn.generate(document, targetFile) ;
  }// launchGeneration(PlugInInfo, Document, String)
View Full Code Here

Examples of modbuspal.generator.Generator

            @Override
            public void actionPerformed(ActionEvent e)
            {
                try
                {
                    Generator gen = generatorFactory.newInstance(className);
                    automation.addGenerator(gen);
                }
                catch (InstantiationException ex)
                {
                    Logger.getLogger(AutomationEditor.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

Examples of net.flexmojos.oss.generator.Generator

        try
        {
            currentThread().setContextClassLoader( request.getClassLoader() );

            Generator generator = generatorFactory.getGenerator( generatorToUse );
            generator.generate( request );
        }
        catch ( GenerationException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }
View Full Code Here

Examples of org.apache.abdera.ext.serializer.annotation.Generator

                           ObjectContext objectContext,
                           SerializationContext context,
                           Conventions conventions) {
        writeAttributes(source, objectContext, context, conventions);
        StreamWriter sw = context.getStreamWriter();
        Generator _generator = objectContext.getAnnotation(Generator.class);

        String uri = null;
        AccessibleObject accessor = objectContext.getAccessor(URI.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null)
                uri = toString(value);
        }
        if (uri == null) {
            URI _uri = objectContext.getAnnotation(URI.class);
            if (_uri != null && !_uri.value().equals(DEFAULT)) {
                uri = _uri.value();
            }
        }
        if (uri == null && _generator != null && !_generator.uri().equals(DEFAULT)) {
            uri = _generator.uri();
        }
        if (uri != null)
            sw.writeAttribute("uri", uri);

        String version = null;
        accessor = objectContext.getAccessor(URI.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null)
                version = toString(value);
        }
        if (version == null) {
            URI _version = objectContext.getAnnotation(URI.class);
            if (_version != null && !_version.value().equals(DEFAULT)) {
                version = _version.value();
            }
        }
        if (version == null && _generator != null && !_generator.version().equals(DEFAULT)) {
            version = _generator.version();
        }
        if (version != null)
            sw.writeAttribute("version", version);

        writeTextValue(source, objectContext, context, conventions);
View Full Code Here

Examples of org.apache.abdera.model.Generator

    String uri,
    String version,
    String value)
      throws IRISyntaxException {
    FOMFactory fomfactory = (FOMFactory) factory;
    Generator generator = fomfactory.newGenerator(this);
    if (uri != null) generator.setUri(uri);
    if (version != null) generator.setVersion(version);
    if (value != null) generator.setText(value);
    return generator;   
  }
View Full Code Here

Examples of org.apache.abdera.model.Generator

     IRI uri = baseURI.resolve("4.2.4/generator-with-child.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     Generator generator = feed.getGenerator();
     assertEquals(generator.getText(),"");
   }
View Full Code Here

Examples of org.apache.abdera.model.Generator

     IRI uri = baseURI.resolve("4.2.4/generator_relative_ref.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     Generator generator = feed.getGenerator();
     assertNotNull(generator);
     assertEquals(generator.getResolvedUri(), uri.resolve("misc/Colophon"));
   }
View Full Code Here

Examples of org.apache.abdera.model.Generator

     //http://feedvalidator.org/testcases/atom/4.2.11/multiple-generators.xml
     IRI uri = baseURI.resolve("4.2.11/multiple-generators.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Generator g = entry.getSource().getGenerator();
     assertEquals(g.getResolvedUri(), new IRI("http://www.example.com/"));
   }
View Full Code Here

Examples of org.apache.abdera.model.Generator

    assertEquals(dateTime.getTime(), now.getTime());
    dateTime = factory.newDateTime(Constants.UPDATED, null);
    dateTime.setString(AtomDate.format(now));
    assertEquals(dateTime.getString(), AtomDate.format(now));
    assertEquals(dateTime.getDate(), now);
    Generator generator = factory.newDefaultGenerator();
    assertNotNull(generator);
    assertEquals(generator.getText(), Version.APP_NAME);
    assertEquals(generator.getVersion(), Version.VERSION);
    assertEquals(generator.getUri().toString(), Version.URI);
    Div div = factory.newDiv();
    assertNotNull(div);
    Document doc = factory.newDocument();
    assertNotNull(doc);
    Element el = factory.newEmail();
    assertNotNull(el);
    el = factory.newEmail();
    el.setText("a");
    assertEquals(el.getText(), "a");
    Entry entry = factory.newEntry();
    assertNotNull(entry);
    entry = factory.newEntry();
    assertNotNull(entry);
    Element ee = factory.newExtensionElement(new QName("urn:foo", "bar", "b"));
    assertNotNull(ee);
    assertEquals(ee.getQName(), new QName("urn:foo", "bar", "b"));
    Feed feed = factory.newFeed();
    assertNotNull(feed);
    generator = factory.newGenerator();
    assertNotNull(generator);
    generator = factory.newGenerator();
    generator.setUri(Version.URI);
    generator.setVersion(Version.VERSION);
    generator.setText(Version.APP_NAME);
    assertNotNull(generator);
    assertEquals(generator.getText(), Version.APP_NAME);
    assertEquals(generator.getVersion(), Version.VERSION);
    assertEquals(generator.getUri().toString(), Version.URI);
    content = factory.newContent(Content.Type.HTML);
    content.setValue("a");
    assertNotNull(content);
    assertEquals(content.getValue(), "a");
    assertEquals(content.getContentType(), Content.Type.HTML);
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.