本文整理汇总了Java中org.sbml.jsbml.ListOf.get方法的典型用法代码示例。如果您正苦于以下问题:Java ListOf.get方法的具体用法?Java ListOf.get怎么用?Java ListOf.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sbml.jsbml.ListOf
的用法示例。
在下文中一共展示了ListOf.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refreshConstraintsPanel
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Refresh constraints panel
*/
public void refreshConstraintsPanel() {
Model model = bioModel.getSBMLDocument().getModel();
ListOf<Constraint> listOfConstraints = model.getListOfConstraints();
String[] cons = new String[model.getConstraintCount()];
for (int i = 0; i < model.getConstraintCount(); i++) {
Constraint constraint = listOfConstraints.get(i);
if (!constraint.isSetMetaId()) {
String constraintId = "c0";
int cn = 0;
while (bioModel.isSIdInUse(constraintId)) {
cn++;
constraintId = "c" + cn;
}
SBMLutilities.setMetaId(constraint, constraintId);
}
cons[i] = constraint.getMetaId() + SBMLutilities.getDimensionString(constraint);
}
edu.utah.ece.async.ibiosim.dataModels.biomodel.util.Utility.sort(cons);
constraints.setListData(cons);
constraints.setSelectedIndex(0);
}
示例2: createSampledDomainOrder
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Creates the sampled domain order.
*
* @param losv the losv
*/
private void createSampledDomainOrder(ListOf<SampledVolume> losv){
int numDom = (int) losv.size();
List<Double> sampleList = new ArrayList<Double>();
for(int i = 0; i < numDom ; i++){
sampleList.add(losv.get(i).getSampledValue());
}
Collections.sort(sampleList);
for(int i = 0; i < numDom ; i++){
for(int j = 0 ; j < numDom ; j++){
SampledVolume sv = losv.get(j);
if(sampleList.get(i) == sv.getSampledValue()){
orderedList.add(sv.getDomainType());
}
}
}
}
示例3: orderVolume
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Order volume.
*
* @param orderedList the ordered list
* @param loav the loav
* @return the array list
*/
private ArrayList<AnalyticVolume> orderVolume(ArrayList<AnalyticVolume> orderedList, ListOf<AnalyticVolume> loav){
int numDom = (int) loav.size();
for(int i = numDom - 1; i > 0 ; i--){
AnalyticVolume av;
for(int j = 0; j < numDom ; j++){
av = loav.get(j);
if(av.getOrdinal() == i){
rearrangeAST(av.getMath());
orderedList.add(av);
}
}
}
return orderedList;
}
示例4: unitsToString
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Units to string.
*
* @param lou the lou
* @return the string
*/
private String unitsToString(ListOf<Unit> lou){
StringBuilder sb = new StringBuilder();
for(int i = 0; i< lou.size(); i++){
Unit unit = lou.get(i);
String mul = unit.getMultiplier() == 1 ? "" : String.valueOf(unit.getMultiplier()) + " *";
String scale = unit.getScale() == 0 ? "" : "10^" + unit.getScale() + " *";
String exp = unit.getExponent() == 1 ? "" : "^" + String.valueOf(unit.getExponent());
String kind = SBMLProcessUtil.unitIndexToString(unit.getKind());
sb.append("(" + mul + scale + " " + kind + " )" + exp);
if(i < lou.size() - 1)
sb.append(" * ");
}
return sb.toString();
}
示例5: reorderSpeciesReferencesList
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Reorder species references list.
*
* @param srList
* the sr list
* @return the list
*/
private ListOf<SpeciesReference> reorderSpeciesReferencesList(
ListOf<SpeciesReference> srList) {
SpeciesReference sr = srList.get(0);
SpeciesWrapper sw = mWrapper.getSpeciesWrapperById(sr.getSpecies());
if (sw.getClazz().equals("PROTEIN") || sw.getClazz().equals("GENE")
|| sw.getClazz().equals("RNA") || sw.getClazz().equals("ANTISENSE_RNA")) {
return srList;
}
for (int i = 1; i < srList.size(); i++) {
sr = srList.get(i);
sw = mWrapper.getSpeciesWrapperById(sr.getSpecies());
if (sw.getClazz().equals("PROTEIN") || sw.getClazz().equals("GENE")
|| sw.getClazz().equals("RNA") || sw.getClazz().equals("ANTISENSE_RNA")) {
Collections.swap(srList, 0, i);
}
}
return srList;
}
示例6: addVertex
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Vertex.
*
* @param lod the lod
*/
public void addVertex(ListOf<Domain> lod) {
Domain dom;
for (int i = 0; i < lod.size(); i++) {
dom = lod.get(i);
if(getDomainType(dom.getDomainType()).getSpatialDimensions() == dimension)
graphStruct.addVertex(dom.getSpatialId());
}
}
示例7: createspImgList
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Createsp img list.
*/
protected void createspImgList(){
ListOf<GeometryDefinition> logd = geometry.getListOfGeometryDefinitions();
SpatialImage spImg;
for(int i = 0 ; i < logd.size() ; i++){
GeometryDefinition gd = logd.get(i);
spImg = getSpImgFromGeo(gd);
if(spImg != null)
spImgList.add(spImg);
}
}
示例8: refreshCompartmentPanel
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Refresh compartment panel
*/
public void refreshCompartmentPanel(BioModel gcm) {
String selectedCompartment = "";
if (!compartments.isSelectionEmpty()) {
selectedCompartment = ((String) compartments.getSelectedValue()).split("\\[| ")[0];
}
this.bioModel = gcm;
Model model = gcm.getSBMLDocument().getModel();
ListOf<Compartment> listOfCompartments = model.getListOfCompartments();
String[] comparts = new String[model.getCompartmentCount()];
for (int i = 0; i < model.getCompartmentCount(); i++) {
Compartment compartment = listOfCompartments.get(i);
comparts[i] = compartment.getId() + SBMLutilities.getDimensionString(compartment);
comparts[i] += " " + compartment.getSize();
if (paramsOnly) {
for (int j = 0; j < parameterChanges.size(); j++) {
String[] splits = parameterChanges.get(j).split(" ");
if (splits[0].equals(comparts[i].split(" ")[0])) {
parameterChanges.set(j, comparts[i] + " " + splits[splits.length-2] + " " +
splits[splits.length-1]);
comparts[i] = parameterChanges.get(j);
}
}
}
}
edu.utah.ece.async.ibiosim.dataModels.biomodel.util.Utility.sort(comparts);
int selected = 0;
for (int i = 0; i < comparts.length; i++) {
if (comparts[i].split("\\[| ")[0].equals(selectedCompartment)) {
selected = i;
}
}
compartments.setListData(comparts);
compartments.setSelectedIndex(selected);
}
示例9: getDomainTypes
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Gets the domain types.
*
* @return the domain types
*/
protected void getDomainTypes(){
ListOf<DomainType> lodt = geometry.getListOfDomainTypes();
for(int i = 0 ; i < lodt.size(); i++){
DomainType d = lodt.get(i);
if(d.getSpatialDimensions() == dimension)
domList.add(d.getSpatialId());
}
}
示例10: getSampledValues
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
@Override
void getSampledValues() {
ListOf<AnalyticVolume> loav = ag.getListOfAnalyticVolumes();
int numDom = (int) loav.size();
int intervalVal = (int) Math.floor(255 / (numDom - 1)); //divide 255 by num of domains excluding EC
for(int i = 0 ; i < numDom ; i++){
AnalyticVolume av = loav.get(i);
hashSampledValue.put(av.getDomainType(), av.getOrdinal() * intervalVal);
}
}
示例11: getSampledValues
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
@Override
protected void getSampledValues() { //may need to use min/max in future
ListOf<SampledVolume> losv = sfg.getListOfSampledVolumes();
for(int i = 0 ; i < losv.size() ; i++){
SampledVolume sv = losv.get(i);
if(sv.isSetSampledValue())
hashSampledValue.put(sv.getDomainType(), (int) sv.getSampledValue()); //double to int may need to chang
}
}
示例12: refreshUnitsPanel
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Refresh units panel
*/
public void refreshUnitsPanel() {
Model model = bioModel.getSBMLDocument().getModel();
ListOf<UnitDefinition> listOfUnits = model.getListOfUnitDefinitions();
String[] units = new String[model.getUnitDefinitionCount()];
for (int i = 0; i < model.getUnitDefinitionCount(); i++) {
UnitDefinition unit = listOfUnits.get(i);
units[i] = unit.getId();
// GET OTHER THINGS
}
edu.utah.ece.async.ibiosim.dataModels.biomodel.util.Utility.sort(units);
unitDefs.setListData(units);
unitDefs.setSelectedIndex(0);
}
示例13: setUnitDefinitionToList
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Sets the unit definition to list.
*
* @param loud the new unit definition to list
*/
private void setUnitDefinitionToList(ListOf<UnitDefinition> loud){
long max = loud.size();
for(int i = 0; i < max; i++){
UnitDefinition ud = loud.get(i);
memberList.add(ud.clone());
}
}
示例14: setReactionToList
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Sets the reaction to list.
*
* @param lor the new reaction to list
*/
private void setReactionToList(ListOf<Reaction> lor){
long max = lor.size();
for(int i = 0; i < max; i++){
Reaction r = lor.get(i);
memberList.add(r.clone());
}
}
示例15: setParameterToList
import org.sbml.jsbml.ListOf; //导入方法依赖的package包/类
/**
* Sets the parameter to list.
*
* @param lop the new parameter to list
*/
private void setParameterToList(ListOf<Parameter> lop){
long max = lop.size();
for(int i = 0; i < max; i++){
Parameter p = lop.get(i);
SpatialParameterPlugin sp = (SpatialParameterPlugin) p.getPlugin("spatial");
if(!(sp.getParamType() instanceof BoundaryCondition)) continue;
memberList.add(p.clone());
}
}