Skip to content
Snippets Groups Projects
Commit 7cd368d6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

add missing element-id

parent 0e2564dc
No related branches found
No related tags found
1 merge request!1887add missing element-id
Pipeline #103489 failed
package lcsb.mapviewer.model.map.reaction;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.modelutils.map.ElementUtils;
import lcsb.mapviewer.modelutils.serializer.model.map.ElementAsIdSerializer;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
/**
* One of two known types of nodes in the {@link Reaction}. It defines input or
* output element of the reaction in the map model. {@link #element} define
......@@ -21,17 +20,15 @@ import lcsb.mapviewer.modelutils.serializer.model.map.ElementAsIdSerializer;
* <li>{@link Product} - output of the reaction,</li>
* <li>{@link Modifier} - some modifier of the reaction.</li>
* </ul>
*
*
*
* @author Piotr Gawron
*
*/
@Entity
@DiscriminatorValue("GENERIC_REACTION_NODE")
public abstract class ReactionNode extends AbstractNode {
/**
*
*
*/
private static final long serialVersionUID = 1L;
......@@ -53,9 +50,8 @@ public abstract class ReactionNode extends AbstractNode {
/**
* Constructor that creates a copy of the object in the parameter.
*
* @param node
* original node
*
* @param node original node
*/
protected ReactionNode(final ReactionNode node) {
super(node);
......@@ -65,9 +61,8 @@ public abstract class ReactionNode extends AbstractNode {
/**
* Constructor that creates node for given {@link #element}.
*
* @param element
* {@link Element} to which this node refer to
*
* @param element {@link Element} to which this node refer to
*/
public ReactionNode(final Element element) {
this.element = element;
......@@ -81,9 +76,15 @@ public abstract class ReactionNode extends AbstractNode {
return element;
}
public String getElementId() {
if (element != null) {
return element.getElementId();
}
return null;
}
/**
* @param element
* the element to set
* @param element the element to set
* @see #element
*/
public void setElement(final Element element) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment