Class Cloner

java.lang.Object
org.biopax.paxtools.controller.Cloner
All Implemented Interfaces:
Visitor

public class Cloner extends Object implements Visitor
Specifically "Clones" the BioPAX elements set (traverses to obtain dependent elements), puts them to the new model using the visitor and traverser framework; ignores elements that are not in the source list (compare to Fetcher).
See Also:
  • Constructor Details

  • Method Details

    • clone

      public Model clone(Model source, Set<BioPAXElement> toBeCloned)
      Deprecated.
      use clone(Set) instead ('source' model was not used in previous versions)
      For each element from the 'toBeCloned' list, it creates a copy in the new model, setting all the data properties; however, object property values that refer to BioPAX elements not in 'toBeCloned' list are ignored.
      Parameters:
      source - - actually, is never used... can be null all the same
      toBeCloned - elements to clone
      Returns:
      a new model containing the cloned biopax objects
    • clone

      public Model clone(Set<BioPAXElement> toBeCloned)
      For each element from the 'toBeCloned' list, it creates a copy in the new model, setting all the data properties; however, object property values that refer to BioPAX elements not in 'toBeCloned' list are ignored. As the result, e.g., a Pathway can be incomplete, missing some or all its sub-processes, xrefs, pathway steps.
      Parameters:
      toBeCloned - elements to clone
      Returns:
      a new model containing the cloned biopax objects
    • visit

      public void visit(BioPAXElement domain, Object range, Model targetModel, PropertyEditor editor)
      Description copied from interface: Visitor
      An implementation of this method should perform a BioPAX element and editor dependent operation on the model. Examples of uses of this method include adding a BioPAX element--with all its dependent elements that can be reached via the editor--into the model, or updating an element that is equivalent to the given BioPAX element using the latter's/former's values.
      Specified by:
      visit in interface Visitor
      Parameters:
      domain - BioPAXElement which is the domain of this property
      range - Object which is the range of this property
      targetModel - model on which the visiting operation will be done
      editor - editor