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(); }
for (int l=0;l<colValue1.size();l++){ try { cdifferences.addAll(checkEntity(colValue1.getElementAt(l), colValue2.getElementAt(l), alreadyVerified)); } catch (NullEntity e) {
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); } } } }
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();