X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fuk%2Fac%2Fvamsas%2Fobjects%2FIVorbaBinding.java;h=798d558c4e890f76f7b04737e268b5af112d949b;hb=1eea4b639911330e7cd65e17c5421cc584f0d22e;hp=9b620526c8d54beadf4ba860d1dba8fe73b62a7b;hpb=148c608d278e4bd9d2410e9d01bdc80e4faa3ec4;p=vamsas.git diff --git a/src/uk/ac/vamsas/objects/IVorbaBinding.java b/src/uk/ac/vamsas/objects/IVorbaBinding.java index 9b62052..798d558 100644 --- a/src/uk/ac/vamsas/objects/IVorbaBinding.java +++ b/src/uk/ac/vamsas/objects/IVorbaBinding.java @@ -1,5 +1,23 @@ -/** +/* + * This file is part of the Vamsas Client version 0.2. + * Copyright 2010 by Jim Procter, Iain Milne, Pierre Marguerite, + * Andrew Waterhouse and Dominik Lindner. + * + * Earlier versions have also been incorporated into Jalview version 2.4 + * since 2008, and TOPALi version 2 since 2007. + * + * The Vamsas Client is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Vamsas Client 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 Lesser General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with the Vamsas Client. If not, see . */ package uk.ac.vamsas.objects; @@ -7,34 +25,48 @@ import uk.ac.vamsas.client.Vobject; import uk.ac.vamsas.client.VorbaId; /** - * Provides methods to map between VorbaIds and arbitrary object references - * for use by a vamsas Application when moving between its own datamodel and the - * Vamsas session objects. - * The implementing class needs a valid client-document instance if it is expected - * to be able to register newly created vObjects. Normally this will be the case if - * the implementing class has been generated by an IClient implementation which will - * also have passed it a reference to the current valid IClientDocument instance for - * that application's document access thread. + * Provides methods to map between VorbaIds and arbitrary object references for + * use by a vamsas Application when moving between its own datamodel and the + * Vamsas session objects. The implementing class needs a valid client-document + * instance if it is expected to be able to register newly created vObjects. + * Normally this will be the case if the implementing class has been generated + * by an IClient implementation which will also have passed it a reference to + * the current valid IClientDocument instance for that application's document + * access thread. TODO: add remove/clear binding functions - currently you can + * just pass a null to either argument for bindAppsObjectToVamsasObject to + * remove the binding from memory. + * * @author JimP + * */ public interface IVorbaBinding { -/** - * get the Vamsas session object bound to an internal object. - * @param appObject - * @return valid session object or Null. - */ + /** + * get the Vamsas session object bound to an internal object. + * + * @param appObject + * @return valid session object or Null. + */ Vobject getVamsasObjectFor(Object appObject); + /** * Get the Application's own object bound to an existing Vamsas session object - * @param vObject - object in vamsas document + * + * @param vObject + * - object in vamsas document * @return apps object bound to the vamsas document object */ Object getAppsObjectFor(uk.ac.vamsas.client.Vobject vObject); /** - * Record a mapping between a vamsas document object and an application's internal object. + * Record a mapping between a vamsas document object and an application's + * internal object. If either appObject or vObject parameters are null then + * any existing binding to the non-null object will be deleted + * * @param appObject - * @param vObject - this must have been + * @param vObject + * - if newly created then it will be registered using the + * uk.ac.vamsas.client.IClientDocument.registerObject method. */ - void bindAppsObjectToVamsasObject(Object appObject, uk.ac.vamsas.client.Vobject vObject); + void bindAppsObjectToVamsasObject(Object appObject, + uk.ac.vamsas.client.Vobject vObject); }