public String toString() { return getName(); }
private static int[] addTypes(TypeSystemImpl tsSrc, TypeSystemImpl tsTgt) { Map<TypeImpl, TypeImpl> mSrc2Tgt = new LinkedHashMap<TypeImpl, TypeImpl>(); for (Iterator<Type> it = tsSrc.getTypeIterator(); it.hasNext();) { TypeImpl tSrc = (TypeImpl) it.next(); TypeImpl tTgt = (TypeImpl) tsTgt.getType(tSrc.getName()); if (tTgt != null) { mSrc2Tgt.put(tSrc, tTgt); } } int[] r = new int[tsSrc.getNumberOfTypes() + 1]; // type codes are numbered starting with 1 for (Entry<TypeImpl, TypeImpl> e : mSrc2Tgt.entrySet()) { r[e.getKey().getCode()] = e.getValue().getCode(); } return r; }
TypeImpl t = (TypeImpl) it.next(); cds.typeCode2namespaceNames[t.getCode()] = uimaTypeName2XmiElementName(t.getName());
/** * Show text popup. * * @param x the x * @param y the y */ @SuppressWarnings("unchecked") public void showTextPopup(int x, int y) { final int pos = this.textArea.getCaretPosition(); this.textPopup.removeAll(); JMenuItem item = new JMenuItem("Position: " + pos); item.setEnabled(false); this.textPopup.add(item); FSNode posAnnot; if (this.isAnnotationIndex) { List<FSNode> annots = ((FSTreeModel) this.fsTree.getModel()).getFSs(); ArrayList<FSNode> selAnnots = getAnnotationsAtPos(pos, annots); for (int i = 0; i < selAnnots.size(); i++) { posAnnot = selAnnots.get(i); item = new JMenuItem("[" + posAnnot.getArrayPos() + "] = " + posAnnot.getType().getName()); item.addActionListener(new PopupHandler(this, posAnnot.getArrayPos())); this.textPopup.add(item); } } this.textPopup.show(this.textArea, x, y); }
casName = t.getName(); String name_Type; if (builtInsWithNoJCas.contains(casName)) String nameBase = "org.apache.uima.jcas." + casName.substring(5); name_Type = nameBase + "_Type"; jcasTypes.put(nameBase, new LoadedJCasType<>(t.getName(), (Class<? extends TOP_Type>) Class .forName(name_Type, true, cl), cl)); } catch (ClassNotFoundException e1) { jcasTypes.put(casName, new LoadedJCasType<>(t.getName(), (Class<? extends TOP_Type>) Class.forName(name_Type, true, cl), cl));
(type == ts.fsArrayType) || (type == ts.stringArrayType) || (TypeSystemImpl.isArrayTypeNameButNotBuiltIn(type.getName()));
|| (TypeSystemImpl.isArrayTypeNameButNotBuiltIn(type.getName()));
String typeName = fsItem._getTypeImpl().getName(); if (cds.filterTypeSystem_inner.getType(typeName) == null) { fsItem = null;
private SerializedString getSerializedTypeName(TypeImpl ti) { XmlElementName xe = cds.typeCode2namespaceNames[ti.getCode()]; if (null == xe) { // happens for supertypes which have no instantiations String typeName = ti.getName(); xe = uimaTypeName2XmiElementName(typeName); checkForNameCollision(xe); cds.typeCode2namespaceNames[ti.getCode()] = xe; } return getSerializedString(xe.qName); }
if (isWithExpandedTypeNames) { jg.writeString(ti.getName());
if (!srcRangeType.getName().equals( tgtFeat.getRange().getName())) { throw new UIMARuntimeException(UIMARuntimeException.COPY_CAS_RANGE_TYPE_NAMES_NOT_EQUAL,