|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.service.generator.Generator org.biomoby.service.generator.DataTypesGenerator
public class DataTypesGenerator
A generator generating classes representing Biomoby data types.
Data types are generated using information stored in a Biomoby registry. In other words, generating is possible only for data types that had been registered.
The best way how to find what it does for you is to use command-line client MosesGenerators. Start MosesGenerators either from a command-line using a script:
build/run/run-generator -hor using Ant:
./build.sh moses-datatypes
Field Summary |
---|
Fields inherited from class org.biomoby.service.generator.Generator |
---|
GPROP_AUTH, GPROP_DOTLOCATION, GPROP_FILTER, GPROP_NOGEN, GPROP_NOGRAPHS, GPROP_OUTDIR, GPROP_SERVICE, GPROP_VERBOSE |
Constructor Summary | |
---|---|
DataTypesGenerator()
|
|
DataTypesGenerator(CentralCached worker)
|
|
DataTypesGenerator(String cacheDir)
|
|
DataTypesGenerator(String registryEndpoint,
String registryURI,
String cacheDir)
|
Method Summary | |
---|---|
void |
generate(Properties props)
Generate classes for all data types from a given Biomoby registry. |
Map<String,File> |
getTemplateNames()
Getting names of templates is isolated here so a sub-class can override it (but any new teplate still needs to follow the same patterns as the original template - so it is not too flexible, anyway). |
static boolean |
isPrimitiveType(String dataTypeName)
Return true if 'dataTypeName' is a Biomoby primitive type. |
Methods inherited from class org.biomoby.service.generator.Generator |
---|
getWorker, makeDirs |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataTypesGenerator()
public DataTypesGenerator(String cacheDir) throws MobyException
MobyException
public DataTypesGenerator(String registryEndpoint, String registryURI, String cacheDir) throws MobyException
MobyException
public DataTypesGenerator(CentralCached worker)
Method Detail |
---|
public Map<String,File> getTemplateNames()
Generator
The values of returned Map are files. It their names are relative (which is the best way) then they are looked for in the CLASSPATH (including all jar files there).
Make sure that the returned path is correct for the system where JVM is running.
getTemplateNames
in class Generator
public void generate(Properties props) throws MobyException
generate
in class Generator
props
- are properties influencing the generated results
MobyException
- if anything goes wrongproperty GPROP_FILTER
,
property GPROP_OUTDIR
,
property GPROP_VERBOSE
,
property GPROP_NOGRAPHS
,
property GPROP_DOTLOCATION
public static boolean isPrimitiveType(String dataTypeName)
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |