Пример #1
0
 /**
  * Find or create the scope.
  *
  * @param scope the scope configuration
  * @return scope scope
  */
 private ProcScope createScope(Scope scope) {
   ProcScope created = createdScopes.get(scope);
   if (created == null) {
     created = new ProcScope(scope.getName());
     createdScopes.put(scope, created);
     created.setStrong(scope.isStrong());
     created.setIgnoreText(scope.isIgnoreText());
     if (scope.getParent() != null) {
       created.setParent(createScope(scope.getParent()));
     }
     Set<ProcCode> scopeCodes = new HashSet<ProcCode>();
     for (Code code : scope.getCodes()) {
       scopeCodes.add(createCode(code));
     }
     created.setScopeCodes(scopeCodes);
     created.setMin(scope.getMin());
     created.setMax(scope.getMax());
   }
   return created;
 }