* Check if a pathway with a specific id already exists in the network
*
* @param id a String
* @return true if there is a {@link BioPathway} with this id exists in the BioNetwork
*/
publicbooleancontainsPathway(@NonNullStringid){
returnthis.pathways.containsId(id);
}
/**
* Get a protein by its id
* @param id a String
* @return a {@link BioProtein}
*/
publicBioProteingetProtein(@NonNullStringid){
returnthis.proteins.get(id);
}
/**
* Check if a pathway with a specific id already exists in the network
*
* @param id a String
* @return true if there is a {@link BioPathway} with this id exists in the BioNetwork
*/
publicbooleancontainsProtein(@NonNullStringid){
returnthis.proteins.containsId(id);
}
/**
* Get a gene by its id
* @param id a String
* @return a {@link BioGene}
*/
publicBioGenegetGene(Stringid){
returnthis.genes.get(id);
}
/**
* Check if a gene with a specific id already exists in the network
*
* @param id a String
* @return true if there is a {@link BioGene} with this id exists in the BioNetwork
*/
publicbooleancontainsGene(Stringid){
returnthis.genes.containsId(id);
}
/**
* Get a compartment by its id
* @param id a String
* @return a {@link BioCompartment}
*/
publicBioCompartmentgetCompartment(Stringid){
returnthis.compartments.get(id);
}
/**
* Check if a compartment with a specific id already exists in the network
*
* @param id a String
* @return true if there is a {@link BioCompartment} with this id exists in the BioNetwork
*/
publicbooleancontainsCompartment(Stringid){
returnthis.compartments.containsId(id);
}
/**
* Get an enzyme by its id
* @param id a String
* @return a {@link BioEnzyme}
*/
publicBioEnzymegetEnzyme(Stringid){
returnthis.enzymes.get(id);
}
/**
* Check if an enzyme with a specific id already exists in the network
*
* @param id a String
* @return true if there is a {@link BioEnzyme} with this id exists in the BioNetwork
*/
publicbooleancontainsEnzyme(Stringid){
returnthis.enzymes.containsId(id);
}
/**
* Add several entities
*
...
...
@@ -134,8 +272,7 @@ public class BioNetwork extends BioEntity {
this.addCompartment((BioCompartment)e);
}elseif(einstanceofBioEnzyme){
this.addEnzyme((BioEnzyme)e);
}
else{
}else{
thrownewIllegalArgumentException(
"BioEntity \""+e.getClass().getSimpleName()+"\" not supported by BioNetwork");
}
...
...
@@ -583,7 +720,7 @@ public class BioNetwork extends BioEntity {
* @param localisation a {@link fr.inrae.toulouse.metexplore.met4j_core.biodata.BioCompartment}
* @param products a {@link fr.inrae.toulouse.metexplore.met4j_core.biodata.collection.BioCollection} of {@link fr.inrae.toulouse.metexplore.met4j_core.biodata.BioMetabolite} to add to the right side of the reaction