X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fuk%2Fac%2Fvamsas%2Fclient%2FVorbaIdFactory.java;h=8b0e98aa4b0c6e3a104ae04a7d2d5a14256fec27;hb=844ccad5a3fcbedec17b2af66d460f31abc7cff1;hp=c5a5079904b5a04a4538fa0e9b7ed15123c67690;hpb=6f33f705957d674dc2ab6c994a6ea87f7a91f40f;p=vamsas.git diff --git a/src/uk/ac/vamsas/client/VorbaIdFactory.java b/src/uk/ac/vamsas/client/VorbaIdFactory.java index c5a5079..8b0e98a 100644 --- a/src/uk/ac/vamsas/client/VorbaIdFactory.java +++ b/src/uk/ac/vamsas/client/VorbaIdFactory.java @@ -1,8 +1,23 @@ /* - * Created on 12-Sep-2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates + * This file is part of the Vamsas Client version 0.1. + * Copyright 2009 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.client; @@ -10,9 +25,8 @@ import java.util.Hashtable; import java.util.Vector; /** - * A VorbaIdFactory is constructed by an IClient instance. - * It guarantees that any new VorbaId objects are unique - * within the VAMSAS session. + * A VorbaIdFactory is constructed by an IClient instance. It guarantees that + * any new VorbaId objects are unique within the VAMSAS session. * * @author jimp */ @@ -20,16 +34,18 @@ public abstract class VorbaIdFactory implements IVorbaIdFactory { /** * hash of VorbaIds to Vobject. */ - protected Hashtable extantids=null; + protected Hashtable extantids = null; + /** * hash of VorbaIds to persisted hash values */ - protected Hashtable extanthashv=null; + protected Hashtable extanthashv = null; + /** * list of Vobjects added since last Document read. */ - protected Vector newobj=null; - + protected Vector newobj = null; + /** * construct a new id appropriate for this client in the vamsas session. * @@ -37,28 +53,35 @@ public abstract class VorbaIdFactory implements IVorbaIdFactory { * correctly. */ public abstract VorbaId makeVorbaId(Vobject vobject); - + /** - * internal method to access the protected VorbaId object constructor - * This shennanigan is to prevent casual generation of VorbaIds - * (which may destroy the integrity of a Vamsas Document!) + * internal method to access the protected VorbaId object constructor This + * shennanigan is to prevent casual generation of VorbaIds (which may destroy + * the integrity of a Vamsas Document!) + * * @param id * @return new VorbaId object */ protected VorbaId newId(String id) { return VorbaId.newId(id); } + /** - * Called by VorbaXmlBinder so the record of newly unmarshalled Vobject Ids - * is accessible to the Document's VorbaIdFactory instance. + * Called by VorbaXmlBinder so the record of newly unmarshalled Vobject Ids is + * accessible to the Document's VorbaIdFactory instance. + * * @param idtable */ protected void setNewIdHash(Hashtable idtable) { extantids = idtable; } - - /* (non-Javadoc) - * @see uk.ac.vamsas.client.IVorbaIdFactory#updateHashValue(uk.ac.vamsas.client.Vobject) + + /* + * (non-Javadoc) + * + * @see + * uk.ac.vamsas.client.IVorbaIdFactory#updateHashValue(uk.ac.vamsas.client + * .Vobject) */ public void updateHashValue(Vobject vobject) { if (vobject.isRegisterable())