001// BibRef.java 002// 003// senger@ebi.ac.uk 004// March 2001 005// 006 007/* 008 * BioJava development code 009 * 010 * This code may be freely distributed and modified under the 011 * terms of the GNU Lesser General Public Licence. This should 012 * be distributed with the code. If you do not have a copy, 013 * see: 014 * 015 * http://www.gnu.org/copyleft/lesser.html 016 * 017 * Copyright for this code is held jointly by the individual 018 * authors. These should be listed in @author doc comments. 019 * 020 * For more information on the BioJava project and its aims, 021 * or to join the biojava-l mailing list, visit the home page 022 * at: 023 * 024 * http://www.biojava.org/ 025 * 026 */ 027package org.biojava.bibliography; 028 029import java.util.Hashtable; 030 031/** 032 * <p> 033 * This class is a core class of the bibliographic data model - it 034 * represents a bibliographic reference, a citation. 035 * It is a super-class for all specialized citation types, but it 036 * can also be instantiated and represent an additional specialized 037 * citation type. 038 * </p> 039 * 040 * <p> 041 * The <em>BibRef</em> class has several explicit attributes, which are 042 * reasonably general and which originate from the 043 * <a href="http://dublincore.org">Dublin Core Metadata</a>, and a 044 * hashtable that can hold any number of additional attributes. The same pattern is 045 * repeatedly used on several other places of the data model. It achieves 046 * extendibility without losing interoperability if the following rules are obeyed: 047 * <ul> 048 * <li> The implementation must be prepared for cases when the explicitly 049 * defined attributes are empty (containing <tt>null</tt> value, or, 050 * in case of arrays, an empty list of elements). 051 * <li> The names of additional properties (keys of the hashtable) must be 052 * obtainable and/or checkable using controlled vocabularies 053 * (see interface {@link BibRefSupport} for details). 054 * <li> The values stored in that hashtable should be of "reasonable" types. Any 055 * implementation should understand at least basic Java types (in most cases 056 * the <tt>String</tt> type is the best choice). The more exotic types 057 * are used, the less interoperability between implementations is likely. 058 * </ul> 059 * </p> 060 * 061 * <p> 062 * The <em>BibRef</em> class is a parent class for derived classes representing bibliographic 063 * references to specialized bibliographic resources. The following classes are 064 * defined explicitly: 065 * {@link BiblioBook}, 066 * {@link BiblioArticle}, 067 * {@link BiblioBookArticle}, 068 * {@link BiblioJournalArticle}, 069 * {@link BiblioPatent}, 070 * {@link BiblioThesis}, 071 * {@link BiblioProceeding}, 072 * {@link BiblioTechReport}, and 073 * {@link BiblioWebResource} 074 * </p> 075 * 076 * <p> 077 * The active participants of the process of creation and dissemination of the 078 * bibliographic resources are defined by the class {@link BiblioProvider} and its 079 * sub-classes. The participants can be people, organizations, or even software 080 * services (mainly used for new digital resources). The most obvious examples 081 * are authors, but it includes also publishers and other contributors. 082 * </p> 083 * 084 * <p> 085 * And finally, there is a class {@link BiblioJournal} describing journals. 086 * The citations referring to the journal articles have a reference to this class. 087 * </p> 088 * 089 * <p> 090 * This is an overview of all participating classes and their attributes: 091 * <img src="doc-files/bibobjects_java.jpg">. 092 * </p> 093 * 094 * @author <A HREF="mailto:senger@ebi.ac.uk">Martin Senger</A> 095 * @version $Id$ 096 * @since 1.3 097 */ 098 099public class BibRef { 100 101 /** 102 * Additional attributes of this citation. 103 */ 104 public Hashtable properties = new Hashtable(); 105 106 /** It is an unambiguous reference to this citation "within the world". 107 * It is a string conforming to an identification system. An example 108 * of such system can be a combination of a well-known repository name 109 * and a unique identifier defined within this repository, such as 110 * <tt>MEDLINE/20000003</tt>. 111 */ 112 public String identifier; 113 114 /** 115 * <p> 116 * It defines the nature or genre of the cited resource. 117 * </p> 118 * 119 * <p> 120 * A recommended best practice is to use only values from a controlled vocabulary 121 * named as defined in {@link BibRefSupport#RESOURCE_TYPES}. 122 * Syntactically, and because of making query navigation easier, the value of this 123 * attribute should be equal to a constant predefined in {@link BibRefSupport}, 124 * such as {@link BibRefSupport#TYPE_BOOK} for books, or 125 * {@link BibRefSupport#TYPE_JOURNAL_ARTICLE} for journal articles. 126 * However, there may be bibliographic resources, which are 127 * not defined by specialized sub-classes (for example, letters, practical guideline, 128 * or archives), and therefore they do not have predefined names in 129 * {@link BibRefSupport} interface. 130 * </p> 131 * 132 * <p> 133 * <em>Note that for the description of the physical or digital manifestation of the 134 * cited resource there is an attribute {@link #format}.</em> 135 * </p> 136 */ 137 public String type; 138 139 /** 140 * <p> 141 * It is an array of identifiers, all of them pointing to <em>the same cited source</em> 142 * but usually stored in different bibliographic repositories. 143 * </p> 144 * 145 * <p> 146 * <em>Note that this attribute is not for referencing citations to other documents 147 * that are related to the cited document.</em> 148 * </p> 149 */ 150 public String[] crossReferences; 151 152 /** 153 * A title given to the cited resource (a name by which the resource is formally known). 154 */ 155 public String title; 156 157 /** 158 * It defines the topic of the content of the cited resource. 159 */ 160 public BiblioSubject subject; 161 162 /** 163 * An account of the content of the cited resource. 164 * It is either an abstract, or table of contents, or both. 165 * It can be written in a language different from the language of the cited resource. 166 */ 167 public BiblioDescription description; 168 169 /** 170 * It defines an extent or scope of the content of the cited resource. 171 * It can include spatial location (a place name or geographic co-ordinates), 172 * temporal period (a period label, date, or date range), or both. 173 */ 174 public BiblioScope coverage; 175 176 /** 177 * <p> 178 * The authors and contributors are responsible for creating the contents of the cited resource. 179 * There is no formal definition of how this responsibility is divided between them. However, 180 * the authors are usually primary creators while contributors may be illustrators, translators, 181 * or other creative providers. 182 * </p> 183 * 184 * <p> 185 * The authors are in an ordered array (to be able to find the first author). 186 * </p> 187 */ 188 public BiblioProvider[] authors; 189 190 /** 191 * <p> 192 * The authors and contributors are responsible for creating the contents of the cited resource. 193 * There is no formal definition of how this responsibility is divided between them. However, 194 * the authors are usually primary creators while contributors may be illustrators, translators, 195 * or other creative providers. 196 * </p> 197 * 198 * <p> 199 * The contributors are in an ordered array (to be able to find the first contributor). 200 * </p> 201 */ 202 public BiblioProvider[] contributors; 203 204 /** 205 * A publisher is responsible for making the resource available. 206 */ 207 public BiblioProvider publisher; 208 209 /** 210 * <p> 211 * It specifies information about rights over the cited resource. 212 * Typically, it contains a rights management statement for the resource, or it refers 213 * to a service providing such information. Rights information often encompasses 214 * <a href="http://www.itds.treas.gov/ITDS/ITTA/ipr.html">Intellectual Property Rights</a>, 215 * Copyright, and various Property Rights. 216 * </p> 217 * 218 * <p> 219 * If the attribute is empty, no assumptions can be made about the status of these and 220 * other rights with respect to the cited resource. 221 * </p> 222 */ 223 public String rights; 224 225 /** 226 * <p> 227 * Defines a date associated with an event in the life cycle of the cited resource 228 * when this resource became available. Usually, it is a date of publishing. However, 229 * for not yet published resources, it can be a date of creation. 230 * </p> 231 * 232 * <p> 233 * The suggested encoding is as defined in a W3C NOTE 234 * <a href="http://www.w3.org/TR/NOTE-datetime">Date and Time Formats</a>. 235 * This NOTE defines a profile of <a href="http://www.iso.ch/markete/8601.pdf">ISO8601 standard</a>. 236 * ISO8601 describes a large number of date/time formats and the NOTE reduces the scope and restricts 237 * the supported formats to a small number. The profile offers a number of options from which this 238 * attribute should contain/permit only the following ones: 239 * </p> 240 * 241 * <p> 242 * <dl> 243 * <dt> Year 244 * <dd> YYYY (e.g., 2000) 245 * <dt> Year and month 246 * <dd> YYYY-MM (e.g., 2000-12) 247 * <dt> Complete date 248 * <dd> YYYY-MM-DD (e.g., 2000-12-31) 249 * <dt> Complete date plus hours, minutes, and seconds 250 * <dd> YYYY-MM-DDThh:mm:ssZ (e.g., 2000-12-31T23:59:59Z) 251 * </dl> 252 * </p> 253 * 254 * <p> 255 * Exactly the components shown here must be present, with exactly this punctuation. 256 * Note that the <b>T</b> appears literally in the string, to indicate the beginning 257 * of the time element, as specified in ISO 8601. 258 * </p> 259 * 260 * <p> 261 * Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator 262 * (<em>Z</em>), again as specified in ISO 8601. 263 * </p> 264 * 265 * <p> 266 * For query purposes, the format with fewer details is considered 267 * as having all possible values in place of missing details. Thus, YYYY-MM would mean 268 * all dates and times in the given month. 269 * </p> 270 */ 271 public String date; 272 273 /** 274 * <p> 275 * It defines a language of the intellectual contents of the cited resource. 276 * The recommendation is to use values as defined by 277 * <a href="http://www.ietf.org/rfc/rfc1766.txt">RFC1766</a> which includes a two-letter 278 * <em>Language Code</em> (taken from the ISO639 standard), followed optionally by a two-letter 279 * <em>Country Code</em> (taken from the ISO3166 standard). 280 * </p> 281 * 282 * <p> 283 * For example, <tt>en</tt> for English, 284 * <tt>fr</tt> for French, or <tt>en-uk</tt> for English used in the United Kingdom. 285 * </p> 286 * 287 * <p> 288 * Another possibility is to use 289 * <a href="http://lcweb.loc.gov/marc/languages">MARC List of Languages</a>. 290 * </p> 291 * 292 * <p> 293 * In any case, the name of the used controlled vocabulary should be equal to 294 * {@link BibRefSupport#LANGUAGES}. 295 * </p> 296 */ 297 public String language; 298 299 /** 300 * It describes the physical or digital manifestation of the cited 301 * resource. It can have very different content depending on the 302 * citation type. Therefore, it is highly recommended to use a 303 * controlled vocabulary to fill this attribute. The name of such 304 * vocabulary should be equal to the type of the reosurce type 305 * followed by {@link BibRefSupport#ATTR_FORMAT}. For example: 306 * {@link BibRefSupport#TYPE_BOOK}/{@link BibRefSupport#ATTR_FORMAT}. 307 */ 308 public String format; 309 310 /** 311 * It defines information related to the citation itself rather than to the cited resource. 312 */ 313 public BiblioEntryStatus entryStatus; 314 315}