You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
(14) |
May
(36) |
Jun
(148) |
Jul
(33) |
Aug
(2) |
Sep
(17) |
Oct
(42) |
Nov
(137) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(89) |
Feb
(80) |
Mar
(217) |
Apr
(76) |
May
(5) |
Jun
(39) |
Jul
(35) |
Aug
(4) |
Sep
(7) |
Oct
(14) |
Nov
(12) |
Dec
(9) |
2011 |
Jan
(6) |
Feb
(4) |
Mar
(11) |
Apr
(55) |
May
(90) |
Jun
(39) |
Jul
(15) |
Aug
(15) |
Sep
(23) |
Oct
(12) |
Nov
(17) |
Dec
(20) |
2012 |
Jan
(22) |
Feb
(63) |
Mar
|
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(3) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rv...@us...> - 2010-03-16 17:00:56
|
Revision: 609 http://treebase.svn.sourceforge.net/treebase/?rev=609&view=rev Author: rvos Date: 2010-03-16 17:00:50 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Implemented getContext, which returns the containing study. Wrapped annotation generation inside a try {} block (I was getting some lazy initialization exceptions), changed the fetch mode to join, to prevent lazy initialization exceptions. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTree.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTree.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTree.java 2010-03-16 16:58:15 UTC (rev 608) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTree.java 2010-03-16 17:00:50 UTC (rev 609) @@ -37,6 +37,8 @@ import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; import org.hibernate.annotations.NamedNativeQuery; /** @@ -284,6 +286,7 @@ */ @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY) @JoinColumn(name = "TREEQUALITY_ID") + @Fetch(FetchMode.JOIN) public TreeQuality getTreeQuality() { return mTreeQuality; } @@ -320,6 +323,7 @@ */ @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "TREEKIND_ID") + @Fetch(FetchMode.JOIN) public TreeKind getTreeKind() { return mTreeKind; } @@ -338,6 +342,7 @@ */ @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY) @JoinColumn(name = "TREETYPE_ID") + @Fetch(FetchMode.JOIN) public TreeType getTreeType() { return mTreeType; } @@ -786,22 +791,29 @@ @Transient public List<Annotation> getAnnotations() { List<Annotation> annotations = super.getAnnotations(); - if ( null != getId() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.tree", getId())); + try { + if ( null != getKindDescription() ) { + annotations.add(new Annotation(Constants.TBTermsURI, "tb:kind.tree", getKindDescription())); + } + if ( null != getTypeDescription() ) { + annotations.add(new Annotation(Constants.TBTermsURI, "tb:type.tree", getTypeDescription())); + } + if ( null != getQualityDescription() ) { + annotations.add(new Annotation(Constants.TBTermsURI, "tb:quality.tree", getQualityDescription())); + } + if ( null != getnTax() ) { + annotations.add(new Annotation(Constants.TBTermsURI, "tb:ntax.tree", getnTax())); + } + } catch ( Exception e ) { + e.printStackTrace(); } - if ( null != getKindDescription() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:kind.tree", getKindDescription())); - } - if ( null != getTypeDescription() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:type.tree", getTypeDescription())); - } - if ( null != getQualityDescription() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:quality.tree", getQualityDescription())); - } - if ( null != getnTax() ) { - annotations.add(new Annotation(Constants.TBTermsURI, "tb:ntax.tree", getnTax())); - } return annotations; } + + @Override + @Transient + public Study getContext() { + return getStudy(); + } } 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:58:23
|
Revision: 608 http://treebase.svn.sourceforge.net/treebase/?rev=608&view=rev Author: rvos Date: 2010-03-16 16:58:15 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added implementation of getContext, which provides the containing Study. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/TreeBlock.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/TreeBlock.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/TreeBlock.java 2010-03-16 16:57:25 UTC (rev 607) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/TreeBlock.java 2010-03-16 16:58:15 UTC (rev 608) @@ -22,6 +22,7 @@ import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.domain.AbstractPersistedObject; import org.cipres.treebase.domain.TBPersistable; +import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.taxon.TaxonLabel; import org.cipres.treebase.domain.taxon.TaxonLabelSet; import org.hibernate.annotations.Cache; @@ -281,5 +282,14 @@ public String getLabel() { return getTitle(); } + + @Transient + public Study getContext() { + PhyloTree firstTree = getTreeList().iterator().next(); + if ( null != firstTree ) { + return firstTree.getContext(); + } + 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:57:39
|
Revision: 607 http://treebase.svn.sourceforge.net/treebase/?rev=607&view=rev Author: rvos Date: 2010-03-16 16:57:25 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added implementation of getContext, which returns the containing phylogeny. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTreeNode.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTreeNode.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTreeNode.java 2010-03-16 16:55:33 UTC (rev 606) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/tree/PhyloTreeNode.java 2010-03-16 16:57:25 UTC (rev 607) @@ -591,4 +591,10 @@ public String getLabel() { return getTaxonLabelAsString(); } + + @Override + @Transient + public PhyloTree getContext() { + return getTree(); + } } 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:55:39
|
Revision: 606 http://treebase.svn.sourceforge.net/treebase/?rev=606&view=rev Author: rvos Date: 2010-03-16 16:55:33 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added dummy implementation for getContext, which just returns null. Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java 2010-03-16 16:55:00 UTC (rev 605) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java 2010-03-16 16:55:33 UTC (rev 606) @@ -75,4 +75,9 @@ return null; } + public TBPersistable getContext() { + // TODO Auto-generated method stub + 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:55:10
|
Revision: 605 http://treebase.svn.sourceforge.net/treebase/?rev=605&view=rev Author: rvos Date: 2010-03-16 16:55:00 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Now retrieves the specified object and saves it in the session so that the template can use it to fetch annotations and context links. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java 2010-03-16 16:53:37 UTC (rev 604) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java 2010-03-16 16:55:00 UTC (rev 605) @@ -3,12 +3,15 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.log4j.Logger; import org.cipres.treebase.NamespacedGUID; import org.cipres.treebase.PhyloWSPath; import org.cipres.treebase.TreebaseIDString; import org.cipres.treebase.TreebaseUtil; +import org.cipres.treebase.domain.TBPersistable; import org.cipres.treebase.domain.matrix.Matrix; import org.cipres.treebase.domain.study.Study; +import org.cipres.treebase.domain.study.StudyService; import org.cipres.treebase.domain.tree.PhyloTree; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; @@ -18,7 +21,18 @@ * */ public class AnyObjectAsRDFController implements Controller { + private static final Logger LOGGER = Logger.getLogger(AnyObjectAsRDFController.class); + private StudyService mStudyService; + + public StudyService getStudyService() { + return mStudyService; + } + + public void setStudyService(StudyService studyService) { + mStudyService = studyService; + } + public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { NamespacedGUID namespacedGUID = new NamespacedGUID(request.getParameter("namespacedGUID")); @@ -34,9 +48,16 @@ e.printStackTrace(); } if ( null != treebaseIDString ) { - if ( null != treebaseIDString.getTypePrefix() ) { - Class<?> theClass = TreebaseIDString.getClassForPrefix(treebaseIDString.getTypePrefix()); + LOGGER.info("TreeBASE ID String: "+treebaseIDString); + + String typePrefix = treebaseIDString.getTypePrefix(); + if ( null != typePrefix ) { + LOGGER.info("Type prefix: "+typePrefix); + + Class<?> theClass = TreebaseIDString.getClassForPrefix(typePrefix); if ( null != theClass ) { + LOGGER.info("Class: "+theClass); + if ( theClass.isAssignableFrom(PhyloTree.class) || theClass.isAssignableFrom(Matrix.class) || theClass.isAssignableFrom(Study.class) ) { @@ -46,12 +67,27 @@ request.setAttribute("hasRdf", true); } phyloWSPath = new PhyloWSPath(theClass.getPackage(),namespacedGUID); -// if ( theClass.isAssignableFrom(Annotatable.class) ) { -// request.setAttribute(arg0, arg1) -// } + + TBPersistable theObject = getStudyService().findByID(theClass, treebaseIDString.getId()); + if ( null != theObject ) { + request.getSession().setAttribute("theObject", theObject); + LOGGER.info("Object: "+theObject); + } + else { + LOGGER.info("Couldn't instantiate object of type "+theClass+" with ID "+treebaseIDString.getId()); + } } + else { + LOGGER.info("Couldn't get class for prefix "+typePrefix); + } } + else { + LOGGER.info("Couldn't get prefix for ID string" + treebaseIDString); + } } + else { + LOGGER.info("Couldn't get ID String"); + } request.getSession().setAttribute("namespacedGUID", namespacedGUID.toString()); // <c:set var="baseURL" value="http://localhost:8080/treebase-web/PhyloWS"/> // treebase.purl.domain=http://purl.org/phylo/treebase/phylows/ 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-03-16 16:52:35
|
Revision: 603 http://treebase.svn.sourceforge.net/treebase/?rev=603&view=rev Author: rvos Date: 2010-03-16 16:52:28 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added getContext() interface method. The idea is that objects that implement this return whichever other object that provides its context. For example, a tree node might return the tree that contains it. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/TBPersistable.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/TBPersistable.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/TBPersistable.java 2010-03-16 16:51:01 UTC (rev 602) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/TBPersistable.java 2010-03-16 16:52:28 UTC (rev 603) @@ -43,5 +43,7 @@ public NamespacedGUID getNamespacedGUID (); public PhyloWSPath getPhyloWSPath (); + + public TBPersistable getContext (); } 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:51:07
|
Revision: 602 http://treebase.svn.sourceforge.net/treebase/?rev=602&view=rev Author: rvos Date: 2010-03-16 16:51:01 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added context link and annotations. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp 2010-03-16 16:50:12 UTC (rev 601) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/anyObjectAsRDF.jsp 2010-03-16 16:51:01 UTC (rev 602) @@ -3,13 +3,21 @@ <% response.setContentType("application/rss+xml"); %> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/"> <channel rdf:about="${baseURL}${phyloWSPath}"> - <title>${phyloWSPath}</title> + <title><c:out value="${theObject.label}"/></title> <link>${baseURL}</link> <description>Serializations for ${phyloWSPath}</description> + <c:if test="${theObject.context != null}"> + <rdfs:isDefinedBy rdf:resource="${baseURL}<c:out value="${theObject.context.phyloWSPath}"/>"/> + </c:if> + <c:forEach var="anno" items="${theObject.annotations}" varStatus="annoStatus"> + <<c:out value="${anno.property}"/> + xmlns:<c:out value="${anno.prefix}"/>="<c:out value="${anno.URI}"/>"><c:out value="${anno.value}" escapeXml="true"/></<c:out value="${anno.property}"/>> + </c:forEach> <%--image rdf:resource="<c:url value="/images/logo16px.png"/>"/--%> <items> <rdf:Seq> 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:50:18
|
Revision: 601 http://treebase.svn.sourceforge.net/treebase/?rev=601&view=rev Author: rvos Date: 2010-03-16 16:50:12 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Set FetchMode to JOIN to prevent lazy initialization exceptions. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonVariant.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonVariant.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonVariant.java 2010-03-16 16:49:19 UTC (rev 600) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonVariant.java 2010-03-16 16:50:12 UTC (rev 601) @@ -14,6 +14,8 @@ import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; import org.hibernate.annotations.Index; import org.cipres.treebase.domain.AbstractPersistedObject; @@ -151,6 +153,7 @@ @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST}) @JoinColumn(name = "TAXON_ID", nullable = false) @Index(name = "TVARI_TAXON_IDX") + @Fetch(FetchMode.JOIN) public Taxon getTaxon() { return mTaxon; } 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:49:25
|
Revision: 600 http://treebase.svn.sourceforge.net/treebase/?rev=600&view=rev Author: rvos Date: 2010-03-16 16:49:19 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Cleaned up annotations, wrapped inside try {} block to be safe. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java 2010-03-16 16:48:22 UTC (rev 599) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java 2010-03-16 16:49:19 UTC (rev 600) @@ -25,6 +25,8 @@ import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; import org.hibernate.annotations.Index; /** @@ -134,6 +136,7 @@ */ @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST}) @JoinColumn(name = "TAXONVARIANT_ID", nullable = true) + @Fetch(FetchMode.JOIN) public TaxonVariant getTaxonVariant() { return mTaxonVariant; } @@ -153,6 +156,7 @@ @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "STUDY_ID", nullable = true) @Index(name = "TLABEL_STUDY_IDX") + @Fetch(FetchMode.JOIN) public Study getStudy() { return mStudy; } @@ -206,26 +210,29 @@ @Transient public List<Annotation> getAnnotations() { List<Annotation> annotations = super.getAnnotations(); - if ( null != getNcbiTaxID() ) { - StringBuilder urlString = new StringBuilder(TreebaseUtil.getPurlDomain()); - getPhyloWSPath().getPath(urlString).append("NCBI:").append(getNcbiTaxID()); - annotations.add(new Annotation(Constants.DCTermsURI, "dc:relation", URI.create(urlString.toString()))); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.ncbi", "NCBI:" + getNcbiTaxID())); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxon", getTaxonVariant().getTaxon().getId())); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonLabel", getId())); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:title.taxon", getTaxonVariant().getTaxon().getName())); + try { + TaxonVariant tv = getTaxonVariant(); + if ( null != tv ) { + if ( null != tv.getNamebankID() ) { + annotations.add(new Annotation(Constants.SKOSURI, "skos:closeMatch", URI.create(Constants.uBioBase+tv.getNamebankID()))); + String fullName = tv.getFullName(); + if ( ! getLabel().equals(fullName) ) { + annotations.add(new Annotation(Constants.SKOSURI, "skos:altLabel",fullName)); + } + if ( null != getNcbiTaxID() ) { + annotations.add(new Annotation(Constants.SKOSURI, "skos:closeMatch", URI.create(String.format(Constants.NCBITaxonomyFormat, getNcbiTaxID())))); + String taxonName = tv.getTaxon().getLabel(); + if ( ! fullName.equals(taxonName) ) { + annotations.add(new Annotation(Constants.SKOSURI, "skos:prefLabel",taxonName)); + } + + } + } + } } - TaxonVariant tv = getTaxonVariant(); - if ( null != tv ) { - if ( null != tv.getNamebankID() ) { - StringBuilder urlString = new StringBuilder(TreebaseUtil.getPurlDomain()); - getPhyloWSPath().getPath(urlString).append("uBio:").append(tv.getNamebankID()); - annotations.add(new Annotation(Constants.DCTermsURI, "dc:relation", URI.create(urlString.toString()))); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.ubio", "uBio:" + tv.getNamebankID())); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.taxonVariant", tv.getId())); - annotations.add(new Annotation(Constants.TBTermsURI, "tb:title.taxonVariant", tv.getFullName())); - } - } + catch ( Exception e) { + e.printStackTrace(); + } return annotations; } @@ -233,4 +240,9 @@ public String getLabel() { return getTaxonLabel(); } + + @Transient + public Study getContext() { + return getStudy(); + } } 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:48:29
|
Revision: 599 http://treebase.svn.sourceforge.net/treebase/?rev=599&view=rev Author: rvos Date: 2010-03-16 16:48:22 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added constants for SKOS, NCBI and uBio. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/Constants.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/Constants.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/Constants.java 2010-03-16 16:47:24 UTC (rev 598) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/Constants.java 2010-03-16 16:48:22 UTC (rev 599) @@ -12,5 +12,9 @@ public static final URI PrismURI = URI.create("http://prismstandard.org/namespaces/1.2/basic/"); public static final URI BaseURI = URI.create("http://purl.org/PHYLO/TREEBASE/PHYLOWS/"); public static final URI OWLURI = URI.create("http://www.w3.org/2002/07/owl#"); + public static final URI SKOSURI = URI.create("http://www.w3.org/2004/02/skos/core#"); + public static final String NCBITaxonomyBase = "http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id="; + public static final String uBioBase = "http://www.ubio.org/authority/metadata.php?lsid=urn:lsid:ubio.org:namebank:"; + public static final String NCBITaxonomyFormat = "http://purl.uniprot.org/taxonomy/%s.rdf"; } 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:47:30
|
Revision: 598 http://treebase.svn.sourceforge.net/treebase/?rev=598&view=rev Author: rvos Date: 2010-03-16 16:47:24 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added getAnnotations() method, which returns skos: predicates to link to ubio and ncbi. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/Taxon.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/Taxon.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/Taxon.java 2010-03-16 16:46:12 UTC (rev 597) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/Taxon.java 2010-03-16 16:47:24 UTC (rev 598) @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.List; import javax.persistence.AttributeOverride; import javax.persistence.CascadeType; @@ -20,7 +21,9 @@ import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Index; +import org.cipres.treebase.Constants; import org.cipres.treebase.domain.AbstractPersistedObject; +import org.cipres.treebase.domain.Annotation; import org.cipres.treebase.domain.TBPersistable; /** @@ -245,5 +248,23 @@ public String getLabel() { return getName(); } + + @Transient + public List<Annotation> getAnnotations() { + List<Annotation> annotations = super.getAnnotations(); + try { + if ( null != getNcbiTaxId() ) { + annotations.add(new Annotation(Constants.SKOSURI,"skos:exactMatch",Constants.NCBITaxonomyBase + getNcbiTaxId())); + annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.ncbi", getNcbiTaxId())); + } + if ( null != getUBioNamebankId() ) { + annotations.add(new Annotation(Constants.SKOSURI,"skos:exactMatch",Constants.uBioBase + getUBioNamebankId())); + annotations.add(new Annotation(Constants.TBTermsURI, "tb:identifier.ubio", getUBioNamebankId())); + } + } catch ( Exception e ) { + e.printStackTrace(); + } + return annotations; + } } 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:46:19
|
Revision: 597 http://treebase.svn.sourceforge.net/treebase/?rev=597&view=rev Author: rvos Date: 2010-03-16 16:46:12 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added getContext() method, which returns a character matrix. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/matrix/MatrixElement.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/matrix/MatrixElement.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/matrix/MatrixElement.java 2010-03-15 18:53:07 UTC (rev 596) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/matrix/MatrixElement.java 2010-03-16 16:46:12 UTC (rev 597) @@ -17,6 +17,7 @@ import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; +import javax.persistence.Transient; import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.Index; @@ -148,4 +149,9 @@ * @return */ public abstract StringBuilder appendValueAsSymbol(StringBuilder pBuf, CharacterMatrix pMatrix); + + @Transient + public CharacterMatrix getContext() { + return getColumn().getMatrix(); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-03-15 18:54:11
|
Bugs item #2960902, was opened at 2010-02-28 18:06 Message generated for change (Settings changed) made by youjun You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2960902&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ui Group: None >Status: Closed Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Update status causes 403 error Initial Comment: Logging in as tb3 (a regular user) I created a new submission, added data, and then tried to click the "Update Status" link (http://treebasedb-dev.nescent.org/treebase-web/admin/changeStudyStatus.html) in order to change it to "Ready". However I got a 403 error. (below) However, by going back to the submission list (http://treebasedb-dev.nescent.org/treebase-web/user/submissionList.html) I was able to click the "Change to Ready State" button like so: http://treebasedb-dev.nescent.org/treebase-web/user/readyState.html?submissionid=10053 And it worked. bp ============================== HTTP Status 403 - Access is denied type Status report message Access is denied description Access to the specified resource (Access is denied) has been forbidden. Apache Tomcat/5.5.28 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2960902&group_id=248804 |
From: <yo...@us...> - 2010-03-15 18:53:16
|
Revision: 596 http://treebase.svn.sourceforge.net/treebase/?rev=596&view=rev Author: youjun Date: 2010-03-15 18:53:07 +0000 (Mon, 15 Mar 2010) Log Message: ----------- hide "change status" link from non-admin user Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp 2010-03-15 16:23:32 UTC (rev 595) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/submissionSummaryView.jsp 2010-03-15 18:53:07 UTC (rev 596) @@ -9,7 +9,11 @@ <legend>Summary <a href="#" class="openHelp" onclick="openHelp('submissionSummaryView')"><img class="iconButton" alt="help" src="<fmt:message key="icons.help"/>" /></a> </legend> -Submission: <c:out value="${submissionNumber}"/>, <c:out value="${studyStatus}"/>, <a href="/treebase-web/admin/changeStudyStatus.html"> Update Status</a><br/> +Submission: <c:out value="${submissionNumber}"/>, <c:out value="${studyStatus}"/> +<%if(request.isUserInRole("Admin") || request.isUserInRole("Associate Editor")){%> +, <a href="/treebase-web/admin/changeStudyStatus.html"> Update Status</a> +<%}%> +<br/> Submission initiated: <c:out value="${initiatedDate}"/><br/> <br/> @@ -33,7 +37,8 @@ <br/> <a href="<c:out value="${submission.study.phyloWSPath.purl}"/>?x-access-code=<c:out value="${submission.study.namespacedGUID.hashedIDString}"/>&format=html"> <img class="iconButton" alt="link" src="<fmt:message key="icons.weblink"/>" /> - Reviewer access URL: right-click and copy me + Reviewer access URL:<br/> + <c:out value="${submission.study.phyloWSPath.purl}"/>?x-access-code=<c:out value="${submission.study.namespacedGUID.hashedIDString}"/>&format=html </a> <div><strong>You can copy and send this URL to you journal editor to provide reviewers with limited, read-only access to your data, even if your submission has not yet been approved and the data are not yet public.</strong></div> <br/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sfr...@us...> - 2010-03-15 16:23:39
|
Revision: 595 http://treebase.svn.sourceforge.net/treebase/?rev=595&view=rev Author: sfrgpiel Date: 2010-03-15 16:23:32 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Added some UPDATE SQL statements that fix problems with taxonlabelsets not being properly mapped to their respective matrices and tree blocks. Added Paths: ----------- trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/ trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/README.txt trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/map_treeblock_to_taxonlabelset.sql trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/update_taxonlabelset.sql Added: trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/README.txt =================================================================== --- trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/README.txt (rev 0) +++ trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/README.txt 2010-03-15 16:23:32 UTC (rev 595) @@ -0,0 +1,5 @@ + +In the March migration, newly imported records were parked under a study_id with study_id 10215. The taxonlabelset table failed to have its study_id remapped to the newly created studies, so instead it retained the original temporary study_id. The update_taxonlabelset.sql query updates the study_id field in the taxonlabelset + +In the March migration, newly created treeblock records received NULL values for taxonlabelset_id, causing the download of trees to fail and causing a selection of trees under the Trees tab to fail to show the related selection of taxa after clicking on the Taxa tab. The map_treeblock_to_taxonlabelset.sql query addresses the problem by updating the treeblock's taxonlabelset_id using a value from one of the matrices related by way of an analysisstep. + Added: trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/map_treeblock_to_taxonlabelset.sql =================================================================== --- trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/map_treeblock_to_taxonlabelset.sql (rev 0) +++ trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/map_treeblock_to_taxonlabelset.sql 2010-03-15 16:23:32 UTC (rev 595) @@ -0,0 +1,21 @@ +-- In the March migration, newly created treeblock records received NULL values +-- for taxonlabelset_id, causing the download of trees to fail and causing +-- a selection of trees under the Trees tab to fail to show the related selection +-- of taxa after clicking on the Taxa tab. This query addresses the problem +-- by updating the treeblock's taxonlabelset_id using a value from one of the matrices +-- related by way of an analysisstep + + +UPDATE treeblock SET taxonlabelset_id = newtlsid FROM +(SELECT DISTINCT ON (tb.treeblock_id) tb.treeblock_id AS tblid, mx.taxonlabelset_id AS newtlsid +FROM matrix mx JOIN analyzeddata am ON (mx.matrix_id = am.matrix_id) +JOIN analyzeddata at ON (am.analysisstep_id = at.analysisstep_id) +JOIN phylotree pt ON (at.phylotree_id = pt.phylotree_id) +JOIN treeblock tb ON (pt.treeblock_id = tb.treeblock_id) +WHERE tb.taxonlabelset_id IS NULL) AS nm +WHERE treeblock.treeblock_id = tblid + + +-- note Hilar's comment: "note that UPDATE ... FROM is non-standard SQL; normally +-- one would alias the table being updated and have the update value be a subquery" + Added: trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/update_taxonlabelset.sql =================================================================== --- trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/update_taxonlabelset.sql (rev 0) +++ trunk/treebase-core/db/cleaning/2010-03-14_fix_taxonlabelset/update_taxonlabelset.sql 2010-03-15 16:23:32 UTC (rev 595) @@ -0,0 +1,13 @@ +-- In the March migration, newly imported records were parked under a study_id +-- with study_id 10215. The taxonlabelset table failed to have its study_id +-- remapped to the newly created studies, so instead it retained the original +-- temporary study_id. This query updates the study_id field in the taxonlabelset + + +UPDATE taxonlabelset SET study_id = mx.study_id +FROM matrix mx JOIN taxonlabelset tls USING (taxonlabelset_id) +WHERE tls.study_id = 10215 +AND mx.study_id <> 10215 +AND taxonlabelset.taxonlabelset_id = tls.taxonlabelset_id + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-03-15 15:53:31
|
Bugs item #2968150, was opened at 2010-03-10 13:28 Message generated for change (Comment added) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2968150&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ui Group: None >Status: Closed Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Matrix Download Link Broken Initial Comment: If you go here: http://treebase.nescent.org/treebase-web/search/study/matrices.html?id=10207 The download link says localhost: http://localhost:8080/treebase-web/phylows/matrix/TB2:M4596?format=nexus ... when it should put the correct domain ---------------------------------------------------------------------- >Comment By: William Piel (sfrgpiel) Date: 2010-03-15 11:53 Message: A little confusing because the links point to http://treebase.nescent.org/ which has not been re-built in a while. If you point the links to stage, it works okay. ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-03-10 19:24 Message: I fixed this issue, so this is definitely an out-of-date build. ---------------------------------------------------------------------- Comment By: William Piel (sfrgpiel) Date: 2010-03-10 13:32 Message: this might be due to an out-of-date build ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2968150&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-03-15 15:29:55
|
Bugs item #2970700, was opened at 2010-03-15 11:29 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2970700&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ui Group: None Status: Open Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: Nobody/Anonymous (nobody) Summary: Analysis download scrambles taxon labels Initial Comment: Analysis download scrambles taxon labels Analysis download creates a taxon block in which the order of the names does not match with the order of the names in the associated character block. This will cause software programs like PAUP and Mesquite to scramble the taxon labels with the characters that they are supposed to map to. For example, see here: http://treebase-stage.nescent.org/treebase-web/search/downloadAnAnalysisStep.html?analysisid=5539&id=10232 By contrast, if I download the matrix alone, a taxon block with the correct order is used: http://treebase-stage.nescent.org/treebase-web/phylows/matrix/TB2:M4847?format=nexus And if I download the *whole* study as nexus, the correct order is used: http://treebase-stage.nescent.org/treebase-web/phylows/study/TB2:S10232?format=nexus So the problem is in the analysis download. It looks as though the analysis download is re-creating new taxon blocks on the fly, whereas the matrix download is fetching them from the "taxonlabelset" and "taxonlabelset_taxonlabel" tables. A quick fix for the analysis download is the following: create taxon blocks using the information in taxonlabelset and taxonlabelset_taxonlabel tables. If any resulting trees come from a tree block that shares the same taxonlabelset_id as a matrix, then the resulting tree should have a "LINK TAXA" command that points to the *same* taxon block as the matrix. i.e. the number of taxa blocks that are generated at the top of the nexus file are determined by the number of unique taxonlabelset_id values linked to all character blocks and all trees/treeblocks linked to the analysis. The long-term fix is more complicated, namely auto-generate a single taxon block for a particular analysis download, use "LINK TAXA" to have all character blocks and tree blocks refer back to this same taxon block, but within each character block insure that the rows are sorted in exactly the same way as in the taxon block. I'll let you guys decide what to do, but I'm guessing that the quick fix is easier to implement, and while not as ideal as the long-term fix, it solves the row scrambling problem prior to public release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2970700&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-03-15 04:24:03
|
Bugs item #2970482, was opened at 2010-03-15 00:24 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2970482&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ui Group: None Status: Open Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: Nobody/Anonymous (nobody) Summary: unauthorized user can edit trees using phylowidget Initial Comment: This is a significant security hole: an unauthorized user (e.g. an anonymous user or a non-admin person) can view a tree using phylowidget (i.e. through the search interface), reroot the tree, and then click the "save back to the database" menu item -- and, unfortunately, the save does work and the data are permanently changed! We need to block this hole. Only if the user is the owner of the tree -- and where the tree belongs to a "in progress" study -- should the user be allowed to modify the tree and save it back to the database. Frankly, to avoid confusion it would be better to have a duplicate set of phylowidget pages: one available through the submission system (and this one contains the "save back to database" menu item) and one available through the search interface (and this one would not have the "save back to database" menu item). Also, note that the "Quick Links" box makes no sense for the phylowidget page deployed in the submission system, as following those links exits the submission pages. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2970482&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-03-15 01:58:22
|
Bugs item #2970457, was opened at 2010-03-14 21:58 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2970457&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: performance Group: None Status: Open Priority: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: Nobody/Anonymous (nobody) Summary: downloading analysis as nexus hangs Initial Comment: I added and finalized a completely new submission to TreeBASE in order to test the submission process from beginning to end. The result is this new study: http://treebase-stage.nescent.org/treebase-web/search/study/summary.html?id=10315 And everything looks good except that I cannot download one of the analyses (and I can't download the whole study either) as nexus -- the browser spins round and round and finally finishes with a Proxy Error. This is the bad one: http://treebase-stage.nescent.org/treebase-web/search/downloadAnAnalysisStep.html?analysisid=5758&id=10315 But strangely enough, the other analyses work fine (even though they are all pulling about the same amount of data): http://treebase-stage.nescent.org/treebase-web/search/downloadAnAnalysisStep.html?analysisid=5759&id=10315 http://treebase-stage.nescent.org/treebase-web/search/downloadAnAnalysisStep.html?analysisid=5760&id=10315 The individual components of the analysis (1 matrix and 2 trees) can be downloaded without a problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2970457&group_id=248804 |
From: <rv...@us...> - 2010-03-15 01:53:42
|
Revision: 594 http://treebase.svn.sourceforge.net/treebase/?rev=594&view=rev Author: rvos Date: 2010-03-15 01:53:35 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Now adds annotations. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/searchResultsAsRDF.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/searchResultsAsRDF.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/searchResultsAsRDF.jsp 2010-03-15 01:44:48 UTC (rev 593) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/searchResultsAsRDF.jsp 2010-03-15 01:53:35 UTC (rev 594) @@ -7,7 +7,7 @@ xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/"> <channel rdf:about="${baseURL}${phyloWSPath}?query=<c:out value="${normalizedCQLQuery}" escapeXml="true"/>&format=${format}&recordSchema=${recordSchema}"> - <title>${phyloWSPath}</title> + <title>TreeBASE</title> <link>${baseURL}</link> <description>${searchResultsThawed.description}</description> <%--image rdf:resource="${domainAddress}<fmt:message key="icons.treebase.16px"/>"/--%> @@ -26,9 +26,13 @@ </image--%> <c:forEach var="result" items="${searchResultsThawed.results}" varStatus="status"> <item rdf:about="${baseURL}<c:out value="${result.phyloWSPath}"/>"> - <title><c:out value="${result.namespacedGUID}"/></title> + <title><c:out value="${result.label}"/></title> <link>${baseURL}<c:out value="${result.phyloWSPath}"/></link> <description><c:out value="${result.namespacedGUID}"/></description> + <c:forEach var="anno" items="${result.annotations}" varStatus="annoStatus"> + <<c:out value="${anno.property}"/> + xmlns:<c:out value="${anno.prefix}"/>="<c:out value="${anno.URI}"/>"><c:out value="${anno.value}" escapeXml="true"/></<c:out value="${anno.property}"/>> + </c:forEach> </item> </c:forEach> </rdf:RDF> \ No newline at end of file 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:44:55
|
Revision: 593 http://treebase.svn.sourceforge.net/treebase/?rev=593&view=rev Author: rvos Date: 2010-03-15 01:44:48 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Removed unused import. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java 2010-03-15 01:43:07 UTC (rev 592) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AnyObjectAsRDFController.java 2010-03-15 01:44:48 UTC (rev 593) @@ -7,7 +7,6 @@ import org.cipres.treebase.PhyloWSPath; import org.cipres.treebase.TreebaseIDString; import org.cipres.treebase.TreebaseUtil; -import org.cipres.treebase.domain.Annotatable; import org.cipres.treebase.domain.matrix.Matrix; import org.cipres.treebase.domain.study.Study; import org.cipres.treebase.domain.tree.PhyloTree; 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:43:13
|
Revision: 592 http://treebase.svn.sourceforge.net/treebase/?rev=592&view=rev Author: rvos Date: 2010-03-15 01:43:07 +0000 (Mon, 15 Mar 2010) Log Message: ----------- The "nexml.uri.base" property is now the purl domain by default. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java 2010-03-15 01:34:45 UTC (rev 591) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java 2010-03-15 01:43:07 UTC (rev 592) @@ -43,13 +43,13 @@ protected Properties getDefaultProperties(HttpServletRequest request) { Properties properties = new Properties(); - StringBuffer baseURI = new StringBuffer("http://"); - baseURI - .append(request.getServerName()) - .append(':') - .append(request.getServerPort()) - .append("/treebase-web/phylows/"); - properties.setProperty("nexml.uri.base", baseURI.toString()); +// StringBuffer baseURI = new StringBuffer("http://"); +// baseURI +// .append(request.getServerName()) +// .append(':') +// .append(request.getServerPort()) +// .append("/treebase-web/phylows/"); + properties.setProperty("nexml.uri.base", TreebaseUtil.getPurlDomain()); return properties; } 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:34:51
|
Revision: 591 http://treebase.svn.sourceforge.net/treebase/?rev=591&view=rev Author: rvos Date: 2010-03-15 01:34:45 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Added required method stubs. Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java 2010-03-15 01:33:56 UTC (rev 590) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/TBMockObject.java 2010-03-15 01:34:45 UTC (rev 591) @@ -1,5 +1,9 @@ package org.cipres.treebase; +import java.util.List; +import java.util.Set; + +import org.cipres.treebase.domain.Annotation; import org.cipres.treebase.domain.TBPersistable; /** @@ -56,4 +60,19 @@ return null; } + public List<Annotation> getAnnotations() { + // TODO Auto-generated method stub + return null; + } + + public String getAnnotationsAsXmlString() { + // TODO Auto-generated method stub + return null; + } + + public String getLabel() { + // TODO Auto-generated method stub + 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-15 01:34:04
|
Revision: 590 http://treebase.svn.sourceforge.net/treebase/?rev=590&view=rev Author: rvos Date: 2010-03-15 01:33:56 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Now lazily loads the purl domain. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java 2010-03-15 01:32:50 UTC (rev 589) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/TreebaseUtil.java 2010-03-15 01:33:56 UTC (rev 590) @@ -3,7 +3,6 @@ import java.io.BufferedReader; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; @@ -41,6 +40,7 @@ public static final String LINESEP = System.getProperty("line.separator"); public static final int citationMaxLength = 5000; private static final Logger LOGGER = Logger.getLogger(TreebaseUtil.class); + private static String mPurlDomain; private TreebaseUtil() { super(); @@ -436,25 +436,28 @@ * @return domain name */ public static String getPurlDomain() { - Properties properties = new Properties(); - String domainName = ""; - try { - properties.load( - TreebaseUtil.class - .getClassLoader() - .getResourceAsStream("treebase.properties")); - //properties.load( new FileInputStream("treebase.properties") ); - LOGGER.info("properties loaded successfully"); - domainName = properties.getProperty("treebase.purl.domain"); - LOGGER.info("domain name: "+domainName); - } catch (FileNotFoundException e) { - LOGGER.warn("FileNotFoundException: " + e.getMessage()); - e.printStackTrace(); - } catch (IOException e) { - LOGGER.warn("IOException: "+e.getMessage()); - e.printStackTrace(); + if ( null == mPurlDomain ) { + Properties properties = new Properties(); + try { + properties.load( + TreebaseUtil.class + .getClassLoader() + .getResourceAsStream("treebase.properties")); + LOGGER.info("properties loaded successfully"); + mPurlDomain = properties.getProperty("treebase.purl.domain"); + LOGGER.info("domain name: "+mPurlDomain); + } catch (FileNotFoundException e) { + LOGGER.warn("FileNotFoundException: " + e.getMessage()); + e.printStackTrace(); + } catch (IOException e) { + LOGGER.warn("IOException: "+e.getMessage()); + e.printStackTrace(); + } + return mPurlDomain; } - return domainName; + else { + return mPurlDomain; + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |