Package org.apache.uima.tools.jcasgen
Class Jg
java.lang.Object
org.apache.uima.tools.jcasgen.Jg
Class holds type plugin-wide collections and static methods. Also implements the runnable that is
called to do the processing
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
Interface implemeted by JCAS code generation's templates -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Map
(package private) static Map
(package private) static TypeSystem
(package private) CAS
static final Properties
private Type
(package private) String
(package private) static final FeatureDescription[]
(package private) static final Map
(package private) static final FeatureDescription[]
(package private) GUI
(package private) final Map
(package private) static final String
private boolean
(package private) IMerge
(package private) static final Set
Set of types not generated from the CAS type set because they're already in existence as builtins in the JCas impl.private static ArrayList
(package private) String
(package private) IProgressMonitor
private String
(package private) static final Collection
private static ResourceBundle
(package private) String
private Type
private TypeSystem
(package private) Waiter
(package private) String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addBuiltInTypeInfo
(String casName, String javaName) private static void
addBuiltInTypeInfo
(String casName, String javaName, String casElementName) (package private) String
(package private) String
arrayLLCore
(String get_set, String range, String fname) (package private) String
arrayLLCoreChk
(String get_set, String range, String fname) (package private) String
castResult
(String resultType, String core) (package private) void
collectImport
(String casName, boolean _Type) (package private) Collection
collectImports
(TypeDescription td, boolean _Type) void
driveGui()
private void
generateAllTypesFromTemplates
(String outputDirectory, TypeDescription[] tds, CASImpl aCas, Class jcasTypeClass, Class jcas_TypeClass) private void
generateClass
(IProgressMonitor progressMonitorGenerateClass, String outputDirectory, TypeDescription td, String sourceContents, String className, IMerge mergerGenerateClass) private void
generateClassesFromTemplate
(TypeDescription td, String outputDirectory, Jg.IJCasTypeTemplate jcasTypeInstance, Jg.IJCasTypeTemplate jcas_TypeInstance) Generate type classes from the specified templates(package private) String
(package private) String
getDate()
(package private) String
(package private) String
(package private) String
(package private) String
getJavaName
(String name) (package private) String
(package private) String
(package private) String
getJavaNameWithPkg
(String casTypeName) (package private) String
(package private) String
(package private) String
(package private) String
(package private) String
Returns the plugin's resource bundle,getResourceString
(String key) Returns the string from the plugin's resource bundle, or 'key' if not found.(package private) boolean
(package private) boolean
hasPkgPrefix
(String name) private boolean
isOutOfScope
(TypeDescription td, String projectDirPath) return true if td is not defined in this project, of it is defined, but is also in merged and any of the other merged urls are not defined in this projectprivate boolean
(package private) boolean
static void
int
main0
(String[] args, IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError) int
Arguments are: -jcasgeninput xxxx -jcasgenoutput xxxx -jcasgenclasspath xxxxvoid
mainForCde
(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas) void
mainForCde
(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas, String projectPathDir, boolean limitJCasGenToProjectScope, Map<String, Set<String>> mergedTypesAddingFeatures) void
mainGenerateAllTypesFromTemplates
(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas, Class jcasTypeClass, Class jcas_TypeClass) void
mainGenerateAllTypesFromTemplates
(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas, Class jcasTypeClass, Class jcas_TypeClass, String projectPathDir, boolean limitJCasGenToProjectScope, Map<String, Set<String>> mergedTypesAddingFeatures) private String
private TypeSystemDescription
(package private) String
static String
(package private) String
(package private) String
(package private) List
setDifference
(FeatureDescription[] newFeatures, FeatureDescription[] alreadyDefinedFeatures) (package private) String
(package private) String
simpleCore
(String get_set, String range, String fname, String tname_Type) (package private) String
simpleLLCore
(String get_set, String range, String fname) (package private) String
(package private) String
wrapToGetFS
(String core, String range)
-
Field Details
-
jControlModel
- See Also:
-
featureDescriptionArray0
-
reservedFeatureNames
-
noGenTypes
Set of types not generated from the CAS type set because they're already in existence as builtins in the JCas impl. and if they're generated, the generated forms are wrong. -
casCreateProperties
-
extendableBuiltInTypes
-
emptyFds
-
builtInTypeSystem
-
builtInTypes
-
resourceBundle
-
imports
-
_imports
-
classPath
String classPath -
xmlSourceFileName
String xmlSourceFileName -
cas
CAS cas -
gui
GUI gui -
merger
IMerge merger -
progressMonitor
IProgressMonitor progressMonitor -
error
-
waiter
Waiter waiter -
packageName
String packageName -
simpleClassName
String simpleClassName -
typeSystem
-
casStringType
-
tcasAnnotationType
-
mergedTypesAddingFeatures
-
projectPathDir
-
limitJCasGenToProjectScope
private boolean limitJCasGenToProjectScope -
nonImportableJavaNames
-
-
Constructor Details
-
Jg
public Jg()
-
-
Method Details
-
addBuiltInTypeInfo
-
addBuiltInTypeInfo
-
getResourceString
Returns the string from the plugin's resource bundle, or 'key' if not found. -
getString
-
getResourceBundle
Returns the plugin's resource bundle, -
driveGui
public void driveGui() -
main
-
mainForCde
public void mainForCde(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas) throws IOException - Throws:
IOException
-
mainForCde
public void mainForCde(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas, String projectPathDir, boolean limitJCasGenToProjectScope, Map<String, Set<String>> mergedTypesAddingFeatures) throws IOException- Throws:
IOException
-
mainGenerateAllTypesFromTemplates
public void mainGenerateAllTypesFromTemplates(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas, Class jcasTypeClass, Class jcas_TypeClass) throws IOException, InstantiationException, IllegalAccessException -
mainGenerateAllTypesFromTemplates
public void mainGenerateAllTypesFromTemplates(IMerge aMerger, IProgressMonitor aProgressMonitor, IError aError, String inputFile, String outputDirectory, TypeDescription[] tds, CASImpl aCas, Class jcasTypeClass, Class jcas_TypeClass, String projectPathDir, boolean limitJCasGenToProjectScope, Map<String, Set<String>> mergedTypesAddingFeatures) throws IOException, InstantiationException, IllegalAccessException -
main0
-
main1
Arguments are: -jcasgeninput xxxx -jcasgenoutput xxxx -jcasgenclasspath xxxx- Parameters:
arguments
-
-
makeMergeMessage
-
generateAllTypesFromTemplates
private void generateAllTypesFromTemplates(String outputDirectory, TypeDescription[] tds, CASImpl aCas, Class jcasTypeClass, Class jcas_TypeClass) throws IOException, InstantiationException, IllegalAccessException -
isOutOfScope
return true if td is not defined in this project, of it is defined, but is also in merged and any of the other merged urls are not defined in this project -
generateClassesFromTemplate
private void generateClassesFromTemplate(TypeDescription td, String outputDirectory, Jg.IJCasTypeTemplate jcasTypeInstance, Jg.IJCasTypeTemplate jcas_TypeInstance) throws IOException Generate type classes from the specified templates- Parameters:
td
- TypeDescription objectoutputDirectory
- output directoryjcasTypeInstance
- Template instance used to generate classjcas_TypeInstance
- Template instance used to generate class- Throws:
IOException
- -InstantiationException
- -IllegalAccessException
- -
-
getPkg
-
getPkg
-
generateClass
private void generateClass(IProgressMonitor progressMonitorGenerateClass, String outputDirectory, TypeDescription td, String sourceContents, String className, IMerge mergerGenerateClass) throws IOException - Throws:
IOException
-
removePkg
-
sc
-
getJavaPkg
-
getJavaNameWithPkg
-
hasPkgPrefix
-
getJavaName
-
getJavaName_Type
-
getJavaName
-
collectImport
-
collectImports
-
getJavaRangeType
-
isSubTypeOfAnnotation
-
hasArrayRange
-
getJavaRangeArrayElementType
-
uc1
-
getDate
String getDate() -
castResult
-
wrapToGetFS
-
simpleCore
-
simpleLLCore
-
arrayCore
-
arrayLLCore
-
arrayLLCoreChk
-
getFeatureValue
-
setFeatureValue
-
getArrayFeatureValue
-
setArrayFeatureValue
-
getGetSetNamePart
-
getGetSetArrayNamePart
-
nullBlank
-
createResourceManager
-
mergeTypeSystemImports
private TypeSystemDescription mergeTypeSystemImports(TypeSystemDescription tsd) throws ResourceInitializationException - Throws:
ResourceInitializationException
-
setDifference
-
isSameFeatureDescription
-