當前位置: 首頁>>代碼示例>>Java>>正文


Java ComponentDefinition.getComponents方法代碼示例

本文整理匯總了Java中org.sbolstandard.core2.ComponentDefinition.getComponents方法的典型用法代碼示例。如果您正苦於以下問題:Java ComponentDefinition.getComponents方法的具體用法?Java ComponentDefinition.getComponents怎麽用?Java ComponentDefinition.getComponents使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.sbolstandard.core2.ComponentDefinition的用法示例。


在下文中一共展示了ComponentDefinition.getComponents方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: recurseComponentDefinition

import org.sbolstandard.core2.ComponentDefinition; //導入方法依賴的package包/類
/**
 * Creates a copy of an SBOL ComponentDefintion from the given ComponentDefinition's Component if it does not already exist within the given SBOL Document.
 * 
 * @param sbolDoc - The SBOL Document that will store the created ComponentDefintion.
 * @param cd - The ComponentDefinition's Component to be created.
 * @throws SBOLValidationException - SBOL validation exception while creating an SBOL object for SBML2SBOL conversion.
 */
private static void recurseComponentDefinition(SBOLDocument sbolDoc, ComponentDefinition cd) throws SBOLValidationException {
	for (org.sbolstandard.core2.Component comp : cd.getComponents()) {
		if (sbolDoc.getComponentDefinition(comp.getDefinitionURI()) == null) {
			ComponentDefinition compDef = comp.getDefinition();
			sbolDoc.createCopy(compDef);

			for (Sequence sequence : compDef.getSequences()) {
				if (sbolDoc.getSequence(sequence.getIdentity()) == null) {
					sbolDoc.createCopy(sequence);

				}
			}
			recurseComponentDefinition(sbolDoc,compDef);
		}
	}
}
 
開發者ID:MyersResearchGroup,項目名稱:iBioSim,代碼行數:24,代碼來源:SBML2SBOL.java

示例2: addAsNestedDerivation

import org.sbolstandard.core2.ComponentDefinition; //導入方法依賴的package包/類
private void addAsNestedDerivation(ComponentDefinition derivationCD, CombinatorialDerivation derivation)
		throws SBOLValidationException {
	for (ComponentDefinition parentCD : design.getComponentDefinitions()) {
		for (org.sbolstandard.core2.Component link : parentCD.getComponents()) {
			if (link.getDefinition().equals(derivationCD)) {
				CombinatorialDerivation parentDerivation = getCombinatorialDerivation(parentCD);

				if (parentDerivation != null) {
					VariableComponent variable = getVariableComponent(parentDerivation, link);

					if (variable == null) {
						variable = createVariableComponent(parentDerivation, OperatorType.ONE, link);
					}

					if (!variable.getVariantDerivations().contains(derivation)) {
						variable.addVariantDerivation(derivation.getIdentity());
					}
				}
			}
		}
	}
}
 
開發者ID:SynBioDex,項目名稱:SBOLDesigner,代碼行數:23,代碼來源:VariantEditor.java

示例3: getComponentLink

import org.sbolstandard.core2.ComponentDefinition; //導入方法依賴的package包/類
private org.sbolstandard.core2.Component getComponentLink(ComponentDefinition derivationCD,
		ComponentDefinition variableCD) {
	for (org.sbolstandard.core2.Component link : derivationCD.getComponents()) {
		if (link.getDefinitionURI().equals(variableCD.getIdentity())) {
			return link;
		}
	}

	return null;
}
 
開發者ID:SynBioDex,項目名稱:SBOLDesigner,代碼行數:11,代碼來源:VariantEditor.java

示例4: updateComponentReferences

import org.sbolstandard.core2.ComponentDefinition; //導入方法依賴的package包/類
/**
 * Looks through all the components and updates all references from
 * originalIdentity to identity
 */
private void updateComponentReferences(URI originalIdentity, URI newIdentity) throws SBOLValidationException {
	for (ComponentDefinition CD : design.getComponentDefinitions()) {
		for (org.sbolstandard.core2.Component comp : CD.getComponents()) {
			if (comp.getDefinitionURI().equals(originalIdentity)) {
				comp.setDefinition(newIdentity);
			}
		}
	}
}
 
開發者ID:SynBioDex,項目名稱:SBOLDesigner,代碼行數:14,代碼來源:SBOLDesign.java


注:本文中的org.sbolstandard.core2.ComponentDefinition.getComponents方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。