001    /*
002     *                    BioJava development code
003     *
004     * This code may be freely distributed and modified under the
005     * terms of the GNU Lesser General Public Licence.  This should
006     * be distributed with the code.  If you do not have a copy,
007     * see:
008     *
009     *      http://www.gnu.org/copyleft/lesser.html
010     *
011     * Copyright for this code is held jointly by the individual
012     * authors.  These should be listed in @author doc comments.
013     *
014     * For more information on the BioJava project and its aims,
015     * or to join the biojava-l mailing list, visit the home page
016     * at:
017     *
018     *      http://www.biojava.org/
019     *
020     * Created on 01-21-2010
021     */
022    
023    package org.biojava3.core.sequence.features;
024    
025    import java.util.LinkedHashMap;
026    import org.biojava3.core.sequence.loader.UniprotProxySequenceReader;
027    
028    /**
029     * If you have a uniprot ID then it is possible to get a collection
030     * of other id(s) that the protein is known by. This is a place holder
031     * for the alternative source database and the id for the same protein.
032     * Currently implement when the {@link UniprotProxySequenceReader} is used
033     * to load a protein sequence
034     *
035     * @author Scooter Willis <willishf at gmail dot com>
036     */
037    public class DBReferenceInfo {
038        private LinkedHashMap<String, String> properties = new LinkedHashMap<String, String>();
039        private String database = "";
040        private String id = "";
041    
042        /**
043         * The source database and id
044         * @param database
045         * @param id
046         */
047        public DBReferenceInfo(String database, String id){
048            this.database = database;
049            this.id = id;
050        }
051    
052        /**
053         * Add a property and type to associate with this DBReferenceInfo
054         * @param type
055         * @param value
056         */
057    
058        public void addProperty(String type, String value){
059            properties.put(type, value);
060        }
061    
062        /**
063         * Get the properties
064         * @return the properties
065         */
066        public LinkedHashMap<String, String> getProperties() {
067            return properties;
068        }
069    
070        /**
071         * @param properties the properties to set
072         */
073        public void setProperties(LinkedHashMap<String, String> properties) {
074            this.properties = properties;
075        }
076    
077        /**
078         * @return the database
079         */
080        public String getDatabase() {
081            return database;
082        }
083    
084        /**
085         * @param database the database to set
086         */
087        public void setDatabase(String database) {
088            this.database = database;
089        }
090    
091        /**
092         * @return the id
093         */
094        public String getId() {
095            return id;
096        }
097    
098        /**
099         * @param id the id to set
100         */
101        public void setId(String id) {
102            this.id = id;
103        }
104    
105    
106    
107    }