From 3a346de2daeb2d71db8977840620bb0f4dfc183b Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 30 Jun 2017 14:15:41 +0200
Subject: [PATCH] regulation contain information about containedInPathway

---
 .../reactome/model/ReactomeRegulation.java    | 40 ++++++++++++++++---
 .../columnParser/RegulationColumnParser.java  |  2 +
 2 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/reactome/src/main/java/lcsb/mapviewer/reactome/model/ReactomeRegulation.java b/reactome/src/main/java/lcsb/mapviewer/reactome/model/ReactomeRegulation.java
index ca1e444af2..220e738700 100644
--- a/reactome/src/main/java/lcsb/mapviewer/reactome/model/ReactomeRegulation.java
+++ b/reactome/src/main/java/lcsb/mapviewer/reactome/model/ReactomeRegulation.java
@@ -9,16 +9,27 @@ package lcsb.mapviewer.reactome.model;
  * 
  */
 public class ReactomeRegulation extends ReactomeDatabaseObject {
+	
 	/**
-	 * Event param in reactome model. More information can be found <a
-	 * href="http://wiki.reactome.org/index.php/Glossary_Data_Model">here</a>.
+	 * Event param in reactome model. More information can be found
+	 * <a href="http://wiki.reactome.org/index.php/Glossary_Data_Model">here</a>.
 	 */
-	private ReactomeEvent						regulatedEntity;
+	private ReactomeEvent					 regulatedEntity;
+	
 	/**
-	 * DatabaseObject param in reactome model. More information can be found <a
-	 * href="http://wiki.reactome.org/index.php/Glossary_Data_Model">here</a>.
+	 * DatabaseObject param in reactome model. More information can be found
+	 * <a href="http://wiki.reactome.org/index.php/Glossary_Data_Model">here</a>.
 	 */
-	private ReactomeDatabaseObject	regulator;
+	private ReactomeDatabaseObject regulator;
+
+	/**
+	 * If a reaction is regulated in different ways in different pathway contexts,
+	 * the containedInPathway allows curator to specify this. More information can
+	 * be found <a href=
+	 * "http://wiki.reactome.org/index.php/Glossary_Data_Model#Regulation">here
+	 * </a>.
+	 */
+	private ReactomePathway				 containedInPathway;
 
 	/**
 	 * @return the regulatedEntity
@@ -54,4 +65,21 @@ public class ReactomeRegulation extends ReactomeDatabaseObject {
 		this.regulator = regulator;
 	}
 
+	/**
+	 * @return the containedInPathway
+	 * @see #containedInPathway
+	 */
+	public ReactomePathway getContainedInPathway() {
+		return containedInPathway;
+	}
+
+	/**
+	 * @param containedInPathway
+	 *          the containedInPathway to set
+	 * @see #containedInPathway
+	 */
+	public void setContainedInPathway(ReactomePathway containedInPathway) {
+		this.containedInPathway = containedInPathway;
+	}
+
 }
diff --git a/reactome/src/main/java/lcsb/mapviewer/reactome/xml/columnParser/RegulationColumnParser.java b/reactome/src/main/java/lcsb/mapviewer/reactome/xml/columnParser/RegulationColumnParser.java
index 39f16dfb7c..08beeb87dd 100644
--- a/reactome/src/main/java/lcsb/mapviewer/reactome/xml/columnParser/RegulationColumnParser.java
+++ b/reactome/src/main/java/lcsb/mapviewer/reactome/xml/columnParser/RegulationColumnParser.java
@@ -26,6 +26,8 @@ public class RegulationColumnParser extends ColumnParser<ReactomeRegulation> {
 			object.setRegulatedEntity(geteParser().parseObject(node));
 		} else if (node.getNodeName().equalsIgnoreCase("regulator")) {
 			object.setRegulator(getDoParser().parseObject(node));
+		} else if (node.getNodeName().equalsIgnoreCase("containedInPathway")) {
+			object.setRegulator(getpParser().parseObject(node));
 		} else {
 			getParentParser().updateColumnFromNode(object, node);
 		}
-- 
GitLab