String featDesc = jg.nullBlank(fd.getDescription()); String featDescCmt = featDesc; null); String featDesc = jg.nullBlank(fd.getDescription()); String featDescCmt = featDesc;
null); String featDesc = JcasGen.nullBlank(fd.getDescription()); String featDescCmt = featDesc;
sb.append("<li><b>" + eachFeat.getName() + "</b> (" + eachFeat.getRangeTypeName() + ") </li>"); if (eachFeat.getDescription() != null && !eachFeat.getDescription().trim().isEmpty()) { sb.append("<p>"); sb.append(eachFeat.getDescription()); sb.append("</p>");
private void addFeature(OntModel ontModel, OntClass ontClass, FeatureDescription feature) { if (ontModel.getDatatypeProperty(namespace + feature.getName()) == null) { DatatypeProperty property = ontModel.createDatatypeProperty(namespace + feature.getName()); String propertyComment = feature.getDescription(); if (propertyComment != null) { property.addComment(propertyComment, EN); } property.addDomain(ontClass); property.addRange(getRange(feature)); } }
private void addFeature(OntModel ontModel, OntClass ontClass, FeatureDescription feature) { if (ontModel.getDatatypeProperty(namespace + feature.getName()) == null) { DatatypeProperty property = ontModel.createDatatypeProperty(namespace + feature.getName()); String propertyComment = feature.getDescription(); if (propertyComment != null) { property.addComment(propertyComment, EN); } property.addDomain(ontClass); property.addRange(getRange(feature)); } }
FeatureDescription featDesc = aType.addFeature(featName, aFeatures[i].getDescription(), rangeTypeName, elementTypeName, multiRefsAllowed); featDesc.setSourceUrl(aFeatures[i].getSourceUrl());
/** * Handle hover. * * @param event the event */ public void handleHover(Event event) { // next getItem call requires that table have SWT.FULL_SELECTION Style TableTreeItem item = tt.getItem(new Point(event.x, event.y)); if (null != item) { Object o = item.getData(); if (null == o) throw new InternalErrorCDE("invalid state"); if (o instanceof TypeDescription) { setToolTipText(tt, ((TypeDescription) o).getDescription()); } else if (o instanceof FeatureDescription) { FeatureDescription fd = (FeatureDescription) o; if (item.getBounds(MULTIPLE_REF_OK_COL).contains(event.x, event.y) && isArrayOrListType(fd.getRangeTypeName())) { Boolean mra = fd.getMultipleReferencesAllowed(); setToolTipText(tt, (mra != null && mra.booleanValue()) ? "Multiple References Allowed" : "Multiple References Not Allowed"); } else setToolTipText(tt, fd.getDescription()); } else if (o instanceof AllowedValue) { setToolTipText(tt, ((AllowedValue) o).getDescription()); } } else tt.setToolTipText(""); }
descriptionUI.setText(convertNull(existingFd.getDescription())); featureNameUI.setText(originalFeatureName = existingFd.getName()); featureRangeNameUI.setText(existingFd.getRangeTypeName());
private AnnotationFeature analyzeFeature(TypeSystem aTS, FeatureDescription aFD, Feature aFeat) { AnnotationFeature feat = new AnnotationFeature(); feat.setType(aFeat.getRange().getName()); feat.setName(aFeat.getShortName()); feat.setUiName(aFeat.getShortName()); feat.setDescription(trimToNull(aFD.getDescription())); feat.setEnabled(true); if (isSlotFeature(aTS, aFeat)) { feat.setType(aFeat.getRange().getComponentType().getFeatureByBaseName("target") .getRange().getName()); feat.setMode(MultiValueMode.ARRAY); feat.setLinkMode(LinkMode.WITH_ROLE); // Need to strip the "[]" marking the type as multi-valued off the type name feat.setLinkTypeName(removeEnd(aFeat.getRange().getName(), "[]")); // FIXME Instead of hard-coding the feature names here, try to auto-detect them by // looking for a String feature and a feature whose type is subsumed by Annotation feat.setLinkTypeRoleFeatureName("role"); feat.setLinkTypeTargetFeatureName("target"); } return feat; }
private AnnotationFeature analyzeFeature(TypeSystem aTS, FeatureDescription aFD, Feature aFeat) { AnnotationFeature feat = new AnnotationFeature(); feat.setType(aFeat.getRange().getName()); feat.setName(aFeat.getShortName()); feat.setUiName(aFeat.getShortName()); feat.setDescription(trimToNull(aFD.getDescription())); feat.setEnabled(true); if (isSlotFeature(aTS, aFeat)) { feat.setType(aFeat.getRange().getComponentType().getFeatureByBaseName("target") .getRange().getName()); feat.setMode(MultiValueMode.ARRAY); feat.setLinkMode(LinkMode.WITH_ROLE); // Need to strip the "[]" marking the type as multi-valued off the type name feat.setLinkTypeName(removeEnd(aFeat.getRange().getName(), "[]")); // FIXME Instead of hard-coding the feature names here, try to auto-detect them by // looking for a String feature and a feature whose type is subsumed by Annotation feat.setLinkTypeRoleFeatureName("role"); feat.setLinkTypeTargetFeatureName("target"); } return feat; }
/** * Feature update. * * @param fd the fd * @param dialog the dialog */ public void featureUpdate(FeatureDescription fd, AddFeatureDialog dialog) { valueChanged = false; String v = setValueChanged(dialog.featureName, fd.getName()); fd.setName(v); v = setValueChanged(multiLineFix(dialog.description), fd.getDescription()); fd.setDescription(v); String range = setValueChanged(dialog.featureRangeName, fd.getRangeTypeName()); fd.setRangeTypeName(range); if (isArrayOrListType(range)) { Boolean b = setValueChangedCapitalBoolean(dialog.multiRef, fd.getMultipleReferencesAllowed()); fd.setMultipleReferencesAllowed(b); if (isFSArrayOrListType(range)) { v = setValueChanged(dialog.elementRangeName, fd.getElementType()); fd.setElementType(v); } else { fd.setElementType(null); } } else { fd.setMultipleReferencesAllowed(null); fd.setElementType(null); } }