本文整理匯總了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);
}
}
}
示例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());
}
}
}
}
}
}
示例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;
}
示例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);
}
}
}
}