diff --git a/org/gmod/schema/analysis/Analysis.java b/org/gmod/schema/analysis/Analysis.java new file mode 100644 index 0000000000000000000000000000000000000000..280da6955b89a20dd7fe372198d00bdfa98bda3c --- /dev/null +++ b/org/gmod/schema/analysis/Analysis.java @@ -0,0 +1,242 @@ +package org.gmod.schema.analysis; + + +import java.io.Serializable; +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + +public class Analysis implements Serializable { + + // Fields + + + private int analysisId; + + + private String name; + + + private String description; + + + private String program; + + + private String programVersion; + + + private String algorithm; + + + private String sourceName; + + + private String sourceVersion; + + + private String sourceUri; + + + private Date timeExecuted; + + + private Set<AnalysisFeature> analysisFeatures = new HashSet<AnalysisFeature>(0); + + + private Set<AnalysisProp> analysisProps = new HashSet<AnalysisProp>(0); + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getAnalysisId() + */ + public int getAnalysisId() { + return this.analysisId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setAnalysisId(int) + */ + public void setAnalysisId(int analysisId) { + this.analysisId = analysisId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getName() + */ + public String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setName(java.lang.String) + */ + public void setName(String name) { + this.name = name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getDescription() + */ + public String getDescription() { + return this.description; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setDescription(java.lang.String) + */ + public void setDescription(String description) { + this.description = description; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getProgram() + */ + public String getProgram() { + return this.program; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setProgram(java.lang.String) + */ + public void setProgram(String program) { + this.program = program; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getProgramversion() + */ + public String getProgramVersion() { + return this.programVersion; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setProgramversion(java.lang.String) + */ + public void setProgramVersion(String programVersion) { + this.programVersion = programVersion; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getAlgorithm() + */ + public String getAlgorithm() { + return this.algorithm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setAlgorithm(java.lang.String) + */ + public void setAlgorithm(String algorithm) { + this.algorithm = algorithm; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getSourcename() + */ + public String getSourceName() { + return this.sourceName; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setSourcename(java.lang.String) + */ + public void setSourceName(String sourceName) { + this.sourceName = sourceName; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getSourceversion() + */ + public String getSourceVersion() { + return this.sourceVersion; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setSourceversion(java.lang.String) + */ + public void setSourceVersion(String sourceVersion) { + this.sourceVersion = sourceVersion; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getSourceuri() + */ + public String getSourceUri() { + return this.sourceUri; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setSourceuri(java.lang.String) + */ + public void setSourceUri(String sourceUri) { + this.sourceUri = sourceUri; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getTimeexecuted() + */ + public Date getTimeExecuted() { + return this.timeExecuted; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setTimeexecuted(java.util.Date) + */ + public void setTimeExecuted(Date timeExecuted) { + this.timeExecuted = timeExecuted; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getAnalysisfeatures() + */ + public Collection<AnalysisFeature> getAnalysisFeatures() { + return this.analysisFeatures; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setAnalysisfeatures(java.util.Set) + */ + public void setAnalysisFeatures(Set<AnalysisFeature> analysisFeatures) { + this.analysisFeatures = analysisFeatures; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#getAnalysisprops() + */ + public Collection<AnalysisProp> getAnalysisProps() { + return this.analysisProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisI#setAnalysisprops(java.util.Set) + */ + private void setAnalysisProps(Set<AnalysisProp> analysisProps) { + this.analysisProps = analysisProps; + } + + + + +} + + diff --git a/org/gmod/schema/analysis/AnalysisFeature.java b/org/gmod/schema/analysis/AnalysisFeature.java new file mode 100644 index 0000000000000000000000000000000000000000..5bff33006ca81d8a9233619b58df5e08de0cd9b6 --- /dev/null +++ b/org/gmod/schema/analysis/AnalysisFeature.java @@ -0,0 +1,176 @@ +package org.gmod.schema.analysis; + +import org.gmod.schema.sequence.Feature; + +import java.io.Serializable; + + + + + + + + + + + +public class AnalysisFeature implements Serializable { + + // Fields + + + + private int analysisFeatureId; + + + + private Analysis analysis; + + + + private Feature feature; + + + private Double rawScore; + + + private Double normScore; + + + private Double significance; + + + private Double identity; + + // Constructors + + /** default constructor */ + public AnalysisFeature() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public AnalysisFeature(Analysis analysis, Feature feature) { + this.analysis = analysis; + this.feature = feature; + } + /** full constructor */ + public AnalysisFeature(Analysis analysis, Feature feature, Double rawScore, Double normScore, Double significance, Double identity) { + this.analysis = analysis; + this.feature = feature; + this.rawScore = rawScore; + this.normScore = normScore; + this.significance = significance; + this.identity = identity; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getAnalysisFeatureId() + */ + public int getAnalysisFeatureId() { + return this.analysisFeatureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setAnalysisFeatureId(int) + */ + public void setAnalysisFeatureId(int analysisFeatureId) { + this.analysisFeatureId = analysisFeatureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getAnalysis() + */ + public Analysis getAnalysis() { + return this.analysis; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setAnalysis(org.genedb.db.jpa.Analysis) + */ + public void setAnalysis(Analysis analysis) { + this.analysis = analysis; + } + + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getFeature() + */ + public Feature getFeature() { + return this.feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setFeature(org.genedb.db.jpa.Feature) + */ + public void setFeature(Feature feature) { + this.feature = feature; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getRawscore() + */ + public Double getRawScore() { + return this.rawScore; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setRawscore(java.lang.Double) + */ + public void setRawScore(Double rawScore) { + this.rawScore = rawScore; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getNormscore() + */ + public Double getNormScore() { + return this.normScore; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setNormscore(java.lang.Double) + */ + public void setNormScore(Double normScore) { + this.normScore = normScore; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getSignificance() + */ + public Double getSignificance() { + return this.significance; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setSignificance(java.lang.Double) + */ + public void setSignificance(Double significance) { + this.significance = significance; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#getIdentity() + */ + public Double getIdentity() { + return this.identity; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisFeatureI#setIdentity(java.lang.Double) + */ + public void setIdentity(Double identity) { + this.identity = identity; + } + + + + +} + + diff --git a/org/gmod/schema/analysis/AnalysisProp.java b/org/gmod/schema/analysis/AnalysisProp.java new file mode 100644 index 0000000000000000000000000000000000000000..8770dfd483213de9288b0a8f436ea11b63c1b517 --- /dev/null +++ b/org/gmod/schema/analysis/AnalysisProp.java @@ -0,0 +1,104 @@ +package org.gmod.schema.analysis; + + + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; + +import java.io.Serializable; + + + + + + + + + + + +public class AnalysisProp implements Serializable, PropertyI { + + // Fields + + + + private int analysisPropId; + + + + private Analysis analysis; + + + + private CvTerm cvTerm; + + + private String value; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#getAnalysispropId() + */ + private int getAnalysisPropId() { + return this.analysisPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#setAnalysispropId(int) + */ + private void setAnalysisPropId(int analysisPropId) { + this.analysisPropId = analysisPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#getAnalysis() + */ + private Analysis getAnalysis() { + return this.analysis; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#setAnalysis(org.genedb.db.jpa.Analysis) + */ + private void setAnalysis(Analysis analysis) { + this.analysis = analysis; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#getCvterm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#setCvterm(org.gmod.schema.cv.CvTermI) + */ + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#getValue() + */ + private String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.AnalysisPropI#setValue(java.lang.String) + */ + private void setValue(String value) { + this.value = value; + } + + + + +} + + diff --git a/org/gmod/schema/cv/Cv.java b/org/gmod/schema/cv/Cv.java new file mode 100644 index 0000000000000000000000000000000000000000..2f15e4fa622e4fcbbbe62a9e2f41d4e82c309448 --- /dev/null +++ b/org/gmod/schema/cv/Cv.java @@ -0,0 +1,111 @@ +package org.gmod.schema.cv; + + + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + +public class Cv implements Serializable { + + // Fields + + + private int cvId; + + + private String name; + + + private String definition; + + + private Set<CvTermPath> cvTermPaths = new HashSet<CvTermPath>(0); + + + private Set<CvTerm> cvTerms = new HashSet<CvTerm>(0); + + + // Property accessors + + public int getCvId() { + return this.cvId; + } + + public void setCvId(int cvId) { + this.cvId = cvId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#getName() + */ + public String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#setName(java.lang.String) + */ + public void setName(String name) { + this.name = name; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#getDefinition() + */ + public String getDefinition() { + return this.definition; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#setDefinition(java.lang.String) + */ + public void setDefinition(String definition) { + this.definition = definition; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#getCvTermPaths() + */ + public Collection<CvTermPath> getCvTermPaths() { + return this.cvTermPaths; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#setCvTermPaths(java.util.Set) + */ + public void setCvTermPaths(Set<CvTermPath> cvTermPaths) { + this.cvTermPaths = cvTermPaths; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#getCvTerms() + */ + public Collection<CvTerm> getCvTerms() { + return this.cvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvI#setCvTerms(java.util.Set) + */ + public void setCvTerms(Set<CvTerm> cvTerms) { + this.cvTerms = cvTerms; + } + +} + + diff --git a/org/gmod/schema/cv/CvTerm.java b/org/gmod/schema/cv/CvTerm.java new file mode 100644 index 0000000000000000000000000000000000000000..12ff609153b35ded714d694bd00dcea9de39bfd4 --- /dev/null +++ b/org/gmod/schema/cv/CvTerm.java @@ -0,0 +1,648 @@ +package org.gmod.schema.cv; + + +import org.gmod.schema.analysis.AnalysisProp; +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.organism.OrganismProp; +import org.gmod.schema.phylogeny.Phylonode; +import org.gmod.schema.phylogeny.PhylonodeProp; +import org.gmod.schema.phylogeny.PhylonodeRelationship; +import org.gmod.schema.phylogeny.Phylotree; +import org.gmod.schema.pub.Pub; +import org.gmod.schema.pub.PubProp; +import org.gmod.schema.pub.PubRelationship; +import org.gmod.schema.sequence.Feature; +import org.gmod.schema.sequence.FeatureCvTerm; +import org.gmod.schema.sequence.FeatureCvTermProp; +import org.gmod.schema.sequence.FeatureProp; +import org.gmod.schema.sequence.FeatureRelationship; +import org.gmod.schema.sequence.FeatureRelationshipProp; +import org.gmod.schema.sequence.Synonym; + +import java.io.Serializable; +import java.util.Collection; + + + + + + + + + + + + + +public class CvTerm implements Serializable { + + private Collection<Phylotree> phylotrees; + private Collection<PhylonodeProp> phylonodeProps; + private Collection<PhylonodeRelationship> phylonodeRelationships; + private Collection<Phylonode> phylonodes; + + + + + public Collection<Phylotree> getPhylotrees() { + return this.phylotrees; + } + + public void setPhylotrees(Collection<Phylotree> phylotrees) { + this.phylotrees = phylotrees; + } + + + public Collection<PhylonodeProp> getPhylonodeProps() { + return this.phylonodeProps; + } + + public void setPhylonodeProps(Collection<PhylonodeProp> phylonodeProps) { + this.phylonodeProps = phylonodeProps; + } + + + + + public Collection<PhylonodeRelationship> getPhylonodeRelationships() { + return this.phylonodeRelationships; + } + + public void setPhylonodeRelationships(Collection<PhylonodeRelationship> phylonodeRelationships) { + this.phylonodeRelationships = phylonodeRelationships; + } + + + public Collection<Phylonode> getPhylonodes() { + return this.phylonodes; + } + + public void setPhylonodes(Collection<Phylonode> phylonodes) { + this.phylonodes = phylonodes; + } + + + + + + + + + + + + // Fields + + + private int cvTermId; + + + + private DbXRef dbXRef; + + + + private Cv cv; + + + private String name; + + + private String definition; + + + private int isObsolete; + + + private int isRelationshipType; + + + private Collection<AnalysisProp> analysisProps; + + + private Collection<CvTermProp> cvTermPropsForTypeId; + + + private Collection<CvTermProp> cvTermPropsForCvTermId; + + + private Collection<DbXRefProp> dbXRefProps; + + + private Collection<Synonym> synonyms; + + + private Collection<CvTermDbXRef> cvTermDbXRefs; + + + private Collection<CvTermPath> cvTermPathsForTypeId; + + + private Collection<FeatureCvTermProp> featureCvTermProps; + + + private Collection<FeatureCvTerm> featureCvTerms; + + + private Collection<CvTermRelationship> cvTermRelationshipsForTypeId; + + + private Collection<CvTermRelationship> cvTermRelationshipsForObjectId; + + + private Collection<PubProp> pubProps; + + + private Collection<OrganismProp> organismProps; + + + private Collection<CvTermRelationship> cvTermRelationshipsForSubjectId; + + + private Collection<CvTermSynonym> cvTermSynonymsForCvTermId; + + + private Collection<FeatureProp> featureProps; + + + private Collection<CvTermPath> cvTermPathsForSubjectId; + + + private Collection<CvTermPath> cvTermPathsForObjectId; + + + private Collection<CvTermSynonym> cvTermSynonymsForTypeId; + + + private Collection<Pub> pubs; + + + private Collection<FeatureRelationshipProp> featureRelationshipProps; + + + private Collection<Feature> features; + + + private Collection<PubRelationship> pubRelationships; + + + private Collection<FeatureRelationship> featureRelationships; + + // Constructors + + /** default constructor */ + public CvTerm() { + // Deliberately empty default constructor + } + + /** useful constructor! */ + public CvTerm(Cv cv, DbXRef dbXRef, String name, String definition) { + this.dbXRef = dbXRef; + this.cv = cv; + this.name = name; + this.definition = definition; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermId() + */ + public int getCvTermId() { + return this.cvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermId(int) + */ + public void setCvTermId(int cvTermId) { + this.cvTermId = cvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getDbXRef() + */ + public DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setDbXRef(org.genedb.db.jpa.DbXRef) + */ + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCv() + */ + public Cv getCv() { + return this.cv; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCv(org.gmod.schema.cv.CvI) + */ + public void setCv(Cv cv) { + this.cv = cv; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getName() + */ + public String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setName(java.lang.String) + */ + public void setName(String name) { + this.name = name; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getDefinition() + */ + public String getDefinition() { + return this.definition; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setDefinition(java.lang.String) + */ + public void setDefinition(String definition) { + this.definition = definition; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getIsObsolete() + */ + public int getIsObsolete() { + return this.isObsolete; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setIsObsolete(int) + */ + public void setIsObsolete(int isObsolete) { + this.isObsolete = isObsolete; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getIsRelationshipType() + */ + public int getIsRelationshipType() { + return this.isRelationshipType; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setIsRelationshipType(int) + */ + public void setIsRelationshipType(int isRelationshipType) { + this.isRelationshipType = isRelationshipType; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getAnalsisProps() + */ + private Collection<AnalysisProp> getAnalysisProps() { + return this.analysisProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setAnalsisProps(java.util.Set) + */ + private void setAnalysisProps(Collection<AnalysisProp> analysisProps) { + this.analysisProps = analysisProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermPropsForTypeId() + */ + private Collection<CvTermProp> getCvTermPropsForTypeId() { + return this.cvTermPropsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermPropsForTypeId(java.util.Set) + */ + private void setCvTermPropsForTypeId(Collection<CvTermProp> cvTermPropsForTypeId) { + this.cvTermPropsForTypeId = cvTermPropsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermPropsForCvTermId() + */ + private Collection<CvTermProp> getCvTermPropsForCvTermId() { + return this.cvTermPropsForCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermPropsForCvTermId(java.util.Set) + */ + private void setCvTermPropsForCvTermId(Collection<CvTermProp> cvTermPropsForCvTermId) { + this.cvTermPropsForCvTermId = cvTermPropsForCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getDbXRefProps() + */ + private Collection<DbXRefProp> getDbXRefProps() { + return this.dbXRefProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setDbXRefProps(java.util.Set) + */ + private void setDbXRefProps(Collection<DbXRefProp> dbXRefProps) { + this.dbXRefProps = dbXRefProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getSynonyms() + */ + private Collection<Synonym> getSynonyms() { + return this.synonyms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setSynonyms(java.util.Set) + */ + private void setSynonyms(Collection<Synonym> synonyms) { + this.synonyms = synonyms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermDbXRefs() + */ + private Collection<CvTermDbXRef> getCvTermDbXRefs() { + return this.cvTermDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermDbXRefs(java.util.Set) + */ + private void setCvTermDbXRefs(Collection<CvTermDbXRef> cvTermDbXRefs) { + this.cvTermDbXRefs = cvTermDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermPathsForTypeId() + */ + private Collection<CvTermPath> getCvTermPathsForTypeId() { + return this.cvTermPathsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermPathsForTypeId(java.util.Set) + */ + private void setCvTermPathsForTypeId(Collection<CvTermPath> cvTermPathsForTypeId) { + this.cvTermPathsForTypeId = cvTermPathsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getFeatureCvTermProps() + */ + private Collection<FeatureCvTermProp> getFeatureCvTermProps() { + return this.featureCvTermProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setFeatureCvTermProps(java.util.Set) + */ + private void setFeatureCvTermProps(Collection<FeatureCvTermProp> featureCvTermProps) { + this.featureCvTermProps = featureCvTermProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getFeatureCvTerms() + */ + private Collection<FeatureCvTerm> getFeatureCvTerms() { + return this.featureCvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setFeatureCvTerms(java.util.Set) + */ + private void setFeatureCvTerms(Collection<FeatureCvTerm> featureCvTerms) { + this.featureCvTerms = featureCvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermRelationshipsForTypeId() + */ + private Collection<CvTermRelationship> getCvTermRelationshipsForTypeId() { + return this.cvTermRelationshipsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermRelationshipsForTypeId(java.util.Set) + */ + private void setCvTermRelationshipsForTypeId(Collection<CvTermRelationship> cvTermRelationshipsForTypeId) { + this.cvTermRelationshipsForTypeId = cvTermRelationshipsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermRelationshipsForObjectId() + */ + public Collection<CvTermRelationship> getCvTermRelationshipsForObjectId() { + return this.cvTermRelationshipsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermRelationshipsForObjectId(java.util.Set) + */ + public void setCvTermRelationshipsForObjectId(Collection<CvTermRelationship> cvTermRelationshipsForObjectId) { + this.cvTermRelationshipsForObjectId = cvTermRelationshipsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getPubProps() + */ + private Collection<PubProp> getPubProps() { + return this.pubProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setPubProps(java.util.Set) + */ + private void setPubProps(Collection<PubProp> pubProps) { + this.pubProps = pubProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getOrganismProps() + */ + private Collection<OrganismProp> getOrganismProps() { + return this.organismProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setOrganismProps(java.util.Set) + */ + private void setOrganismProps(Collection<OrganismProp> organismProps) { + this.organismProps = organismProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermRelationshipsForSubjectId() + */ + public Collection<CvTermRelationship> getCvTermRelationshipsForSubjectId() { + return this.cvTermRelationshipsForSubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermRelationshipsForSubjectId(java.util.Set) + */ + public void setCvTermRelationshipsForSubjectId(Collection<CvTermRelationship> cvTermRelationshipsForSubjectId) { + this.cvTermRelationshipsForSubjectId = cvTermRelationshipsForSubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermSynonymsForCvTermId() + */ + private Collection<CvTermSynonym> getCvTermSynonymsForCvTermId() { + return this.cvTermSynonymsForCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermSynonymsForCvTermId(java.util.Set) + */ + private void setCvTermSynonymsForCvTermId(Collection<CvTermSynonym> cvTermSynonymsForCvTermId) { + this.cvTermSynonymsForCvTermId = cvTermSynonymsForCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getFeatureProps() + */ + private Collection<FeatureProp> getFeatureProps() { + return this.featureProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setFeatureProps(java.util.Set) + */ + private void setFeatureProps(Collection<FeatureProp> featureProps) { + this.featureProps = featureProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermPathsForSubjectId() + */ + private Collection<CvTermPath> getCvTermPathsForSubjectId() { + return this.cvTermPathsForSubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermPathsForSubjectId(java.util.Set) + */ + private void setCvTermPathsForSubjectId(Collection<CvTermPath> cvTermPathsForSubjectId) { + this.cvTermPathsForSubjectId = cvTermPathsForSubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermPathsForObjectId() + */ + private Collection<CvTermPath> getCvTermPathsForObjectId() { + return this.cvTermPathsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermPathsForObjectId(java.util.Set) + */ + private void setCvTermPathsForObjectId(Collection<CvTermPath> cvTermPathsForObjectId) { + this.cvTermPathsForObjectId = cvTermPathsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getCvTermSynonymsForTypeId() + */ + private Collection<CvTermSynonym> getCvTermSynonymsForTypeId() { + return this.cvTermSynonymsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setCvTermSynonymsForTypeId(java.util.Set) + */ + private void setCvTermSynonymsForTypeId(Collection<CvTermSynonym> cvTermSynonymsForTypeId) { + this.cvTermSynonymsForTypeId = cvTermSynonymsForTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getPubs() + */ + private Collection<Pub> getPubs() { + return this.pubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setPubs(java.util.Set) + */ + private void setPubs(Collection<Pub> pubs) { + this.pubs = pubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getFeatureRelationshipProps() + */ + private Collection<FeatureRelationshipProp> getFeatureRelationshipProps() { + return this.featureRelationshipProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setFeatureRelationshipProps(java.util.Set) + */ + private void setFeatureRelationshipProps(Collection<FeatureRelationshipProp> featureRelationshipProps) { + this.featureRelationshipProps = featureRelationshipProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getFeatures() + */ + private Collection<Feature> getFeatures() { + return this.features; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setFeatures(java.util.Set) + */ + private void setFeatures(Collection<Feature> features) { + this.features = features; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getPubRelationships() + */ + private Collection<PubRelationship> getPubRelationships() { + return this.pubRelationships; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setPubRelationships(java.util.Set) + */ + private void setPubRelationships(Collection<PubRelationship> pubRelationships) { + this.pubRelationships = pubRelationships; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#getFeatureRelationships() + */ + private Collection<FeatureRelationship> getFeatureRelationships() { + return this.featureRelationships; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermI#setFeatureRelationships(java.util.Set) + */ + private void setFeatureRelationships(Collection<FeatureRelationship> featureRelationships) { + this.featureRelationships = featureRelationships; + } + + +} + diff --git a/org/gmod/schema/cv/CvTermDbXRef.java b/org/gmod/schema/cv/CvTermDbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..138bf9ac93dd7154c1d07ea6103c3f283a168afa --- /dev/null +++ b/org/gmod/schema/cv/CvTermDbXRef.java @@ -0,0 +1,103 @@ +package org.gmod.schema.cv; + + + +import org.gmod.schema.general.DbXRef; + +import java.io.Serializable; + + + + + + + + + + + + +public class CvTermDbXRef implements Serializable { + + // Fields + + + private int cvTermDbXRefId; + + + + private CvTerm cvTerm; + + + + private DbXRef dbXRef; + + + private int isForDefinition; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#getCvTermDbXRefId() + */ + private int getCvTermDbXRefId() { + return this.cvTermDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#setCvTermDbXRefId(int) + */ + private void setCvTermDbXRefId(int cvTermDbXRefId) { + this.cvTermDbXRefId = cvTermDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#getCvTerm() + */ + private CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#getDbXRef() + */ + private DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#setDbXRef(org.gmod.schema.general.DbXRefI) + */ + private void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#getIsForDefinition() + */ + private int getIsForDefinition() { + return this.isForDefinition; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermDbXRefI#setIsForDefinition(int) + */ + private void setIsForDefinition(int isForDefinition) { + this.isForDefinition = isForDefinition; + } + + + + +} + + diff --git a/org/gmod/schema/cv/CvTermPath.java b/org/gmod/schema/cv/CvTermPath.java new file mode 100644 index 0000000000000000000000000000000000000000..0c21d5c8c475773e864fd2a0c9546c0e91bd8122 --- /dev/null +++ b/org/gmod/schema/cv/CvTermPath.java @@ -0,0 +1,139 @@ +package org.gmod.schema.cv; + + + +import java.io.Serializable; + + + + + + + + + + + +public class CvTermPath implements Serializable { + + // Fields + + + private int cvTermPathId; + + + + private CvTerm cvTermBySubjectId; + + + + + private CvTerm cvTermByObjectId; + + + + + private CvTerm cvTermByTypeId; + + + + + private Cv cv; + + + private Integer pathDistance; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#getCvTermPathId() + */ + private int getCvTermPathId() { + return this.cvTermPathId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#setCvTermPathId(int) + */ + private void setCvTermPathId(int cvTermPathId) { + this.cvTermPathId = cvTermPathId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#getCvTermBySubjectId() + */ + private CvTerm getCvTermBySubjectId() { + return this.cvTermBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#setCvTermBySubjectId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermBySubjectId(CvTerm cvTermBySubjectId) { + this.cvTermBySubjectId = cvTermBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#getCvTermByObjectId() + */ + private CvTerm getCvTermByObjectId() { + return this.cvTermByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#setCvTermByObjectId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByObjectId(CvTerm cvTermByObjectId) { + this.cvTermByObjectId = cvTermByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#getCvTermByTypeId() + */ + private CvTerm getCvTermByTypeId() { + return this.cvTermByTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#setCvTermByTypeId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByTypeId(CvTerm cvTermByTypeId) { + this.cvTermByTypeId = cvTermByTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#getCv() + */ + private Cv getCv() { + return this.cv; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#setCv(org.gmod.schema.cv.CvI) + */ + private void setCv(Cv cv) { + this.cv = cv; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#getPathDistance() + */ + private Integer getPathDistance() { + return this.pathDistance; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPathI#setPathDistance(java.lang.Integer) + */ + private void setPathDistance(Integer pathDistance) { + this.pathDistance = pathDistance; + } + + + + +} + + diff --git a/org/gmod/schema/cv/CvTermProp.java b/org/gmod/schema/cv/CvTermProp.java new file mode 100644 index 0000000000000000000000000000000000000000..db9eeae4f5b2a3961b0b82141eb4415943c7cd5d --- /dev/null +++ b/org/gmod/schema/cv/CvTermProp.java @@ -0,0 +1,118 @@ +package org.gmod.schema.cv; + + + +import java.io.Serializable; + + + + + + + + + + + + +public class CvTermProp implements Serializable { + + // Fields + + + private int cvTermPropId; + + + + private CvTerm cvTermByCvTermId; + + + + private CvTerm cvTermByTypeId; + + + private String value; + + + private int rank; + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#getCvTermpropId() + */ + private int getCvTermPropId() { + return this.cvTermPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#setCvTermpropId(int) + */ + private void setCvTermPropId(int cvTermPropId) { + this.cvTermPropId = cvTermPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#getCvTermByCvTermId() + */ + private CvTerm getCvTermByCvTermId() { + return this.cvTermByCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#setCvTermByCvTermId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByCvTermId(CvTerm cvTermByCvTermId) { + this.cvTermByCvTermId = cvTermByCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#getCvTermByTypeId() + */ + private CvTerm getCvTermByTypeId() { + return this.cvTermByTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#setCvTermByTypeId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByTypeId(CvTerm cvTermByTypeId) { + this.cvTermByTypeId = cvTermByTypeId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#getValue() + */ + private String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#setValue(java.lang.String) + */ + private void setValue(String value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#getRank() + */ + private int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermPropI#setRank(int) + */ + private void setRank(int rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/cv/CvTermRelationship.java b/org/gmod/schema/cv/CvTermRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..c71b35493fbf05c0925ed303c86947a76482be03 --- /dev/null +++ b/org/gmod/schema/cv/CvTermRelationship.java @@ -0,0 +1,113 @@ +package org.gmod.schema.cv; + + + +import java.io.Serializable; + + + + + + + + + + + +public class CvTermRelationship implements Serializable { + + // Fields + + + private int cvTermRelationshipId; + + + + private CvTerm cvTermBySubjectId; + + + + private CvTerm cvTermByObjectId; + + + + private CvTerm cvTermByTypeId; + + // Constructors + + /** default constructor */ + public CvTermRelationship() { + // Deliberately empty default constructor + } + + /** full constructor */ + public CvTermRelationship(CvTerm cvTermBySubjectId, CvTerm cvTermByObjectId, CvTerm cvTermByTypeId) { + this.cvTermBySubjectId = cvTermBySubjectId; + this.cvTermByObjectId = cvTermByObjectId; + this.cvTermByTypeId = cvTermByTypeId; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#getCvTermRelationshipId() + */ + private int getCvTermRelationshipId() { + return this.cvTermRelationshipId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#setCvTermRelationshipId(int) + */ + private void setCvTermRelationshipId(int cvTermRelationshipId) { + this.cvTermRelationshipId = cvTermRelationshipId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#getCvTermBySubjectId() + */ + private CvTerm getCvTermBySubjectId() { + return this.cvTermBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#setCvTermBySubjectId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermBySubjectId(CvTerm cvTermBySubjectId) { + this.cvTermBySubjectId = cvTermBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#getCvTermByObjectId() + */ + private CvTerm getCvTermByObjectId() { + return this.cvTermByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#setCvTermByObjectId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByObjectId(CvTerm cvTermByObjectId) { + this.cvTermByObjectId = cvTermByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#getCvTermByTypeId() + */ + private CvTerm getCvTermByTypeId() { + return this.cvTermByTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermRelationshipI#setCvTermByTypeId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByTypeId(CvTerm cvTermByTypeId) { + this.cvTermByTypeId = cvTermByTypeId; + } + + + + +} + + diff --git a/org/gmod/schema/cv/CvTermSynonym.java b/org/gmod/schema/cv/CvTermSynonym.java new file mode 100644 index 0000000000000000000000000000000000000000..9401b368c97e9ed33242a707f544dff22c54f142 --- /dev/null +++ b/org/gmod/schema/cv/CvTermSynonym.java @@ -0,0 +1,101 @@ +package org.gmod.schema.cv; + + + + +import java.io.Serializable; + + + + + + + + + + + +public class CvTermSynonym implements Serializable { + + // Fields + + + private int cvTermSynonymId; + + + + private CvTerm cvTermByCvTermId; + + + + private CvTerm cvTermByTypeId; + + + private String synonym; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#getCvTermSynonymId() + */ + private int getCvTermSynonymId() { + return this.cvTermSynonymId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#setCvTermSynonymId(int) + */ + private void setCvTermSynonymId(int cvTermSynonymId) { + this.cvTermSynonymId = cvTermSynonymId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#getCvTermByCvTermId() + */ + private CvTerm getCvTermByCvTermId() { + return this.cvTermByCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#setCvTermByCvTermId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByCvTermId(CvTerm cvTermByCvTermId) { + this.cvTermByCvTermId = cvTermByCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#getCvTermByTypeId() + */ + private CvTerm getCvTermByTypeId() { + return this.cvTermByTypeId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#setCvTermByTypeId(org.gmod.schema.cv.CvTermI) + */ + private void setCvTermByTypeId(CvTerm cvTermByTypeId) { + this.cvTermByTypeId = cvTermByTypeId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#getSynonym() + */ + private String getSynonym() { + return this.synonym; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.CvTermSynonymI#setSynonym(java.lang.String) + */ + private void setSynonym(String synonym) { + this.synonym = synonym; + } + + + + +} + + diff --git a/org/gmod/schema/cv/DbXRefProp.java b/org/gmod/schema/cv/DbXRefProp.java new file mode 100644 index 0000000000000000000000000000000000000000..97ce2ae6968c86bbe6b4d942b9157c0a6e681260 --- /dev/null +++ b/org/gmod/schema/cv/DbXRefProp.java @@ -0,0 +1,120 @@ +package org.gmod.schema.cv; + + + + +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.utils.propinterface.PropertyI; + +import java.io.Serializable; + + + + + + + + + + + +public class DbXRefProp implements Serializable, PropertyI { + + // Fields + + + private int dbXRefPropId; + + + + private CvTerm cvTerm; + + + + private DbXRef dbXRef; + + + private String value; + + + private int rank; + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#getDbXRefpropId() + */ + private int getDbXRefPropId() { + return this.dbXRefPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#setDbXRefpropId(int) + */ + private void setDbXRefPropId(int dbXRefPropId) { + this.dbXRefPropId = dbXRefPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#getCvTerm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#getDbXRef() + */ + private DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#setDbXRef(org.gmod.schema.general.DbXRefI) + */ + private void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#getValue() + */ + private String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#setValue(java.lang.String) + */ + private void setValue(String value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#getRank() + */ + private int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefPropI#setRank(int) + */ + private void setRank(int rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/dao/BaseDaoI.java b/org/gmod/schema/dao/BaseDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..971a8fa642a11607494fdf54164f217e6b40e9c0 --- /dev/null +++ b/org/gmod/schema/dao/BaseDaoI.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + +public interface BaseDaoI { + + + /** + * Save the object to the database (at the end of the current transaction, + * or depending upon flush mode). This method is available in all the DAOs. + * It's recommended to call it through an appropriate one eg SequenceDaoI + * for FeatureI + * @param o the new instance to persist + */ + public abstract void persist(Object o); + + /** + * Delete an object from the database + * @param o the object to remove + * + */ + public abstract void delete(Object o); + + /** + * Merge (update) an already persistent object back to the database (at the end of + * the current transaction, or depending upon flush mode). This method is defined in + * all the DAOs. It's recommended to call it through an appropriate one eg SequenceDaoI + * for FeatureI + * + * @param o the existing feature to merge + */ + public abstract void merge(Object o); + +} diff --git a/org/gmod/schema/dao/CvDaoI.java b/org/gmod/schema/dao/CvDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..686026f16a702cc3847b3c3ce91b32e9ef90809d --- /dev/null +++ b/org/gmod/schema/dao/CvDaoI.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + + +import org.gmod.schema.cv.Cv; +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.utils.CountedName; + +import java.util.List; + +public interface CvDaoI extends BaseDaoI { + + /** + * Get a CV by id + * + * @param id the cv id (primary key) + * @return the corresponding Cv, or null + */ + public abstract Cv getCvById(int id); + + // TODO Should this return a list or just one? + /** + * Retrieve a controlled vocabulary by its name + * + * @param name the name to lookup + * @return the List<Cv> of matches, or null + */ + public abstract List<Cv> getCvByName(String name); + + /** + * Retrieve a CvTerm by id + * + * @param id then cvterm id (primary key) + * @return the corresponding CvTerm, or null + */ + public abstract CvTerm getCvTermById(int id); + + + // TODO Should this return a list or just one? + /** + * Retrieve a named CvTerm from a given Cv + * + * @param cvTermName the name of the cvterm + * @param cv the controlled vocabulary this cvterm is part of + * @return a (possibly empty) list of matching cvterms + */ + public abstract List<CvTerm> getCvTermByNameInCv(String cvTermName, Cv cv); + + + /** + * Retrieve a CvTerm from the Gene Ontology + * + * @param value the + * @return the corresponding CvTerm, or null + */ + public abstract CvTerm getGoCvTermByAcc(String value); + + + /** + * Retrieve a CvTerm from the Gene Ontology via it's database entry + * + * @param id the database name eg GO:123456 + * @return the corresponding CvTerm, or null + */ + public abstract CvTerm getGoCvTermByAccViaDb(final String id); + + + /** + * Retrieve all CvTerms + * @return a list of all cvterms + */ + public abstract List<CvTerm> getCvTerms(); + + /** + * Retrieve a named CvTerm from a given Cv + * + * @param cvTermName the name of the cvterm + * @param name the controlled vocabulary name this cvterm could be part of + * @return a (possibly empty) cvterm + */ + public abstract CvTerm getCvTermByNameAndCvName(String cvTermName, String name); + + /** + * Get a CvTerm by DbXRef + * + * @param dbXRef the DbXRef + * @return the corresponding CvTerm, or null + */ + public abstract CvTerm getCvTermByDbXRef(DbXRef dbXRef); + + public boolean existsNameInOntology(String name, Cv ontology); + + + public List<String> getPossibleMatches(String search, Cv cv, int limit); + + public List<CountedName> getAllTermsInCvWithCount(Cv cv); + +} diff --git a/org/gmod/schema/dao/GeneralDaoI.java b/org/gmod/schema/dao/GeneralDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..3a18ae1f412576ab9be804c18fb315a09096a04e --- /dev/null +++ b/org/gmod/schema/dao/GeneralDaoI.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + +import org.gmod.schema.analysis.AnalysisFeature; +import org.gmod.schema.general.Db; +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.sequence.Feature; + + + +public interface GeneralDaoI extends BaseDaoI{ + + /** + * Retrieve a database by name + * + * @param name the name to lookup + * @return the corresponding db, or null + */ + public abstract Db getDbByName(String name); + + /** + * Retrieve the db xref corresponding to a given DB and accession number + * + * @param db the db the dbxref refers to + * @param accession the accession "number" the dbxref refers to + * @return the dbxref, or null + */ + public abstract DbXRef getDbXRefByDbAndAcc(Db db, String accession); + + /** + * Retrieve the analysisfeature corresponding to the given feature + * + * @param feature the feature whose analysisfeature has to be found + * @return the analysisfeature + */ + public abstract AnalysisFeature getAnalysisFeatureFromFeature(Feature feature); +} diff --git a/org/gmod/schema/dao/OrganismDaoI.java b/org/gmod/schema/dao/OrganismDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..4edfb6fcbced27fe361bdbb2b0ac4ff13b98a888 --- /dev/null +++ b/org/gmod/schema/dao/OrganismDaoI.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + +import org.gmod.schema.organism.Organism; + +import java.util.List; + +public interface OrganismDaoI extends BaseDaoI { + + /** + * Get the organism corresponding to this id + * + * @param id the organism id (primary key) to lookup by + * @return the corresponding organism, or null + */ + public abstract Organism getOrganismById(int id); + + /** + * Get the organism corresponding to this common name + * + * @param commonName the short name to look up + * @return the corresponding organism, or null + */ + public abstract Organism getOrganismByCommonName(String commonName); + + /** + * Get a list of the common name of all the organisms. + * + * @return a (possibly empty) List<String> of all the organisms' common names + */ + public abstract List<String> findAllOrganismCommonNames(); + + /** + * Get a list of all the organisms + * + * @return a (possibly empty) List<Organism> of all the organisms' + */ + public abstract List<Organism> getOrganisms(); + +} diff --git a/org/gmod/schema/dao/PhylogenyDaoI.java b/org/gmod/schema/dao/PhylogenyDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..e3241eb6231fd650081144f6e9b4d4275c192eee --- /dev/null +++ b/org/gmod/schema/dao/PhylogenyDaoI.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.phylogeny.Phylonode; +import org.gmod.schema.phylogeny.Phylotree; + +import java.util.List; + + + +public interface PhylogenyDaoI extends BaseDaoI { + + public Phylotree getPhyloTreeByName(String name); + + public List<Phylonode> getPhyloNodesByCvTermInTree(CvTerm type, Phylotree tree); + + public List<Phylonode> getAllPhylonodes(); + + public List<Phylonode> getPhylonodeByDepthAndParent(double depth,Phylonode parent); + + public List<Phylonode> getPhylonodeByName(String name); + + public List<Phylonode> getPhylonodesByParent(Phylonode parent); + + //public List<Phylonode> getPhylonodeByDepth(double depth); +} diff --git a/org/gmod/schema/dao/PubDaoI.java b/org/gmod/schema/dao/PubDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..e196c19beaacd0508ed890359364279671e636e2 --- /dev/null +++ b/org/gmod/schema/dao/PubDaoI.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + +import java.util.List; + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.pub.Pub; +import org.gmod.schema.pub.PubProp; +import org.gmod.schema.pub.PubDbXRef; + +public interface PubDaoI extends BaseDaoI { + + /** + * Retrieve the publication with this primary key + * + * @param id the publication id + * @return the corresponding publication, or null + */ + public abstract Pub getPubById(int id); + + /** + * Retrieve the publication with this primary key + * + * @param uniqueName + * @return the publication with this unique name, or null + */ + public abstract Pub getPubByUniqueName(String uniqueName); + + + public Pub getPubByDbXRef(DbXRef dbXRef); + + /** + * Get a list of all PubDbXRef's + * @return list of PubDbXRef's + */ + public List<PubDbXRef> getPubDbXRef(); + + /** + * Retrieve the publication property with Pub and Cvterm + * + * @param pub the Publication + * @param cvTerm the cvTerm + * @return the publication or null + */ + public abstract List<PubProp> getPubPropByPubAndCvTerm(Pub pub,CvTerm cvTerm); +} diff --git a/org/gmod/schema/dao/SchemaDaoI.java b/org/gmod/schema/dao/SchemaDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..484a529c55932b9a6d0c03ae06888bd3d2563fcc --- /dev/null +++ b/org/gmod/schema/dao/SchemaDaoI.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + + +import org.gmod.schema.sequence.Feature; + +import java.sql.SQLException; +import java.util.List; + +public interface SchemaDaoI extends BaseDaoI { + + /** + * Return a list of features with residues. + * @return the <code>List</code> of <code>Feature</code> objects + * @throws SQLException + */ + public List<Feature> getResidueFeatures() throws SQLException; + + + /** + * For a schema return the type_id's with residues. + * @param schema schema/organism name or null + * @return the <code>List</code> of type_id's as <code>String</code> objects + * @throws SQLException + */ + public List<String> getResidueType(String schema) throws SQLException; + + /** + * Get available schemas (as a <code>List</code> of <code>String</code> + * objects). + * @return the available schemas + * @throws SQLException + */ + public List<String> getSchema() throws SQLException; + + +} diff --git a/org/gmod/schema/dao/SequenceDaoI.java b/org/gmod/schema/dao/SequenceDaoI.java new file mode 100644 index 0000000000000000000000000000000000000000..b752a05b3270565812b7d3aeec42c3eaca86094e --- /dev/null +++ b/org/gmod/schema/dao/SequenceDaoI.java @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2006 Genome Research Limited. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 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 Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; see the file COPYING.LIB. If not, write to + * the Free Software Foundation Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307 USA + */ + +package org.gmod.schema.dao; + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.organism.Organism; +import org.gmod.schema.sequence.Feature; +import org.gmod.schema.sequence.FeatureCvTerm; +import org.gmod.schema.sequence.FeatureCvTermDbXRef; +import org.gmod.schema.sequence.FeatureCvTermPub; +import org.gmod.schema.sequence.FeatureDbXRef; +import org.gmod.schema.sequence.FeatureSynonym; +import org.gmod.schema.sequence.Synonym; +import org.gmod.schema.utils.CountedName; + +import java.util.List; + +public interface SequenceDaoI extends BaseDaoI { + + /** + * Return the feature corresponding to this feature_id + * + * @param id the systematic id + * @return the Feature, or null + */ + public Feature getFeatureById(int id); + + /** + * Return a list of features with this uniquename + * + * @param name the uniquename + * @return the Feature, or null + */ + public List<Feature> getFeaturesByUniqueName(String name); + + /** + * + * @param name the uniquename + * @param featureType the type of feature to return eg "gene". <b>NB</> String, not a type argument + * @return + */ + public Feature getFeatureByUniqueName(String name, String featureType); + + /** + * Return a list of features with any current (ie non-obsolete) name or synonym + * + * @param name the lookup name + * @return a (possibly empty) List<Feature> of children with this current name + */ + public List<Feature> getFeaturesByAnyCurrentName(String name); + + /** + * Return a list of features with this name or synonym (including obsolete names). The + * name can contain an SQL wildcard (%) + * + * @param name the lookup name + * @param featureType the type of feature to return eg "gene" + * @return a (possibly empty) List<Feature> of children with this name + */ + public List<Feature> getFeaturesByAnyName(String name, String featureType); + + + // TODO Document overlap behaviour + /** + * Return a list of features located on a source Feature, within a given range + * + * @param min the minimum (interbase) coordinate + * @param max the maximum (interbase) coordinate + * @param strand + * @param parent the source feature + * @param type + * @return a List<Feature> which ??? this range + */ + public List<Feature> getFeaturesByRange(int min, int max, int strand, + Feature parent, String type); + + /** + * Return a list of features located on a source Feature + * + * @param parent the parent feature + * @return a (possibly empty) List<Feature> of children located on this parent + */ + public List<Feature> getFeaturesByLocatedOnFeature(Feature parent); + + /** + * Return the FeatureCvTerm that links a given Feature and CvTerm, with a given value of 'not' + * + * @param feature the Feature to test the link for + * @param cvTerm the CvTerm to test the link for + * @param not test for the not flag in the FeatureCvTerm + * @return the Feature, or null + */ + public List<FeatureCvTerm> getFeatureCvTermsByFeatureAndCvTermAndNot(Feature feature, + CvTerm cvTerm, boolean not); + + /** + * Return a list of FeatureCvterm's for a Feature, or a list + * of all FeatureCvTerm's if Feature is null. + * @param feature the Feature to retrieve associated FeatureCvTerm's + * @return the FeatureCvTerm's + */ + public List<FeatureCvTerm> getFeatureCvTermsByFeature(Feature feature); + + /** + * Get a list of all FeatureCvTermDbXRef's for a Feature, or a list + * of all FeatureCvTermDbXRef's if Feature is null. + * @param feature the Feature to retrieve associated FeatureCvTermDbXRef's + * @return the FeatureCvTermDbXRef's + */ + public List<FeatureCvTermDbXRef> getFeatureCvTermDbXRefByFeature(Feature feature); + + /** + * Get a list of all FeatureCvTermPub's for a Feature, or a list + * of all FeatureCvTermPub's if Feature is null. + * @param feature the Feature to retrieve associated FeatureCvTermPub's + * @return the FeatureCvTermPub's + */ + public List<FeatureCvTermPub> getFeatureCvTermPubByFeature(Feature feature); + + /** + * Return a synonym of the given name and type if it exists + * + * @param name the name to lookup + * @param type the type of the Synonym + * @return a Synonym, or null + */ + public Synonym getSynonymByNameAndCvTerm(String name, CvTerm type); + + /** + * Return a list of FeatureSynonyms which link a given Feature and Synonym + * + * @param feature the test Feature + * @param synonym the test Synonym + * @return a (possibly empty) List<FeatureSynonym> + */ + public List<FeatureSynonym> getFeatureSynonymsByFeatureAndSynonym( + Feature feature, Synonym synonym); + + public FeatureDbXRef getFeatureDbXRefByFeatureAndDbXRef(final Feature feature, final DbXRef dbXRef); + + /** + * Return all the FeatureDbXRefs for a given feature, <b>specified by name</b>, or all if + * <code>null</code> is passed + * + * @param uniqueName the uniquename of a Feature, or null for all FeatureDbXRefs + * @return a (possibly empty) List<FeatureDbXRefI> + */ + public List<FeatureDbXRef> getFeatureDbXRefsByFeatureUniquename(final String uniqueName); + + /** + * Return the list of FeatureSynonyms for a given Feature, <b>specified by name</b>, or all if + * <code>null</code> is passed + * + * @param uniqueName the uniquename of a Feature, or null for all + * @return a (possibly empty) List<FeatureSynonymI> of matching synonyms + */ + public List<FeatureSynonym> getFeatureSynonymsByFeatureUniquename(final String uniqueName); + + /** + * Return the list of all feature_synonyms as Feature.featureSynonyms + * + * @return a (possibly empty) List<Features> of matching synonyms + */ + public List<Feature> getAllFeatureSynonymsAsFeature(); + + /** + * Return the list of Features for a given GO number + * + * + * @param go the GO number + * @return a (possibly empty) List<Feature> of matching genes + */ + public List<List> getFeatureByGO(final String go); + + /** + * Return a list of features that have this particular cvterm + * + * + * @param cvTermName the CvTerm name + * @return a (possibly empty) List<Feature> of children + */ + public List<Feature> getFeaturesByCvTermName(String cvTermName); + + /** + * Return a list of features that have this particular cvterm + * + * + * @param cvTermName the CvTerm name + * @return a (possibly empty) List<Feature> of children + */ + public List<Feature> getFeaturesByCvTermNameAndCvName(String cvTermName, String cvName); + + /** + * Return a list of top-level features + * + * + * @return a (possibly empty) List<Feature> of children + */ + public List<Feature> getTopLevelFeatures(); + + public List<CountedName> getProducts(); + + /** + * Return a list of feature uniquename based on cvterm for auto-completion + * + * @param name the Feature uniquename + * @param cvTerm the CvTerm + * @param limit the number of maximum results to return + * @return a (possibly empty) List<String> of feature uniquename + */ + public List<String> getPossibleMatches(String name,CvTerm cvTerm, int limit); + + /** + * Return a list of feature uniquename based on cvterm for auto-completion + * + * @param name the Feature uniquename + * @param orgNames the comma seperated organism common names + * @param featureType the type of Features to return e.g gene + * @param limit the number of maximum results to return + * @return a (possibly empty) List<Feature> of Feature + */ + public List<Feature> getFeaturesByAnyNameAndOrganism(String name,String orgNames,String featureType); + + /** + * Return a list of feature based on organism + * + * @param organism the Organism + * @return a (possibly empty) List<String> of feature + */ + public List<Feature> getFeaturesByOrganism(Organism org); + + /** + * Return the features corresponding to uniquenames in the list + * + * @param names the list of uniquenames + * @return the list of Features, or null + */ + public List<Feature> getFeaturesByUniqueNames(List<String> names); + +} diff --git a/org/gmod/schema/general/Db.java b/org/gmod/schema/general/Db.java new file mode 100644 index 0000000000000000000000000000000000000000..eabd4273b541bca47b35e5475fbd6c201073cf59 --- /dev/null +++ b/org/gmod/schema/general/Db.java @@ -0,0 +1,136 @@ +package org.gmod.schema.general; + + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + +public class Db implements Serializable { + + // Fields + + + + private int dbId; + + + private String name; + + + private String description; + + + private String urlPrefix; + + + private String url; + + + private Set<DbXRef> dbXRefs = new HashSet<DbXRef>(0); + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#getDbId() + */ + public int getDbId() { + return this.dbId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#setDbId(int) + */ + public void setDbId(int dbId) { + this.dbId = dbId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#getName() + */ + public String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#setName(java.lang.String) + */ + public void setName(String name) { + this.name = name; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#getDescription() + */ + public String getDescription() { + return this.description; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#setDescription(java.lang.String) + */ + public void setDescription(String description) { + this.description = description; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#getUrlPrefix() + */ + public String getUrlPrefix() { + return this.urlPrefix; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#setUrlPrefix(java.lang.String) + */ + public void setUrlPrefix(String urlPrefix) { + this.urlPrefix = urlPrefix; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#getUrl() + */ + public String getUrl() { + return this.url; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#setUrl(java.lang.String) + */ + public void setUrl(String url) { + this.url = url; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#getDbXRefs() + */ + public Collection<DbXRef> getDbXRefs() { + return this.dbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbI#setDbXRefs(java.util.Set) + */ + public void setDbXRefs(Set<DbXRef> dbXRefs) { + this.dbXRefs = dbXRefs; + } + + + + +} + + diff --git a/org/gmod/schema/general/DbXRef.java b/org/gmod/schema/general/DbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..7945f1a2b7dc5122257f1d083221e7d64cf58dfe --- /dev/null +++ b/org/gmod/schema/general/DbXRef.java @@ -0,0 +1,292 @@ +package org.gmod.schema.general; + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.cv.CvTermDbXRef; +import org.gmod.schema.cv.DbXRefProp; +import org.gmod.schema.organism.OrganismDbXRef; +import org.gmod.schema.phylogeny.PhylonodeDbXRef; +import org.gmod.schema.phylogeny.Phylotree; +import org.gmod.schema.pub.PubDbXRef; +import org.gmod.schema.sequence.Feature; +import org.gmod.schema.sequence.FeatureCvTermDbXRef; +import org.gmod.schema.sequence.FeatureDbXRef; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +public class DbXRef implements Serializable { + + private Set<PhylonodeDbXRef> phylonodeDbXRefs = new HashSet<PhylonodeDbXRef>(0); + private Set<Phylotree> phylotrees = new HashSet<Phylotree>(0); + + public Set<PhylonodeDbXRef> getPhylonodeDbXRefs() { + return this.phylonodeDbXRefs; + } + + public void setPhylonodeDbXRefs(Set<PhylonodeDbXRef> phylonodeDbXRefs) { + this.phylonodeDbXRefs = phylonodeDbXRefs; + } + + + public Set<Phylotree> getPhylotrees() { + return this.phylotrees; + } + + public void setPhylotrees(Set<Phylotree> phylotrees) { + this.phylotrees = phylotrees; + } + + + + // Fields + + + + private int dbXRefId; + + + private String version; + + + + private Db db; + + + private String accession; + + + private String description; + + + private Set<DbXRefProp> dbXRefProps = new HashSet<DbXRefProp>(0); + + + private Set<FeatureCvTermDbXRef> featureCvTermDbXRefs = new HashSet<FeatureCvTermDbXRef>(0); + + + private Set<Feature> features = new HashSet<Feature>(0); + + + private Set<FeatureDbXRef> featureDbXRefs = new HashSet<FeatureDbXRef>(0); + + + private Set<CvTerm> cvTerms = new HashSet<CvTerm>(0); + + + private Set<PubDbXRef> pubDbXRefs = new HashSet<PubDbXRef>(0); + + + private Set<OrganismDbXRef> organismDbXRefs = new HashSet<OrganismDbXRef>(0); + + + private Set<CvTermDbXRef> cvTermDbXRefs = new HashSet<CvTermDbXRef>(0); + + // Constructors + + /** default constructor */ + public DbXRef() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public DbXRef(Db db, String accession) { + this.version = "1"; + this.db = db; + this.accession = accession; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getDbXRefId() + */ + public int getDbXRefId() { + return this.dbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setDbXRefId(int) + */ + public void setDbXRefId(int dbXRefId) { + this.dbXRefId = dbXRefId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getVersion() + */ + public String getVersion() { + return this.version; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setVersion(java.lang.String) + */ + public void setVersion(String version) { + this.version = version; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getDb() + */ + public Db getDb() { + return this.db; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setDb(org.gmod.schema.general.DbI) + */ + public void setDb(Db db) { + this.db = db; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getAccession() + */ + public String getAccession() { + return this.accession; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setAccession(java.lang.String) + */ + public void setAccession(String accession) { + this.accession = accession; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getDescription() + */ + public String getDescription() { + return this.description; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setDescription(java.lang.String) + */ + public void setDescription(String description) { + this.description = description; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getDbXRefProps() + */ + private Collection<DbXRefProp> getDbXRefProps() { + return this.dbXRefProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setDbXRefProps(java.util.Set) + */ + private void setDbXRefProps(Set<DbXRefProp> dbXRefProps) { + this.dbXRefProps = dbXRefProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getFeatureCvTermDbXRefs() + */ + private Collection<FeatureCvTermDbXRef> getFeatureCvTermDbXRefs() { + return this.featureCvTermDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setFeatureCvTermDbXRefs(java.util.Set) + */ + private void setFeatureCvTermDbXRefs(Set<FeatureCvTermDbXRef> featureCvTermDbXRefs) { + this.featureCvTermDbXRefs = featureCvTermDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getFeatures() + */ + private Collection<Feature> getFeatures() { + return this.features; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setFeatures(java.util.Set) + */ + private void setFeatures(Set<Feature> features) { + this.features = features; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getFeatureDbXRefs() + */ + private Collection<FeatureDbXRef> getFeatureDbXRefs() { + return this.featureDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setFeatureDbXRefs(java.util.Set) + */ + private void setFeatureDbXRefs(Set<FeatureDbXRef> featureDbXRefs) { + this.featureDbXRefs = featureDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getCvTerms() + */ + public Collection<CvTerm> getCvTerms() { + return this.cvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setCvTerms(java.util.Set) + */ + private void setCvTerms(Set<CvTerm> cvTerms) { + this.cvTerms = cvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getPubDbXRefs() + */ + private Collection<PubDbXRef> getPubDbXRefs() { + return this.pubDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setPubDbXRefs(java.util.Set) + */ + private void setPubDbXRefs(Set<PubDbXRef> pubDbXRefs) { + this.pubDbXRefs = pubDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getOrganismDbXRefs() + */ + private Collection<OrganismDbXRef> getOrganismDbXRefs() { + return this.organismDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setOrganismDbXRefs(java.util.Set) + */ + private void setOrganismDbXRefs(Set<OrganismDbXRef> organismDbXRefs) { + this.organismDbXRefs = organismDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#getCvTermDbXRefs() + */ + private Collection<CvTermDbXRef> getCvTermDbXRefs() { + return this.cvTermDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.DbXRefI#setCvTermDbXRefs(java.util.Set) + */ + private void setCvTermDbXRefs(Set<CvTermDbXRef> cvTermDbXRefs) { + this.cvTermDbXRefs = cvTermDbXRefs; + } + + + + +} + + diff --git a/org/gmod/schema/general/Project.java b/org/gmod/schema/general/Project.java new file mode 100644 index 0000000000000000000000000000000000000000..f8bfd6a062cac75a931c5114a9220958714927cf --- /dev/null +++ b/org/gmod/schema/general/Project.java @@ -0,0 +1,59 @@ +package org.gmod.schema.general; + + +import java.io.Serializable; + +public class Project implements Serializable { + + // Fields + private int projectId; + private String name; + private String description; + + /* (non-Javadoc) + * @see org.genedb.db.jpa.ProjectI#getProjectId() + */ + private int getProjectId() { + return this.projectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.ProjectI#setProjectId(int) + */ + private void setProjectId(int projectId) { + this.projectId = projectId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.ProjectI#getName() + */ + private String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.ProjectI#setName(java.lang.String) + */ + private void setName(String name) { + this.name = name; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.ProjectI#getDescription() + */ + private String getDescription() { + return this.description; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.ProjectI#setDescription(java.lang.String) + */ + private void setDescription(String description) { + this.description = description; + } + +} + + diff --git a/org/gmod/schema/general/Tableinfo.java b/org/gmod/schema/general/Tableinfo.java new file mode 100644 index 0000000000000000000000000000000000000000..665d77fd402e50aec73c424e8d4d991ad9e92bce --- /dev/null +++ b/org/gmod/schema/general/Tableinfo.java @@ -0,0 +1,148 @@ +package org.gmod.schema.general; + + +import java.io.Serializable; +import java.util.Date; + +public class Tableinfo implements Serializable { + + // Fields + + private int tableinfoId; + private String name; + private String primaryKeyColumn; + private int isView; + private Integer viewOnTableId; + private Integer superclassTableId; + private int isUpdateable; + private Date modificationDate; + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getTableinfoId() + */ + + + + private int getTableinfoId() { + return this.tableinfoId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setTableinfoId(int) + */ + private void setTableinfoId(int tableinfoId) { + this.tableinfoId = tableinfoId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getName() + */ + private String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setName(java.lang.String) + */ + private void setName(String name) { + this.name = name; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getPrimaryKeyColumn() + */ + private String getPrimaryKeyColumn() { + return this.primaryKeyColumn; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setPrimaryKeyColumn(java.lang.String) + */ + private void setPrimaryKeyColumn(String primaryKeyColumn) { + this.primaryKeyColumn = primaryKeyColumn; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getIsView() + */ + private int getIsView() { + return this.isView; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setIsView(int) + */ + private void setIsView(int isView) { + this.isView = isView; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getViewOnTableId() + */ + private Integer getViewOnTableId() { + return this.viewOnTableId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setViewOnTableId(java.lang.Integer) + */ + private void setViewOnTableId(Integer viewOnTableId) { + this.viewOnTableId = viewOnTableId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getSuperclassTableId() + */ + private Integer getSuperclassTableId() { + return this.superclassTableId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setSuperclassTableId(java.lang.Integer) + */ + private void setSuperclassTableId(Integer superclassTableId) { + this.superclassTableId = superclassTableId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getIsUpdateable() + */ + private int getIsUpdateable() { + return this.isUpdateable; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setIsUpdateable(int) + */ + private void setIsUpdateable(int isUpdateable) { + this.isUpdateable = isUpdateable; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#getModificationDate() + */ + private Date getModificationDate() { + return this.modificationDate; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.TableInfoI#setModificationDate(java.util.Date) + */ + private void setModificationDate(Date modificationDate) { + this.modificationDate = modificationDate; + } + + + + +} + + diff --git a/org/gmod/schema/organism/Organism.java b/org/gmod/schema/organism/Organism.java new file mode 100644 index 0000000000000000000000000000000000000000..8a539e7000d15dca0008fa467e4d6d64a8ddc6ca --- /dev/null +++ b/org/gmod/schema/organism/Organism.java @@ -0,0 +1,207 @@ +package org.gmod.schema.organism; + + + +import org.gmod.schema.phylogeny.PhylonodeOrganism; +import org.gmod.schema.sequence.Feature; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + + +public class Organism implements Serializable { + + private Set<PhylonodeOrganism> phylonodeOrganisms = new HashSet<PhylonodeOrganism>(0); + + public Set<PhylonodeOrganism> getPhylonodeOrganisms() { + return this.phylonodeOrganisms; + } + + public void setPhylonodeOrganisms(Set<PhylonodeOrganism> phylonodeOrganisms) { + this.phylonodeOrganisms = phylonodeOrganisms; + } + + // Fields + + + + private int organismId; + + + private String abbreviation; + + + private String genus; + + + private String species; + + + private String commonName; + + + private String comment; + + + private Set<OrganismProp> organismProps = new HashSet<OrganismProp>(0); + + + private Set<Feature> features = new HashSet<Feature>(0); + + + private Set<OrganismDbXRef> organismDbXRefs = new HashSet<OrganismDbXRef>(0); + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getOrganismId() + */ + public int getOrganismId() { + return this.organismId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setOrganismId(int) + */ + public void setOrganismId(int organismId) { + this.organismId = organismId; + } + + public String getFullName() { + return getGenus()+' '+getSpecies(); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getAbbreviation() + */ + public String getAbbreviation() { + return this.abbreviation; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setAbbreviation(java.lang.String) + */ + public void setAbbreviation(String abbreviation) { + this.abbreviation = abbreviation; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getGenus() + */ + public String getGenus() { + return this.genus; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setGenus(java.lang.String) + */ + public void setGenus(String genus) { + this.genus = genus; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getSpecies() + */ + public String getSpecies() { + return this.species; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setSpecies(java.lang.String) + */ + public void setSpecies(String species) { + this.species = species; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getCommonName() + */ + public String getCommonName() { + return this.commonName; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setCommonName(java.lang.String) + */ + public void setCommonName(String commonName) { + this.commonName = commonName; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getComment() + */ + public String getComment() { + return this.comment; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setComment(java.lang.String) + */ + public void setComment(String comment) { + this.comment = comment; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getOrganismProps() + */ + public Set<OrganismProp> getOrganismProps() { + return this.organismProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setOrganismProps(java.util.Set) + */ + private void setOrganismProps(Set<OrganismProp> organismProps) { + this.organismProps = organismProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getFeatures() + */ + private Collection<Feature> getFeatures() { + return this.features; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setFeatures(java.util.Set) + */ + private void setFeatures(Set<Feature> features) { + this.features = features; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#getOrganismDbXRefs() + */ + private Collection<OrganismDbXRef> getOrganismDbXRefs() { + return this.organismDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismI#setOrganismDbXRefs(java.util.Set) + */ + private void setOrganismDbXRefs(Set<OrganismDbXRef> organismDbXRefs) { + this.organismDbXRefs = organismDbXRefs; + } + + + + +} + + diff --git a/org/gmod/schema/organism/OrganismDbXRef.java b/org/gmod/schema/organism/OrganismDbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..05ec0768bb664fca0f3dbbab3b639eefd9a9d574 --- /dev/null +++ b/org/gmod/schema/organism/OrganismDbXRef.java @@ -0,0 +1,85 @@ +package org.gmod.schema.organism; + +import org.gmod.schema.general.DbXRef; + +import java.io.Serializable; + + + + + + + + + + + +public class OrganismDbXRef implements Serializable { + + // Fields + + + + private int organismDbXRefId; + + + + + private Organism organism; + + + + + private DbXRef dbXRef; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismDbXRefI#getOrganismDbXRefId() + */ + private int getOrganismDbXRefId() { + return this.organismDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismDbXRefI#setOrganismDbXRefId(int) + */ + private void setOrganismDbXRefId(int organismDbXRefId) { + this.organismDbXRefId = organismDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismDbXRefI#getOrganism() + */ + private Organism getOrganism() { + return this.organism; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismDbXRefI#setOrganism(org.gmod.schema.organism.OrganismI) + */ + private void setOrganism(Organism organism) { + this.organism = organism; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismDbXRefI#getDbXRef() + */ + private DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismDbXRefI#setDbXRef(org.gmod.schema.general.DbXRefI) + */ + private void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + + + +} + + diff --git a/org/gmod/schema/organism/OrganismProp.java b/org/gmod/schema/organism/OrganismProp.java new file mode 100644 index 0000000000000000000000000000000000000000..b8a1d5be595834d199c225d9ed9f37a44d554230 --- /dev/null +++ b/org/gmod/schema/organism/OrganismProp.java @@ -0,0 +1,124 @@ +package org.gmod.schema.organism; + + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; + +import java.io.Serializable; + + + + + + + + + + + +public class OrganismProp implements Serializable, PropertyI { + + // Fields + + + + private int organismPropId; + + + + + private Organism organism; + + + + + private CvTerm cvTerm; + + + private String value; + + + private int rank; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#getOrganismPropId() + */ + private int getOrganismPropId() { + return this.organismPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#setOrganismPropId(int) + */ + private void setOrganismPropId(int organismPropId) { + this.organismPropId = organismPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#getOrganism() + */ + private Organism getOrganism() { + return this.organism; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#setOrganism(org.gmod.schema.organism.OrganismI) + */ + private void setOrganism(Organism organism) { + this.organism = organism; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#getCvTerm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#getValue() + */ + public String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#setValue(java.lang.String) + */ + private void setValue(String value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#getRank() + */ + private int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.OrganismPropI#setRank(int) + */ + private void setRank(int rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/Phylonode.java b/org/gmod/schema/phylogeny/Phylonode.java new file mode 100644 index 0000000000000000000000000000000000000000..8bb2b292d0e8fa90d1b3bcbc251dd2c1ed0e6b89 --- /dev/null +++ b/org/gmod/schema/phylogeny/Phylonode.java @@ -0,0 +1,230 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.sequence.Feature; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + + + +/** + * Phylonode generated by hbm2java + */ + + +public class Phylonode implements java.io.Serializable { + + // Fields + + private int phylonodeId; + private Phylotree phylotree; + private Phylonode parent; + private CvTerm cvTerm; + private Feature feature; + private int leftIdx; + private int rightIdx; + private String label; + private Double distance; + private Set<PhylonodeRelationship> phylonodeRelationshipsForObjectId = new HashSet<PhylonodeRelationship>(0); + private Set<PhylonodeOrganism> phylonodeOrganisms = new HashSet<PhylonodeOrganism>(0); + private Set<PhylonodePub> phylonodePubs = new HashSet<PhylonodePub>(0); + private Set<Phylonode> phylonodes = new HashSet<Phylonode>(0); + private Set<PhylonodeRelationship> phylonodeRelationshipsForSubjectId = new HashSet<PhylonodeRelationship>(0); + private Set<PhylonodeDbXRef> phylonodeDbXRefs = new HashSet<PhylonodeDbXRef>(0); + private Set<PhylonodeProp> phylonodeProps = new HashSet<PhylonodeProp>(0); + + // Constructors + + /** default constructor */ + public Phylonode() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public Phylonode(int phylonodeId, Phylotree phylotree, int leftIdx, int rightIdx) { + this.phylonodeId = phylonodeId; + this.phylotree = phylotree; + this.leftIdx = leftIdx; + this.rightIdx = rightIdx; + } + /** full constructor */ + public Phylonode(int phylonodeId, Phylotree phylotree, Phylonode parent, CvTerm cvTerm, Feature feature, int leftIdx, int rightIdx, String label, Double distance, Set<PhylonodeRelationship> phylonodeRelationshipsForObjectId, Set<PhylonodeOrganism> phylonodeOrganisms, Set<PhylonodePub> phylonodePubs, Set<Phylonode> phylonodes, Set<PhylonodeRelationship> phylonodeRelationshipsForSubjectId, Set<PhylonodeDbXRef> phylonodeDbXRefs, Set<PhylonodeProp> phylonodeProps) { + this.phylonodeId = phylonodeId; + this.phylotree = phylotree; + this.parent = parent; + this.cvTerm = cvTerm; + this.feature = feature; + this.leftIdx = leftIdx; + this.rightIdx = rightIdx; + this.label = label; + this.distance = distance; + this.phylonodeRelationshipsForObjectId = phylonodeRelationshipsForObjectId; + this.phylonodeOrganisms = phylonodeOrganisms; + this.phylonodePubs = phylonodePubs; + this.phylonodes = phylonodes; + this.phylonodeRelationshipsForSubjectId = phylonodeRelationshipsForSubjectId; + this.phylonodeDbXRefs = phylonodeDbXRefs; + this.phylonodeProps = phylonodeProps; + } + + // Property accessors + + + + public int getPhylonodeId() { + return this.phylonodeId; + } + + public void setPhylonodeId(int phylonodeId) { + this.phylonodeId = phylonodeId; + } + + + + public Phylotree getPhylotree() { + return this.phylotree; + } + + public void setPhylotree(Phylotree phylotree) { + this.phylotree = phylotree; + } + + + + public Phylonode getParent() { + return this.parent; + } + + public void setParent(Phylonode parent) { + this.parent = parent; + } + + + public CvTerm getCvTerm() { + return this.cvTerm; + } + + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + public Feature getFeature() { + return this.feature; + } + + public void setFeature(Feature feature) { + this.feature = feature; + } + + + public int getLeftIdx() { + return this.leftIdx; + } + + public void setLeftIdx(int leftIdx) { + this.leftIdx = leftIdx; + } + + + public int getRightIdx() { + return this.rightIdx; + } + + public void setRightIdx(int rightIdx) { + this.rightIdx = rightIdx; + } + + + public String getLabel() { + return this.label; + } + + public void setLabel(String label) { + this.label = label; + } + + + public Double getDistance() { + return this.distance; + } + + public void setDistance(Double distance) { + this.distance = distance; + } + + public Collection<PhylonodeRelationship> getPhylonodeRelationshipsForObjectId() { + return this.phylonodeRelationshipsForObjectId; + } + + public void setPhylonodeRelationshipsForObjectId(Set<PhylonodeRelationship> phylonodeRelationshipsForObjectId) { + this.phylonodeRelationshipsForObjectId = phylonodeRelationshipsForObjectId; + } + + public Collection<PhylonodeOrganism> getPhylonodeOrganisms() { + return this.phylonodeOrganisms; + } + + public void setPhylonodeOrganisms(Set<PhylonodeOrganism> phylonodeOrganisms) { + this.phylonodeOrganisms = phylonodeOrganisms; + } + + public Collection<PhylonodePub> getPhylonodePubs() { + return this.phylonodePubs; + } + + public void setPhylonodePubs(Set<PhylonodePub> phylonodePubs) { + this.phylonodePubs = phylonodePubs; + } + + public Collection<Phylonode> getPhylonodes() { + return this.phylonodes; + } + + public void setPhylonodes(Set<Phylonode> phylonodes) { + this.phylonodes = phylonodes; + } + + public Collection<PhylonodeRelationship> getPhylonodeRelationshipsForSubjectId() { + return this.phylonodeRelationshipsForSubjectId; + } + + public void setPhylonodeRelationshipsForSubjectId(Set<PhylonodeRelationship> phylonodeRelationshipsForSubjectId) { + this.phylonodeRelationshipsForSubjectId = phylonodeRelationshipsForSubjectId; + } + + public Collection<PhylonodeDbXRef> getPhylonodeDbXRefs() { + return this.phylonodeDbXRefs; + } + + public void setPhylonodeDbXRefs(Set<PhylonodeDbXRef> phylonodeDbXRefs) { + this.phylonodeDbXRefs = phylonodeDbXRefs; + } + + public Collection<PhylonodeProp> getPhylonodeProps() { + return this.phylonodeProps; + } + + public void setPhylonodeProps(Set<PhylonodeProp> phylonodeProps) { + this.phylonodeProps = phylonodeProps; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/PhylonodeDbXRef.java b/org/gmod/schema/phylogeny/PhylonodeDbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..cf18f7569cbefef6fb11c43e19052a2b5829b03b --- /dev/null +++ b/org/gmod/schema/phylogeny/PhylonodeDbXRef.java @@ -0,0 +1,80 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.general.DbXRef; + + + + + + + + + + +/** + * PhylonodeDbXRef generated by hbm2java + */ + + +public class PhylonodeDbXRef implements java.io.Serializable { + + // Fields + + private int phylonodeDbXRefId; + private DbXRef dbXRef; + private Phylonode phylonode; + + // Constructors + + /** default constructor */ + public PhylonodeDbXRef() { + // Deliberately empty default constructor + } + + /** full constructor */ + public PhylonodeDbXRef(int phylonodeDbXRefId, DbXRef dbXRef, Phylonode phylonode) { + this.phylonodeDbXRefId = phylonodeDbXRefId; + this.dbXRef = dbXRef; + this.phylonode = phylonode; + } + + // Property accessors + + + + public int getPhylonodeDbXRefId() { + return this.phylonodeDbXRefId; + } + + public void setPhylonodeDbXRefId(int phylonodeDbXRefId) { + this.phylonodeDbXRefId = phylonodeDbXRefId; + } + + + + + public DbXRef getDbXRef() { + return this.dbXRef; + } + + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + + public Phylonode getPhylonode() { + return this.phylonode; + } + + public void setPhylonode(Phylonode phylonode) { + this.phylonode = phylonode; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/PhylonodeOrganism.java b/org/gmod/schema/phylogeny/PhylonodeOrganism.java new file mode 100644 index 0000000000000000000000000000000000000000..978e9b6e5fe196d0ad8dbb40968098ff830a6fc7 --- /dev/null +++ b/org/gmod/schema/phylogeny/PhylonodeOrganism.java @@ -0,0 +1,80 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.organism.Organism; + + + + + + + + + + +/** + * PhylonodeOrganism generated by hbm2java + */ + + +public class PhylonodeOrganism implements java.io.Serializable { + + // Fields + + private int phylonodeOrganismId; + private Organism organism; + private Phylonode phylonode; + + // Constructors + + /** default constructor */ + public PhylonodeOrganism() { + // Deliberately empty default constructor + } + + /** full constructor */ + public PhylonodeOrganism(int phylonodeOrganismId, Organism organism, Phylonode phylonode) { + this.phylonodeOrganismId = phylonodeOrganismId; + this.organism = organism; + this.phylonode = phylonode; + } + + // Property accessors + + + + public int getPhylonodeOrganismId() { + return this.phylonodeOrganismId; + } + + public void setPhylonodeOrganismId(int phylonodeOrganismId) { + this.phylonodeOrganismId = phylonodeOrganismId; + } + + + + public Organism getOrganism() { + return this.organism; + } + + public void setOrganism(Organism organism) { + this.organism = organism; + } + + + + public Phylonode getPhylonode() { + return this.phylonode; + } + + public void setPhylonode(Phylonode phylonode) { + this.phylonode = phylonode; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/PhylonodeProp.java b/org/gmod/schema/phylogeny/PhylonodeProp.java new file mode 100644 index 0000000000000000000000000000000000000000..8126743cef9c584d7fb60233e0135263773ff5e1 --- /dev/null +++ b/org/gmod/schema/phylogeny/PhylonodeProp.java @@ -0,0 +1,104 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; + + + + + + + + + + +/** + * PhylonodeProp generated by hbm2java + */ + + +public class PhylonodeProp implements java.io.Serializable, PropertyI { + + // Fields + + private int phylonodePropId; + private CvTerm cvTerm; + private Phylonode phylonode; + private String value; + private int rank; + + // Constructors + + /** default constructor */ + public PhylonodeProp() { + // Deliberately empty default constructor + } + + /** full constructor */ + public PhylonodeProp(int phylonodePropId, CvTerm cvTerm, Phylonode phylonode, String value, int rank) { + this.phylonodePropId = phylonodePropId; + this.cvTerm = cvTerm; + this.phylonode = phylonode; + this.value = value; + this.rank = rank; + } + + // Property accessors + + + + public int getPhylonodePropId() { + return this.phylonodePropId; + } + + public void setPhylonodePropId(int phylonodePropId) { + this.phylonodePropId = phylonodePropId; + } + + + + public CvTerm getCvTerm() { + return this.cvTerm; + } + + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + + public Phylonode getPhylonode() { + return this.phylonode; + } + + public void setPhylonode(Phylonode phylonode) { + this.phylonode = phylonode; + } + + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + + public int getRank() { + return this.rank; + } + + public void setRank(int rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/PhylonodePub.java b/org/gmod/schema/phylogeny/PhylonodePub.java new file mode 100644 index 0000000000000000000000000000000000000000..aabd38ce58112fc94a8808c5505929bec8a31eaf --- /dev/null +++ b/org/gmod/schema/phylogeny/PhylonodePub.java @@ -0,0 +1,80 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.pub.Pub; + + + + + + + + + + +/** + * PhylonodePub generated by hbm2java + */ + + +public class PhylonodePub implements java.io.Serializable { + + // Fields + + private int phylonodePubId; + private Pub pub; + private Phylonode phylonode; + + // Constructors + + /** default constructor */ + public PhylonodePub() { + // Deliberately empty default constructor + } + + /** full constructor */ + public PhylonodePub(int phylonodePubId, Pub pub, Phylonode phylonode) { + this.phylonodePubId = phylonodePubId; + this.pub = pub; + this.phylonode = phylonode; + } + + // Property accessors + + + + public int getPhylonodePubId() { + return this.phylonodePubId; + } + + public void setPhylonodePubId(int phylonodePubId) { + this.phylonodePubId = phylonodePubId; + } + + + + public Pub getPub() { + return this.pub; + } + + public void setPub(Pub pub) { + this.pub = pub; + } + + + + public Phylonode getPhylonode() { + return this.phylonode; + } + + public void setPhylonode(Phylonode phylonode) { + this.phylonode = phylonode; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/PhylonodeRelationship.java b/org/gmod/schema/phylogeny/PhylonodeRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..0330c9a217a8002d953004de3e051cc3bec372f5 --- /dev/null +++ b/org/gmod/schema/phylogeny/PhylonodeRelationship.java @@ -0,0 +1,110 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.cv.CvTerm; + + + + + + + + + + +/** + * PhylonodeRelationship generated by hbm2java + */ + + +public class PhylonodeRelationship implements java.io.Serializable { + + // Fields + + private int phylonodeRelationshipId; + private Phylonode phylonodeBySubjectId; + private Phylonode phylonodeByObjectId; + private CvTerm cvTerm; + private Integer rank; + + // Constructors + + /** default constructor */ + public PhylonodeRelationship() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public PhylonodeRelationship(int phylonodeRelationshipId, Phylonode phylonodeBySubjectId, Phylonode phylonodeByObjectId, CvTerm cvTerm) { + this.phylonodeRelationshipId = phylonodeRelationshipId; + this.phylonodeBySubjectId = phylonodeBySubjectId; + this.phylonodeByObjectId = phylonodeByObjectId; + this.cvTerm = cvTerm; + } + /** full constructor */ + public PhylonodeRelationship(int phylonodeRelationshipId, Phylonode phylonodeBySubjectId, Phylonode phylonodeByObjectId, CvTerm cvTerm, Integer rank) { + this.phylonodeRelationshipId = phylonodeRelationshipId; + this.phylonodeBySubjectId = phylonodeBySubjectId; + this.phylonodeByObjectId = phylonodeByObjectId; + this.cvTerm = cvTerm; + this.rank = rank; + } + + // Property accessors + + + + public int getPhylonodeRelationshipId() { + return this.phylonodeRelationshipId; + } + + public void setPhylonodeRelationshipId(int phylonodeRelationshipId) { + this.phylonodeRelationshipId = phylonodeRelationshipId; + } + + + + public Phylonode getPhylonodeBySubjectId() { + return this.phylonodeBySubjectId; + } + + public void setPhylonodeBySubjectId(Phylonode phylonodeBySubjectId) { + this.phylonodeBySubjectId = phylonodeBySubjectId; + } + + + + public Phylonode getPhylonodeByObjectId() { + return this.phylonodeByObjectId; + } + + public void setPhylonodeByObjectId(Phylonode phylonodeByObjectId) { + this.phylonodeByObjectId = phylonodeByObjectId; + } + + + + public CvTerm getCvTerm() { + return this.cvTerm; + } + + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + public Integer getRank() { + return this.rank; + } + + public void setRank(Integer rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/Phylotree.java b/org/gmod/schema/phylogeny/Phylotree.java new file mode 100644 index 0000000000000000000000000000000000000000..e7d3ad6124c732326330017b8eca3fa08ca85425 --- /dev/null +++ b/org/gmod/schema/phylogeny/Phylotree.java @@ -0,0 +1,131 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.general.DbXRef; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + + +/** + * Phylotree generated by hbm2java + */ + + +public class Phylotree implements java.io.Serializable { + + // Fields + + private int phylotreeId; + private CvTerm cvTerm; + private DbXRef dbXRef; + private String name; + private String comment; + private Set<Phylonode> phylonodes = new HashSet<Phylonode>(0); + private Set<PhylotreePub> phylotreePubs = new HashSet<PhylotreePub>(0); + + // Constructors + + /** default constructor */ + public Phylotree() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public Phylotree(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + /** full constructor */ + public Phylotree(CvTerm cvTerm, DbXRef dbXRef, String name, String comment, Set<Phylonode> phylonodes, Set<PhylotreePub> phylotreePubs) { + this.cvTerm = cvTerm; + this.dbXRef = dbXRef; + this.name = name; + this.comment = comment; + this.phylonodes = phylonodes; + this.phylotreePubs = phylotreePubs; + } + + // Property accessors + + + public int getPhylotreeId() { + return this.phylotreeId; + } + + private void setPhylotreeId(int phylotreeId) { + this.phylotreeId = phylotreeId; + } + + + + public CvTerm getCvTerm() { + return this.cvTerm; + } + + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + + public DbXRef getDbXRef() { + return this.dbXRef; + } + + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + + public String getComment() { + return this.comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + + public Collection<Phylonode> getPhylonodes() { + return this.phylonodes; + } + + public void setPhylonodes(Set<Phylonode> phylonodes) { + this.phylonodes = phylonodes; + } + + public Collection<PhylotreePub> getPhylotreePubs() { + return this.phylotreePubs; + } + + public void setPhylotreePubs(Set<PhylotreePub> phylotreePubs) { + this.phylotreePubs = phylotreePubs; + } + + + + +} + + diff --git a/org/gmod/schema/phylogeny/PhylotreePub.java b/org/gmod/schema/phylogeny/PhylotreePub.java new file mode 100644 index 0000000000000000000000000000000000000000..e5f2dc26e1a6d7aed276c708b993760e378a88f9 --- /dev/null +++ b/org/gmod/schema/phylogeny/PhylotreePub.java @@ -0,0 +1,80 @@ +package org.gmod.schema.phylogeny; +// Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 + + +import org.gmod.schema.pub.Pub; + + + + + + + + + + +/** + * PhylotreePub generated by hbm2java + */ + + +public class PhylotreePub implements java.io.Serializable { + + // Fields + + private int phylotreePubId; + private Phylotree phylotree; + private Pub pub; + + // Constructors + + /** default constructor */ + public PhylotreePub() { + // Deliberately empty default constructor + } + + /** full constructor */ + public PhylotreePub(int phylotreePubId, Phylotree phylotree, Pub pub) { + this.phylotreePubId = phylotreePubId; + this.phylotree = phylotree; + this.pub = pub; + } + + // Property accessors + + + + public int getPhylotreePubId() { + return this.phylotreePubId; + } + + public void setPhylotreePubId(int phylotreePubId) { + this.phylotreePubId = phylotreePubId; + } + + + + public Phylotree getPhylotree() { + return this.phylotree; + } + + public void setPhylotree(Phylotree phylotree) { + this.phylotree = phylotree; + } + + + + public Pub getPub() { + return this.pub; + } + + public void setPub(Pub pub) { + this.pub = pub; + } + + + + +} + + diff --git a/org/gmod/schema/pub/Pub.java b/org/gmod/schema/pub/Pub.java new file mode 100644 index 0000000000000000000000000000000000000000..a58817a33f2f59f873fc765d94ec40b1e8ff8b61 --- /dev/null +++ b/org/gmod/schema/pub/Pub.java @@ -0,0 +1,555 @@ +package org.gmod.schema.pub; + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.phylogeny.PhylonodePub; +import org.gmod.schema.phylogeny.PhylotreePub; +import org.gmod.schema.sequence.FeatureCvTerm; +import org.gmod.schema.sequence.FeatureCvTermPub; +import org.gmod.schema.sequence.FeatureLocPub; +import org.gmod.schema.sequence.FeaturePropPub; +import org.gmod.schema.sequence.FeaturePub; +import org.gmod.schema.sequence.FeatureRelationshipPropPub; +import org.gmod.schema.sequence.FeatureRelationshipPub; +import org.gmod.schema.sequence.FeatureSynonym; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + + + + + + + + + + + + + +public class Pub implements Serializable { + + + private Set<PhylotreePub> phylotreePubs = new HashSet<PhylotreePub>(0); + private Set<PhylonodePub> phylonodePubs = new HashSet<PhylonodePub>(0); + + + public Set<PhylotreePub> getPhylotreePubs() { + return this.phylotreePubs; + } + + public void setPhylotreePubs(Set<PhylotreePub> phylotreePubs) { + this.phylotreePubs = phylotreePubs; + } + + + public Set<PhylonodePub> getPhylonodePubs() { + return this.phylonodePubs; + } + + public void setPhylonodePubs(Set<PhylonodePub> phylonodePubs) { + this.phylonodePubs = phylonodePubs; + } + + // Fields + + + + private int pubId; + + + + + private CvTerm cvTerm; + + + private String title; + + + private String volumeTitle; + + + private String volume; + + + private String seriesName; + + + private String issue; + + + private String pyear; + + + private String pages; + + + private String miniRef; + + + private String uniqueName; + + + private Boolean obsolete; + + + private String publisher; + + + private String pubPlace; + + + private Set<PubAuthor> pubAuthors = new HashSet<PubAuthor>(0); + + + private Set<PubRelationship> pubRelationshipsForObjectId = new HashSet<PubRelationship>(0); + + + private Set<PubDbXRef> pubDbXRefs = new HashSet<PubDbXRef>(0); + + + private Set<FeatureCvTerm> featureCvTerms = new HashSet<FeatureCvTerm>(0); + + + private Set<FeatureRelationshipPub> featureRelationshipPubs = new HashSet<FeatureRelationshipPub>(0); + + + private Set<FeaturePub> featurePubs = new HashSet<FeaturePub>(0); + + + private Set<FeaturePropPub> featurePropPubs = new HashSet<FeaturePropPub>(0); + + + private Set<FeatureSynonym> featureSynonyms = new HashSet<FeatureSynonym>(0); + + + private Set<FeatureCvTermPub> featureCvTermPubs = new HashSet<FeatureCvTermPub>(0); + + + private Set<FeatureRelationshipPropPub> featureRelationshipPropPubs = new HashSet<FeatureRelationshipPropPub>(0); + + + private Set<PubProp> pubProps = new HashSet<PubProp>(0); + + + private Set<PubRelationship> pubRelationshipsForSubjectId = new HashSet<PubRelationship>(0); + + + private Set<FeatureLocPub> featureLocPubs = new HashSet<FeatureLocPub>(0); + + // Constructors + + /** default constructor */ + public Pub() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public Pub(String uniqueName, CvTerm cvTerm) { + this.uniqueName = uniqueName; + this.cvTerm = cvTerm; + } + + public Pub(String uniqueName) { + this.uniqueName = uniqueName; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubId() + */ + public int getPubId() { + return this.pubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubId(int) + */ + public void setPubId(int pubId) { + this.pubId = pubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getCvTerm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getTitle() + */ + public String getTitle() { + return this.title; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setTitle(java.lang.String) + */ + public void setTitle(String title) { + this.title = title; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getVolumeTitle() + */ + public String getVolumeTitle() { + return this.volumeTitle; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setVolumeTitle(java.lang.String) + */ + public void setVolumeTitle(String volumeTitle) { + this.volumeTitle = volumeTitle; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getVolume() + */ + public String getVolume() { + return this.volume; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setVolume(java.lang.String) + */ + public void setVolume(String volume) { + this.volume = volume; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getSeriesName() + */ + public String getSeriesName() { + return this.seriesName; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setSeriesName(java.lang.String) + */ + public void setSeriesName(String seriesName) { + this.seriesName = seriesName; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getIssue() + */ + public String getIssue() { + return this.issue; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setIssue(java.lang.String) + */ + public void setIssue(String issue) { + this.issue = issue; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPyear() + */ + public String getPyear() { + return this.pyear; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPyear(java.lang.String) + */ + public void setPyear(String pyear) { + this.pyear = pyear; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPages() + */ + public String getPages() { + return this.pages; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPages(java.lang.String) + */ + public void setPages(String pages) { + this.pages = pages; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getMiniRef() + */ + public String getMiniRef() { + return this.miniRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setMiniRef(java.lang.String) + */ + public void setMiniRef(String miniRef) { + this.miniRef = miniRef; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getUniqueName() + */ + public String getUniqueName() { + return this.uniqueName; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setUniqueName(java.lang.String) + */ + public void setUniqueName(String uniqueName) { + this.uniqueName = uniqueName; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getobsolete() + */ + public Boolean getObsolete() { + return this.obsolete; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setobsolete(java.lang.Boolean) + */ + public void setObsolete(Boolean obsolete) { + this.obsolete = obsolete; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPublisher() + */ + public String getPublisher() { + return this.publisher; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPublisher(java.lang.String) + */ + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubPlace() + */ + public String getPubPlace() { + return this.pubPlace; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubPlace(java.lang.String) + */ + public void setPubPlace(String pubPlace) { + this.pubPlace = pubPlace; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubAuthors() + */ + public Collection<PubAuthor> getPubAuthors() { + return this.pubAuthors; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubAuthors(java.util.Set) + */ + public void setPubAuthors(Set<PubAuthor> pubAuthors) { + this.pubAuthors = pubAuthors; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubRelationshipsForObjectId() + */ + public Collection<PubRelationship> getPubRelationshipsForObjectId() { + return this.pubRelationshipsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubRelationshipsForObjectId(java.util.Set) + */ + public void setPubRelationshipsForObjectId(Set<PubRelationship> pubRelationshipsForObjectId) { + this.pubRelationshipsForObjectId = pubRelationshipsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubDbXRefs() + */ + private Collection<PubDbXRef> getPubDbXRefs() { + return this.pubDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubDbXRefs(java.util.Set) + */ + private void setPubDbXRefs(Set<PubDbXRef> pubDbXRefs) { + this.pubDbXRefs = pubDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeatureCvTerms() + */ + private Collection<FeatureCvTerm> getFeatureCvTerms() { + return this.featureCvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeatureCvTerms(java.util.Set) + */ + private void setFeatureCvTerms(Set<FeatureCvTerm> featureCvTerms) { + this.featureCvTerms = featureCvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeatureRelationshipPubs() + */ + private Collection<FeatureRelationshipPub> getFeatureRelationshipPubs() { + return this.featureRelationshipPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeatureRelationshipPubs(java.util.Set) + */ + private void setFeatureRelationshipPubs(Set<FeatureRelationshipPub> featureRelationshipPubs) { + this.featureRelationshipPubs = featureRelationshipPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeaturePubs() + */ + private Collection<FeaturePub> getFeaturePubs() { + return this.featurePubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeaturePubs(java.util.Set) + */ + private void setFeaturePubs(Set<FeaturePub> featurePubs) { + this.featurePubs = featurePubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeaturePropPubs() + */ + private Collection<FeaturePropPub> getFeaturePropPubs() { + return this.featurePropPubs; + } +// + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeaturePropPubs(java.util.Set) + */ + private void setFeaturePropPubs(Set<FeaturePropPub> featurePropPubs) { + this.featurePropPubs = featurePropPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeatureSynonyms() + */ + private Collection<FeatureSynonym> getFeatureSynonyms() { + return this.featureSynonyms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeatureSynonyms(java.util.Set) + */ + private void setFeatureSynonyms(Set<FeatureSynonym> featureSynonyms) { + this.featureSynonyms = featureSynonyms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeatureCvTermPubs() + */ + private Collection<FeatureCvTermPub> getFeatureCvTermPubs() { + return this.featureCvTermPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeatureCvTermPubs(java.util.Set) + */ + private void setFeatureCvTermPubs(Set<FeatureCvTermPub> featureCvTermPubs) { + this.featureCvTermPubs = featureCvTermPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeatureRelationshipPropPubs() + */ + private Collection<FeatureRelationshipPropPub> getFeatureRelationshipPropPubs() { + return this.featureRelationshipPropPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeatureRelationshipPropPubs(java.util.Set) + */ + private void setFeatureRelationshipPropPubs(Set<FeatureRelationshipPropPub> featureRelationshipPropPubs) { + this.featureRelationshipPropPubs = featureRelationshipPropPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubProps() + */ + private Collection<PubProp> getPubProps() { + return this.pubProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubProps(java.util.Set) + */ + private void setPubProps(Set<PubProp> pubProps) { + this.pubProps = pubProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getPubRelationshipsForSubjectId() + */ + private Collection<PubRelationship> getPubRelationshipsForSubjectId() { + return this.pubRelationshipsForSubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setPubRelationshipsForSubjectId(java.util.Set) + */ + private void setPubRelationshipsForSubjectId(Set<PubRelationship> pubRelationshipsForSubjectId) { + this.pubRelationshipsForSubjectId = pubRelationshipsForSubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#getFeatureLocPubs() + */ + private Collection<FeatureLocPub> getFeatureLocPubs() { + return this.featureLocPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubI#setFeatureLocPubs(java.util.Set) + */ + private void setFeatureLocPubs(Set<FeatureLocPub> featureLocPubs) { + this.featureLocPubs = featureLocPubs; + } + +} + + diff --git a/org/gmod/schema/pub/PubAuthor.java b/org/gmod/schema/pub/PubAuthor.java new file mode 100644 index 0000000000000000000000000000000000000000..6edd160bee740297d7b3f49409da156050563e10 --- /dev/null +++ b/org/gmod/schema/pub/PubAuthor.java @@ -0,0 +1,155 @@ +package org.gmod.schema.pub; + + + +import java.io.Serializable; + + + + + + + + + + + +public class PubAuthor implements Serializable { + + // Fields + + + + private int pubAuthorId; + + + + private Pub pub; + + + private int rank; + + + private Boolean editor; + + + private String surname; + + + private String givenNames; + + + private String suffix; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getPubAuthorId() + */ + private int getPubAuthorId() { + return this.pubAuthorId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setPubAuthorId(int) + */ + private void setPubAuthorId(int pubAuthorId) { + this.pubAuthorId = pubAuthorId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getPub() + */ + private Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setPub(org.gmod.schema.pub.PubI) + */ + private void setPub(Pub pub) { + this.pub = pub; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getRank() + */ + private int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setRank(int) + */ + private void setRank(int rank) { + this.rank = rank; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getEditor() + */ + private Boolean getEditor() { + return this.editor; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setEditor(java.lang.Boolean) + */ + private void setEditor(Boolean editor) { + this.editor = editor; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getSurname() + */ + private String getSurname() { + return this.surname; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setSurname(java.lang.String) + */ + private void setSurname(String surname) { + this.surname = surname; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getGivenNames() + */ + private String getGivenNames() { + return this.givenNames; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setGivenNames(java.lang.String) + */ + private void setGivenNames(String givenNames) { + this.givenNames = givenNames; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#getSuffix() + */ + private String getSuffix() { + return this.suffix; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubAuthorI#setSuffix(java.lang.String) + */ + private void setSuffix(String suffix) { + this.suffix = suffix; + } + + + + +} + + diff --git a/org/gmod/schema/pub/PubDbXRef.java b/org/gmod/schema/pub/PubDbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..1db4eda34349dc43dec2a77be75e41f004879489 --- /dev/null +++ b/org/gmod/schema/pub/PubDbXRef.java @@ -0,0 +1,117 @@ +package org.gmod.schema.pub; + +import org.gmod.schema.general.DbXRef; + +import java.io.Serializable; + + + + + + + + + + + +public class PubDbXRef implements Serializable { + + // Fields + + + + private int pubDbXRefId; + + + + + private DbXRef dbXRef; + + + + + private Pub pub; + + + private boolean current; + + // Constructors + + /** default constructor */ + public PubDbXRef() { + // Deliberately empty default constructor + } + + /** full constructor */ + public PubDbXRef(Pub pub, DbXRef dbXRef, boolean current) { + this.dbXRef = dbXRef; + this.pub = pub; + this.current = current; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#getPubDbXRefId() + */ + private int getPubDbXRefId() { + return this.pubDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#setPubDbXRefId(int) + */ + private void setPubDbXRefId(int pubDbXRefId) { + this.pubDbXRefId = pubDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#getDbXRef() + */ + public DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#setDbXRef(org.gmod.schema.general.DbXRefI) + */ + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#getPub() + */ + public Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#setPub(org.gmod.schema.pub.PubI) + */ + public void setPub(Pub pub) { + this.pub = pub; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#isCurrent() + */ + public boolean isCurrent() { + return this.current; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubDbXRefI#setCurrent(boolean) + */ + public void setCurrent(boolean current) { + this.current = current; + } + + + + +} + + diff --git a/org/gmod/schema/pub/PubProp.java b/org/gmod/schema/pub/PubProp.java new file mode 100644 index 0000000000000000000000000000000000000000..3164d86cedfdb157c5d53e97572a3c38efd1daad --- /dev/null +++ b/org/gmod/schema/pub/PubProp.java @@ -0,0 +1,145 @@ +package org.gmod.schema.pub; + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; + +import java.io.Serializable; + + + + + + + + + + + + +public class PubProp implements Serializable, PropertyI { + + // Fields + + + + private int pubPropId; + + + + + private CvTerm cvTerm; + + + + + private Pub pub; + + + private String value; + + + private Integer rank; + + // Constructors + + /** default constructor */ + public PubProp() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public PubProp(CvTerm cvTerm, Pub pub, String value) { + this.cvTerm = cvTerm; + this.pub = pub; + this.value = value; + } + /** full constructor */ + public PubProp(CvTerm cvTerm, Pub pub, String value, Integer rank) { + this.cvTerm = cvTerm; + this.pub = pub; + this.value = value; + this.rank = rank; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#getPubPropId() + */ + private int getPubPropId() { + return this.pubPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#setPubPropId(int) + */ + private void setPubPropId(int pubPropId) { + this.pubPropId = pubPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#getCvTerm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#getPub() + */ + private Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#setPub(org.gmod.schema.pub.PubI) + */ + private void setPub(Pub pub) { + this.pub = pub; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#getValue() + */ + private String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#setValue(java.lang.String) + */ + private void setValue(String value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#getRank() + */ + public Integer getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubPropI#setRank(java.lang.Integer) + */ + private void setRank(Integer rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/pub/PubRelationship.java b/org/gmod/schema/pub/PubRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..011a4dba8d0c9429af508e5e9f1ed6bf53006225 --- /dev/null +++ b/org/gmod/schema/pub/PubRelationship.java @@ -0,0 +1,104 @@ +package org.gmod.schema.pub; + +import org.gmod.schema.cv.CvTerm; + +import java.io.Serializable; + + + + + + + + + + + +public class PubRelationship implements Serializable { + + // Fields + + + + private int pubRelationshipId; + + + + + private Pub pubBySubjectId; + + + + + private Pub pubByObjectId; + + + + + private CvTerm cvTerm; + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#getPubRelationshipId() + */ + private int getPubRelationshipId() { + return this.pubRelationshipId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#setPubRelationshipId(int) + */ + private void setPubRelationshipId(int pubRelationshipId) { + this.pubRelationshipId = pubRelationshipId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#getPubBySubjectId() + */ + private Pub getPubBySubjectId() { + return this.pubBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#setPubBySubjectId(org.gmod.schema.pub.PubI) + */ + private void setPubBySubjectId(Pub pubBySubjectId) { + this.pubBySubjectId = pubBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#getPubByObjectId() + */ + private Pub getPubByObjectId() { + return this.pubByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#setPubByObjectId(org.gmod.schema.pub.PubI) + */ + private void setPubByObjectId(Pub pubByObjectId) { + this.pubByObjectId = pubByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#getCvTerm() + */ + private CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.PubRelationshipI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/Feature.java b/org/gmod/schema/sequence/Feature.java new file mode 100644 index 0000000000000000000000000000000000000000..ff4a8ed24eb38111a13d83102f2bed2089f8878d --- /dev/null +++ b/org/gmod/schema/sequence/Feature.java @@ -0,0 +1,509 @@ +package org.gmod.schema.sequence; + + +import org.gmod.schema.analysis.AnalysisFeature; +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.general.DbXRef; +import org.gmod.schema.organism.Organism; +import org.gmod.schema.phylogeny.Phylonode; +import org.gmod.schema.utils.CollectionUtils; + + + + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Collection; +import java.util.Date; +import java.sql.Timestamp; + +public class Feature implements java.io.Serializable { + + private int featureId; + private Organism organism; + private CvTerm cvTerm; + private String name; + private String uniqueName; + private Integer seqLen = -1; + private String md5Checksum; + private boolean analysis; + private boolean obsolete; + private Timestamp timeAccessioned; + private Timestamp timeLastModified; + + // ------------------------------------------------------------------------------- + // Unsorted properties below here + + + private Collection<Phylonode> phylonodes; + private DbXRef dbXRef; + private byte residues[]; + private Collection<FeatureLoc> featureLocsForSrcFeatureId; + private Collection<FeatureRelationship> featureRelationshipsForObjectId; + private Collection<FeatureRelationship> featureRelationshipsForSubjectId; + private Collection<FeatureDbXRef> featureDbXRefs; + private Collection<FeatureLoc> featureLocsForFeatureId; + private Collection<FeatureCvTerm> featureCvTerms; + + //@Cascade( {CascadeType.ALL, CascadeType.DELETE_ORPHAN} ) + private Collection<FeatureProp> featureProps; + private Collection<FeaturePub> featurePubs; + private Collection<AnalysisFeature> analysisFeatures; + private Collection<FeatureSynonym> featureSynonyms; + private FeatureLoc featureLoc; + + // Constructors + + /** default constructor */ + public Feature() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public Feature(Organism organism, CvTerm cvTerm, String uniqueName, boolean analysis, boolean obsolete, Timestamp timeAccessioned, Timestamp timeLastModified) { + this.organism = organism; + this.cvTerm = cvTerm; + this.uniqueName = uniqueName; + this.analysis = analysis; + this.obsolete = obsolete; + this.timeAccessioned = timeAccessioned; + this.timeLastModified = timeLastModified; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureId() + */ + public int getFeatureId() { + return this.featureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureId(int) + */ + public void setFeatureId(int featureId) { + this.featureId = featureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getOrganism() + */ + public Organism getOrganism() { + return this.organism; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setOrganism(org.gmod.schema.organism.OrganismI) + */ + public void setOrganism(Organism organism) { + this.organism = organism; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getCvTerm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setCvTerm(org.gmod.schema.cv.CvTermI) + */ + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getDbxref() + */ + public DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setDbxref(org.gmod.schema.general.DbXRefI) + */ + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + + /** + * Get the human-readable form of the feature eg the gene name + * + * @return the name, may be null + */ + public String getName() { + return this.name; + } + + + /** + * Set the human-readable form of the feature eg the gene name + * + * @param name the human-readable name + */ + public void setName(String name) { + this.name = name; + } + + + /** + * Fetch the unique name (systematic id) for the feature + * + * @return the unique name, not null + */ + /** + * @return + */ + public String getUniqueName() { + return this.uniqueName; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setUniquename(java.lang.String) + */ + public void setUniqueName(String uniqueName) { + this.uniqueName = uniqueName; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getResidues() + */ + public byte[] getResidues() { + return this.residues; + } + + /** + * Fetch a subset of the sequence (may be lazy) + * + * @param min the lower bound, in interbase coordinates + * @param max the upper bound, in interbase coordinates + * @return + */ + public byte[] getResidues(int min, int max) { + byte[] results = new byte[max - min]; + System.arraycopy(getResidues(), 0, results, 0, max); + return results; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setResidues(java.lang.String) + */ + public void setResidues(byte[] residues) { + this.residues = residues; + if (residues == null) { + seqLen = 0; + md5Checksum = ""; + return; + } + seqLen = residues.length; + this.md5Checksum = calcMD5(this.residues); + } + + + /** + * Fetch the length of the sequence. Find it from the parent if necessary + * + * @return the length + */ + public int getSeqLen() { + if (this.seqLen.intValue() == -1 && residues != null) { + return getResidues().length; + } + return this.seqLen.intValue(); + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setSeqlen(java.lang.Integer) + */ + public void setSeqLen(Integer seqLen) { + if (seqLen == null) { + throw new IllegalArgumentException("Length of '"+uniqueName+"' attempted to be set to null"); + } + this.seqLen = seqLen; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getMd5Checksum() + */ + public String getMd5Checksum() { + return this.md5Checksum; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setMd5Checksum(java.lang.String) + */ + public void setMd5Checksum(String md5Checksum) { + this.md5Checksum = md5Checksum; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#isAnalysis() + */ + public boolean isAnalysis() { + return this.analysis; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setAnalysis(boolean) + */ + public void setAnalysis(boolean analysis) { + this.analysis = analysis; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#isObsolete() + */ + public boolean isObsolete() { + return this.obsolete; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setObsolete(boolean) + */ + public void setObsolete(boolean obsolete) { + this.obsolete = obsolete; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getTimeAccessioned() + */ + public Date getTimeAccessioned() { + return this.timeAccessioned; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setTimeAccessioned(java.util.Date) + */ + public void setTimeAccessioned(Timestamp timeAccessioned) { + this.timeAccessioned = timeAccessioned; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getTimeLastModified() + */ + public Timestamp getTimeLastModified() { + return this.timeLastModified; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setTimeLastModified(java.util.Date) + */ + public void setTimeLastModified(Timestamp timeLastModified) { + this.timeLastModified = timeLastModified; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeaturelocsForSrcfeatureId() + */ + public Collection<FeatureLoc> getFeatureLocsForSrcFeatureId() { + return (featureLocsForSrcFeatureId = CollectionUtils.safeGetter(featureLocsForSrcFeatureId)); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeaturelocsForSrcfeatureId(java.util.Set) + */ + public void setFeatureLocsForSrcFeatureId(Collection<FeatureLoc> featureLocsForSrcFeatureId) { + this.featureLocsForSrcFeatureId = featureLocsForSrcFeatureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureRelationshipsForObjectId() + */ + public Collection<FeatureRelationship> getFeatureRelationshipsForObjectId() { + return (featureRelationshipsForObjectId = CollectionUtils.safeGetter(featureRelationshipsForObjectId)); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureRelationshipsForObjectId(java.util.Set) + */ + public void setFeatureRelationshipsForObjectId(Collection<FeatureRelationship> featureRelationshipsForObjectId) { + this.featureRelationshipsForObjectId = featureRelationshipsForObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureRelationshipsForSubjectId() + */ + public Collection<FeatureRelationship> getFeatureRelationshipsForSubjectId() { + return (featureRelationshipsForSubjectId = CollectionUtils.safeGetter(featureRelationshipsForSubjectId)); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureRelationshipsForSubjectId(java.util.Set) + */ + public void setFeatureRelationshipsForSubjectId(Collection<FeatureRelationship> featureRelationshipsForSubjectId) { + this.featureRelationshipsForSubjectId = featureRelationshipsForSubjectId; + } + + public void addFeatureRelationshipsForSubjectId(FeatureRelationship featureRelationshipForSubjectId) { + featureRelationshipForSubjectId.setFeatureBySubjectId(this); + this.featureRelationshipsForSubjectId.add(featureRelationshipForSubjectId); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureDbxrefs() + */ + public Collection<FeatureDbXRef> getFeatureDbXRefs() { + return this.featureDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureDbxrefs(java.util.Set) + */ + public void setFeatureDbXRefs(Collection<FeatureDbXRef> featureDbXRefs) { + this.featureDbXRefs = featureDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeaturelocsForFeatureId() + */ + public Collection<FeatureLoc> getFeatureLocsForFeatureId() { + return (featureLocsForFeatureId = CollectionUtils.safeGetter(featureLocsForFeatureId)); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeaturelocsForFeatureId(java.util.Set) + */ + public void addFeatureLocsForFeatureId(FeatureLoc featureLocForFeatureId) { + featureLocForFeatureId.setFeatureByFeatureId(this); + getFeatureLocsForFeatureId().add(featureLocForFeatureId); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureCvterms() + */ + public Collection<FeatureCvTerm> getFeatureCvTerms() { + return this.featureCvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureCvterms(java.util.Set) + */ + public void setFeatureCvTerms(Collection<FeatureCvTerm> featureCvTerms) { + this.featureCvTerms = featureCvTerms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureProps() + */ + public Collection<FeatureProp> getFeatureProps() { + return (featureProps = CollectionUtils.safeGetter(featureProps)); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureProps(java.util.Set) + */ + public void addFeatureProp(FeatureProp featureProp) { + featureProp.setFeature(this); + getFeatureProps().add(featureProp); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeaturePubs() + */ + public Collection<FeaturePub> getFeaturePubs() { + return this.featurePubs; + } + + public void setFeaturePubs(Collection<FeaturePub> featurePubs) { + this.featurePubs = featurePubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getAnalysisfeatures() + */ + public Collection<AnalysisFeature> getAnalysisFeatures() { + return this.analysisFeatures; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setAnalysisfeatures(java.util.Set) + */ + public void setAnalysisFeatures(Collection<AnalysisFeature> analysisFeatures) { + this.analysisFeatures = analysisFeatures; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#getFeatureSynonyms() + */ + public Collection<FeatureSynonym> getFeatureSynonyms() { + return (featureSynonyms = CollectionUtils.safeGetter(featureSynonyms)); + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureI#setFeatureSynonyms(java.util.Set) + */ + public void setFeatureSynonyms(Collection<FeatureSynonym> featureSynonyms) { + this.featureSynonyms = featureSynonyms; + } + + /** + * Get the display name for the gene, preferrably the name, + * otherwise the display name + * + * @return the preferred display name, never null + */ + public String getDisplayName() { + return (getName() != null) ? getName() : getUniqueName(); + } + + + public void setFeatureLocsForFeatureId(Collection<FeatureLoc> featureLocsForFeatureId) { + this.featureLocsForFeatureId = featureLocsForFeatureId; + } + + + public void setFeatureProps(Collection<FeatureProp> featureProps) { + this.featureProps = featureProps; + } + + + public Collection<Phylonode> getPhylonodes() { + return this.phylonodes; + } + + public void setPhylonodes(Collection<Phylonode> phylonodes) { + this.phylonodes = phylonodes; + } + + private String calcMD5(byte[] residue) { + try { + MessageDigest md5 = MessageDigest.getInstance("MD5"); +// MessageDigest tc1 = md.clone(); + byte[] md5Bytes = md5.digest(residue); + + StringBuilder hexValue = new StringBuilder(); + for (int i=0 ; i<md5Bytes.length ; i++) { + int val = md5Bytes[i] & 0xff; + if (val < 16) hexValue.append("0"); + hexValue.append(Integer.toHexString(val)); + } + return hexValue.toString(); + + } + catch (NoSuchAlgorithmException exp) { + exp.printStackTrace(); // Shouldn't happen - MD5 is supported algorithm + } + return null; + } + + public FeatureLoc getFeatureLoc() + { + return featureLoc; + } + + public void setFeatureLoc(FeatureLoc featureLoc) + { + this.featureLoc = featureLoc; + } + +} diff --git a/org/gmod/schema/sequence/FeatureCvTerm.java b/org/gmod/schema/sequence/FeatureCvTerm.java new file mode 100644 index 0000000000000000000000000000000000000000..c4c34210c805305965a79dfee5a5fb6a20a5b2f4 --- /dev/null +++ b/org/gmod/schema/sequence/FeatureCvTerm.java @@ -0,0 +1,169 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.pub.Pub; +import org.gmod.schema.utils.Rankable; +import org.gmod.schema.utils.propinterface.PropertyI; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; + +public class FeatureCvTerm implements Serializable, Rankable, PropertyI { + + // Fields + private int featureCvTermId; + private CvTerm cvTerm; + private Feature feature; + private Pub pub; + private boolean not; + private int rank; + private Collection<FeatureCvTermProp> featureCvTermProps = new HashSet<FeatureCvTermProp>(0); + private Collection<FeatureCvTermPub> featureCvTermPubs = new HashSet<FeatureCvTermPub>(0); + private Collection<FeatureCvTermDbXRef> featureCvTermDbXRefs = new HashSet<FeatureCvTermDbXRef>(0); + + // Constructors + + /** default constructor */ + public FeatureCvTerm() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public FeatureCvTerm(CvTerm cvTerm, Feature feature, Pub pub, boolean not,int rank) { + this.cvTerm = cvTerm; + this.feature = feature; + this.pub = pub; + this.not = not; + this.rank = rank; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getFeatureCvTermId() + */ + public int getFeatureCvTermId() { + return this.featureCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setFeatureCvTermId(int) + */ + public void setFeatureCvTermId(int featureCvTermId) { + this.featureCvTermId = featureCvTermId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getCvterm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setCvterm(org.gmod.schema.cv.CvTermI) + */ + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getFeature() + */ + public Feature getFeature() { + return this.feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setFeature(org.genedb.db.jpa.Feature) + */ + public void setFeature(Feature feature) { + this.feature = feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getPub() + */ + public Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setPub(org.gmod.schema.pub.PubI) + */ + public void setPub(Pub pub) { + this.pub = pub; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#isNot() + */ + public boolean isNot() { + return this.not; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setNot(boolean) + */ + public void setNot(boolean not) { + this.not = not; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getFeatureCvtermprops() + */ + public Collection<FeatureCvTermProp> getFeatureCvTermProps() { + return this.featureCvTermProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setFeatureCvtermprops(java.util.Set) + */ + public void setFeatureCvTermProps(Collection<FeatureCvTermProp> featureCvTermProps) { + this.featureCvTermProps = featureCvTermProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getFeatureCvtermPubs() + */ + public Collection<FeatureCvTermPub> getFeatureCvTermPubs() { + return this.featureCvTermPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setFeatureCvtermPubs(java.util.Set) + */ + public void setFeatureCvTermPubs(Collection<FeatureCvTermPub> featureCvTermPubs) { + this.featureCvTermPubs = featureCvTermPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#getFeatureCvtermDbxrefs() + */ + public Collection<FeatureCvTermDbXRef> getFeatureCvTermDbXRefs() { + return this.featureCvTermDbXRefs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermI#setFeatureCvtermDbxrefs(java.util.Set) + */ + public void setFeatureCvTermDbXRefs(Collection<FeatureCvTermDbXRef> featureCvTermDbXRefs) { + this.featureCvTermDbXRefs = featureCvTermDbXRefs; + } + + public int getRank() { + return rank; + } + + public void setRank(int rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureCvTermDbXRef.java b/org/gmod/schema/sequence/FeatureCvTermDbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..14d1db9cb3147487cd01ed7bd5d813ddd95702aa --- /dev/null +++ b/org/gmod/schema/sequence/FeatureCvTermDbXRef.java @@ -0,0 +1,76 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.general.DbXRef; + +import java.io.Serializable; + +public class FeatureCvTermDbXRef implements Serializable { + + // Fields + private int featureCvTermDbXRefId; + private DbXRef dbXRef; + private FeatureCvTerm featureCvTerm; + + // Constructors + + /** default constructor */ + public FeatureCvTermDbXRef() { + // Deliberately empty default constructor + } + + /** full constructor */ + public FeatureCvTermDbXRef(DbXRef dbXRef, FeatureCvTerm featureCvTerm) { + this.dbXRef = dbXRef; + this.featureCvTerm = featureCvTerm; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermDbXRefI#getFeatureCvTermDbXrefId() + */ + private int getFeatureCvTermDbXRefId() { + return this.featureCvTermDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermDbXRefI#setFeatureCvTermDbXrefId(int) + */ + private void setFeatureCvTermDbXRefId(int featureCvTermDbXRefId) { + this.featureCvTermDbXRefId = featureCvTermDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermDbXRefI#getDbxref() + */ + public DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermDbXRefI#setDbxref(org.gmod.schema.general.DbXRefI) + */ + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermDbXRefI#getFeatureCvterm() + */ + public FeatureCvTerm getFeatureCvTerm() { + return this.featureCvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermDbXRefI#setFeatureCvterm(org.gmod.schema.sequence.FeatureCvTermI) + */ + public void setFeatureCvTerm(FeatureCvTerm featureCvTerm) { + this.featureCvTerm = featureCvTerm; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureCvTermProp.java b/org/gmod/schema/sequence/FeatureCvTermProp.java new file mode 100644 index 0000000000000000000000000000000000000000..4af9838b6a12ad2acab09da6245364414d6e0030 --- /dev/null +++ b/org/gmod/schema/sequence/FeatureCvTermProp.java @@ -0,0 +1,175 @@ +package org.gmod.schema.sequence; + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; +import org.gmod.schema.utils.Rankable; + +import java.io.Serializable; + +/** + * This represents a key/value pair attached to a FeatureCvTerm. The key is itself a CvTerm, with + * a free-text value + * + * Database constraints: feature_cvtermprop_c1 unique (feature_cvterm_id, type_id, rank) + * + * @author art + */ +/** + * @author art + * + */ + + +public class FeatureCvTermProp implements Serializable, PropertyI, Rankable { + + // Fields + + + /** + * Database unique primary key + */ + private int featureCvTermPropId; + + + /** + * The CvTerm that acts as the key in this map of properties + */ + private CvTerm cvTerm; + + /** + * The FeatureCvTerm to which this property is attached + */ + private FeatureCvTerm featureCvTerm; + + /** + * The value of this property + */ + private String value; + + /** + * The rank is used to distinguish multiple + * values for the same key eg /foo="value1", /foo="value2" in an EMBL file could be stored as two FeatureCvTerm with + * different ranks. The default is 0; + */ + private int rank; + + // Constructors + + /** default constructor */ + public FeatureCvTermProp() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public FeatureCvTermProp(CvTerm cvTerm, FeatureCvTerm featureCvTerm, int rank) { + this.cvTerm = cvTerm; + this.featureCvTerm = featureCvTerm; + this.rank = rank; + } + /** full constructor */ + public FeatureCvTermProp(CvTerm cvTerm, FeatureCvTerm featureCvTerm, String value, int rank) { + this.cvTerm = cvTerm; + this.featureCvTerm = featureCvTerm; + this.value = value; + this.rank = rank; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPropI#getFeatureCvTermpropId() + */ + private int getFeatureCvTermPropId() { + return this.featureCvTermPropId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPropI#setFeatureCvTermpropId(int) + */ + private void setFeatureCvTermPropId(int featureCvTermPropId) { + this.featureCvTermPropId = featureCvTermPropId; + } + + /** + * Accessor for featureCvTerm + * + * @see featureCvTerm + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /** + * Accessor for cvTerm + * + * @see cvTerm + */ + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /** + * Accessor for featureCvTerm + * + * @see featureCvTerm + */ + public FeatureCvTerm getFeatureCvTerm() { + return this.featureCvTerm; + } + + + /** + * Accessor for featureCvTerm + * + * @see featureCvTerm + */ + public void setFeatureCvTerm(FeatureCvTerm featureCvTerm) { + this.featureCvTerm = featureCvTerm; + } + + + /** + * Accessor for value + * + * @see value + */ + public String getValue() { + return this.value; + } + + /** + * Accessor for value + * + * @see value + */ + public void setValue(String value) { + this.value = value; + } + + + /** + * Accessor for rank + * + * @see rank + */ + public int getRank() { + return this.rank; + } + + /** + * Accessor for rank + * + * @see rank + */ + public void setRank(int rank) { + this.rank = rank; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureCvTermPub.java b/org/gmod/schema/sequence/FeatureCvTermPub.java new file mode 100644 index 0000000000000000000000000000000000000000..3d81a599747bdcd6eb38c71e315581f5492407ad --- /dev/null +++ b/org/gmod/schema/sequence/FeatureCvTermPub.java @@ -0,0 +1,78 @@ +package org.gmod.schema.sequence; + + + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeatureCvTermPub implements Serializable { + + // Fields + private int featureCvTermPubId; + private Pub pub; + private FeatureCvTerm featureCvTerm; + + // Constructors + + /** default constructor */ + public FeatureCvTermPub() { + // Deliberately empty default constructor + } + + /** full constructor */ + public FeatureCvTermPub(Pub pub, FeatureCvTerm featureCvTerm) { + this.pub = pub; + this.featureCvTerm = featureCvTerm; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPubI#getFeatureCvTermPubId() + */ + public int getFeatureCvTermPubId() { + return this.featureCvTermPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPubI#setFeatureCvTermPubId(int) + */ + public void setFeatureCvTermPubId(int featureCvTermPubId) { + this.featureCvTermPubId = featureCvTermPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPubI#getPub() + */ + public Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPubI#setPub(org.gmod.schema.pub.PubI) + */ + public void setPub(Pub pub) { + this.pub = pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPubI#getFeatureCvterm() + */ + public FeatureCvTerm getFeatureCvTerm() { + return this.featureCvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureCvTermPubI#setFeatureCvterm(org.gmod.schema.sequence.FeatureCvTermI) + */ + public void setFeatureCvTerm(FeatureCvTerm featureCvTerm) { + this.featureCvTerm = featureCvTerm; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureDbXRef.java b/org/gmod/schema/sequence/FeatureDbXRef.java new file mode 100644 index 0000000000000000000000000000000000000000..f43ae4c059657b45bb50a962fdbdb0969bc70b59 --- /dev/null +++ b/org/gmod/schema/sequence/FeatureDbXRef.java @@ -0,0 +1,93 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.general.DbXRef; + +import java.io.Serializable; + +public class FeatureDbXRef implements Serializable { + + // Fields + private int featureDbXRefId; + private DbXRef dbXRef; + private Feature feature; + private boolean current; + + // Constructors + + /** default constructor */ + public FeatureDbXRef() { + // Deliberately empty default constructor + } + + /** full constructor */ + public FeatureDbXRef(DbXRef dbXRef, Feature feature, boolean current) { + this.dbXRef = dbXRef; + this.feature = feature; + this.current = current; + } + + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#getFeatureDbXRefId() + */ + public int getFeatureDbXRefId() { + return this.featureDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#setFeatureDbXRefId(int) + */ + public void setFeatureDbXRefId(int featureDbXRefId) { + this.featureDbXRefId = featureDbXRefId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#getDbxref() + */ + public DbXRef getDbXRef() { + return this.dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#setDbxref(org.gmod.schema.general.DbXRefI) + */ + public void setDbXRef(DbXRef dbXRef) { + this.dbXRef = dbXRef; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#getFeature() + */ + public Feature getFeature() { + return this.feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#setFeature(org.genedb.db.jpa.Feature) + */ + public void setFeature(Feature feature) { + this.feature = feature; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#isCurrent() + */ + public boolean isCurrent() { + return this.current; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureDbXRefI#setCurrent(boolean) + */ + public void setCurrent(boolean current) { + this.current = current; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureLoc.java b/org/gmod/schema/sequence/FeatureLoc.java new file mode 100644 index 0000000000000000000000000000000000000000..06699511ea85c83ec97b7085ac83d42a8597e96e --- /dev/null +++ b/org/gmod/schema/sequence/FeatureLoc.java @@ -0,0 +1,251 @@ +package org.gmod.schema.sequence; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +public class FeatureLoc implements Serializable { + + // Fields + private int featureLocId; + private Feature featureBySrcFeatureId; + private Feature featureByFeatureId; + private Integer fmin; + private boolean fminPartial; + private Integer fmax; + private boolean fmaxPartial; + private Short strand; + private Integer phase; + private String residueInfo; + private int locGroup; + private int rank; + private Set<FeatureLocPub> featureLocPubs = new HashSet<FeatureLocPub>(0); + + // used by artemis + private int srcFeatureId; + + // Constructors + + /** default constructor */ + public FeatureLoc() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + + private FeatureLoc(Feature featureBySrcFeatureId, boolean fminPartial, boolean fmaxPartial, int locGroup, int rank) { + this.featureBySrcFeatureId = featureBySrcFeatureId; + this.fminPartial = fminPartial; + this.fmaxPartial = fmaxPartial; + this.locGroup = locGroup; + this.rank = rank; + } + /** large constructor */ + public FeatureLoc(Feature featureBySrcfeatureId, Feature featureByFeatureId, Integer fmin, boolean fminPartial, Integer fmax, boolean fmaxPartial, Short strand, Integer phase, int locGroup, int rank) { + this.featureBySrcFeatureId = featureBySrcfeatureId; + this.featureByFeatureId = featureByFeatureId; + this.fmin = fmin; + this.fminPartial = fminPartial; + this.fmax = fmax; + this.fmaxPartial = fmaxPartial; + this.strand = strand; + this.phase = phase; + this.locGroup = locGroup; + this.rank = rank; + } + + + // Property accessors + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getFeatureBySrcfeatureId() + */ + public Feature getFeatureBySrcFeatureId() { + return this.featureBySrcFeatureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFeatureBySrcfeatureId(org.genedb.db.jpa.Feature) + */ + public void setFeatureBySrcFeatureId(Feature featureBySrcFeatureId) { + this.featureBySrcFeatureId = featureBySrcFeatureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getFeatureByFeatureId() + */ + public Feature getFeatureByFeatureId() { + return this.featureByFeatureId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFeatureByFeatureId(org.genedb.db.jpa.Feature) + */ + public void setFeatureByFeatureId(Feature featureByFeatureId) { + this.featureByFeatureId = featureByFeatureId; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getFmin() + */ + public Integer getFmin() { + return this.fmin; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFmin(java.lang.Integer) + */ + public void setFmin(Integer fmin) { + this.fmin = fmin; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#isFminPartial() + */ + public boolean isFminPartial() { + return this.fminPartial; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFminPartial(boolean) + */ + public void setFminPartial(boolean fminPartial) { + this.fminPartial = fminPartial; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getFmax() + */ + public Integer getFmax() { + return this.fmax; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFmax(java.lang.Integer) + */ + public void setFmax(Integer fmax) { + this.fmax = fmax; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#isFmaxPartial() + */ + public boolean isFmaxPartial() { + return this.fmaxPartial; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFmaxPartial(boolean) + */ + public void setFmaxPartial(boolean fmaxPartial) { + this.fmaxPartial = fmaxPartial; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getStrand() + */ + public Short getStrand() { + return this.strand; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setStrand(java.lang.Short) + */ + public void setStrand(Short strand) { + this.strand = strand; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getPhase() + */ + public Integer getPhase() { + return this.phase; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setPhase(java.lang.Integer) + */ + public void setPhase(Integer phase) { + this.phase = phase; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getResidueInfo() + */ + public String getResidueInfo() { + return this.residueInfo; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setResidueInfo(java.lang.String) + */ + public void setResidueInfo(String residueInfo) { + this.residueInfo = residueInfo; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getLocgroup() + */ + public int getLocGroup() { + return this.locGroup; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setLocgroup(int) + */ + public void setLocGroup(int locGroup) { + this.locGroup = locGroup; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getRank() + */ + public int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setRank(int) + */ + public void setRank(int rank) { + this.rank = rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#getFeaturelocPubs() + */ + public Set<FeatureLocPub> getFeatureLocPubs() { + return this.featureLocPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocI#setFeaturelocPubs(java.util.Set) + */ + public void setFeaturelocPubs(Set<FeatureLocPub> featureLocPubs) { + this.featureLocPubs = featureLocPubs; + } + + + public int getFeatureLocId() { + return this.featureLocId; + } + + + public void setFeatureLocId(int featureLocId) { + this.featureLocId = featureLocId; + } + + public int getSrcFeatureId() { + return srcFeatureId; + } + + public void setSrcFeatureId(int srcFeatureId) { + this.srcFeatureId = srcFeatureId; + } + +} diff --git a/org/gmod/schema/sequence/FeatureLocPub.java b/org/gmod/schema/sequence/FeatureLocPub.java new file mode 100644 index 0000000000000000000000000000000000000000..0b7bdcf66c77a36995c47ed7f93ebc2c3689753c --- /dev/null +++ b/org/gmod/schema/sequence/FeatureLocPub.java @@ -0,0 +1,62 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeatureLocPub implements Serializable { + + // Fields + private int featureLocPubId; + private FeatureLoc featureLoc; + private Pub pub; + + // Property accessors + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocPubI#getFeatureLocPubId() + */ + private int getFeatureLocPubId() { + return this.featureLocPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocPubI#setFeatureLocPubId(int) + */ + private void setFeatureLocPubId(int featureLocPubId) { + this.featureLocPubId = featureLocPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocPubI#getFeatureloc() + */ + private FeatureLoc getFeatureloc() { + return this.featureLoc; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocPubI#setFeatureloc(org.gmod.schema.sequence.FeatureLocI) + */ + private void setFeatureloc(FeatureLoc featureloc) { + this.featureLoc = featureloc; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocPubI#getPub() + */ + private Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureLocPubI#setPub(org.gmod.schema.pub.PubI) + */ + private void setPub(Pub pub) { + this.pub = pub; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureProp.java b/org/gmod/schema/sequence/FeatureProp.java new file mode 100644 index 0000000000000000000000000000000000000000..f87130d3603ce90bb0a9fefdbd5d699c22d8219f --- /dev/null +++ b/org/gmod/schema/sequence/FeatureProp.java @@ -0,0 +1,122 @@ +package org.gmod.schema.sequence; + + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; + + + + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +public class FeatureProp implements Serializable, PropertyI { + + // Fields + private int featurePropId; + public CvTerm cvTerm; + private Feature feature; + private String value; + private int rank; + private Set<FeaturePropPub> featurePropPubs = new HashSet<FeaturePropPub>(0); + + // Constructors + /** default constructor */ + public FeatureProp() { + // Deliberately empty default constructor + } + + /** useful constructor ! */ + public FeatureProp(Feature feature, CvTerm cvTerm, String value, int rank) { + this.cvTerm = cvTerm; + this.feature = feature; + this.value = value; + this.rank = rank; + } + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#getCvterm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#setCvterm(org.gmod.schema.cv.CvTermI) + */ + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#getFeature() + */ + public Feature getFeature() { + return this.feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#setFeature(org.genedb.db.jpa.Feature) + */ + public void setFeature(Feature feature) { + this.feature = feature; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#getValue() + */ + public String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#setValue(java.lang.String) + */ + public void setValue(String value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#getRank() + */ + public int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#setRank(int) + */ + public void setRank(int rank) { + this.rank = rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#getFeaturepropPubs() + */ + private Set<FeaturePropPub> getFeaturePropPubs() { + return this.featurePropPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropI#setFeaturepropPubs(java.util.Set) + */ + public void setFeaturePropPubs(Set<FeaturePropPub> featurePropPubs) { + this.featurePropPubs = featurePropPubs; + } + + public int getFeaturePropId() { + return this.featurePropId; + } + + public void setFeaturePropId(final int featurePropId) { + this.featurePropId = featurePropId; + } + +} + + diff --git a/org/gmod/schema/sequence/FeaturePropPub.java b/org/gmod/schema/sequence/FeaturePropPub.java new file mode 100644 index 0000000000000000000000000000000000000000..c0a35611a1a9f38aa288c72d2dcfdcc6ca702f3a --- /dev/null +++ b/org/gmod/schema/sequence/FeaturePropPub.java @@ -0,0 +1,65 @@ +package org.gmod.schema.sequence; + + + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeaturePropPub implements Serializable { + + // Fields + private int featurePropPubId; + private FeatureProp featureProp; + private Pub pub; + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropPubI#getFeaturePropPubId() + */ + private int getFeaturePropPubId() { + return this.featurePropPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropPubI#setFeaturePropPubId(int) + */ + private void setFeaturePropPubId(int featurePropPubId) { + this.featurePropPubId = featurePropPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropPubI#getFeatureprop() + */ + private FeatureProp getFeatureProp() { + return this.featureProp; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropPubI#setFeatureprop(org.genedb.db.jpa.FeatureProp) + */ + private void setFeatureProp(FeatureProp featureProp) { + this.featureProp = featureProp; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropPubI#getPub() + */ + private Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePropPubI#setPub(org.gmod.schema.pub.PubI) + */ + private void setPub(Pub pub) { + this.pub = pub; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeaturePub.java b/org/gmod/schema/sequence/FeaturePub.java new file mode 100644 index 0000000000000000000000000000000000000000..b99be41a276111547e4847ff16daa11e4f2c4084 --- /dev/null +++ b/org/gmod/schema/sequence/FeaturePub.java @@ -0,0 +1,77 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeaturePub implements Serializable { + + // Fields + private int featurePubId; + private Feature feature; + private Pub pub; + + // Constructors + + /** default constructor */ + public FeaturePub() { + // Deliberately empty default constructor + } + + /** full constructor */ + public FeaturePub(Feature feature, Pub pub) { + this.feature = feature; + this.pub = pub; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePubI#getFeaturePubId() + */ + private int getFeaturePubId() { + return this.featurePubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePubI#setFeaturePubId(int) + */ + private void setFeaturePubId(int featurePubId) { + this.featurePubId = featurePubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePubI#getFeature() + */ + public Feature getFeature() { + return this.feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePubI#setFeature(org.genedb.db.jpa.Feature) + */ + public void setFeature(Feature feature) { + this.feature = feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePubI#getPub() + */ + public Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeaturePubI#setPub(org.gmod.schema.pub.PubI) + */ + public void setPub(Pub pub) { + this.pub = pub; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureRelationship.java b/org/gmod/schema/sequence/FeatureRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..739bd78845b8e816002cde51c8750e720e148455 --- /dev/null +++ b/org/gmod/schema/sequence/FeatureRelationship.java @@ -0,0 +1,160 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.cv.CvTerm; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +public class FeatureRelationship implements Serializable { + + // Fields + private int featureRelationshipId; + private Feature featureBySubjectId; + private Feature featureByObjectId; + private CvTerm cvTerm; + private String value; + private int rank; + private Set<FeatureRelationshipProp> featureRelationshipProps = new HashSet<FeatureRelationshipProp>(0); + private Set<FeatureRelationshipPub> featureRelationshipPubs = new HashSet<FeatureRelationshipPub>(0); + + // Constructors + + /** default constructor */ + public FeatureRelationship() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public FeatureRelationship(Feature featureBySubjectId, Feature featureByObjectId, CvTerm cvTerm, int rank) { + this.featureBySubjectId = featureBySubjectId; + this.featureByObjectId = featureByObjectId; + this.cvTerm = cvTerm; + this.rank = rank; + } + + + // Property accessors + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getFeatureRelationshipId() + */ + public int getFeatureRelationshipId() { + return this.featureRelationshipId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setFeatureRelationshipId(int) + */ + public void setFeatureRelationshipId(int featureRelationshipId) { + this.featureRelationshipId = featureRelationshipId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getFeatureBySubjectId() + */ + public Feature getFeatureBySubjectId() { + return this.featureBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setFeatureBySubjectId(org.genedb.db.jpa.Feature) + */ + public void setFeatureBySubjectId(Feature featureBySubjectId) { + this.featureBySubjectId = featureBySubjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getFeatureByObjectId() + */ + public Feature getFeatureByObjectId() { + return this.featureByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setFeatureByObjectId(org.genedb.db.jpa.Feature) + */ + public void setFeatureByObjectId(Feature featureByObjectId) { + this.featureByObjectId = featureByObjectId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getCvterm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setCvterm(org.gmod.schema.cv.CvTermI) + */ + public void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getValue() + */ + public String getValue() { + return this.value; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setValue(java.lang.String) + */ + private void setValue(String value) { + this.value = value; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getRank() + */ + public int getRank() { + return this.rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setRank(int) + */ + public void setRank(int rank) { + this.rank = rank; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getFeatureRelationshipprops() + */ + private Collection<FeatureRelationshipProp> getFeatureRelationshipProps() { + return this.featureRelationshipProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setFeatureRelationshipprops(java.util.Set) + */ + private void setFeatureRelationshipProps(Set<FeatureRelationshipProp> featureRelationshipProps) { + this.featureRelationshipProps = featureRelationshipProps; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#getFeatureRelationshipPubs() + */ + private Collection<FeatureRelationshipPub> getFeatureRelationshipPubs() { + return this.featureRelationshipPubs; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipI#setFeatureRelationshipPubs(java.util.Set) + */ + private void setFeatureRelationshipPubs(Set<FeatureRelationshipPub> featureRelationshipPubs) { + this.featureRelationshipPubs = featureRelationshipPubs; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureRelationshipProp.java b/org/gmod/schema/sequence/FeatureRelationshipProp.java new file mode 100644 index 0000000000000000000000000000000000000000..6aaeab90dcf4e775041eec57a383ecc3ac3447fb --- /dev/null +++ b/org/gmod/schema/sequence/FeatureRelationshipProp.java @@ -0,0 +1,78 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.cv.CvTerm; +import org.gmod.schema.utils.propinterface.PropertyI; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +public class FeatureRelationshipProp implements Serializable, PropertyI { + + // Fields + private int featureRelationshipPropId; + private CvTerm cvTerm; + private FeatureRelationship featureRelationship; + private String value; + private int rank; + private Set<FeatureRelationshipPropPub> featureRelationshipPropPubs = new HashSet<FeatureRelationshipPropPub>(0); + + // Property accessors + + private int getFeatureRelationshipPropId() { + return this.featureRelationshipPropId; + } + + private void setFeatureRelationshipPropId(int featureRelationshipPropId) { + this.featureRelationshipPropId = featureRelationshipPropId; + } + + public CvTerm getCvTerm() { + return this.cvTerm; + } + + private void setCvTerm(CvTerm cvTerm) { + this.cvTerm = cvTerm; + } + + private FeatureRelationship getFeatureRelationship() { + return this.featureRelationship; + } + + private void setFeatureRelationship(FeatureRelationship featureRelationship) { + this.featureRelationship = featureRelationship; + } + + + private String getValue() { + return this.value; + } + + private void setValue(String value) { + this.value = value; + } + + + private int getRank() { + return this.rank; + } + + private void setRank(int rank) { + this.rank = rank; + } + + private Collection<FeatureRelationshipPropPub> getFeatureRelationshipPropPubs() { + return this.featureRelationshipPropPubs; + } + + private void setFeatureRelationshipPropPubs(Set<FeatureRelationshipPropPub> featureRelationshipPropPubs) { + this.featureRelationshipPropPubs = featureRelationshipPropPubs; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureRelationshipPropPub.java b/org/gmod/schema/sequence/FeatureRelationshipPropPub.java new file mode 100644 index 0000000000000000000000000000000000000000..bac84e251a75337f933ad624e6f301d880463f71 --- /dev/null +++ b/org/gmod/schema/sequence/FeatureRelationshipPropPub.java @@ -0,0 +1,63 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeatureRelationshipPropPub implements Serializable { + + // Fields + private int featureRelationshipPropPubId; + private FeatureRelationshipProp featureRelationshipProp; + private Pub pub; + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPropPubI#getFeatureRelationshipPropPubId() + */ + private int getFeatureRelationshipPropPubId() { + return this.featureRelationshipPropPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPropPubI#setFeatureRelationshipPropPubId(int) + */ + private void setFeatureRelationshipPropPubId(int featureRelationshipPropPubId) { + this.featureRelationshipPropPubId = featureRelationshipPropPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPropPubI#getFeatureRelationshipprop() + */ + private FeatureRelationshipProp getFeatureRelationshipProp() { + return this.featureRelationshipProp; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPropPubI#setFeatureRelationshipprop(org.genedb.db.jpa.FeatureRelationshipProp) + */ + private void setFeatureRelationshipProp(FeatureRelationshipProp featureRelationshipProp) { + this.featureRelationshipProp = featureRelationshipProp; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPropPubI#getPub() + */ + private Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPropPubI#setPub(org.gmod.schema.pub.PubI) + */ + private void setPub(Pub pub) { + this.pub = pub; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureRelationshipPub.java b/org/gmod/schema/sequence/FeatureRelationshipPub.java new file mode 100644 index 0000000000000000000000000000000000000000..0f420b713c6e0a14757bc7df7ee85a8d208e31df --- /dev/null +++ b/org/gmod/schema/sequence/FeatureRelationshipPub.java @@ -0,0 +1,63 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeatureRelationshipPub implements Serializable { + + // Fields + private int featureRelationshipPubId; + private Pub pub; + private FeatureRelationship featureRelationship; + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPubI#getFeatureRelationshipPubId() + */ + private int getFeatureRelationshipPubId() { + return this.featureRelationshipPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPubI#setFeatureRelationshipPubId(int) + */ + private void setFeatureRelationshipPubId(int featureRelationshipPubId) { + this.featureRelationshipPubId = featureRelationshipPubId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPubI#getPub() + */ + private Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPubI#setPub(org.gmod.schema.pub.PubI) + */ + private void setPub(Pub pub) { + this.pub = pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPubI#getFeatureRelationship() + */ + private FeatureRelationship getFeatureRelationship() { + return this.featureRelationship; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureRelationshipPubI#setFeatureRelationship(org.genedb.db.jpa.FeatureRelationship) + */ + private void setFeatureRelationship(FeatureRelationship featureRelationship) { + this.featureRelationship = featureRelationship; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/FeatureSynonym.java b/org/gmod/schema/sequence/FeatureSynonym.java new file mode 100644 index 0000000000000000000000000000000000000000..4374656e10af82a053439dceaaee8b2939bc5582 --- /dev/null +++ b/org/gmod/schema/sequence/FeatureSynonym.java @@ -0,0 +1,127 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.pub.Pub; + +import java.io.Serializable; + +public class FeatureSynonym implements Serializable { + + // Fields + private int featureSynonymId; + private Synonym synonym; + private Feature feature; + private Pub pub; + private boolean current; + private boolean internal; + + // Constructors + + /** default constructor */ + public FeatureSynonym() { + // Deliberately empty default constructor + } + + /** full constructor */ + public FeatureSynonym(Synonym synonym, Feature feature, Pub pub, boolean current, boolean internal) { + this.synonym = synonym; + this.feature = feature; + this.pub = pub; + this.current = current; + this.internal = internal; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#getFeatureSynonymId() + */ + public int getFeatureSynonymId() { + return this.featureSynonymId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#setFeatureSynonymId(int) + */ + public void setFeatureSynonymId(int featureSynonymId) { + this.featureSynonymId = featureSynonymId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#getSynonym() + */ + public Synonym getSynonym() { + return this.synonym; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#setSynonym(org.gmod.schema.sequence.SynonymI) + */ + public void setSynonym(Synonym synonym) { + this.synonym = synonym; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#getFeature() + */ + public Feature getFeature() { + return this.feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#setFeature(org.genedb.db.jpa.Feature) + */ + public void setFeature(Feature feature) { + this.feature = feature; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#getPub() + */ + public Pub getPub() { + return this.pub; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#setPub(org.gmod.schema.pub.PubI) + */ + public void setPub(Pub pub) { + this.pub = pub; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#isCurrent() + */ + public boolean isCurrent() { + return this.current; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#setCurrent(boolean) + */ + public void setCurrent(boolean current) { + this.current = current; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#isInternal() + */ + public boolean isInternal() { + return this.internal; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.FeatureSynonymI#setInternal(boolean) + */ + public void setInternal(boolean internal) { + this.internal = internal; + } + + + + +} + + diff --git a/org/gmod/schema/sequence/Synonym.java b/org/gmod/schema/sequence/Synonym.java new file mode 100644 index 0000000000000000000000000000000000000000..b68d85012bc412c2e3847fa3aa2566b481187a99 --- /dev/null +++ b/org/gmod/schema/sequence/Synonym.java @@ -0,0 +1,113 @@ +package org.gmod.schema.sequence; + +import org.gmod.schema.cv.CvTerm; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +public class Synonym implements Serializable { + + // Fields + private int synonymId; + private CvTerm cvTerm; + private String name; + private String synonymSgml; + private Set<FeatureSynonym> featureSynonyms = new HashSet<FeatureSynonym>(0); + + // Constructors + + /** default constructor */ + public Synonym() { + // Deliberately empty default constructor + } + + /** minimal constructor */ + public Synonym(CvTerm cvTerm, String name, String synonymSgml) { + this.cvTerm = cvTerm; + this.name = name; + this.synonymSgml = synonymSgml; + } + + + // Property accessors + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#getSynonymId() + */ + public int getSynonymId() { + return this.synonymId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#setSynonymId(int) + */ + public void setSynonymId(int synonymId) { + this.synonymId = synonymId; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#getCvterm() + */ + public CvTerm getCvTerm() { + return this.cvTerm; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#setCvterm(org.gmod.schema.cv.CvTermI) + */ + public void setCvTerm(CvTerm cvterm) { + this.cvTerm = cvterm; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#getName() + */ + public String getName() { + return this.name; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#setName(java.lang.String) + */ + public void setName(String name) { + this.name = name; + } + + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#getSynonymSgml() + */ + private String getSynonymSgml() { + return this.synonymSgml; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#setSynonymSgml(java.lang.String) + */ + public void setSynonymSgml(String synonymSgml) { + this.synonymSgml = synonymSgml; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#getFeatureSynonyms() + */ + private Collection<FeatureSynonym> getFeatureSynonyms() { + return this.featureSynonyms; + } + + /* (non-Javadoc) + * @see org.genedb.db.jpa.SynonymI#setFeatureSynonyms(java.util.Set) + */ + private void setFeatureSynonyms(Set<FeatureSynonym> featureSynonyms) { + this.featureSynonyms = featureSynonyms; + } + + + + +} + + diff --git a/org/gmod/schema/utils/CollectionUtils.java b/org/gmod/schema/utils/CollectionUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..79430802e83a32be9c285bfc8a087ac69e53cd51 --- /dev/null +++ b/org/gmod/schema/utils/CollectionUtils.java @@ -0,0 +1,27 @@ +package org.gmod.schema.utils; + +import java.util.Collection; +import java.util.HashSet; + +/** + * Static utility class for miscellaneous collection handling + * + * @author art + */ +public class CollectionUtils { + + /** + * + * + * @param <T> + * @param collection + * @return the original collection, or an empty collection + */ + public static <T> Collection<T> safeGetter(Collection<T> collection) { + if (collection != null) { + return collection; + } + return new HashSet<T>(0); + } + +} diff --git a/org/gmod/schema/utils/CountedName.java b/org/gmod/schema/utils/CountedName.java new file mode 100644 index 0000000000000000000000000000000000000000..ed3477cbe101f668ba0e4a62dfdc397d29527157 --- /dev/null +++ b/org/gmod/schema/utils/CountedName.java @@ -0,0 +1,55 @@ +package org.gmod.schema.utils; + +/** + * Class to store terms, eg products, and how many occurences there are + * + * @author cp2 + */ +public class CountedName { + + /** + * + */ + private String name; + + /** + * + */ + private int count; + + + + public CountedName(String name, int count) { + this.name = name; + this.count = count; + } + + /** + * @return + */ + public int getCount() { + return count; + } + + /** + * @param count + */ + public void setCount(int count) { + this.count = count; + } + + /** + * @return + */ + public String getName() { + return name; + } + + /** + * @param name + */ + public void setName(String name) { + this.name = name; + } + +} diff --git a/org/gmod/schema/utils/PeptideProperties.java b/org/gmod/schema/utils/PeptideProperties.java new file mode 100644 index 0000000000000000000000000000000000000000..5fffa5af78ef157ff61fb9e588bacad1f7c42483 --- /dev/null +++ b/org/gmod/schema/utils/PeptideProperties.java @@ -0,0 +1,76 @@ +package org.gmod.schema.utils; + +public class PeptideProperties { + + private String mass; + + private String aminoAcids; + + private String isoelectricPoint; + + private String charge; + + private String signalPeptide; + + private String transmembraneDomain; + + private String gpiAnchor; + + public String getAminoAcids() { + return aminoAcids; + } + + public void setAminoAcids(String aminoAcids) { + this.aminoAcids = aminoAcids; + } + + public String getCharge() { + return charge; + } + + public void setCharge(String charge) { + this.charge = charge; + } + + public String getGpiAnchor() { + return gpiAnchor; + } + + public void setGpiAnchor(String gpiAnchor) { + this.gpiAnchor = gpiAnchor; + } + + public String getIsoelectricPoint() { + return isoelectricPoint; + } + + public void setIsoelectricPoint(String isoelectricPoint) { + this.isoelectricPoint = isoelectricPoint; + } + + public String getMass() { + return mass; + } + + public void setMass(String mass) { + this.mass = mass; + } + + public String getSignalPeptide() { + return signalPeptide; + } + + public void setSignalPeptide(String signalPeptide) { + this.signalPeptide = signalPeptide; + } + + public String getTransmembraneDomain() { + return transmembraneDomain; + } + + public void setTransmembraneDomain(String transmembraneDomain) { + this.transmembraneDomain = transmembraneDomain; + } + + +} diff --git a/org/gmod/schema/utils/Rankable.java b/org/gmod/schema/utils/Rankable.java new file mode 100644 index 0000000000000000000000000000000000000000..ca36d2e20fdc12f68fd97188d1314364be859228 --- /dev/null +++ b/org/gmod/schema/utils/Rankable.java @@ -0,0 +1,16 @@ +package org.gmod.schema.utils; + +/** + * These domain objects use rank to define an order + * + * @author art + */ +public abstract interface Rankable { + + /** + * Retrieve the rank, ie order, of this object. Ranks start at zero + * + * @return the rank + */ + public abstract int getRank(); +} diff --git a/org/gmod/schema/utils/propinterface/PropertyI.java b/org/gmod/schema/utils/propinterface/PropertyI.java new file mode 100644 index 0000000000000000000000000000000000000000..6b55fa2819ca237754b664bd3121a37442caba14 --- /dev/null +++ b/org/gmod/schema/utils/propinterface/PropertyI.java @@ -0,0 +1,13 @@ +package org.gmod.schema.utils.propinterface; + +import org.gmod.schema.cv.CvTerm; + +/** + * + * @author cp2 + */ +public interface PropertyI { + + public abstract CvTerm getCvTerm(); + +}