Package org.yaac.shared.crud

Examples of org.yaac.shared.crud.MetaKind


          namespace = new MetaNamespace(namespaceName);
          namespacesMap.put(namespaceName, namespace);
        }
       
        String kindName = kindEntity.getKey().getName();
        namespace.getKindsMap().put(kindName, new MetaKind(kindName));       
      }
    }
   
    // step 2 : populate properties map
    for (String namespaceName : propertiesMap.keySet()) {
      for (Entity propertyEntity : propertiesMap.get(namespaceName)) {
        Key propertyKey = propertyEntity.getKey();
        Key kindKey = propertyKey.getParent();
       
        @SuppressWarnings("unchecked")
        List<String> representation =
          (List<String>) propertyEntity.getProperty(PROPERTY_REPRESENTATION);
       
        MetaNamespace namespace = namespacesMap.get(namespaceName);
        if (namespace == null) {
          throw new IllegalArgumentException("unknown namespace " + namespaceName);
        }
       
        MetaKind kind = namespace.getKindsMap().get(kindKey.getName());
        if (kind == null) {
          throw new IllegalArgumentException("unknown kind " + kindKey.getName());
        }
       
        kind.addProperty(propertyKey.getName(), representation);
      }
    }
   
    return new ArrayList<MetaNamespace>(namespacesMap.values());
  }
View Full Code Here

TOP

Related Classes of org.yaac.shared.crud.MetaKind

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.