@Override protected void clearModelBaseValue() { getTypeSystemDescription().setTypes(typeDescription0); }
/** * Removes the type. * * @param td the td * @param tsd the tsd */ private void removeType(TypeDescription td, TypeSystemDescription tsd) { tsd.setTypes((TypeDescription[]) Utility.removeElementFromArray(tsd.getTypes(), td, TypeDescription.class)); }
/** * Sets the imported type system description. * * @throws ResourceInitializationException the resource initialization exception */ private void setImportedTypeSystemDescription() throws ResourceInitializationException { Collection tsdc = new ArrayList(1); TypeSystemDescription tsd = typeSystemDescription; if (null != tsd) { tsd = (TypeSystemDescription) tsd.clone(); tsd.setTypes(typeDescriptionArray0); } tsdc.clear(); tsdc.add(tsd); importedTypeSystemDescription = CasCreationUtils .mergeTypeSystems(tsdc, createResourceManager()); }
/** * Convert a {@link TypeSystem} to an equivalent {@link TypeSystemDescription}. * * @param aTypeSystem * type system object to convert * @return a TypeSystemDescription that is equivalent to <code>aTypeSystem</code> */ public static TypeSystemDescription typeSystem2TypeSystemDescription(TypeSystem aTypeSystem) { ResourceSpecifierFactory fact = UIMAFramework.getResourceSpecifierFactory(); TypeSystemDescription tsDesc = fact.createTypeSystemDescription(); Iterator<Type> typeIter = aTypeSystem.getTypeIterator(); ArrayList<TypeDescription> typeDescs = new ArrayList<TypeDescription>(); while (typeIter.hasNext()) { Type type = typeIter.next(); if (!type.getName().startsWith("uima.cas") && !type.getName().equals("uima.tcas.Annotation") && !type.isArray()) { typeDescs.add(type2TypeDescription(type, aTypeSystem)); } } TypeDescription[] typeDescArr = new TypeDescription[typeDescs.size()]; typeDescs.toArray(typeDescArr); tsDesc.setTypes(typeDescArr); return tsDesc; }
TypeDescription[] types = new TypeDescription[typeNameMap.values().size()]; typeNameMap.values().toArray(types); result.setTypes(types); return result;
td[j] = typesArr.get(j); result.setTypes(td); return result;
tsDesc.setTypes(typeDescArr);
typeSystemDescription.setTypes(types.toArray(new TypeDescription[0])); String descName = desc.getScriptName() + options.getTypeSystemSuffix(); if (!StringUtils.isBlank(desc.getPackageString())) {