uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klenner <alexander.garvin.klen...@scai.fraunhofer.de>
Subject CollectionReaderFactory.createDescription with multiple output sofas
Date Thu, 29 Sep 2011 12:44:21 GMT
Hi,

I am using the  CollectionReaderFactory from uimafit to create my CollectionReaderDescription
at runtime. That works fine as long as I do not try to create CRs that produce multiple SOFAs.
My code looks like this at the moment:

Capability[] cap = new Capability[1];
cap[0] =  new Capability_impl();

cap[0].addOutputSofa("textView");     		//ascii
cap[0].addOutputSofa("imageView");		//binary
cap[0].addOutputSofa("originalFileView");	//binary
	

CollectionReaderDescription crDesc = CollectionReaderFactory
				.createDescription(RTFReader.class,
						typeSysDes,
						tp,
						fic,cap,"InputDirectory",args[0]);

Starting this CR leads to the following error:

org.apache.uima.cas.CASRuntimeException: No sofaFS with name textView found.
	at org.apache.uima.cas.impl.CASImpl.getSofa(CASImpl.java:661)
	at org.apache.uima.cas.impl.CASImpl.getView(CASImpl.java:2658)

and the same error for the other sofas as well. 

Can someone maybe provide a code snippet where a working multiple sofa CRs descriptor is created
using uimafit? I am also not sure which parameters of 
  
   TypePriorities typePriorities,
   FsIndexCollection indexes,

are mandatory in this case. (Since there is no builder with Capabilities[] but without  TypePriorities
and FsIndexCollections I guess they are needed?)


Thank you,

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: alexander.garvin.klenner@scai.fraunhofer.de
Internet: http://www.scai.fraunhofer.de



Mime
View raw message