org.biopax.paxtools.controller
Class ShallowCopy

java.lang.Object
  extended by org.biopax.paxtools.controller.ShallowCopy
All Implemented Interfaces:
Visitor

public class ShallowCopy
extends java.lang.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:
Visitor, Traverser

Constructor Summary
ShallowCopy()
           
ShallowCopy(BioPAXLevel l)
           
ShallowCopy(EditorMap map)
           
 
Method Summary
<T extends BioPAXElement>
T
copy(Model model, T source, java.lang.String newID)
          Creates a copy of the BioPAX object with all its properties are the same, and also adds it to a model.
<T extends BioPAXElement>
T
copy(T source, java.lang.String newID)
          Returns a copy of the BioPAX element (with all the property values are same)
 void visit(BioPAXElement domain, java.lang.Object range, Model model, PropertyEditor editor)
          An implementation of this method should perform a BioPAX element and editor dependent operation on the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShallowCopy

public ShallowCopy(EditorMap map)

ShallowCopy

public ShallowCopy(BioPAXLevel l)

ShallowCopy

public ShallowCopy()
Method Detail

copy

public <T extends BioPAXElement> T copy(Model model,
                                        T source,
                                        java.lang.String newID)
Creates a copy of the BioPAX object with all its properties are the same, and also adds it to a model.

Parameters:
model -
source -
newID -
Returns:

copy

public <T extends BioPAXElement> T copy(T source,
                                        java.lang.String newID)
Returns a copy of the BioPAX element (with all the property values are same)

Type Parameters:
T -
Parameters:
source -
newID -
Returns:

visit

public void visit(BioPAXElement domain,
                  java.lang.Object range,
                  Model model,
                  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
model - model on which the visiting operation will be done
editor - editor


Copyright © 2011 BioPAX. All Rights Reserved.