Пример #1
0
 private String findModelClass(NodeElement node) {
   String name = modelClassMap.get(node);
   if (name != null) {
     return name;
   }
   if (node instanceof HasDataModelNode) {
     name = getModelClassName((HasDataModelNode) node);
     if (name == null) {
       name = UNDEFINED_CLASS;
     }
     modelClassMap.put(node, name);
     return name;
   }
   modelClassMap.put(node, UNDEFINED_CLASS);
   for (Connection c : node.getIncomings()) {
     NodeElement cnode = c.getOpposite(node);
     name = findModelClass(cnode);
     if (name != UNDEFINED_CLASS) {
       modelClassMap.put(node, name);
       return name;
     }
   }
   for (Connection c : node.getOutgoings()) {
     NodeElement cnode = c.getOpposite(node);
     name = findModelClass(cnode);
     if (name != UNDEFINED_CLASS) {
       modelClassMap.put(node, name);
       return name;
     }
   }
   return UNDEFINED_CLASS;
 }
Пример #2
0
 public boolean complete(Map<Integer, GenNode> map) {
   for (NodeElement node : incomings) {
     if (!map.containsKey(node.getId())) {
       NodeElement parent = node.getParent();
       if (parent == null) {
         return false;
       }
       if (!map.containsKey(parent.getId())) {
         return false;
       }
     }
   }
   return true;
 }
Пример #3
0
 public GenNode(NodeElement node) {
   for (Connection c : node.getIncomings()) {
     NodeElement source = c.getSource();
     incomings.add(source);
   }
 }