public List getAllActiveSynapticConductances() { List list = new ArrayList(); String pre = ReMoto.ACTIVE; String pos = ReMoto.ACTIVE; Hashtable active = new Hashtable(); // Verify active neuronTypes for (int i = 0; i < neuronTypes.size(); i++) { NeuronVO nt = (NeuronVO) neuronTypes.get(i); active.put(nt.getCategoryAndType() + " " + nt.getCdNucleus(), new Boolean(nt.isActive())); } Iterator it = synapseTypes.values().iterator(); while (it.hasNext()) { ConductanceVO g = (ConductanceVO) it.next(); if ((pre.equals(ReMoto.ALL) || pre.equals(ReMoto.ACTIVE)) && (g.getCdConductanceType().lastIndexOf(pos) > 0 || pos.equals(ReMoto.ALL) || pos.equals(ReMoto.ACTIVE))) { Boolean statePre = (Boolean) active.get(g.getPreSimple() + " " + g.getCdNucleusPre()); Boolean statePos = (Boolean) active.get(g.getPos() + " " + g.getCdNucleus()); if ((pre.equals(ReMoto.ALL) || (pre.equals(ReMoto.ACTIVE) && statePre != null && statePre.equals(Boolean.TRUE))) && (g.getPos().indexOf(pos) == 0 || pos.equals(ReMoto.ALL) || (pos.equals(ReMoto.ACTIVE) && statePos != null && statePos.equals(Boolean.TRUE)))) { // Set synaptic dynamics type (depressing, facilitating or none) DynamicVO vo = getDynamicType(g.getCdConductanceType(), g.getCdNucleusPre(), g.getCdNucleus()); g.setDynamics(vo); list.add(g); } } } Collections.sort(list); return list; }
public void setSynapseTypes(List conductances) { if (synapseTypes == null) synapseTypes = new Hashtable(); for (int i = 0; i < conductances.size(); i++) { ConductanceVO g = (ConductanceVO) conductances.get(i); synapseTypes.put(g.getCdNucleusPre() + g.getCdNucleus() + g.getCdConductanceType(), g); } }
public void setSynapseType(String cdConductance, ConductanceVO g) { synapseTypes.put(g.getCdNucleusPre() + g.getCdNucleus() + g.getCdConductanceType(), g); }