Changeset 1025 for trunk/src/anaToMia
- Timestamp:
- 10/26/11 12:02:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java ¶
r1024 r1025 2738 2738 } 2739 2739 2740 2741 // handles the getContent call for scope topics of variant-names 2742 private void getVariantNameScopeContent(ArrayList<Pair<Object, TopicMapsTypes>> contents, boolean validate, Topic carrier, int selectedValueIndex) throws InvalidGdlSchemaException, InvalidContentException, ExecutionException{ 2743 if(!(carrier instanceof Topic)) throw new ExecutionException("the constraint " + TmHelper.getAnyIdOfTopic(this.getConstraint()) + " must be bound to a Topic, but is: " + carrier.getClass()); 2744 ArrayList<Variant> possibleVariants = TmHelper.getVariantsForConstraint(carrier, this.getRootConstraint()); 2745 if(possibleVariants.size() != 0){ 2746 Variant variant = possibleVariants.get(0); 2747 JsArray<Topic> scopes = variant.getScope(); 2748 2749 if(validate) this.validateLiteralValue(this.getSelectedValues().get(selectedValueIndex)); 2750 2751 if(scopes.length() > selectedValueIndex){ 2752 Topic oldScope = scopes.get(selectedValueIndex); 2753 Topic newScope = TmHelper.getTopicFromStringRepresentation(this.getSelectedValues().get(selectedValueIndex), this.getValueGroup()); 2754 2755 if(!oldScope.equals(newScope)){ 2756 variant.removeTheme(oldScope); 2757 variant.addTheme(newScope); 2758 } 2759 } 2760 2761 contents.add(new Pair<Object, TopicMapsTypes>(variant, TopicMapsTypes.Variant)); 2762 } 2763 } 2764 2740 2765 2741 2766 // returns the actual data that is hold by this instance … … 2766 2791 // TODO: implement 2767 2792 } else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlVariantNameScope)){ 2768 // TODO: implement2793 this.getVariantNameScopeContent(result, validate, (Topic)localCarrier, idx); 2769 2794 } else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlVariantNameReifier)){ 2770 2795 this.getVariantReifierContent(result, validate, (Topic)localCarrier, idx);
Note: See TracChangeset
for help on using the changeset viewer.