protected IDiagnostician |
diagnostician
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GENERATOR_OK
public static final int GENERATOR_OK
- See Also:
- Constant Field Values
GENERATOR_ERROR
public static final int GENERATOR_ERROR
- See Also:
- Constant Field Values
output
protected static ILineOutput output
resourceSetProvider
logger
diagnostician
fileAccess
uriResolver
validator
protected IResourceValidator validator
AbstractGenerator
public AbstractGenerator()
setTerminateOnError
public static void setTerminateOnError(boolean terminateOnError)
isTerminateOnError
public static boolean isTerminateOnError()
setOutput
public static void setOutput(ILineOutput out)
createAndRunGenerator
protected static int createAndRunGenerator(Module generatorModule,
java.lang.String[] args)
- creates an instance of the generator and invokes the
runGenerator(String[]) method
- Parameters:
generatorModule - a Guice module from which the Injector is created
- Returns:
getInjector
public static Injector getInjector()
setupRoomModel
protected void setupRoomModel()
- setup the ROOM core model plug-in and create a validator using injection
createGeneratorModel
protected Root createGeneratorModel(ResourceSet rs,
boolean asLibrary,
java.lang.String genModelPath)
- Parameters:
rs - the ResourceSet to which the generator model should be addedgenModelPath - path to store the generator model (not stored if null)
- Returns:
- the
Root object of the generator model (is added to a new Resource also)
validateModels
protected boolean validateModels(ResourceSet rs)
- validate the models
- Parameters:
rs -
loadModel
protected boolean loadModel(java.lang.String uriString,
ResourceSet rs)
throws java.lang.RuntimeException,
java.io.IOException
- Throws:
java.lang.RuntimeException
java.io.IOException
loadModels
protected boolean loadModels(java.util.List<java.lang.String> uriList,
ResourceSet rs)
- load all models into a
ResourceSet
- Parameters:
uriList - a list of URIs as Stringsrs - the ResourceSet
runGenerator
protected abstract int runGenerator(java.lang.String[] args)
- abstract method which is finally called by
createAndRunGenerator(Module, String[])
- Parameters:
args -
- Returns:
- GENERATOR_OK or GENERATOR_ERROR
|