public Collection getMetaPropertiesArguments() throws XavaException {
   StringTokenizer st = new StringTokenizer(getArguments(), ",");
   Collection result = new ArrayList();
   while (st.hasMoreTokens()) {
     String argument = st.nextToken();
     StringTokenizer argumentSt = new StringTokenizer(argument);
     String type = argumentSt.nextToken().trim();
     String name = argumentSt.nextToken().trim();
     MetaProperty p = new MetaProperty();
     p.setName(name);
     p.setTypeName(type);
     result.add(p);
   }
   return result;
 }
示例#2
0
 // assert(!areAllProperties());
 private List createPropertiesNames() {
   StringTokenizer st = new StringTokenizer(removeTotalProperties(properties), ",;");
   List result = new ArrayList();
   while (st.hasMoreTokens()) {
     String name = st.nextToken().trim();
     if (name.endsWith("+")) {
       name = name.substring(0, name.length() - 1);
       if (sumPropertiesNames == null) sumPropertiesNames = new HashSet();
       sumPropertiesNames.add(name);
     }
     result.add(name);
   }
   return result;
 }
 private String transformAgregateProperty(String property) {
   StringBuffer result = new StringBuffer();
   StringTokenizer st = new StringTokenizer(property, ".");
   String member = "";
   while (st.hasMoreTokens()) {
     String token = st.nextToken();
     result.append(token);
     if (!st.hasMoreTokens()) break;
     member = member + token;
     try {
       MetaReference ref = getMetaModel().getMetaReference(member);
       if (ref.isAggregate()) result.append('_');
       else result.append('.');
     } catch (XavaException ex) {
       result.append('.');
     }
     member = member + ".";
   }
   return result.toString();
 }