Hi,

is there a way to change the import locations of CpeCasProcessors in a 
cpeDescriptor during the runtime of this descriptor? My code looks like this:

URL myURL=this.getClass().getResource("/desc/cpe_descriptor.xml");  //this 
folder is inide a jar file    
CpeDescription cpeDesc = UIMAFramework.getXMLParser().parseCpeDescription(new 
XMLInputSource(myURL));
                        
myURL=this.getClass().getResource("/desc/annotator/annotator1Descriptor.xml"); 
//this annotator's location is found inside the jar and URL is returned
                
cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors()[0].setSourceUrl(myURL); 

But that doesn't help. I came up with this problem when I tried to deliver some 
code completely packed in a jar file. The import locations are not valid 
anymore, they have to be replaced by URLs from getResource() for all the 
descriptors that are inside the jar file. I had the same problem with input 
parameters but those could be set by: 

cpeDesc.getAllCollectionCollectionReaders()[0]
                                
.getConfigurationParameterSettings().setParameterValue(
                                                "InputDirectory", args[0]);
        

I am looking for something similar for the import locations, but didn't find 
anything so far.

Thanks,

Alex




--
Dipl. Bioinformatiker Alexander G. Klenner
Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven, D-53754 Sankt Augustin
Tel.: +49 - 2241 - 14 - 2736
E-mail: [email protected]
Internet: http://www.scai.fraunhofer.de


Reply via email to