Posted: Wed Nov 20, 2013 3:53 am Post subject: Pattern - ESQLFile
Centurion
Joined: 10 Jan 2011 Posts: 124
I am trying to write Java code to manipulate ESQL File as a part of Pattern Authoring.
I am not sure on how to retrieve ESQLFile object.. Please help. I have tried like the below.
Code:
File esql = new File(location+"/"+patternInstanceName+"_ExemplarProject/InboundMappers/SingleTxnToISFMapper_Template.esql");
ESQLFile esqlFile = new ESQLFile(esql); //--need something that returns ESQLFile
the getEsqlModules should only return the list of Compute modules within the ESQL file.
That is, the Vector containing anything that is
Code:
CREATE COMPUTE MODULE
...
END MODULE;
If your size of the vector is 0, then likely it's not finding any Compute modules in the file you loaded.
It doesn't look like there's a way to automatically find ESQL files or any files within the pattern, you would have to use standard methods to iterate over files in the workspace, and then construct File objects that reference them.
If you then want to change the contents of the ESQL file, you have to treat it as text and manipulate it that way. There doesn't appear to be any kind of class or object that will let you manipulate ESQL statements.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum