} else if (colValue1!=null && colValue2!=null && colValue1.size()==colValue2.size()){ Vector<String> cdifferences = new Vector<String>(); for (int l=0;l<colValue1.size();l++){ try { cdifferences.addAll(checkEntity(colValue1.getElementAt(l), colValue2.getElementAt(l), alreadyVerified)); } catch (NullEntity e) { } else { differences.add("entity " +ent1.getID()+":"+ent1.getType()+" has not the same number of values for attribute "+ gaE1.getName()+" with "+colValue1.size()+" instead the second spec has "+colValue2.size()+" elements");
public static String getValue(GraphAttribute attribute) { if (attribute.isCollectionValue()) { try { return replaceBadChars(attribute.getCollectionValue().getElementAt(0).getID()); } catch (NullEntity ex) { Logger.getLogger(TaskGenerator.class.getName()).log(Level.SEVERE, null, ex); } } if(attribute.isEntityValue()) { return replaceBadChars(attribute.getSimpleValue()); } return attribute.getSimpleValue(); }
private void generateDeviceAgentsInitialization(Graph simDiag, Repeat simInitRep) throws NullEntity, NotFound { for (GraphEntity progPool : Utils.getEntities(simDiag, INIT_PROGRAM_POOL)) { for (GraphEntity deviceEntity : Utils.getTargetsEntity(progPool, "device")) { Repeat importADLRep = new Repeat("importDevices"); simInitRep.add(importADLRep); String deviceId = deviceEntity.getID(); Repeat agentRep = new Repeat("deviceAgentRep"); simInitRep.add(agentRep); simInitRep.add(new Var("daID", deviceId)); GraphCollection gc = progPool.getAttributeByName("ProgramPoolField").getCollectionValue(); for (int i = 0; i < gc.size(); i++) { String progId = gc.getElementAt(i).getAttributeByName("modelID").getSimpleValue(); Repeat progRep = new Repeat("progsRep"); progRep.add(new Var("progId", progId)); agentRep.add(progRep); } } } }
GraphAttribute filters = filter.getAttributeByName(TASK_ALLOWED); GraphCollection filterCollection = filters.getCollectionValue(); for (int i = 0; i < filterCollection.size(); i++) { GraphEntity ge = filterCollection.getElementAt(i); GraphAttribute filterRef = ge.getAttributeByName("modelID"); String filterDiagName = filterRef.getSimpleValue();