+\r
+ if(targetTermOrVocabulary instanceof OrderedTermBase && term instanceof OrderedTermBase) {\r
+ TermVocabulary tVoc = ((DefinedTermBase) targetTermOrVocabulary).getVocabulary();\r
+ if(tVoc instanceof OrderedTermVocabulary) {\r
+ OrderedTermVocabulary otVoc = (OrderedTermVocabulary)tVoc;\r
+ // the link between the location and the add term (below / above)\r
+ // method is determined by the compare method in the\r
+ // DefinedTermEditor's ViewerSorter (DefinedTermSorter) class\r
+ if(currentLocation == ViewerDropAdapter.LOCATION_BEFORE) {\r
+ otVoc.addTermBelow((OrderedTermBase)term, (OrderedTermBase)targetTermOrVocabulary);\r
+ }\r
+\r
+ if(currentLocation == ViewerDropAdapter.LOCATION_AFTER) {\r
+ otVoc.addTermAbove((OrderedTermBase)term, (OrderedTermBase)targetTermOrVocabulary);\r
+ }\r
+ }\r
+ }\r
+ if(currentLocation == ViewerDropAdapter.LOCATION_ON) {\r
+ targetDefinedTerm.addIncludes(term);\r
+ targetDefinedTerm.getVocabulary().addTerm(term);\r
+ }\r