// circular import
_testInvalidDescriptor(JUnitExtension
.getFile("TextAnalysisEngineImplTest/AggregateThatImportsItself.xml"));
// try some that should work
XMLInputSource in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/AggregateTaeWithConfigParamOverrides.xml"));
AnalysisEngineDescription desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
in = new XMLInputSource(JUnitExtension
.getFile("AnnotatorContextTest/AnnotatorWithGroupsAndNonGroupParams.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
// try aggregate containing remote service - should work even if can't connect
in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/AggregateWithUnknownRemoteComponent.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
// try aggregate with sofas
in = new XMLInputSource(JUnitExtension.getFile("CpeSofaTest/TransAnnotatorAggregate.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
// try another aggregate with sofas
in = new XMLInputSource(JUnitExtension
.getFile("CpeSofaTest/TransAnnotatorAndTestAnnotatorAggregate.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
// try primitive with duplicate configuration group definitions
in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/AnnotatorWithDuplicateConfigurationGroups.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
// try aggregate with duplicate configuration group definitions
in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/AggregateWithDuplicateGroupOverrides.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
//test aggregate with import by name and configuration parameter overrides
in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/AeWithConfigParamOverridesAndImportByName.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
File dataPathDir = JUnitExtension.getFile("TextAnalysisEngineImplTest/dataPathDir");
resMgr.setDataPath(dataPathDir.getCanonicalPath());
desc.doFullValidation(resMgr);
//test UIMA C++ descriptor (should succeed even though annotator library doesn't exist)
in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/TestUimaCppAe.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
in = new XMLInputSource(JUnitExtension
.getFile("TextAnalysisEngineImplTest/TestAggregateContainingCppAnnotator.xml"));
desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
desc.doFullValidation();
}