当前位置: 首页>>代码示例>>Java>>正文


Java ListOf.get方法代码示例

本文整理汇总了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);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:25,代码来源:Constraints.java

示例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());		
			}
		}
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:22,代码来源:DomainStruct.java

示例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;
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:23,代码来源:AnalyticGeometryData.java

示例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();
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:23,代码来源:UnitDefinitionTable.java

示例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;
}
 
开发者ID:funasoul,项目名称:celldesigner-parser,代码行数:26,代码来源:Layout2CDConverter.java

示例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());
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:14,代码来源:DomainStruct.java

示例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);
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:14,代码来源:GeometryDatas.java

示例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);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:38,代码来源:Compartments.java

示例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());
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:14,代码来源:GeometryDatas.java

示例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);
	}		
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:12,代码来源:AnalyticGeometryData.java

示例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
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:10,代码来源:SampledFieldGeometryData.java

示例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);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:17,代码来源:Units.java

示例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());
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:13,代码来源:UnitDefinitionTable.java

示例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());
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:13,代码来源:ReactionTable.java

示例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());
	}
}
 
开发者ID:spatialsimulator,项目名称:XitoSBML,代码行数:15,代码来源:BoundaryConditionTable.java


注:本文中的org.sbml.jsbml.ListOf.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。