|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.creole.BootStrap
This class creates a resource (e.g.ProcessingResource, VisualResource or Language Resource) with the information from the user and generates a project in the directory provided by the user
Field Summary | |
protected Set |
allPackages
the packages used by the class which creates the resources |
private static int |
BUFF_SIZE
the size of the buffer |
private byte[] |
buffer
a buffer in order to read an array of bytes |
private char[] |
cbuffer
a buffer in order to read an array of char |
protected Map |
fields
the enumeration of the variables from main class |
protected ArrayList |
listMethodsResource
the methods from the class that implements the resource |
protected List |
listPackages
the list with the packages name where the main class can be find |
protected String |
nameProject
the name of jar resource |
protected static Map |
names
a map from the variants of the names of the files and the directories of the empty project to the variants of the names of the files and the directories the new project |
protected Map |
oldNames
|
protected String |
oldResource
the name of the resource of the template project from the gate resources |
protected static String |
resourcePath
Where on the classpath the gate resources are to be found |
Constructor Summary | |
BootStrap()
|
Method Summary | |
String |
addContent(String content,
String expr,
String interfaces)
Modifies the content of the file from gate/resources/pathResourceFile using the information (e.g.name of the resource, name of the class which implements the resource)provided by the user and copies it in currentFile. |
String |
changeKeyValue(String text,
Map map)
Determines all the keys from the map "names" in the text and replaces them with their values |
Map |
createNames(String namePackage,
String nameClass,
String stringPackages)
create the map with variants of the names... |
void |
createResource(String namePackage,
String typeResource,
String nameClass,
Set listInterfaces,
String pathNewProject)
Creates the resource and dumps out a project structure using the structure from gate/resource/creole/templateproject/Template and the information provided by the user |
List |
determinePath(String namePackage)
determines the name of the packages and adds them to a list |
String |
determineTypePackage(String text)
return the text between the last dot and the end of input |
String |
getInterfacesAndClass(String typeResource,
Set listInterfaces)
returns all the interfaces that it implements and the class that it extends as a string |
String |
namesPackages(Set listPackages)
determine all the packages |
String |
regularExpressions(String text,
String replacement,
String regEx)
replace with replacement in the text using regEx as a regular expression |
void |
shapeMethod(List listMethodExtend,
List listInterfacesMethod)
create the form for the methods from the class that create the resource |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static String resourcePath
protected String oldResource
protected String nameProject
protected static Map names
protected Map oldNames
private static final int BUFF_SIZE
private byte[] buffer
private char[] cbuffer
protected ArrayList listMethodsResource
protected List listPackages
protected Set allPackages
protected Map fields
Constructor Detail |
public BootStrap()
Method Detail |
public String regularExpressions(String text, String replacement, String regEx) throws gnu.regexp.REException
public String changeKeyValue(String text, Map map) throws gnu.regexp.REException
public String determineTypePackage(String text)
public String getInterfacesAndClass(String typeResource, Set listInterfaces) throws ClassNotFoundException
public void shapeMethod(List listMethodExtend, List listInterfacesMethod)
public String addContent(String content, String expr, String interfaces) throws gnu.regexp.REException
public Map createNames(String namePackage, String nameClass, String stringPackages)
public String namesPackages(Set listPackages)
public List determinePath(String namePackage) throws IOException
public void createResource(String namePackage, String typeResource, String nameClass, Set listInterfaces, String pathNewProject) throws IOException, ClassNotFoundException, gnu.regexp.REException, GateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |