/** * Clones everything from the original graph */ public void cloneAll() { cloneMetaData(); cloneAllConcepts(); cloneAllRelations(); }
/** * NB if you make a clone request here and metadata has not been cloned, * then this will be done */ public void cloneAllConcepts() { if (!metaDataHasBeenCloned) { cloneMetaData(); } if (conceptsHaveBeenCloned) { System.err .println("Concepts have already been cloned: Ignoring request"); return; } conceptsHaveBeenCloned = true; for (ONDEXConcept c : origGraph.getConcepts()) { cloneConcept(c); } }
/** * NB if you make a clone request here and metadata and concepts have not * been cloned, then this will be done */ public void cloneAllRelations() { if (!metaDataHasBeenCloned) { cloneMetaData(); } if (!conceptsHaveBeenCloned) { cloneAllConcepts(); } if (relationsHaveBeenCloned) { System.err .println("Relations have already been cloned: Ignoring request"); return; } relationsHaveBeenCloned = true; for (ONDEXRelation r : origGraph.getRelations()) { cloneRelation(r); } }