From: <rv...@us...> - 2009-06-25 02:43:45
|
Revision: 108 http://treebase.svn.sourceforge.net/treebase/?rev=108&view=rev Author: rvos Date: 2009-06-25 02:43:44 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Added getTreebaseIDString() and getNamespacedGUID() transient methods Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2009-06-25 02:41:29 UTC (rev 107) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2009-06-25 02:43:44 UTC (rev 108) @@ -28,8 +28,12 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; +import javax.persistence.Transient; import javax.persistence.Version; +import org.cipres.treebase.NamespacedGUID; +import org.cipres.treebase.TreebaseIDString; + /** * The abstract super class for all persisted domain objects. * @@ -97,5 +101,15 @@ private void setVersion(int pNewVersion) { mVersion = pNewVersion; } + + @Transient + public TreebaseIDString getTreebaseIDString () { + return new TreebaseIDString(this); + } + + @Transient + public NamespacedGUID getNamespacedGUID () { + return getTreebaseIDString().getNamespacedGUID(); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2009-06-28 10:14:11
|
Revision: 137 http://treebase.svn.sourceforge.net/treebase/?rev=137&view=rev Author: rvos Date: 2009-06-28 10:11:30 +0000 (Sun, 28 Jun 2009) Log Message: ----------- Implemented interface methods Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2009-06-28 10:11:14 UTC (rev 136) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2009-06-28 10:11:30 UTC (rev 137) @@ -32,6 +32,7 @@ import javax.persistence.Version; import org.cipres.treebase.NamespacedGUID; +import org.cipres.treebase.PhyloWSPath; import org.cipres.treebase.TreebaseIDString; /** @@ -111,5 +112,10 @@ public NamespacedGUID getNamespacedGUID () { return getTreebaseIDString().getNamespacedGUID(); } + + @Transient + public PhyloWSPath getPhyloWSPath() { + return new PhyloWSPath(this); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2009-11-18 17:51:32
|
Revision: 282 http://treebase.svn.sourceforge.net/treebase/?rev=282&view=rev Author: rvos Date: 2009-11-18 17:51:00 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Changed GenerationType for IDs from AUTO to SEQUENCE Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2009-11-18 17:02:31 UTC (rev 281) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2009-11-18 17:51:00 UTC (rev 282) @@ -53,7 +53,7 @@ * @see org.cipres.treebase.domain.TBPersistable#getId() */ @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.SEQUENCE) public Long getId() { return mId; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-03-15 01:25:54
|
Revision: 584 http://treebase.svn.sourceforge.net/treebase/?rev=584&view=rev Author: rvos Date: 2010-03-15 01:25:48 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Added getAnnotations() and getLabel() for nexml and rdf serialization. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-03-15 01:20:38 UTC (rev 583) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-03-15 01:25:48 UTC (rev 584) @@ -2,19 +2,22 @@ package org.cipres.treebase.domain; import java.io.Serializable; +import java.net.URI; +import java.util.ArrayList; import java.util.Comparator; - +import java.util.List; import javax.persistence.Column; import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; import javax.persistence.Transient; import javax.persistence.Version; +import org.cipres.treebase.Constants; import org.cipres.treebase.NamespacedGUID; import org.cipres.treebase.PhyloWSPath; import org.cipres.treebase.TreebaseIDString; +import org.cipres.treebase.TreebaseUtil; import org.hibernate.annotations.GenericGenerator; /** @@ -100,5 +103,30 @@ public PhyloWSPath getPhyloWSPath() { return new PhyloWSPath(this); } + + /* + * (non-Javadoc) + * @see org.cipres.treebase.domain.Annotatable#getAnnotations() + */ + @Transient + public List<Annotation> getAnnotations() { + // This is called by child classes using super.getAnnotations() + // to get the common annotations out of the way + List<Annotation> annotations = new ArrayList<Annotation>(); + URI uri = URI.create(TreebaseUtil.getPurlDomain()+getPhyloWSPath()); + annotations.add(new Annotation(Constants.OWLURI,"owl:sameAs",uri)); + return annotations; + } + /* + * (non-Javadoc) + * @see org.cipres.treebase.domain.NexmlWritable#getLabel() + */ + @Transient + public String getLabel() { + // This is overridden by child classes that want a name/title/label + // to be serialized in nexml or rdf + return null; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-03-16 16:53:54
|
Revision: 604 http://treebase.svn.sourceforge.net/treebase/?rev=604&view=rev Author: rvos Date: 2010-03-16 16:53:37 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added dummy implementation for getContext, which just returns null. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-03-16 16:52:28 UTC (rev 603) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-03-16 16:53:37 UTC (rev 604) @@ -128,5 +128,16 @@ // to be serialized in nexml or rdf return null; } + + /* + * (non-Javadoc) + * @see org.cipres.treebase.domain.TBPersistable#getContext() + */ + @Transient + public TBPersistable getContext() { + // This is overridden by child classes to indicate which other object + // provides the invocant's context. E.g. for a node this would be a tree. + return null; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-06-03 17:16:17
|
Revision: 711 http://treebase.svn.sourceforge.net/treebase/?rev=711&view=rev Author: rvos Date: 2010-06-03 17:16:11 +0000 (Thu, 03 Jun 2010) Log Message: ----------- Where available, now adds rdfs:isDefinedBy annotations that point to the containing context (e.g. for a tree, the study in which it is published). This is on the recommendation of the SADI bunch, and at @rdmpage's request. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-06-03 17:14:46 UTC (rev 710) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2010-06-03 17:16:11 UTC (rev 711) @@ -115,6 +115,11 @@ List<Annotation> annotations = new ArrayList<Annotation>(); URI uri = URI.create(TreebaseUtil.getPurlBase()+getPhyloWSPath()); annotations.add(new Annotation(Constants.OWLURI,"owl:sameAs",uri)); + TBPersistable context = getContext(); + if ( null != context ) { + URI contextUri = URI.create(TreebaseUtil.getPurlBase()+context.getPhyloWSPath()); + annotations.add(new Annotation(Constants.RDFSURI, "rdfs:isDefinedBy",contextUri)); + } return annotations; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-04-19 11:22:38
|
Revision: 793 http://treebase.svn.sourceforge.net/treebase/?rev=793&view=rev Author: rvos Date: 2011-04-19 11:22:32 +0000 (Tue, 19 Apr 2011) Log Message: ----------- No longer returning owl:sameAs annotations because we are using the TreebaseIDString values as xml id's directly. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2011-04-19 11:20:14 UTC (rev 792) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2011-04-19 11:22:32 UTC (rev 793) @@ -111,10 +111,9 @@ @Transient public List<Annotation> getAnnotations() { // This is called by child classes using super.getAnnotations() - // to get the common annotations out of the way + // to get the common annotations out of the way. We no longer need + // to do owl:sameAs because we use TreeBASE ID strings as XML IDs. List<Annotation> annotations = new ArrayList<Annotation>(); - URI uri = URI.create(TreebaseUtil.getPurlBase()+getPhyloWSPath()); - annotations.add(new Annotation(Constants.OWLURI,"owl:sameAs",uri)); TBPersistable context = getContext(); if ( null != context ) { URI contextUri = URI.create(TreebaseUtil.getPurlBase()+context.getPhyloWSPath()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2011-06-11 22:20:38
|
Revision: 912 http://treebase.svn.sourceforge.net/treebase/?rev=912&view=rev Author: rvos Date: 2011-06-11 22:20:32 +0000 (Sat, 11 Jun 2011) Log Message: ----------- Added javadoc Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2011-06-11 22:19:57 UTC (rev 911) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/AbstractPersistedObject.java 2011-06-11 22:20:32 UTC (rev 912) @@ -89,16 +89,28 @@ mVersion = pNewVersion; } + /** + * Returns an object whose string representation is of the format + * S1787 + */ @Transient public TreebaseIDString getTreebaseIDString () { return new TreebaseIDString(this); } + /** + * Returns an object whose string representation is of the format + * TB2:S1787 + */ @Transient public NamespacedGUID getNamespacedGUID () { return getTreebaseIDString().getNamespacedGUID(); } + /** + * Returns an object whose string representation is of the format + * study/TB2:1787 + */ @Transient public PhyloWSPath getPhyloWSPath() { return new PhyloWSPath(this); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |