Package org.biopax.paxtools.converter
Class LevelUpgrader
java.lang.Object
org.biopax.paxtools.controller.Traverser
org.biopax.paxtools.controller.AbstractTraverser
org.biopax.paxtools.converter.LevelUpgrader
- All Implemented Interfaces:
ModelFilter,Visitor
Upgrades BioPAX L1 and L2 to Level 3.
Notes:
- it does not fix existing BioPAX errors
- most but not all things are converted (e.g., complex.ORGANISM property cannot...)
- phy. entities "clones" - because, during L1 or L2 data read, all re-used pEPs are duplicated... (TODO filter after the conversion)
- Author:
- rodch
-
Field Summary
Fields inherited from class org.biopax.paxtools.controller.AbstractTraverser
visited -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor that also loads 'classesmap' and 'propsmap' from the properties files.LevelUpgrader(BioPAXFactory factory) Constructor -
Method Summary
Modifier and TypeMethodDescriptionConverts a BioPAX Model, Level 1 or 2, to the Level 3.static StringgetLocalId(BioPAXElement bpe) Gets the local part of the BioPAX element ID.protected Objectprotected voidpreparePep2PEIDMap(Model model) protected voidvisit(Object value, BioPAXElement parent, Model newModel, PropertyEditor editor) This is to implement a real action here: do something, return or even to continue (traverse) into the child (range) element's properties if it's a BioPAX object.Methods inherited from class org.biopax.paxtools.controller.AbstractTraverser
reset, traverse, visitMethods inherited from class org.biopax.paxtools.controller.Traverser
filter, getVisitor, setVisitor, traverseElements
-
Constructor Details
-
LevelUpgrader
public LevelUpgrader()Default Constructor that also loads 'classesmap' and 'propsmap' from the properties files. -
LevelUpgrader
Constructor- Parameters:
factory- BioPAX objects factory implementation
-
-
Method Details
-
filter
Converts a BioPAX Model, Level 1 or 2, to the Level 3.- Specified by:
filterin interfaceModelFilter- Parameters:
model- BioPAX model to upgrade- Returns:
- new Level3 model
-
visit
Description copied from class:AbstractTraverserThis is to implement a real action here: do something, return or even to continue (traverse) into the child (range) element's properties if it's a BioPAX object.- Specified by:
visitin classAbstractTraverser- Parameters:
value- property valueparent- parent/owner BioPAX elementnewModel- the BioPAX model of interesteditor- the property editor
-
getLocalId
Gets the local part of the BioPAX element ID.- Parameters:
bpe- BioPAX object- Returns:
- id - local part of the URI
-
getMatchingEnum
-
preparePep2PEIDMap
-