org.restlet.ext.odata
Class Generator

java.lang.Object
  extended by org.restlet.ext.odata.Generator

public class Generator
extends Object

Code generator for accessing OData services. The generator use metadata exposed by an online service to generate client-side artifacts facilitating the execution of queries on the available entities.

Author:
Thierry Boileau

Constructor Summary
Generator(Reference serviceRef)
          Constructor.
Generator(Reference serviceRef, String serviceClassName)
          Constructor.
Generator(String serviceUri)
          Constructor.
Generator(String serviceUri, String serviceClassName)
          Constructor.
 
Method Summary
 void generate(File outputDir)
          Generates the client code to the given output directory.
 void generate(String outputDir)
          Generates the client code to the given output directory.
static void main(String[] args)
          Takes two (or three) parameters:
The URI of the OData service The output directory (optional, used the current directory by default) The name of the generated service class name (optional)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator(Reference serviceRef)
Constructor.

Parameters:
serviceRef - The URI of the OData service.

Generator

public Generator(Reference serviceRef,
                 String serviceClassName)
Constructor. The name of the service class can be provided if there is only one service defined in the metadata.

Parameters:
serviceRef - The URI of the OData service.
serviceClassName - The name of the service class (in case there is only one in the metadata).

Generator

public Generator(String serviceUri)
Constructor.

Parameters:
serviceUri - The URI of the OData service.

Generator

public Generator(String serviceUri,
                 String serviceClassName)
Constructor. The name of the service class can be provided if there is only one service defined in the metadata.

Parameters:
serviceUri - The URI of the OData service.
serviceClassName - The name of the service class (in case there is only one in the metadata).
Method Detail

main

public static void main(String[] args)
Takes two (or three) parameters:
  1. The URI of the OData service
  2. The output directory (optional, used the current directory by default)
  3. The name of the generated service class name (optional)

Parameters:
args - The list of arguments.

generate

public void generate(File outputDir)
              throws Exception
Generates the client code to the given output directory.

Parameters:
outputDir - The output directory.
Throws:
Exception

generate

public void generate(String outputDir)
              throws Exception
Generates the client code to the given output directory.

Parameters:
outputDir - The output directory.
Throws:
Exception


Copyright © 2005-2013 Restlet.