public void setNeuronIonicConductances(List conductances) { for (int i = 0; i < conductances.size(); i++) { ConductanceVO g = (ConductanceVO) conductances.get(i); marcovTypes.put(g.getCdNucleus() + g.getCdConductanceType() + g.getPolarity(), g); } }
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 List getNeuronIonicConductances(String cdNucleus, String cdNeuronType) { List list = new ArrayList(); Iterator it = marcovTypes.values().iterator(); while (it.hasNext()) { ConductanceVO g = (ConductanceVO) it.next(); if (g.getCdNucleus().equals(cdNucleus) && g.getCdConductanceType().indexOf("-" + cdNeuronType) > 0) { list.add(g); } } return list; }
public List getSynapticDynamics(String cdNucleus) { List list = new ArrayList(); Iterator it = marcovTypes.values().iterator(); while (it.hasNext()) { ConductanceVO g = (ConductanceVO) it.next(); if ((cdNucleus == null || cdNucleus.equals("") || cdNucleus.equals(g.getCdNucleus())) && g.getCdConductanceType().indexOf("g") != 0) { list.add(g); } } Collections.sort(list); return list; }
public double getSynapticConnectivity(ConductanceVO g) { if (g != null) return g.getConnectivity() / 100.0; else return 0; }
public void setSynapseType(String cdConductance, ConductanceVO g) { synapseTypes.put(g.getCdNucleusPre() + g.getCdNucleus() + g.getCdConductanceType(), g); }
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; }