You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2008/01/08 17:38:51 UTC
svn commit: r610062 [11/12] - in
/incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor: ./
src/main/java/org/apache/uima/aae/deployment/
src/main/java/org/apache/uima/aae/deployment/impl/
src/main/java/org/apache/uima/application/metadata...
Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/CpeDescriptorModel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/CpeDescriptorModel.java?rev=610062&r1=610061&r2=610062&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/CpeDescriptorModel.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/CpeDescriptorModel.java Tue Jan 8 08:38:45 2008
@@ -1,550 +1,550 @@
-package org.apache.uima.cpe.model;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.TaeDescription;
-import org.apache.uima.application.metadata.UimaApplication;
-import org.apache.uima.collection.CasConsumerDescription;
-import org.apache.uima.collection.CollectionReaderDescription;
-import org.apache.uima.collection.metadata.CasProcessorConfigurationParameterSettings;
-import org.apache.uima.collection.metadata.CpeCasProcessor;
-import org.apache.uima.collection.metadata.CpeCollectionReader;
-import org.apache.uima.collection.metadata.CpeCollectionReaderCasInitializer;
-import org.apache.uima.collection.metadata.CpeDescription;
-import org.apache.uima.collection.metadata.CpeDescriptorException;
-import org.apache.uima.collection.metadata.NameValuePair;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.resource.URISpecifier;
-import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.tools.debug.util.Trace;
-import org.apache.uima.util.CasCreationUtils;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-import org.xml.sax.SAXException;
-
-
-
-
-/**
- * CpeDescriptorModel
- * Collection Reader Model
- * xml Descriptor
- * Cas Initializer
- * cpeCasProcessorModelList
- * CpeCasProcessorModel 1
- * xml Descriptor
- * CpeCasProcessorModel 2
- * xml Descriptor
- *
- */
-public class CpeDescriptorModel {
-
- // UIMA Application for this CpeDescriptorModel
- protected UimaApplication mUimaApplication = null;
-
- // List of CollectionReaderModel
- protected List collectionReaderModelList = null;
-
- // List of CpeCasProcessorModel
- protected List cpeCasProcessorModelList = null;
-
- // UIMA Objects
- protected CpeDescription cpeDesc;
- protected CpeCollectionReader[] collRdrs;
- protected CpeCasProcessor[] casProcs;
-
- // List of ResourceSpecifier
- protected List resourceSpecifierList = null;
- // List of ResourceSpecifier for AnalysisEngine
- protected List analysisEngineList = null;
-
- protected List casConsumerList = null;
- protected List typeSystemList = null;
- protected TypeSystemDescription mergedTypeSystemDescription = null;
-
- /*************************************************************************/
-
- protected CpeDescriptorModel () {
- }
-
- static public CpeDescriptorModel createInstance (String cpeXmlDescriptorFile)
- {
- try {
- CpeDescription cpeDescription = UIMAFramework.getXMLParser().parseCpeDescription(new XMLInputSource(new File(cpeXmlDescriptorFile)));
- return createInstance (cpeXmlDescriptorFile, cpeDescription);
- } catch (InvalidXMLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return null;
- }
-
- static public CpeDescriptorModel createInstance (String cpeXmlDescriptorFile,
- CpeDescription cpeDescription)
- {
- CpeDescriptorModel cpeModel = new CpeDescriptorModel ();
- try {
- cpeModel.cpeDesc = cpeDescription;
-
- // Collection Reader
- cpeModel.collRdrs = cpeModel.cpeDesc.getAllCollectionCollectionReaders();
- cpeModel.collectionReaderModelList = new ArrayList();
- if (cpeModel.collRdrs != null && cpeModel.collRdrs.length>0) {
- for (int i=0; i<cpeModel.collRdrs.length; ++i) {
- cpeModel.collectionReaderModelList.add(new UimaCollectionReader(cpeModel,
- cpeModel.collRdrs[i], null));
- }
- }
-
- /*****************************************************************/
-
- // CPE Cas Processors
- cpeModel.casProcs = cpeModel.cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
- if (cpeModel.casProcs == null) {
- // Empty Cpe Descriptor
- return cpeModel;
- }
-
- // Get list of CpeCasProcessor which can be an AE or a Cas Consumer
- // For each CpeCasProcessor, get its type system (insert in cpeModel.typeSystemList)
- cpeModel.cpeCasProcessorModelList = new ArrayList();
- List specifierList = new ArrayList();
- List aeList = new ArrayList();
- List consumerList = new ArrayList();
- cpeModel.typeSystemList = new ArrayList();
- for (int i=0; i < cpeModel.casProcs.length; i++) {
- // CpeCasProcessor casProc = model.casProcs[i];
- printCpeCasProcessor(cpeModel.casProcs[i]);
- String specifierFile = cpeModel.casProcs[i].getDescriptor();
- ResourceSpecifier specifier = UIMAFramework.getXMLParser().
- parseResourceSpecifier(new XMLInputSource(specifierFile));
- specifierList.add(specifier);
- cpeModel.cpeCasProcessorModelList.add(new CpeCasProcessorModel(cpeModel, cpeModel.casProcs[i], specifier));
- if (cpeModel.isCasConsumerSpecifier(specifier)) {
- consumerList.add(specifier);
- } else {
- aeList.add(specifier);
- }
- // Get type system
- cpeModel.typeSystemList.add(getTypeSystemDescription(specifier));
- }
- if (specifierList.size() > 0)
- cpeModel.resourceSpecifierList = specifierList;
- if (aeList.size() > 0)
- cpeModel.analysisEngineList = aeList;
- if (consumerList.size() > 0)
- cpeModel.casConsumerList = consumerList;
-
- // Create Merged Type System
- cpeModel.mergedTypeSystemDescription = CasCreationUtils.mergeTypeSystems(cpeModel.typeSystemList);
- // Set Name and Description
- cpeModel.mergedTypeSystemDescription.setName("Merged Type System for ???");
- String descr = "Merge TSs of: ";
- for (int i=0; i<cpeModel.casProcs.length; ++i) {
- if (i > 0) {
- descr += ", ";
- }
- descr += ((CpeCasProcessor) cpeModel.casProcs[i]).getName();
- }
- cpeModel.mergedTypeSystemDescription.setDescription(descr);
-
- StringWriter sw = new StringWriter();
- cpeModel.mergedTypeSystemDescription.toXML(sw);
-// String taeDescString = new String(sw.toString());
- sw.close();
-
- // Trace.trace(taeDescString);
-
- } catch (InvalidXMLException e) {
- e.printStackTrace();
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- } catch (CpeDescriptorException e) {
- e.printStackTrace();
- return null;
- } catch (ResourceInitializationException e) {
- e.printStackTrace();
- } catch (SAXException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- return cpeModel;
- } // createInstance
-
- static public void printCpeCasProcessor (CpeCasProcessor cpeCasProc)
- {
- CasProcessorConfigurationParameterSettings settings = cpeCasProc.getConfigurationParameterSettings();
- if (settings != null) {
- printNameValuePairs (settings.getParameterSettings());
- }
- }
-
- static public void printNameValuePairs (NameValuePair[] nvs)
- {
- for (int i=0; i<nvs.length; ++i) {
- String name = nvs[i].getName();
- Trace.trace("Param name:" + nvs[i].getName());
- Object aValue = nvs[i].getValue();
- if (aValue == null) {
- System.out.println(" no value");
- }
- if (aValue instanceof String) {
-
- } else if (aValue instanceof Integer) {
- System.out.println(" Integer" + ((Integer) aValue).intValue());
- } else if (aValue instanceof Float) {
-
- } else if (aValue instanceof Boolean) {
-
- } else if (aValue instanceof Object[]) {
- Object[] obj = (Object[])aValue;
- System.out.println(" Object[]:" + obj.length);
- for (int k = 0; k < obj.length; k++) {
- if (obj[k] instanceof String) {
- System.out.println(" [" + k + "]:" + obj[k].toString());
- }
- else if (obj[k] instanceof Integer) {
- System.out.println(" [" + k + "]:" + ((Integer)obj[k]).intValue());
- }
- else if (obj[k] instanceof Float) {
- System.out.println(" [" + k + "]:" + ((Float)obj[k]).floatValue());
- } else if (obj[k] instanceof Boolean) {
- System.out.println(" [" + k + "]:" + ((Boolean)obj[k]).booleanValue());
- }
- }
- } else {
-
- }
- }
-
- }
-
- static public CpeDescriptorModel printCpeXmlDescriptor (String cpeXmlDescriptorFile )
- {
- CpeDescriptorModel cpeModel = new CpeDescriptorModel ();
- try {
- cpeModel.cpeDesc =
- UIMAFramework.getXMLParser().parseCpeDescription(new XMLInputSource(new File(cpeXmlDescriptorFile)));
-
- // Collection Reader
- cpeModel.collRdrs = cpeModel.cpeDesc.getAllCollectionCollectionReaders();
- cpeModel.collectionReaderModelList = new ArrayList();
- if (cpeModel.collRdrs != null && cpeModel.collRdrs.length>0) {
- for (int i=0; i<cpeModel.collRdrs.length; ++i) {
- cpeModel.collectionReaderModelList.add(new UimaCollectionReader(cpeModel,
- cpeModel.collRdrs[i], null));
- }
- }
-
- /*****************************************************************/
-
- // CPE Cas Processors
- cpeModel.casProcs = cpeModel.cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
- if (cpeModel.casProcs == null) {
- // Empty Cpe Descriptor
- return cpeModel;
- }
-
- // Get list of CpeCasProcessor which can be an AE or a Cas Consumer
- // For each CpeCasProcessor, get its type system (insert in cpeModel.typeSystemList)
- cpeModel.cpeCasProcessorModelList = new ArrayList();
- List specifierList = new ArrayList();
- List aeList = new ArrayList();
- List consumerList = new ArrayList();
- cpeModel.typeSystemList = new ArrayList();
- for (int i=0; i < cpeModel.casProcs.length; i++) {
- // CpeCasProcessor casProc = model.casProcs[i];
- String specifierFile = cpeModel.casProcs[i].getDescriptor();
- ResourceSpecifier specifier = UIMAFramework.getXMLParser().
- parseResourceSpecifier(new XMLInputSource(specifierFile));
- specifierList.add(specifier);
- cpeModel.cpeCasProcessorModelList.add(new CpeCasProcessorModel(cpeModel, cpeModel.casProcs[i], specifier));
- if (cpeModel.isCasConsumerSpecifier(specifier)) {
- consumerList.add(specifier);
- } else {
- aeList.add(specifier);
- }
- // Get type system
- cpeModel.typeSystemList.add(getTypeSystemDescription(specifier));
- }
- if (specifierList.size() > 0)
- cpeModel.resourceSpecifierList = specifierList;
- if (aeList.size() > 0)
- cpeModel.analysisEngineList = aeList;
- if (consumerList.size() > 0)
- cpeModel.casConsumerList = consumerList;
-
- // Create Merged Type System
- cpeModel.mergedTypeSystemDescription = CasCreationUtils.mergeTypeSystems(cpeModel.typeSystemList);
- // Set Name and Description
- cpeModel.mergedTypeSystemDescription.setName("Merged Type System for ???");
- String descr = "Merge TSs of: ";
- for (int i=0; i<cpeModel.casProcs.length; ++i) {
- if (i > 0) {
- descr += ", ";
- }
- descr += ((CpeCasProcessor) cpeModel.casProcs[i]).getName();
- }
- cpeModel.mergedTypeSystemDescription.setDescription(descr);
-
- StringWriter sw = new StringWriter();
- cpeModel.mergedTypeSystemDescription.toXML(sw);
-// String taeDescString = new String(sw.toString());
- sw.close();
-
- // Trace.trace(taeDescString);
-
- } catch (InvalidXMLException e) {
- e.printStackTrace();
- return null;
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- } catch (CpeDescriptorException e) {
- e.printStackTrace();
- return null;
- } catch (ResourceInitializationException e) {
- e.printStackTrace();
- } catch (SAXException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- return cpeModel;
- } // createInstance
-
- /*************************************************************************/
-
- static public TypeSystemDescription getTypeSystemDescription (ResourceSpecifier specifier)
- {
- TypeSystemDescription tsDescription = null;
-
- try {
- if (specifier instanceof TaeDescription) {
- TaeDescription tae = (TaeDescription) specifier;
- if ( tae.isPrimitive() ) {
- tsDescription = tae.getAnalysisEngineMetaData().getTypeSystem();
- } else {
- tsDescription = CasCreationUtils.mergeDelegateAnalysisEngineTypeSystems(tae);
- }
- } else if (specifier instanceof CasConsumerDescription) {
- CasConsumerDescription ccDescr = (CasConsumerDescription) specifier;
- tsDescription = ccDescr.getCasConsumerMetaData().getTypeSystem();
- } else if (specifier instanceof CollectionReaderDescription) {
- CollectionReaderDescription crDescr = (CollectionReaderDescription) specifier;
- tsDescription = crDescr.getCollectionReaderMetaData().getTypeSystem();
- }
- } catch (ResourceInitializationException e) {
- e.printStackTrace();
- }
-
- return tsDescription;
- } // getTypeSystemDescription
-
- /**
- * Return true if the ResourceSpecifier is CasConsumerDescription
- *
- * @param specifier
- * @return
- * @return boolean
- */
- private boolean isCasConsumerSpecifier(ResourceSpecifier specifier)
- {
- if (specifier instanceof CasConsumerDescription) {
- return true;
- } else if (specifier instanceof URISpecifier) {
- URISpecifier uriSpec = (URISpecifier)specifier;
- return URISpecifier.RESOURCE_TYPE_CAS_CONSUMER.equals(uriSpec.getResourceType());
- }
- return false;
- }
-
- private void openCpeDescriptor (File aFile) throws InvalidXMLException,
- IOException, CpeDescriptorException
- {
- // Parse
- cpeDesc =
- UIMAFramework.getXMLParser().parseCpeDescription(new XMLInputSource(aFile));
-
- // Collection Reader
- collRdrs = cpeDesc.getAllCollectionCollectionReaders(); //more than one??
- CpeCollectionReader collRdr = null;
- if (collRdrs != null && collRdrs.length > 0) {
- // collRdr.getDescriptor().getInclude().get();
- collRdr = collRdrs[0];
- }
-
- // CAS Initializer
- CpeCollectionReaderCasInitializer casIni = null;
- if (collRdr != null) {
- casIni = collRdr.getCasInitializer();
- }
- if (casIni != null) {
- String casIniDescFile = casIni.getDescriptor().getInclude().get();
- }
-
- // CAS Processors
- casProcs = cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
- for (int i=0; i < casProcs.length; i++) {
- CpeCasProcessor casProc = casProcs[i];
- String specifierFile = casProcs[i].getDescriptor();
- ResourceSpecifier specifier = UIMAFramework.getXMLParser().
- parseResourceSpecifier(new XMLInputSource(specifierFile));
-// if (isCasConsumerSpecifier(specifier)) {
-// addConsumer(specifierFile);
-// } else {
-// addTae(specifierFile);
-// }
- }
- }
-
- /*************************************************************************/
-
- public void setUimaApplication (UimaApplication model) {
- mUimaApplication = model;
- }
-
-// public UimaCasProcessor getUimaCasProcessor(String casProcessorName) {
-// return mUimaApplication.getUimaCasProcessor(casProcessorName);
-// }
-
- /*************************************************************************/
-
- /**
- * @return Returns the casProcs.
- */
- public CpeCasProcessor[] getCasProcs() {
- return casProcs;
- }
-
- /**
- * @param casProcs The casProcs to set.
- */
- public void setCasProcs(CpeCasProcessor[] casProcs) {
- this.casProcs = casProcs;
- }
-
- /**
- * @return Returns the collRdrs.
- */
- public CpeCollectionReader[] getCollRdrs() {
- return collRdrs;
- }
-
- /**
- * @param collRdrs The collRdrs to set.
- */
- public void setCollRdrs(CpeCollectionReader[] collRdrs) {
- this.collRdrs = collRdrs;
- }
-
- /**
- * @return Returns the cpeDesc.
- */
- public CpeDescription getCpeDesc() {
- return cpeDesc;
- }
-
- /**
- * @param cpeDesc The cpeDesc to set.
- */
- public void setCpeDesc(CpeDescription cpeDesc) {
- this.cpeDesc = cpeDesc;
- }
-
- /**
- * @return Returns the analysisEngineList.
- */
- public List getAnalysisEngineList() {
- return analysisEngineList;
- }
-
- /**
- * @param analysisEngineList The analysisEngineList to set.
- */
- public void setAnalysisEngineList(List analysisEngineList) {
- this.analysisEngineList = analysisEngineList;
- }
-
- /**
- * @return Returns the casConsumerList.
- */
- public List getCasConsumerList() {
- return casConsumerList;
- }
-
- /**
- * @param casConsumerList The casConsumerList to set.
- */
- public void setCasConsumerList(List casConsumerList) {
- this.casConsumerList = casConsumerList;
- }
-
- /**
- * @return Returns the mergedTypeSystemDescription.
- */
- public TypeSystemDescription getMergedTypeSystemDescription() {
- return mergedTypeSystemDescription;
- }
-
- /**
- * @return Returns the resourceSpecifierList.
- */
- public List getResourceSpecifierList() {
- return resourceSpecifierList;
- }
-
- /**
- * @return Returns the cpeCasProcessorModelList.
- */
- public List getCpeCasProcessorModelList() {
- return cpeCasProcessorModelList;
- }
-
- /**
- * @param cpeCasProcessorModelList The cpeCasProcessorModelList to set.
- */
- public void setCpeCasProcessorModelList(List cpeCasProcessorModelList) {
- this.cpeCasProcessorModelList = cpeCasProcessorModelList;
- }
-
- public CpeCasProcessorModel getCpeCasProcessorModel (String name)
- {
-
- for (int i=0; i<cpeCasProcessorModelList.size(); ++i) {
- if ( name.equals(((CpeCasProcessorModel) cpeCasProcessorModelList.get(i)).getName()) ) {
- return (CpeCasProcessorModel) cpeCasProcessorModelList.get(i);
- }
- }
- Trace.trace(" *** Cannot find CpeCasProcessorModel: " + name + " ***");
- return null;
- }
-
- /**
- * @return Returns the collectionReaderModelList.
- */
- public List getCollectionReaderModelList() {
- return collectionReaderModelList;
- }
-
- /**
- * @param collectionReaderModelList The collectionReaderModelList to set.
- */
- public void setCollectionReaderModelList(List collectionReaderModelList) {
- this.collectionReaderModelList = collectionReaderModelList;
- }
-
-
-}
+package org.apache.uima.cpe.model;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.analysis_engine.TaeDescription;
+import org.apache.uima.application.metadata.UimaApplication;
+import org.apache.uima.collection.CasConsumerDescription;
+import org.apache.uima.collection.CollectionReaderDescription;
+import org.apache.uima.collection.metadata.CasProcessorConfigurationParameterSettings;
+import org.apache.uima.collection.metadata.CpeCasProcessor;
+import org.apache.uima.collection.metadata.CpeCollectionReader;
+import org.apache.uima.collection.metadata.CpeCollectionReaderCasInitializer;
+import org.apache.uima.collection.metadata.CpeDescription;
+import org.apache.uima.collection.metadata.CpeDescriptorException;
+import org.apache.uima.collection.metadata.NameValuePair;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.apache.uima.resource.ResourceSpecifier;
+import org.apache.uima.resource.URISpecifier;
+import org.apache.uima.resource.metadata.TypeSystemDescription;
+import org.apache.uima.tools.debug.util.Trace;
+import org.apache.uima.util.CasCreationUtils;
+import org.apache.uima.util.InvalidXMLException;
+import org.apache.uima.util.XMLInputSource;
+import org.xml.sax.SAXException;
+
+
+
+
+/**
+ * CpeDescriptorModel
+ * Collection Reader Model
+ * xml Descriptor
+ * Cas Initializer
+ * cpeCasProcessorModelList
+ * CpeCasProcessorModel 1
+ * xml Descriptor
+ * CpeCasProcessorModel 2
+ * xml Descriptor
+ *
+ */
+public class CpeDescriptorModel {
+
+ // UIMA Application for this CpeDescriptorModel
+ protected UimaApplication mUimaApplication = null;
+
+ // List of CollectionReaderModel
+ protected List collectionReaderModelList = null;
+
+ // List of CpeCasProcessorModel
+ protected List cpeCasProcessorModelList = null;
+
+ // UIMA Objects
+ protected CpeDescription cpeDesc;
+ protected CpeCollectionReader[] collRdrs;
+ protected CpeCasProcessor[] casProcs;
+
+ // List of ResourceSpecifier
+ protected List resourceSpecifierList = null;
+ // List of ResourceSpecifier for AnalysisEngine
+ protected List analysisEngineList = null;
+
+ protected List casConsumerList = null;
+ protected List typeSystemList = null;
+ protected TypeSystemDescription mergedTypeSystemDescription = null;
+
+ /*************************************************************************/
+
+ protected CpeDescriptorModel () {
+ }
+
+ static public CpeDescriptorModel createInstance (String cpeXmlDescriptorFile)
+ {
+ try {
+ CpeDescription cpeDescription = UIMAFramework.getXMLParser().parseCpeDescription(new XMLInputSource(new File(cpeXmlDescriptorFile)));
+ return createInstance (cpeXmlDescriptorFile, cpeDescription);
+ } catch (InvalidXMLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ static public CpeDescriptorModel createInstance (String cpeXmlDescriptorFile,
+ CpeDescription cpeDescription)
+ {
+ CpeDescriptorModel cpeModel = new CpeDescriptorModel ();
+ try {
+ cpeModel.cpeDesc = cpeDescription;
+
+ // Collection Reader
+ cpeModel.collRdrs = cpeModel.cpeDesc.getAllCollectionCollectionReaders();
+ cpeModel.collectionReaderModelList = new ArrayList();
+ if (cpeModel.collRdrs != null && cpeModel.collRdrs.length>0) {
+ for (int i=0; i<cpeModel.collRdrs.length; ++i) {
+ cpeModel.collectionReaderModelList.add(new UimaCollectionReader(cpeModel,
+ cpeModel.collRdrs[i], null));
+ }
+ }
+
+ /*****************************************************************/
+
+ // CPE Cas Processors
+ cpeModel.casProcs = cpeModel.cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
+ if (cpeModel.casProcs == null) {
+ // Empty Cpe Descriptor
+ return cpeModel;
+ }
+
+ // Get list of CpeCasProcessor which can be an AE or a Cas Consumer
+ // For each CpeCasProcessor, get its type system (insert in cpeModel.typeSystemList)
+ cpeModel.cpeCasProcessorModelList = new ArrayList();
+ List specifierList = new ArrayList();
+ List aeList = new ArrayList();
+ List consumerList = new ArrayList();
+ cpeModel.typeSystemList = new ArrayList();
+ for (int i=0; i < cpeModel.casProcs.length; i++) {
+ // CpeCasProcessor casProc = model.casProcs[i];
+ printCpeCasProcessor(cpeModel.casProcs[i]);
+ String specifierFile = cpeModel.casProcs[i].getDescriptor();
+ ResourceSpecifier specifier = UIMAFramework.getXMLParser().
+ parseResourceSpecifier(new XMLInputSource(specifierFile));
+ specifierList.add(specifier);
+ cpeModel.cpeCasProcessorModelList.add(new CpeCasProcessorModel(cpeModel, cpeModel.casProcs[i], specifier));
+ if (cpeModel.isCasConsumerSpecifier(specifier)) {
+ consumerList.add(specifier);
+ } else {
+ aeList.add(specifier);
+ }
+ // Get type system
+ cpeModel.typeSystemList.add(getTypeSystemDescription(specifier));
+ }
+ if (specifierList.size() > 0)
+ cpeModel.resourceSpecifierList = specifierList;
+ if (aeList.size() > 0)
+ cpeModel.analysisEngineList = aeList;
+ if (consumerList.size() > 0)
+ cpeModel.casConsumerList = consumerList;
+
+ // Create Merged Type System
+ cpeModel.mergedTypeSystemDescription = CasCreationUtils.mergeTypeSystems(cpeModel.typeSystemList);
+ // Set Name and Description
+ cpeModel.mergedTypeSystemDescription.setName("Merged Type System for ???");
+ String descr = "Merge TSs of: ";
+ for (int i=0; i<cpeModel.casProcs.length; ++i) {
+ if (i > 0) {
+ descr += ", ";
+ }
+ descr += ((CpeCasProcessor) cpeModel.casProcs[i]).getName();
+ }
+ cpeModel.mergedTypeSystemDescription.setDescription(descr);
+
+ StringWriter sw = new StringWriter();
+ cpeModel.mergedTypeSystemDescription.toXML(sw);
+// String taeDescString = new String(sw.toString());
+ sw.close();
+
+ // Trace.trace(taeDescString);
+
+ } catch (InvalidXMLException e) {
+ e.printStackTrace();
+ return null;
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ } catch (CpeDescriptorException e) {
+ e.printStackTrace();
+ return null;
+ } catch (ResourceInitializationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return cpeModel;
+ } // createInstance
+
+ static public void printCpeCasProcessor (CpeCasProcessor cpeCasProc)
+ {
+ CasProcessorConfigurationParameterSettings settings = cpeCasProc.getConfigurationParameterSettings();
+ if (settings != null) {
+ printNameValuePairs (settings.getParameterSettings());
+ }
+ }
+
+ static public void printNameValuePairs (NameValuePair[] nvs)
+ {
+ for (int i=0; i<nvs.length; ++i) {
+ String name = nvs[i].getName();
+ Trace.trace("Param name:" + nvs[i].getName());
+ Object aValue = nvs[i].getValue();
+ if (aValue == null) {
+ System.out.println(" no value");
+ }
+ if (aValue instanceof String) {
+
+ } else if (aValue instanceof Integer) {
+ System.out.println(" Integer" + ((Integer) aValue).intValue());
+ } else if (aValue instanceof Float) {
+
+ } else if (aValue instanceof Boolean) {
+
+ } else if (aValue instanceof Object[]) {
+ Object[] obj = (Object[])aValue;
+ System.out.println(" Object[]:" + obj.length);
+ for (int k = 0; k < obj.length; k++) {
+ if (obj[k] instanceof String) {
+ System.out.println(" [" + k + "]:" + obj[k].toString());
+ }
+ else if (obj[k] instanceof Integer) {
+ System.out.println(" [" + k + "]:" + ((Integer)obj[k]).intValue());
+ }
+ else if (obj[k] instanceof Float) {
+ System.out.println(" [" + k + "]:" + ((Float)obj[k]).floatValue());
+ } else if (obj[k] instanceof Boolean) {
+ System.out.println(" [" + k + "]:" + ((Boolean)obj[k]).booleanValue());
+ }
+ }
+ } else {
+
+ }
+ }
+
+ }
+
+ static public CpeDescriptorModel printCpeXmlDescriptor (String cpeXmlDescriptorFile )
+ {
+ CpeDescriptorModel cpeModel = new CpeDescriptorModel ();
+ try {
+ cpeModel.cpeDesc =
+ UIMAFramework.getXMLParser().parseCpeDescription(new XMLInputSource(new File(cpeXmlDescriptorFile)));
+
+ // Collection Reader
+ cpeModel.collRdrs = cpeModel.cpeDesc.getAllCollectionCollectionReaders();
+ cpeModel.collectionReaderModelList = new ArrayList();
+ if (cpeModel.collRdrs != null && cpeModel.collRdrs.length>0) {
+ for (int i=0; i<cpeModel.collRdrs.length; ++i) {
+ cpeModel.collectionReaderModelList.add(new UimaCollectionReader(cpeModel,
+ cpeModel.collRdrs[i], null));
+ }
+ }
+
+ /*****************************************************************/
+
+ // CPE Cas Processors
+ cpeModel.casProcs = cpeModel.cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
+ if (cpeModel.casProcs == null) {
+ // Empty Cpe Descriptor
+ return cpeModel;
+ }
+
+ // Get list of CpeCasProcessor which can be an AE or a Cas Consumer
+ // For each CpeCasProcessor, get its type system (insert in cpeModel.typeSystemList)
+ cpeModel.cpeCasProcessorModelList = new ArrayList();
+ List specifierList = new ArrayList();
+ List aeList = new ArrayList();
+ List consumerList = new ArrayList();
+ cpeModel.typeSystemList = new ArrayList();
+ for (int i=0; i < cpeModel.casProcs.length; i++) {
+ // CpeCasProcessor casProc = model.casProcs[i];
+ String specifierFile = cpeModel.casProcs[i].getDescriptor();
+ ResourceSpecifier specifier = UIMAFramework.getXMLParser().
+ parseResourceSpecifier(new XMLInputSource(specifierFile));
+ specifierList.add(specifier);
+ cpeModel.cpeCasProcessorModelList.add(new CpeCasProcessorModel(cpeModel, cpeModel.casProcs[i], specifier));
+ if (cpeModel.isCasConsumerSpecifier(specifier)) {
+ consumerList.add(specifier);
+ } else {
+ aeList.add(specifier);
+ }
+ // Get type system
+ cpeModel.typeSystemList.add(getTypeSystemDescription(specifier));
+ }
+ if (specifierList.size() > 0)
+ cpeModel.resourceSpecifierList = specifierList;
+ if (aeList.size() > 0)
+ cpeModel.analysisEngineList = aeList;
+ if (consumerList.size() > 0)
+ cpeModel.casConsumerList = consumerList;
+
+ // Create Merged Type System
+ cpeModel.mergedTypeSystemDescription = CasCreationUtils.mergeTypeSystems(cpeModel.typeSystemList);
+ // Set Name and Description
+ cpeModel.mergedTypeSystemDescription.setName("Merged Type System for ???");
+ String descr = "Merge TSs of: ";
+ for (int i=0; i<cpeModel.casProcs.length; ++i) {
+ if (i > 0) {
+ descr += ", ";
+ }
+ descr += ((CpeCasProcessor) cpeModel.casProcs[i]).getName();
+ }
+ cpeModel.mergedTypeSystemDescription.setDescription(descr);
+
+ StringWriter sw = new StringWriter();
+ cpeModel.mergedTypeSystemDescription.toXML(sw);
+// String taeDescString = new String(sw.toString());
+ sw.close();
+
+ // Trace.trace(taeDescString);
+
+ } catch (InvalidXMLException e) {
+ e.printStackTrace();
+ return null;
+ } catch (IOException e) {
+ e.printStackTrace();
+ return null;
+ } catch (CpeDescriptorException e) {
+ e.printStackTrace();
+ return null;
+ } catch (ResourceInitializationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return cpeModel;
+ } // createInstance
+
+ /*************************************************************************/
+
+ static public TypeSystemDescription getTypeSystemDescription (ResourceSpecifier specifier)
+ {
+ TypeSystemDescription tsDescription = null;
+
+ try {
+ if (specifier instanceof TaeDescription) {
+ TaeDescription tae = (TaeDescription) specifier;
+ if ( tae.isPrimitive() ) {
+ tsDescription = tae.getAnalysisEngineMetaData().getTypeSystem();
+ } else {
+ tsDescription = CasCreationUtils.mergeDelegateAnalysisEngineTypeSystems(tae);
+ }
+ } else if (specifier instanceof CasConsumerDescription) {
+ CasConsumerDescription ccDescr = (CasConsumerDescription) specifier;
+ tsDescription = ccDescr.getCasConsumerMetaData().getTypeSystem();
+ } else if (specifier instanceof CollectionReaderDescription) {
+ CollectionReaderDescription crDescr = (CollectionReaderDescription) specifier;
+ tsDescription = crDescr.getCollectionReaderMetaData().getTypeSystem();
+ }
+ } catch (ResourceInitializationException e) {
+ e.printStackTrace();
+ }
+
+ return tsDescription;
+ } // getTypeSystemDescription
+
+ /**
+ * Return true if the ResourceSpecifier is CasConsumerDescription
+ *
+ * @param specifier
+ * @return
+ * @return boolean
+ */
+ private boolean isCasConsumerSpecifier(ResourceSpecifier specifier)
+ {
+ if (specifier instanceof CasConsumerDescription) {
+ return true;
+ } else if (specifier instanceof URISpecifier) {
+ URISpecifier uriSpec = (URISpecifier)specifier;
+ return URISpecifier.RESOURCE_TYPE_CAS_CONSUMER.equals(uriSpec.getResourceType());
+ }
+ return false;
+ }
+
+ private void openCpeDescriptor (File aFile) throws InvalidXMLException,
+ IOException, CpeDescriptorException
+ {
+ // Parse
+ cpeDesc =
+ UIMAFramework.getXMLParser().parseCpeDescription(new XMLInputSource(aFile));
+
+ // Collection Reader
+ collRdrs = cpeDesc.getAllCollectionCollectionReaders(); //more than one??
+ CpeCollectionReader collRdr = null;
+ if (collRdrs != null && collRdrs.length > 0) {
+ // collRdr.getDescriptor().getInclude().get();
+ collRdr = collRdrs[0];
+ }
+
+ // CAS Initializer
+ CpeCollectionReaderCasInitializer casIni = null;
+ if (collRdr != null) {
+ casIni = collRdr.getCasInitializer();
+ }
+ if (casIni != null) {
+ String casIniDescFile = casIni.getDescriptor().getInclude().get();
+ }
+
+ // CAS Processors
+ casProcs = cpeDesc.getCpeCasProcessors().getAllCpeCasProcessors();
+ for (int i=0; i < casProcs.length; i++) {
+ CpeCasProcessor casProc = casProcs[i];
+ String specifierFile = casProcs[i].getDescriptor();
+ ResourceSpecifier specifier = UIMAFramework.getXMLParser().
+ parseResourceSpecifier(new XMLInputSource(specifierFile));
+// if (isCasConsumerSpecifier(specifier)) {
+// addConsumer(specifierFile);
+// } else {
+// addTae(specifierFile);
+// }
+ }
+ }
+
+ /*************************************************************************/
+
+ public void setUimaApplication (UimaApplication model) {
+ mUimaApplication = model;
+ }
+
+// public UimaCasProcessor getUimaCasProcessor(String casProcessorName) {
+// return mUimaApplication.getUimaCasProcessor(casProcessorName);
+// }
+
+ /*************************************************************************/
+
+ /**
+ * @return Returns the casProcs.
+ */
+ public CpeCasProcessor[] getCasProcs() {
+ return casProcs;
+ }
+
+ /**
+ * @param casProcs The casProcs to set.
+ */
+ public void setCasProcs(CpeCasProcessor[] casProcs) {
+ this.casProcs = casProcs;
+ }
+
+ /**
+ * @return Returns the collRdrs.
+ */
+ public CpeCollectionReader[] getCollRdrs() {
+ return collRdrs;
+ }
+
+ /**
+ * @param collRdrs The collRdrs to set.
+ */
+ public void setCollRdrs(CpeCollectionReader[] collRdrs) {
+ this.collRdrs = collRdrs;
+ }
+
+ /**
+ * @return Returns the cpeDesc.
+ */
+ public CpeDescription getCpeDesc() {
+ return cpeDesc;
+ }
+
+ /**
+ * @param cpeDesc The cpeDesc to set.
+ */
+ public void setCpeDesc(CpeDescription cpeDesc) {
+ this.cpeDesc = cpeDesc;
+ }
+
+ /**
+ * @return Returns the analysisEngineList.
+ */
+ public List getAnalysisEngineList() {
+ return analysisEngineList;
+ }
+
+ /**
+ * @param analysisEngineList The analysisEngineList to set.
+ */
+ public void setAnalysisEngineList(List analysisEngineList) {
+ this.analysisEngineList = analysisEngineList;
+ }
+
+ /**
+ * @return Returns the casConsumerList.
+ */
+ public List getCasConsumerList() {
+ return casConsumerList;
+ }
+
+ /**
+ * @param casConsumerList The casConsumerList to set.
+ */
+ public void setCasConsumerList(List casConsumerList) {
+ this.casConsumerList = casConsumerList;
+ }
+
+ /**
+ * @return Returns the mergedTypeSystemDescription.
+ */
+ public TypeSystemDescription getMergedTypeSystemDescription() {
+ return mergedTypeSystemDescription;
+ }
+
+ /**
+ * @return Returns the resourceSpecifierList.
+ */
+ public List getResourceSpecifierList() {
+ return resourceSpecifierList;
+ }
+
+ /**
+ * @return Returns the cpeCasProcessorModelList.
+ */
+ public List getCpeCasProcessorModelList() {
+ return cpeCasProcessorModelList;
+ }
+
+ /**
+ * @param cpeCasProcessorModelList The cpeCasProcessorModelList to set.
+ */
+ public void setCpeCasProcessorModelList(List cpeCasProcessorModelList) {
+ this.cpeCasProcessorModelList = cpeCasProcessorModelList;
+ }
+
+ public CpeCasProcessorModel getCpeCasProcessorModel (String name)
+ {
+
+ for (int i=0; i<cpeCasProcessorModelList.size(); ++i) {
+ if ( name.equals(((CpeCasProcessorModel) cpeCasProcessorModelList.get(i)).getName()) ) {
+ return (CpeCasProcessorModel) cpeCasProcessorModelList.get(i);
+ }
+ }
+ Trace.trace(" *** Cannot find CpeCasProcessorModel: " + name + " ***");
+ return null;
+ }
+
+ /**
+ * @return Returns the collectionReaderModelList.
+ */
+ public List getCollectionReaderModelList() {
+ return collectionReaderModelList;
+ }
+
+ /**
+ * @param collectionReaderModelList The collectionReaderModelList to set.
+ */
+ public void setCollectionReaderModelList(List collectionReaderModelList) {
+ this.collectionReaderModelList = collectionReaderModelList;
+ }
+
+
+}
Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/CpeDescriptorModel.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/DefaultCasProcessorSettings.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/DefaultCasProcessorSettings.java?rev=610062&r1=610061&r2=610062&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/DefaultCasProcessorSettings.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/DefaultCasProcessorSettings.java Tue Jan 8 08:38:45 2008
@@ -1,192 +1,192 @@
-/**
- *
- * Project UIMA Tooling
- *
- *
- * creation date: Feb 24, 2006, 5:27:39 PM
- * source: DefaultCasProcessorSettings.java
- */
-package org.apache.uima.cpe.model;
-
-import org.apache.uima.collection.metadata.CasProcessorErrorHandling;
-import org.apache.uima.collection.metadata.CasProcessorErrorRateThreshold;
-import org.apache.uima.collection.metadata.CasProcessorMaxRestarts;
-import org.apache.uima.collection.metadata.CasProcessorTimeout;
-import org.apache.uima.collection.metadata.CpeCheckpoint;
-import org.apache.uima.collection.metadata.CpeDescriptorException;
-
-
-/**
- * Default settings for each Cas Processor in CPE descriptor.
- *
- */
-public class DefaultCasProcessorSettings {
-
- protected CasProcessorErrorHandling errorHandling = null;
- protected CpeCheckpoint cpeCheckpoint = null;
- protected int casProcBatchSize = -1;
- /**
- *
- */
- public DefaultCasProcessorSettings() {
- super();
- }
-
- public void removeAll()
- {
- errorHandling = null;
- cpeCheckpoint = null;
- casProcBatchSize = -1;
- }
- /**
- * @return Returns the cpeCheckpoint.
- */
- public CpeCheckpoint getCpeCheckpoint() {
- return cpeCheckpoint;
- }
-
- /**
- * @param cpeCheckpoint The cpeCheckpoint to set.
- */
- public void setCpeCheckpoint(CpeCheckpoint cpeCheckpoint) {
- this.cpeCheckpoint = cpeCheckpoint;
- }
-
- /**
- * @return Returns the errorHandling.
- */
- public CasProcessorErrorHandling getErrorHandling() {
- return errorHandling;
- }
-
- public boolean copyErrorHandlingValue (CasProcessorErrorHandling toErrorhandling)
- {
- if (errorHandling == null) {
- // No value to be copied
- return false;
- }
- toErrorhandling.getErrorRateThreshold().setAction(
- errorHandling.getErrorRateThreshold().getAction());
- toErrorhandling.getErrorRateThreshold().setMaxErrorCount(
- errorHandling.getErrorRateThreshold().getMaxErrorCount());
- toErrorhandling.getErrorRateThreshold().setMaxErrorSampleSize(
- errorHandling.getErrorRateThreshold().getMaxErrorSampleSize());
-
- return true;
- }
-
- /**
- * @param errorHandling The errorHandling to set.
- */
- public void setErrorHandling(CasProcessorErrorHandling errorHandling) {
- this.errorHandling = errorHandling;
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#getBatchSize()
- */
-// public int getBatchSize() {
-// return cpeCheckpoint.getBatchSize();
-// }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#getFilePath()
- */
- public String getFilePath() {
- return cpeCheckpoint.getFilePath();
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#getFrequency()
- */
- public int getFrequency() {
- return cpeCheckpoint.getFrequency();
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#isTimeBased()
- */
- public boolean isTimeBased() {
- return cpeCheckpoint.isTimeBased();
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#setBatchSize(int)
- */
-// public void setBatchSize(int arg0) {
-// cpeCheckpoint.setBatchSize(arg0);
-// }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#setFilePath(java.lang.String)
- */
- public void setFilePath(String arg0) throws CpeDescriptorException {
- cpeCheckpoint.setFilePath(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CpeCheckpoint#setFrequency(int, boolean)
- */
- public void setFrequency(int arg0, boolean arg1) {
- cpeCheckpoint.setFrequency(arg0, arg1);
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#getErrorRateThreshold()
- */
- public CasProcessorErrorRateThreshold getErrorRateThreshold() {
- return errorHandling.getErrorRateThreshold();
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#getMaxConsecutiveRestarts()
- */
- public CasProcessorMaxRestarts getMaxConsecutiveRestarts() {
- return errorHandling.getMaxConsecutiveRestarts();
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#getTimeout()
- */
- public CasProcessorTimeout getTimeout() {
- return errorHandling.getTimeout();
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#setErrorRateThreshold(org.apache.uima.collection.metadata.CasProcessorErrorRateThreshold)
- */
- public void setErrorRateThreshold(CasProcessorErrorRateThreshold arg0) {
- errorHandling.setErrorRateThreshold(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#setMaxConsecutiveRestarts(org.apache.uima.collection.metadata.CasProcessorMaxRestarts)
- */
- public void setMaxConsecutiveRestarts(CasProcessorMaxRestarts arg0) {
- errorHandling.setMaxConsecutiveRestarts(arg0);
- }
-
- /* (non-Javadoc)
- * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#setTimeout(org.apache.uima.collection.metadata.CasProcessorTimeout)
- */
- public void setTimeout(CasProcessorTimeout arg0) {
- errorHandling.setTimeout(arg0);
- }
-
- /**
- * @return Returns the casProcBatchSize.
- */
- public int getCasProcBatchSize() {
- return casProcBatchSize;
- }
-
- /**
- * @param casProcBatchSize The casProcBatchSize to set.
- */
- public void setCasProcBatchSize(int casProcBatchSize) {
- this.casProcBatchSize = casProcBatchSize;
- }
- public void removeCasProcBatchSize() {
- this.casProcBatchSize = -1;
- }
-}
+/**
+ *
+ * Project UIMA Tooling
+ *
+ *
+ * creation date: Feb 24, 2006, 5:27:39 PM
+ * source: DefaultCasProcessorSettings.java
+ */
+package org.apache.uima.cpe.model;
+
+import org.apache.uima.collection.metadata.CasProcessorErrorHandling;
+import org.apache.uima.collection.metadata.CasProcessorErrorRateThreshold;
+import org.apache.uima.collection.metadata.CasProcessorMaxRestarts;
+import org.apache.uima.collection.metadata.CasProcessorTimeout;
+import org.apache.uima.collection.metadata.CpeCheckpoint;
+import org.apache.uima.collection.metadata.CpeDescriptorException;
+
+
+/**
+ * Default settings for each Cas Processor in CPE descriptor.
+ *
+ */
+public class DefaultCasProcessorSettings {
+
+ protected CasProcessorErrorHandling errorHandling = null;
+ protected CpeCheckpoint cpeCheckpoint = null;
+ protected int casProcBatchSize = -1;
+ /**
+ *
+ */
+ public DefaultCasProcessorSettings() {
+ super();
+ }
+
+ public void removeAll()
+ {
+ errorHandling = null;
+ cpeCheckpoint = null;
+ casProcBatchSize = -1;
+ }
+ /**
+ * @return Returns the cpeCheckpoint.
+ */
+ public CpeCheckpoint getCpeCheckpoint() {
+ return cpeCheckpoint;
+ }
+
+ /**
+ * @param cpeCheckpoint The cpeCheckpoint to set.
+ */
+ public void setCpeCheckpoint(CpeCheckpoint cpeCheckpoint) {
+ this.cpeCheckpoint = cpeCheckpoint;
+ }
+
+ /**
+ * @return Returns the errorHandling.
+ */
+ public CasProcessorErrorHandling getErrorHandling() {
+ return errorHandling;
+ }
+
+ public boolean copyErrorHandlingValue (CasProcessorErrorHandling toErrorhandling)
+ {
+ if (errorHandling == null) {
+ // No value to be copied
+ return false;
+ }
+ toErrorhandling.getErrorRateThreshold().setAction(
+ errorHandling.getErrorRateThreshold().getAction());
+ toErrorhandling.getErrorRateThreshold().setMaxErrorCount(
+ errorHandling.getErrorRateThreshold().getMaxErrorCount());
+ toErrorhandling.getErrorRateThreshold().setMaxErrorSampleSize(
+ errorHandling.getErrorRateThreshold().getMaxErrorSampleSize());
+
+ return true;
+ }
+
+ /**
+ * @param errorHandling The errorHandling to set.
+ */
+ public void setErrorHandling(CasProcessorErrorHandling errorHandling) {
+ this.errorHandling = errorHandling;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#getBatchSize()
+ */
+// public int getBatchSize() {
+// return cpeCheckpoint.getBatchSize();
+// }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#getFilePath()
+ */
+ public String getFilePath() {
+ return cpeCheckpoint.getFilePath();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#getFrequency()
+ */
+ public int getFrequency() {
+ return cpeCheckpoint.getFrequency();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#isTimeBased()
+ */
+ public boolean isTimeBased() {
+ return cpeCheckpoint.isTimeBased();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#setBatchSize(int)
+ */
+// public void setBatchSize(int arg0) {
+// cpeCheckpoint.setBatchSize(arg0);
+// }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#setFilePath(java.lang.String)
+ */
+ public void setFilePath(String arg0) throws CpeDescriptorException {
+ cpeCheckpoint.setFilePath(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CpeCheckpoint#setFrequency(int, boolean)
+ */
+ public void setFrequency(int arg0, boolean arg1) {
+ cpeCheckpoint.setFrequency(arg0, arg1);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#getErrorRateThreshold()
+ */
+ public CasProcessorErrorRateThreshold getErrorRateThreshold() {
+ return errorHandling.getErrorRateThreshold();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#getMaxConsecutiveRestarts()
+ */
+ public CasProcessorMaxRestarts getMaxConsecutiveRestarts() {
+ return errorHandling.getMaxConsecutiveRestarts();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#getTimeout()
+ */
+ public CasProcessorTimeout getTimeout() {
+ return errorHandling.getTimeout();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#setErrorRateThreshold(org.apache.uima.collection.metadata.CasProcessorErrorRateThreshold)
+ */
+ public void setErrorRateThreshold(CasProcessorErrorRateThreshold arg0) {
+ errorHandling.setErrorRateThreshold(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#setMaxConsecutiveRestarts(org.apache.uima.collection.metadata.CasProcessorMaxRestarts)
+ */
+ public void setMaxConsecutiveRestarts(CasProcessorMaxRestarts arg0) {
+ errorHandling.setMaxConsecutiveRestarts(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.uima.collection.metadata.CasProcessorErrorHandling#setTimeout(org.apache.uima.collection.metadata.CasProcessorTimeout)
+ */
+ public void setTimeout(CasProcessorTimeout arg0) {
+ errorHandling.setTimeout(arg0);
+ }
+
+ /**
+ * @return Returns the casProcBatchSize.
+ */
+ public int getCasProcBatchSize() {
+ return casProcBatchSize;
+ }
+
+ /**
+ * @param casProcBatchSize The casProcBatchSize to set.
+ */
+ public void setCasProcBatchSize(int casProcBatchSize) {
+ this.casProcBatchSize = casProcBatchSize;
+ }
+ public void removeCasProcBatchSize() {
+ this.casProcBatchSize = -1;
+ }
+}
Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/DefaultCasProcessorSettings.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/Node.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/Node.java?rev=610062&r1=610061&r2=610062&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/Node.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/Node.java Tue Jan 8 08:38:45 2008
@@ -1,100 +1,100 @@
-/**
- *
- * Project SITH
- *
- *
- * creation date: Nov 14, 2005, 11:32:06 PM
- * source: Node.java
- */
-package org.apache.uima.cpe.model;
-
-
-/**
- *
- *
- */
-public class Node {
-
- /*************************************************************************/
-
- protected String label;
- protected int nodeKind;
- protected Object object;
-
- /*************************************************************************/
-
- public Node (int nodeKind, String label, Object objectModel) {
- this.nodeKind = nodeKind;
- this.label = label;
- this.object = objectModel;
- }
- public Node (int nodeKind, String label, int objectModel) {
- this.nodeKind = nodeKind;
- this.label = label;
- this.object = Integer.valueOf(objectModel);
- }
-
- public boolean equals(Object obj) {
- // Trace.trace("label:" + label);
- if (obj == null) return false;
- if (! (obj instanceof Node)) return false;
- Node n = (Node) obj;
- if (label.equals(n.getLabel()) && nodeKind == n.getNodeKind()) {
- if (object != null
- && object.equals(n.getObject())) {
- return true;
- } else if (object == null && n.getObject() == null) {
- return true;
- }
- }
- return false;
- }
-
- public int hashCode() {
- // Trace.trace("label:" + label);
- return label.hashCode() + nodeKind;
- }
-
- /**
- * @return Returns the label.
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * @param label The label to set.
- */
- public void setLabel(String label) {
- this.label = label;
- }
-
- /**
- * @return Returns the nodeKind.
- */
- public int getNodeKind() {
- return nodeKind;
- }
-
- /**
- * @param nodeKind The nodeKind to set.
- */
- public void setNodeKind(int nodeKind) {
- this.nodeKind = nodeKind;
- }
-
- /**
- * @return Returns the objectModel.
- */
- public Object getObject() {
- return object;
- }
-
- /**
- * @param objectModel The objectModel to set.
- */
- public void setObject(Object objectModel) {
- this.object = objectModel;
- }
-
-}
+/**
+ *
+ * Project SITH
+ *
+ *
+ * creation date: Nov 14, 2005, 11:32:06 PM
+ * source: Node.java
+ */
+package org.apache.uima.cpe.model;
+
+
+/**
+ *
+ *
+ */
+public class Node {
+
+ /*************************************************************************/
+
+ protected String label;
+ protected int nodeKind;
+ protected Object object;
+
+ /*************************************************************************/
+
+ public Node (int nodeKind, String label, Object objectModel) {
+ this.nodeKind = nodeKind;
+ this.label = label;
+ this.object = objectModel;
+ }
+ public Node (int nodeKind, String label, int objectModel) {
+ this.nodeKind = nodeKind;
+ this.label = label;
+ this.object = Integer.valueOf(objectModel);
+ }
+
+ public boolean equals(Object obj) {
+ // Trace.trace("label:" + label);
+ if (obj == null) return false;
+ if (! (obj instanceof Node)) return false;
+ Node n = (Node) obj;
+ if (label.equals(n.getLabel()) && nodeKind == n.getNodeKind()) {
+ if (object != null
+ && object.equals(n.getObject())) {
+ return true;
+ } else if (object == null && n.getObject() == null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ // Trace.trace("label:" + label);
+ return label.hashCode() + nodeKind;
+ }
+
+ /**
+ * @return Returns the label.
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @param label The label to set.
+ */
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ /**
+ * @return Returns the nodeKind.
+ */
+ public int getNodeKind() {
+ return nodeKind;
+ }
+
+ /**
+ * @param nodeKind The nodeKind to set.
+ */
+ public void setNodeKind(int nodeKind) {
+ this.nodeKind = nodeKind;
+ }
+
+ /**
+ * @return Returns the objectModel.
+ */
+ public Object getObject() {
+ return object;
+ }
+
+ /**
+ * @param objectModel The objectModel to set.
+ */
+ public void setObject(Object objectModel) {
+ this.object = objectModel;
+ }
+
+}
Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/Node.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/UimaCasInitializer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/UimaCasInitializer.java?rev=610062&r1=610061&r2=610062&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/UimaCasInitializer.java (original)
+++ incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/UimaCasInitializer.java Tue Jan 8 08:38:45 2008
@@ -1,165 +1,165 @@
-/**
- *
- * Project UIMA Tooling
- *
- *
- * creation date: Jan 22, 2006, 10:37:12 PM
- * source: CpeCollectionReaderModel.java
- */
-package org.apache.uima.cpe.model;
-
-import java.io.IOException;
-
-import org.apache.uima.UIMAFramework;
-import org.apache.uima.application.metadata.UimaApplication;
-import org.apache.uima.application.metadata.UimaCasProcessor;
-import org.apache.uima.application.metadata.impl.AbstractUimaCasProcessor;
-import org.apache.uima.application.metadata.impl.UimaApplication_Impl;
-import org.apache.uima.collection.CasInitializerDescription;
-import org.apache.uima.collection.metadata.CpeCollectionReaderCasInitializer;
-import org.apache.uima.resource.ResourceSpecifier;
-import org.apache.uima.resource.metadata.ConfigurationParameterDeclarations;
-import org.apache.uima.resource.metadata.ConfigurationParameterSettings;
-import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
-import org.apache.uima.tools.debug.util.Trace;
-import org.apache.uima.util.InvalidXMLException;
-import org.apache.uima.util.XMLInputSource;
-
-
-/**
- *
- *
- */
-public class UimaCasInitializer extends AbstractUimaCasProcessor
-{
-
- private CpeCollectionReaderCasInitializer cpeCasInitializer = null;
- private ResourceSpecifier specifier;
-
-
- /*************************************************************************/
- public UimaCasInitializer () {
- super(UimaCasProcessor.CASPROCESSOR_CAT_CAS_INITIALIZER, null);
- }
-
- public UimaCasInitializer (UimaApplication app) {
- super(UimaCasProcessor.CASPROCESSOR_CAT_CAS_INITIALIZER, app);
- }
-
- public UimaCasInitializer(CpeDescriptorModel parentModel,
- CpeCollectionReaderCasInitializer cpeCasInitializer,
- UimaApplication app)
- {
- super(UimaCasProcessor.CASPROCESSOR_CAT_CAS_INITIALIZER, app);
-// this.mCpeDescriptorModel = parentModel;
- this.cpeCasInitializer = cpeCasInitializer;
- xmlDescriptor = cpeCasInitializer.getDescriptor().getInclude().get();
- try {
- specifier = UIMAFramework.getXMLParser().
- parseResourceSpecifier(new XMLInputSource(xmlDescriptor));
- if (specifier instanceof CasInitializerDescription) {
- ProcessingResourceMetaData m = ((CasInitializerDescription) specifier).getCasInitializerMetaData();
- configParamDecls = m.getConfigurationParameterDeclarations();
- configParamSettings = m.getConfigurationParameterSettings();
- configParamsModel = new ConfigParametersModel(configParamDecls, configParamSettings);
- setName(m.getName());
- setDescription(m.getDescription());
- } else {
- specifier = null;
- }
-
- } catch (InvalidXMLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- static public UimaCasInitializer createUimaCasProcessor (CpeCollectionReaderCasInitializer cpeCasInitializer,
- String xmlDescriptor, UimaApplication app)
- {
- UimaCasInitializer u = new UimaCasInitializer(app);
- u.xmlDescriptor = xmlDescriptor; // new String(cpeCollReader.getDescriptor().getInclude().get());
- u.instanceName = "Unknown";
- try {
- String resolvedFileName = UimaApplication_Impl.resolveUimaXmlDescriptor(xmlDescriptor);
- u.specifier = UIMAFramework.getXMLParser().
- parseResourceSpecifier(new XMLInputSource(resolvedFileName));
- if (u.specifier instanceof CasInitializerDescription) {
- ProcessingResourceMetaData m = ((CasInitializerDescription) u.specifier).getCasInitializerMetaData();
- u.configParamDecls = m.getConfigurationParameterDeclarations();
- u.configParamSettings = m.getConfigurationParameterSettings();
- u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings);
- u.instanceName = m.getName();
- u.casProcessorDescription = m.getDescription();
-
- u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings,
- cpeCasInitializer.getConfigurationParameterSettings());
-
- // Trace.trace(u.casProcessorName);
- } else {
- Trace.err("Cannot parse CI xml: " + xmlDescriptor);
- u.specifier = null;
- }
-
- } catch (InvalidXMLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- u.specifier = null;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- u.specifier = null;
- }
- return u;
- }
-
- static public UimaCasInitializer createUimaCasProcessor (CasInitializerDescription casInitializerDescription,
- String xmlDescriptor, UimaApplication app)
- {
- UimaCasInitializer u = new UimaCasInitializer(app);
- u.xmlDescriptor = xmlDescriptor; // new String(cpeCollReader.getDescriptor().getInclude().get());
- u.instanceName = "Unknown";
- try {
- u.specifier = UIMAFramework.getXMLParser().
- parseResourceSpecifier(new XMLInputSource(UimaApplication_Impl.resolveUimaXmlDescriptor(xmlDescriptor)));
- if (u.specifier instanceof CasInitializerDescription) {
- ProcessingResourceMetaData m = ((CasInitializerDescription) u.specifier).getCasInitializerMetaData();
- u.configParamDecls = m.getConfigurationParameterDeclarations();
- u.configParamSettings = m.getConfigurationParameterSettings();
- u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings);
- u.instanceName = m.getName();
- u.casProcessorDescription = m.getDescription();
- // Trace.trace(u.casProcessorName);
- } else {
- u.specifier = null;
- }
-
- } catch (InvalidXMLException e) {
-// TODO Auto-generated catch block
- e.printStackTrace();
- u.specifier = null;
- } catch (IOException e) {
-// TODO Auto-generated catch block
- e.printStackTrace();
- u.specifier = null;
- }
- return u;
- }
-
- /*************************************************************************/
-
- public ConfigurationParameterDeclarations getConfigurationParameterDeclarations () {
- return configParamDecls;
- }
-
- public ConfigurationParameterSettings getConfigurationParameterSettings () {
- return configParamSettings;
- }
-
-
- /*************************************************************************/
-
-}
+/**
+ *
+ * Project UIMA Tooling
+ *
+ *
+ * creation date: Jan 22, 2006, 10:37:12 PM
+ * source: CpeCollectionReaderModel.java
+ */
+package org.apache.uima.cpe.model;
+
+import java.io.IOException;
+
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.application.metadata.UimaApplication;
+import org.apache.uima.application.metadata.UimaCasProcessor;
+import org.apache.uima.application.metadata.impl.AbstractUimaCasProcessor;
+import org.apache.uima.application.metadata.impl.UimaApplication_Impl;
+import org.apache.uima.collection.CasInitializerDescription;
+import org.apache.uima.collection.metadata.CpeCollectionReaderCasInitializer;
+import org.apache.uima.resource.ResourceSpecifier;
+import org.apache.uima.resource.metadata.ConfigurationParameterDeclarations;
+import org.apache.uima.resource.metadata.ConfigurationParameterSettings;
+import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
+import org.apache.uima.tools.debug.util.Trace;
+import org.apache.uima.util.InvalidXMLException;
+import org.apache.uima.util.XMLInputSource;
+
+
+/**
+ *
+ *
+ */
+public class UimaCasInitializer extends AbstractUimaCasProcessor
+{
+
+ private CpeCollectionReaderCasInitializer cpeCasInitializer = null;
+ private ResourceSpecifier specifier;
+
+
+ /*************************************************************************/
+ public UimaCasInitializer () {
+ super(UimaCasProcessor.CASPROCESSOR_CAT_CAS_INITIALIZER, null);
+ }
+
+ public UimaCasInitializer (UimaApplication app) {
+ super(UimaCasProcessor.CASPROCESSOR_CAT_CAS_INITIALIZER, app);
+ }
+
+ public UimaCasInitializer(CpeDescriptorModel parentModel,
+ CpeCollectionReaderCasInitializer cpeCasInitializer,
+ UimaApplication app)
+ {
+ super(UimaCasProcessor.CASPROCESSOR_CAT_CAS_INITIALIZER, app);
+// this.mCpeDescriptorModel = parentModel;
+ this.cpeCasInitializer = cpeCasInitializer;
+ xmlDescriptor = cpeCasInitializer.getDescriptor().getInclude().get();
+ try {
+ specifier = UIMAFramework.getXMLParser().
+ parseResourceSpecifier(new XMLInputSource(xmlDescriptor));
+ if (specifier instanceof CasInitializerDescription) {
+ ProcessingResourceMetaData m = ((CasInitializerDescription) specifier).getCasInitializerMetaData();
+ configParamDecls = m.getConfigurationParameterDeclarations();
+ configParamSettings = m.getConfigurationParameterSettings();
+ configParamsModel = new ConfigParametersModel(configParamDecls, configParamSettings);
+ setName(m.getName());
+ setDescription(m.getDescription());
+ } else {
+ specifier = null;
+ }
+
+ } catch (InvalidXMLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ static public UimaCasInitializer createUimaCasProcessor (CpeCollectionReaderCasInitializer cpeCasInitializer,
+ String xmlDescriptor, UimaApplication app)
+ {
+ UimaCasInitializer u = new UimaCasInitializer(app);
+ u.xmlDescriptor = xmlDescriptor; // new String(cpeCollReader.getDescriptor().getInclude().get());
+ u.instanceName = "Unknown";
+ try {
+ String resolvedFileName = UimaApplication_Impl.resolveUimaXmlDescriptor(xmlDescriptor);
+ u.specifier = UIMAFramework.getXMLParser().
+ parseResourceSpecifier(new XMLInputSource(resolvedFileName));
+ if (u.specifier instanceof CasInitializerDescription) {
+ ProcessingResourceMetaData m = ((CasInitializerDescription) u.specifier).getCasInitializerMetaData();
+ u.configParamDecls = m.getConfigurationParameterDeclarations();
+ u.configParamSettings = m.getConfigurationParameterSettings();
+ u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings);
+ u.instanceName = m.getName();
+ u.casProcessorDescription = m.getDescription();
+
+ u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings,
+ cpeCasInitializer.getConfigurationParameterSettings());
+
+ // Trace.trace(u.casProcessorName);
+ } else {
+ Trace.err("Cannot parse CI xml: " + xmlDescriptor);
+ u.specifier = null;
+ }
+
+ } catch (InvalidXMLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ u.specifier = null;
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ u.specifier = null;
+ }
+ return u;
+ }
+
+ static public UimaCasInitializer createUimaCasProcessor (CasInitializerDescription casInitializerDescription,
+ String xmlDescriptor, UimaApplication app)
+ {
+ UimaCasInitializer u = new UimaCasInitializer(app);
+ u.xmlDescriptor = xmlDescriptor; // new String(cpeCollReader.getDescriptor().getInclude().get());
+ u.instanceName = "Unknown";
+ try {
+ u.specifier = UIMAFramework.getXMLParser().
+ parseResourceSpecifier(new XMLInputSource(UimaApplication_Impl.resolveUimaXmlDescriptor(xmlDescriptor)));
+ if (u.specifier instanceof CasInitializerDescription) {
+ ProcessingResourceMetaData m = ((CasInitializerDescription) u.specifier).getCasInitializerMetaData();
+ u.configParamDecls = m.getConfigurationParameterDeclarations();
+ u.configParamSettings = m.getConfigurationParameterSettings();
+ u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings);
+ u.instanceName = m.getName();
+ u.casProcessorDescription = m.getDescription();
+ // Trace.trace(u.casProcessorName);
+ } else {
+ u.specifier = null;
+ }
+
+ } catch (InvalidXMLException e) {
+// TODO Auto-generated catch block
+ e.printStackTrace();
+ u.specifier = null;
+ } catch (IOException e) {
+// TODO Auto-generated catch block
+ e.printStackTrace();
+ u.specifier = null;
+ }
+ return u;
+ }
+
+ /*************************************************************************/
+
+ public ConfigurationParameterDeclarations getConfigurationParameterDeclarations () {
+ return configParamDecls;
+ }
+
+ public ConfigurationParameterSettings getConfigurationParameterSettings () {
+ return configParamSettings;
+ }
+
+
+ /*************************************************************************/
+
+}
Propchange: incubator/uima/sandbox/trunk/uima-ee/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/cpe/model/UimaCasInitializer.java
------------------------------------------------------------------------------
svn:eol-style = native