Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
98f6d22
updated the model to ensure consistent between curation and production
guanmingwu Jun 20, 2025
1931729
added nodes to new classes
guanmingwu Jun 20, 2025
b3add2a
Used relationship for modifiedList to keep the order and fixed a bug
guanmingwu Jun 21, 2025
78f4b61
added replacementInstanceDB_IDs for replacement
guanmingwu Sep 29, 2025
56f4b84
Created an explicit rel for structureModified to ensure order
guanmingwu Dec 13, 2025
52dde80
increased the pom version for the curator tool
guanmingwu Dec 13, 2025
e950abc
added a note
guanmingwu Dec 14, 2025
bb1fdcb
Fixed the data type for isCanonical to Boolean
guanmingwu Feb 5, 2026
7a8de5a
added back regulation to RegulationReference
guanmingwu Feb 6, 2026
1282c7e
commented out regulatedBy set/get methods
guanmingwu Feb 7, 2026
f744b63
bug fix in NegativePrecedingEvent
guanmingwu Mar 4, 2026
c94b675
add PhysicalEntityCellType model and relationships to Complex, Pathway,
guanmingwu Mar 30, 2026
d34f951
bump version to 2.0.15.CT and add setContext method for
guanmingwu Apr 28, 2026
5e63fcb
Updates
beaversd May 6, 2026
40c9503
Merge remote-tracking branch 'origin/dev' into curator-tool
beaversd May 6, 2026
37b70ae
bump version to 3.0.0.CT and comment out JSOGGenerator usage in
guanmingwu May 18, 2026
67ac3fd
bump version to 3.0.1.CT and add authorName support in Publication
guanmingwu Aug 1, 2026
ca6fb74
refactor: update Deletable interface to DatabaseObject for broader
guanmingwu Aug 27, 2026
6d422ef
fix: handle null databaseName in ExternalOntology by falling back to
guanmingwu Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
541 changes: 272 additions & 269 deletions pom.xml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/main/java/org/reactome/server/graph/domain/model/Complex.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class Complex extends PhysicalEntity implements CompositionAggregator {

@Relationship(type = "relatedSpecies")
private List<Species> relatedSpecies;

@Relationship(type = "componentCellType")
private List<PhysicalEntityCellType> componentCellType;

@Override
public Stream<? extends Collection<? extends Has<? extends DatabaseObject>>> defineCompositionRelations() {
Expand All @@ -56,6 +59,14 @@ public Complex(Long dbId) {
super(dbId);
}

public List<PhysicalEntityCellType> getComponentCellType() {
return componentCellType;
}

public void setComponentCellType(List<PhysicalEntityCellType> componentCellType) {
this.componentCellType = componentCellType;
}

public Boolean getIsChimeric() {
return isChimeric;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
package org.reactome.server.graph.domain.model;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.SortedSet;
import java.util.TreeSet;

import org.reactome.server.graph.domain.annotations.ReactomeProperty;
import org.reactome.server.graph.domain.annotations.ReactomeSchemaIgnore;
import org.reactome.server.graph.domain.annotations.ReactomeTransient;
import org.reactome.server.graph.domain.relationship.ModifiedList;
import org.reactome.server.graph.domain.result.DatabaseObjectLike;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;
import org.springframework.lang.NonNull;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

/**
* DatabaseObject contains the minimum fields used to define an instance of an Reactome entry
Expand Down Expand Up @@ -61,13 +66,21 @@ public abstract class DatabaseObject implements Serializable, Comparable<Databas

@Relationship(type = "modified", direction = Relationship.Direction.INCOMING)
private InstanceEdit modified;

// This is a list of InstanceEdits that have modified this DatabaseObject.
// So that we can track all modifications, not just the most recent one.
@Relationship(type = "modifiedList", direction = Relationship.Direction.INCOMING)
private SortedSet<ModifiedList> modifiedList;

@Relationship(type = "stableIdentifier")
private StableIdentifier stableIdentifier;

public DatabaseObject() {
}

public DatabaseObject(Long dbId) {
this.dbId = dbId;
}
}

// @ReactomeSchemaIgnore
// public Long getId() {
Expand All @@ -78,6 +91,40 @@ public DatabaseObject(Long dbId) {
// this.id = id;
// }

public StableIdentifier getStableIdentifier() {
return stableIdentifier;
}

public void setStableIdentifier(StableIdentifier stableIdentifier) {
this.stableIdentifier = stableIdentifier;
}

public List<InstanceEdit> getModifiedList() {
if (this.modifiedList == null || this.modifiedList.isEmpty()) {
return null;
}

List<InstanceEdit> rtn = new ArrayList<>();
for (ModifiedList modified : this.modifiedList) {
rtn.add(modified.getInstanceEdit());
}
return rtn;
}

public void setModifiedList(List<InstanceEdit> modifiedList) {
if (modifiedList == null || modifiedList.isEmpty()) {
return;
}
this.modifiedList = new TreeSet<>();
int order = 0;
for (InstanceEdit instanceEdit : modifiedList) {
ModifiedList aux = new ModifiedList();
aux.setInstanceEdit(instanceEdit);
aux.setOrder(order++);
this.modifiedList.add(aux);
}
}

public Long getDbId() {
return dbId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@

import java.util.List;

/**
* This interface is not used any more because it limits the scope of replacementInstances in Deleted, which is supposed to
* cover all different types of DatabaseObjects. It is kept for backward compatibility with the old code since the nodes have
* been already created in the database. The interface may not be removed in the future, but should never be used in new code.
*/
@Node
@Deprecated
public interface Deletable extends DatabaseObjectLike {
List<Deleted> getDeleted();
}
17 changes: 14 additions & 3 deletions src/main/java/org/reactome/server/graph/domain/model/Deleted.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ public class Deleted extends MetaDatabaseObject{
private DeletedControlledVocabulary reason;

@Relationship(type="replacementInstances")
private List<Deletable> replacementInstances;
private List<DatabaseObject> replacementInstances;

@Deprecated
@ReactomeProperty(originName = "deletedInstanceDB_ID")
private List<Integer> deletedInstanceDbId;

@ReactomeProperty(originName = "replacementInstanceDB_IDs")
private List<Integer> replacementInstanceDbIds;

public Deleted() {
}
Expand All @@ -34,6 +37,14 @@ public String getCuratorComment() {
return curatorComment;
}

public List<Integer> getReplacementInstanceDbIds() {
return replacementInstanceDbIds;
}

public void setReplacementInstanceDbIds(List<Integer> replacementInstanceDbIds) {
this.replacementInstanceDbIds = replacementInstanceDbIds;
}

public void setCuratorComment(String curatorComment) {
this.curatorComment = curatorComment;
}
Expand All @@ -54,11 +65,11 @@ public void setReason(DeletedControlledVocabulary reason) {
this.reason = reason;
}

public List<Deletable> getReplacementInstances() {
public List<DatabaseObject> getReplacementInstances() {
return replacementInstances;
}

public void setReplacementInstances(List<Deletable> replacementInstances) {
public void setReplacementInstances(List<DatabaseObject> replacementInstances) {
this.replacementInstances = replacementInstances;
}

Expand Down
49 changes: 46 additions & 3 deletions src/main/java/org/reactome/server/graph/domain/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@
import org.reactome.server.graph.domain.annotations.*;
import org.reactome.server.graph.domain.relationship.EventOf;
import org.reactome.server.graph.domain.relationship.Has;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.stream.Collectors;

import org.reactome.server.graph.domain.annotations.ReactomeProperty;
import org.reactome.server.graph.domain.annotations.ReactomeSchemaIgnore;
import org.reactome.server.graph.domain.annotations.ReactomeTransient;
import org.reactome.server.graph.domain.relationship.HasCompartment;
import org.reactome.server.graph.domain.relationship.StructureModified;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;

import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import com.fasterxml.jackson.annotation.JsonIgnore;

@SuppressWarnings({"unused"})

Expand Down Expand Up @@ -40,6 +52,8 @@ public abstract class Event extends DatabaseObject implements Trackable, Deletab
private String releaseStatus;
@ReactomeProperty(addedField = true)
private String speciesName;
@ReactomeProperty(originName = "_doRelease")
private Boolean doRelease;

@Relationship(type = "authored", direction = Relationship.Direction.INCOMING)
private List<InstanceEdit> authored;
Expand Down Expand Up @@ -115,8 +129,13 @@ public abstract class Event extends DatabaseObject implements Trackable, Deletab
@Relationship(type = "internalReviewed", direction = Relationship.Direction.INCOMING)
private List<InstanceEdit> internalReviewed;

// For some reason, we have to define a relationship to keep the order
// for newly added InstanceEdit in this attribute. Not sure why.
// Use SortedSet to make sure the order is correct. Most likely
// the sorting is conducted when the list, which is generated by the framework(?), is
// converted into a SortedSet.
@Relationship(type = "structureModified", direction = Relationship.Direction.INCOMING)
private List<InstanceEdit> structureModified;
private SortedSet<StructureModified> structureModified;

@ReactomeTransient
@Relationship(type = "replacementInstances", direction = Relationship.Direction.INCOMING)
Expand Down Expand Up @@ -404,11 +423,26 @@ public void setInternalReviewed(List<InstanceEdit> internalReviewed) {
}

public List<InstanceEdit> getStructureModified() {
return structureModified;
if (structureModified == null || structureModified.isEmpty())
return null;
return this.structureModified.stream().map(s -> s.getInstanceEdit()).collect(Collectors.toList());
}

public void setStructureModified(List<InstanceEdit> structureModified) {
this.structureModified = structureModified;
if (structureModified != null && structureModified.size() > 0) {
int order = 0;
this.structureModified = new TreeSet<>();
for (InstanceEdit ie : structureModified) {
StructureModified sm = new StructureModified();
sm.setId(ie.getDbId());
sm.setInstanceEdit(ie);
sm.setOrder(order);
order ++;
this.structureModified.add(sm);
}
}
else
this.structureModified = null;
}

@Override
Expand Down Expand Up @@ -436,4 +470,13 @@ public Integer getMaxDepth() {
public void setMaxDepth(Integer maxDepth) {
this.maxDepth = maxDepth;
}


public Boolean getDoRelease() {
return doRelease;
}

public void setDoRelease(Boolean doRelease) {
this.doRelease = doRelease;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public abstract class ExternalOntology extends DatabaseObject {
public ExternalOntology() {}

public String getDatabaseName() {
// Not all instances having databaseName setting. Therefore,
// the code also tries to get the database name from referenceDatabase.
// Not sure why databaseName is set in the first place. Most likely
// for performance reason.
if (databaseName == null && referenceDatabase != null) {
return referenceDatabase.getDisplayName();
}
return databaseName;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@SuppressWarnings("unused")
@Node
public class GO_BiologicalProcess extends GO_Term{
public class GO_BiologicalProcess extends GO_Term {

public GO_BiologicalProcess() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ public class GO_CellularComponent extends GO_Term {
@Relationship(type = "hasPart")
private List<GO_CellularComponent> hasPart;

@Relationship(type = "instanceOf")
private List<GO_CellularComponent> instanceOf;

@Relationship(type = "surroundedBy")
private List<GO_CellularComponent> surroundedBy;

Expand All @@ -43,14 +40,6 @@ public void setHasPart(List<GO_CellularComponent> hasPart) {
this.hasPart = hasPart;
}

public List<GO_CellularComponent> getInstanceOf() {
return instanceOf;
}

public void setInstanceOf(List<GO_CellularComponent> instanceOf) {
this.instanceOf = instanceOf;
}

public List<GO_CellularComponent> getSurroundedBy() {
return surroundedBy;
}
Expand Down
Loading