Пример #1
0
 @Override
 public Parameter getParameterNamedWithParent(String name, String parent) {
   if (this.getName().equals(parent)) {
     for (Parameter p : parameters) {
       if (p.getName().equals(name)) {
         return p;
       }
     }
   }
   for (AbstractActor aa : vertices) {
     if (aa instanceof Actor && aa.getName().equals(parent)) {
       Refinement refinement = ((Actor) aa).getRefinement();
       if (refinement != null) {
         AbstractActor subGraph = refinement.getAbstractActor();
         if (subGraph != null && subGraph instanceof PiGraph) {
           Parameter p = ((PiGraph) subGraph).getParameterNamedWithParent(name, parent);
           if (p != null) return p;
         }
       }
     } else if (aa instanceof PiGraph) {
       Parameter p = ((PiGraph) aa).getParameterNamedWithParent(name, parent);
       if (p != null) return p;
     }
   }
   return null;
 }
Пример #2
0
 @Override
 public Set<String> getParametersNames() {
   Set<String> names = new HashSet<String>(getVertices().size());
   for (Parameter param : this.getParameters()) {
     names.add(param.getName());
   }
   return names;
 }