Пример #1
0
 /**
  * Processes the BUILDER-typerel-ALLOWEDRELATIONSNAMES in the LIST command, and (possibly) returns
  * a Vector containing requested data (based on the content of TYPE and NODE, which can be
  * retrieved through tagger).
  *
  * @javadoc parameters
  */
 @Override
 public Vector<String> getList(PageInfo sp, StringTagger tagger, StringTokenizer tok) {
   if (tok.hasMoreTokens()) {
     String cmd = tok.nextToken(); // Retrieving command.
     if (cmd.equals("ALLOWEDRELATIONSNAMES")) {
       try {
         String tmp = tagger.Value("TYPE");
         int number1 = mmb.getTypeDef().getIntValue(tmp);
         tmp = tagger.Value("NODE");
         int number2 = Integer.parseInt(tmp);
         MMObjectNode node = getNode(number2);
         return getAllowedRelationsNames(number1, node.getOType());
       } catch (Exception e) {
         log.error(e);
       }
     }
   }
   return null;
 }
Пример #2
0
 /**
  * Retrieves all relations which are 'allowed' between two specified nodes. No distinction between
  * source / destination.
  *
  * @param node1 The first objectnode
  * @param node2 The second objectnode
  * @return An <code>Enumeration</code> of nodes containing the typerel relation data
  */
 public Enumeration<MMObjectNode> getAllowedRelations(MMObjectNode node1, MMObjectNode node2) {
   return getAllowedRelations(node1.getOType(), node2.getOType());
 }