001package org.biopax.paxtools.pattern.miner;
002
003import org.biopax.paxtools.model.level3.ProteinReference;
004import org.biopax.paxtools.pattern.Pattern;
005import org.biopax.paxtools.pattern.PatternBox;
006import org.biopax.paxtools.pattern.constraint.Type;
007
008/**
009 * Miner for the controls-state-change pattern.
010 * @author Ozgun Babur
011 */
012public class CSCOButIsParticipantMiner extends ControlsStateChangeOfMiner
013{
014        /**
015         * Constructor that sets name and description.
016         */
017        public CSCOButIsParticipantMiner()
018        {
019                super("-but-a-participant", "The controller is modeled as a " +
020                        "participant of the Conversion. This is in fact a modeling error, but this pattern " +
021                        "exists in some resources. The controller PhysicalEntity appears at both left and " +
022                        "right of the Conversion.");
023        }
024
025        /**
026         * Constructs the pattern.
027         * @return pattern
028         */
029        @Override
030        public Pattern constructPattern()
031        {
032                Pattern p = PatternBox.controlsStateChangeButIsParticipant();
033                p.add(new Type(ProteinReference.class), "controller ER");
034                p.add(new Type(ProteinReference.class), "changed ER");
035                return p;
036        }
037
038        @Override
039        public String[] getMediatorLabels()
040        {
041                return new String[]{"Conversion"};
042        }
043
044        @Override
045        public String getSourceLabel()
046        {
047                return "controller ER";
048        }
049
050        @Override
051        public String getTargetLabel()
052        {
053                return "changed ER";
054        }
055
056
057        @Override
058        public String[] getSourcePELabels()
059        {
060                return new String[]{"controller simple PE", "controller PE"};
061        }
062
063        @Override
064        public String[] getTargetPELabels()
065        {
066                return new String[]{"input PE", "input simple PE", "output PE", "output simple PE"};
067        }
068}