001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * This package contains documentation from OpenGIS specifications.
017: * OpenGIS consortium's work is fully acknowledged here.
018: */
019: package org.geotools.metadata.iso.citation;
020:
021: // OpenGIS dependencies
022: import org.opengis.metadata.citation.Series;
023: import org.opengis.util.InternationalString;
024:
025: // Geotools dependencies
026: import org.geotools.metadata.iso.MetadataEntity;
027: import org.geotools.util.SimpleInternationalString;
028:
029: /**
030: * Information about the series, or aggregate dataset, to which a dataset belongs.
031: *
032: * @author Jody Garnett
033: * @author Martin Desruisseaux
034: *
035: * @since 2.1
036: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/citation/SeriesImpl.java $
037: */
038: public class SeriesImpl extends MetadataEntity implements Series {
039: /**
040: * Serial number for interoperability with different versions.
041: */
042: private static final long serialVersionUID = 2784101441023323052L;
043:
044: /**
045: * Name of the series, or aggregate dataset, of which the dataset is a part.
046: */
047: private InternationalString name;
048:
049: /**
050: * Information identifying the issue of the series.
051: */
052: private String issueIdentification;
053:
054: /**
055: * Details on which pages of the publication the article was published.
056: */
057: private String page;
058:
059: /**
060: * Constructs a default series.
061: */
062: public SeriesImpl() {
063: }
064:
065: /**
066: * Constructs a metadata entity initialized with the values from the specified metadata.
067: *
068: * @since 2.4
069: */
070: public SeriesImpl(final Series source) {
071: super (source);
072: }
073:
074: /**
075: * Constructs a series with the specified name.
076: */
077: public SeriesImpl(final CharSequence name) {
078: final InternationalString n;
079: if (name instanceof InternationalString) {
080: n = (InternationalString) name;
081: } else {
082: n = new SimpleInternationalString(name.toString());
083: }
084: setName(n);
085: }
086:
087: /**
088: * Returne the name of the series, or aggregate dataset, of which the dataset is a part.
089: */
090: public InternationalString getName() {
091: return name;
092: }
093:
094: /**
095: * Set the name of the series, or aggregate dataset, of which the dataset is a part.
096: */
097: public synchronized void setName(final InternationalString newValue) {
098: checkWritePermission();
099: name = newValue;
100: }
101:
102: /**
103: * Returns information identifying the issue of the series.
104: */
105: public String getIssueIdentification() {
106: return issueIdentification;
107: }
108:
109: /**
110: * Set information identifying the issue of the series.
111: */
112: public synchronized void setIssueIdentification(
113: final String newValue) {
114: checkWritePermission();
115: issueIdentification = newValue;
116: }
117:
118: /**
119: * Returns details on which pages of the publication the article was published.
120: */
121: public String getPage() {
122: return page;
123: }
124:
125: /**
126: * Set details on which pages of the publication the article was published.
127: */
128: public synchronized void setPage(final String newValue) {
129: checkWritePermission();
130: page = newValue;
131: }
132: }
|