Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding new node wrappers

  • Loading branch information...
commit 992dd5f3b53d2f1abb21c94560b40fe5266ee091 1 parent 5887973
@pablopareja pablopareja authored
View
53 src/org/grassius/grg/model/nodes/GRGProteinNode.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 "GRG"
+ *
+ * This file is part of GRG
+ *
+ * GRG is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ */
+package org.grassius.grg.model.nodes;
+
+import com.era7.bioinfo.bioinfoneo4j.BasicEntity;
+import org.neo4j.graphdb.Node;
+
+/**
+ *
+ * @author Pablo Pareja Tobes <ppareja@era7.com>
+ */
+public class GRGProteinNode extends BasicEntity{
+
+ public static final String NODE_TYPE = GRGProteinNode.class.getCanonicalName();
+
+
+ public GRGProteinNode(Node n){
+ super(n);
+ }
+
+
+ @Override
+ public int hashCode(){
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if(obj instanceof GRGProteinNode){
+ GRGProteinNode other = (GRGProteinNode) obj;
+ return this.node.equals(other.node);
+ }else{
+ return false;
+ }
+ }
+
+
+}
+
View
60 src/org/grassius/grg/model/nodes/ProteinFamilyGroupNode.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 "GRG"
+ *
+ * This file is part of GRG
+ *
+ * GRG is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ */
+package org.grassius.grg.model.nodes;
+
+import com.era7.bioinfo.bioinfoneo4j.BasicEntity;
+import org.neo4j.graphdb.Node;
+
+/**
+ *
+ * @author Pablo Pareja Tobes <ppareja@era7.com>
+ */
+public class ProteinFamilyGroupNode extends BasicEntity{
+
+ public static final String NODE_TYPE = ProteinFamilyGroupNode.class.getCanonicalName();
+
+ public static final String NAME_PROPERTY = "name";
+
+
+ public ProteinFamilyGroupNode(Node n){
+ super(n);
+ }
+
+
+ public String getName(){ return String.valueOf(node.getProperty(NAME_PROPERTY));}
+
+
+ public void setName(String value){ node.setProperty(NAME_PROPERTY, value);}
+
+
+ @Override
+ public int hashCode(){
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if(obj instanceof ProteinFamilyGroupNode){
+ ProteinFamilyGroupNode other = (ProteinFamilyGroupNode) obj;
+ return this.node.equals(other.node);
+ }else{
+ return false;
+ }
+ }
+
+}
+
View
60 src/org/grassius/grg/model/nodes/ProteinFamilyNode.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 "GRG"
+ *
+ * This file is part of GRG
+ *
+ * GRG is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ */
+package org.grassius.grg.model.nodes;
+
+import com.era7.bioinfo.bioinfoneo4j.BasicEntity;
+import org.neo4j.graphdb.Node;
+
+/**
+ *
+ * @author Pablo Pareja Tobes <ppareja@era7.com>
+ */
+public class ProteinFamilyNode extends BasicEntity{
+
+ public static final String NODE_TYPE = ProteinFamilyNode.class.getCanonicalName();
+
+ public static final String NAME_PROPERTY = "name";
+
+
+ public ProteinFamilyNode(Node n){
+ super(n);
+ }
+
+
+ public String getName(){ return String.valueOf(node.getProperty(NAME_PROPERTY));}
+
+
+ public void setName(String value){ node.setProperty(NAME_PROPERTY, value);}
+
+
+ @Override
+ public int hashCode(){
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if(obj instanceof ProteinFamilyNode){
+ ProteinFamilyNode other = (ProteinFamilyNode) obj;
+ return this.node.equals(other.node);
+ }else{
+ return false;
+ }
+ }
+
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.