}
script += rules;
URL aedesc = RutaEngine.class.getResource("BasicEngine.xml");
XMLInputSource inae = new XMLInputSource(aedesc);
ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(inae);
ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;
TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();
if (!typeSystemLocation.equals("")) {
String tsLocation = typeSystemLocation;
Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();
tsds.add(basicTypeSystem);
if (typeSystemLocation.endsWith(".ruta")) {
IFile iFile = RutaAddonsPlugin.getIFile(typeSystemLocation);
IPath scriptPath = iFile.getLocation();
IProject project = iFile.getProject();
IPath descriptorRootPath = RutaProjectUtils.getDescriptorRootPath(project);
resMgr.setDataPath(descriptorRootPath.toPortableString());
IPath path = RutaProjectUtils.getTypeSystemDescriptorPath(scriptPath, project);
tsLocation = path.toPortableString();
}
File tsFile = new File(tsLocation);
XMLInputSource ints = new XMLInputSource(tsFile);