Package org.biopax.paxtools.controller
Class ShallowCopy
java.lang.Object
org.biopax.paxtools.controller.ShallowCopy
- All Implemented Interfaces:
Visitor
"Clones" a BioPAX element - using direct properties and dependent children only.
(shallow copy).
Compare to
Fetcher- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructos that defaults to BioPAX L3.ShallowCopy(EditorMap map) Deprecated.use Level based constructor instead.ShallowCopy(BioPAXLevel level) BioPAXLevel based constructor -
Method Summary
Modifier and TypeMethodDescription<T extends BioPAXElement>
TCreates a copy of the BioPAX object with all its properties are the same, and also adds it to a model.<T extends BioPAXElement>
TReturns a copy of the BioPAX element (with all the property values are same)voidvisit(BioPAXElement domain, Object range, Model model, PropertyEditor editor) An implementation of this method should perform a BioPAX element and editor dependent operation on the model.
-
Constructor Details
-
ShallowCopy
Deprecated.use Level based constructor instead.Editor map based constructor.- Parameters:
map- that determines the BioPAX Level
-
ShallowCopy
BioPAXLevel based constructor- Parameters:
level- used for the cloning operation.
-
ShallowCopy
public ShallowCopy()Empty constructos that defaults to BioPAX L3.
-
-
Method Details
-
copy
Creates a copy of the BioPAX object with all its properties are the same, and also adds it to a model.- Type Parameters:
T- BioPAX type/class of the source and copy elements- Parameters:
model- target biopax modelsource- a biopax object to copynewID- new (copy) biopax object's URI- Returns:
- copy of the source biopax element
-
copy
Returns a copy of the BioPAX element (with all the property values are same)- Type Parameters:
T- biopax type- Parameters:
source- biopax element to copynewID- copy biopax element's absolute URI- Returns:
- a copy of the source biopax element
-
visit
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.
-