From: jprocter Date: Thu, 19 Jan 2006 12:12:04 +0000 (+0000) Subject: set correct get/Set VamsasRoots type, added addVamsasRoot, and some more TODOs X-Git-Tag: Release_0.2~375 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d04d80167610368f907b02e81be71012b98357ed;p=vamsas.git set correct get/Set VamsasRoots type, added addVamsasRoot, and some more TODOs git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@145 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/client/IClientDocument.java b/src/org/vamsas/client/IClientDocument.java index 89556bb..80eb94a 100644 --- a/src/org/vamsas/client/IClientDocument.java +++ b/src/org/vamsas/client/IClientDocument.java @@ -6,6 +6,8 @@ */ package org.vamsas.client; +import org.vamsas.objects.core.VAMSAS; + /** * Defines the API for the Vamsas XML Document @@ -28,7 +30,7 @@ package org.vamsas.client; * A user may also want to make private notes, not * available to other people using the same application * in the same session. - * + * TODO: LATER: implement a more sophisticated query interface for quickly identifying new data in a vamsas document and manipulating existing objects * @author jimp */ public interface IClientDocument { @@ -48,9 +50,24 @@ public interface IClientDocument { /** * Returns all root objects in document. All objects inherit * from org.vamsas.client.object and have valid VorbaIds and provenance entries. - * @return array of root Vamsas element objects. (TODO: insert correct class here) + * @return array of root Vamsas element objects. + */ + VAMSAS[] getVamsasRoots(); + /** + * set the VAMSAS roots in the document + * TODO: decide if objects are verified for provenance and VorbaIds by this call or when document is stored + * TODO: decide if this call should throw InvalidVamsasObject exceptions. + * TODO: decide how this call deals with applications that 'forget' to include all VAMSAS roots (this is where reference counting/garbage collection happens) + * @param roots + */ + void setVamsasRoots(VAMSAS[] roots); + /** + * Adds a new VAMSAS root entry + * TODO: decide on same InvalidVamsasObject exceptions. + * TODO: decide if a 'removeVamsasRoot' method is really needed. + * @param newroot */ - object[] getVamsasRoots(); + void addVamsasRoot(VAMSAS newroot); /** * Returns an object with a valid VorbaId, and provenance element. * The VorbaId is so the application may refer to it in