/** * Returns a citation of the given name. If the given name matches a {@linkplain * Citation#getTitle title} or an {@linkplain Citation#getAlternateTitles alternate titles} of * one of the pre-defined constants ({@link #EPSG}, {@link #GEOTIFF}, <cite>etc.</cite>), then * this constant is returned. Otherwise, a new citation is created with the specified name as * the title. * * @param title The citation title (or alternate title). * @return A citation using the specified name */ public static Citation fromName(final String title) { for (int i = 0; i < AUTHORITIES.length; i++) { final Citation citation = AUTHORITIES[i]; if (titleMatches(citation, title)) { return citation; } } return new CitationImpl(title); }
/** * Adds the specified identifier as a CRS authority factory. This is used as a convenience * method for the creation of constants, and for making sure that all of them use the same * identifier type. */ final void addAuthority(final String identifier, final boolean asTitle) { if (asTitle) { getAlternateTitles().add(new SimpleInternationalString(identifier)); } getIdentifiers().add(new IdentifierImpl(identifier)); }
/** Set the version of the cited resource. */ public synchronized void setEdition(final InternationalString newValue) { checkWritePermission(); edition = newValue; }
public Citation getAuthority() { CitationImpl c = new CitationImpl(EXCEPTION_MESSAGE); c.freeze(); return c; }
default: final CitationImpl c = new CitationImpl(authorities[0]); final Collection<Identifier> identifiers = c.getIdentifiers(); for (int i = 1; i < authorities.length; i++) { identifiers.addAll(authorities[i].getIdentifiers()); c.freeze(); authority = c; break;
final Date date = result.getDate(2); final String engine = metadata.getDatabaseProductName(); final CitationImpl c = new CitationImpl(Citations.EPSG); c.getAlternateTitles() .add( Vocabulary.formatInternational( VocabularyKeys.DATA_BASE_$3, "EPSG", version, engine)); c.setEdition(new SimpleInternationalString(version)); c.setEditionDate(date); authority = (Citation) c.unmodifiable(); hints.put(Hints.VERSION, new Version(version)); // For getImplementationHints() } else {
resource.setFunction(OnLineFunction.INFORMATION); resource.setDescription(description); final CitationImpl citation = new CitationImpl(authority); final Collection<ResponsibleParty> parties = citation.getCitedResponsibleParties(); final ResponsibleParty oldParty; final Iterator<ResponsibleParty> it = parties.iterator(); party.setContactInfo(new ContactImpl(resource)); parties.add(party); authority = (Citation) citation.unmodifiable(); } catch (URISyntaxException exception) {
/** * Constructs a citation with the specified responsible party. This convenience constructor * initialize the citation title to the first non-null of the following properties: {@linkplain * ResponsibleParty#getOrganisationName organisation name}, {@linkplain * ResponsibleParty#getPositionName position name} or {@linkplain * ResponsibleParty#getIndividualName individual name}. * * @since 2.2 */ public CitationImpl(final ResponsibleParty party) { InternationalString title = party.getOrganisationName(); if (title == null) { title = party.getPositionName(); if (title == null) { String name = party.getIndividualName(); if (name != null) { title = new SimpleInternationalString(name); } } } setTitle(title); getCitedResponsibleParties().add(party); }
/** Set the short name or other language name by which the cited information is known. */ public synchronized void setAlternateTitles( final Collection<? extends InternationalString> newValues) { alternateTitles = copyCollection(newValues, alternateTitles, InternationalString.class); }
/** * Returns the unique identifier for the resource. Example: Universal Product Code (UPC), * National Stock Number (NSN). */ public synchronized Collection<Identifier> getIdentifiers() { return (identifiers = nonNullCollection(identifiers, Identifier.class)); }
/** * Adds the specified identifier as a CRS authority factory. This is used as a convenience * method for the creation of constants, and for making sure that all of them use the same * identifier type. */ final void addAuthority(final String identifier, final boolean asTitle) { if (asTitle) { getAlternateTitles().add(new SimpleInternationalString(identifier)); } getIdentifierTypes().add("Authority name"); getIdentifiers().add(identifier); }
final Date date = result.getDate(2); final String engine = metadata.getDatabaseProductName(); final CitationImpl c = new CitationImpl(Citations.EPSG); c.getAlternateTitles() .add( Vocabulary.formatInternational( version, engine)); c.setEdition(new SimpleInternationalString(version)); c.setEditionDate(date); authority = (Citation) c.unmodifiable(); hints.put( Hints.VERSION,
/** * Constructs a citation with the specified responsible party. This convenience constructor * initialize the citation title to the first non-null of the following properties: * {@linkplain ResponsibleParty#getOrganisationName organisation name}, * {@linkplain ResponsibleParty#getPositionName position name} or * {@linkplain ResponsibleParty#getIndividualName individual name}. * * @since 2.2 */ public CitationImpl(final ResponsibleParty party) { InternationalString title = party.getOrganisationName(); if (title == null) { title = party.getPositionName(); if (title == null) { String name = party.getIndividualName(); if (name != null) { title = new SimpleInternationalString(name); } } } setTitle(title); getCitedResponsibleParties().add(party); }
/** Set the mode in which the resource is represented, or an empty string if none. */ public synchronized void setPresentationForm( final Collection<? extends PresentationForm> newValues) { presentationForm = copyCollection(newValues, presentationForm, PresentationForm.class); }
/** * Returns the name and position information for an individual or organization that is * responsible for the resource. Returns an empty string if there is none. */ public synchronized Collection<ResponsibleParty> getCitedResponsibleParties() { return (citedResponsibleParties = nonNullCollection(citedResponsibleParties, ResponsibleParty.class)); }
DefaultEllipsoidalCS.getName(gcs, new CitationImpl("EPSG")), (GeodeticDatum) gcs.getDatum(), DefaultEllipsoidalCS.GEODETIC_2D.usingUnit(angularUnit));
/** * Set the common title with holdings note. Note: title identifies elements of a series * collectively, combined with information about what volumes are available at the source cited. * Set to {@code null} if there is no title. */ public synchronized void setCollectiveTitle(final InternationalString newValue) { checkWritePermission(); collectiveTitle = newValue; }
/** * Constructs a citation with the specified responsible party. This convenience constructor * initialize the citation title to the first non-null of the following properties: * {@linkplain ResponsibleParty#getOrganisationName organisation name}, * {@linkplain ResponsibleParty#getPositionName position name} or * {@linkplain ResponsibleParty#getIndividualName individual name}. * * @since 2.2 */ public CitationImpl(final ResponsibleParty party) { InternationalString title = party.getOrganisationName(); if (title == null) { title = party.getPositionName(); if (title == null) { String name = party.getIndividualName(); if (name != null) { title = new SimpleInternationalString(name); } } } setTitle(title); getCitedResponsibleParties().add(party); }
/** * Adds the specified identifier as a CRS authority factory. This is used as a convenience * method for the creation of constants, and for making sure that all of them use the same * identifier type. */ final void addAuthority(final String identifier, final boolean asTitle) { if (asTitle) { getAlternateTitles().add(new SimpleInternationalString(identifier)); } getIdentifiers().add(new IdentifierImpl(identifier)); }
/** * Set the unique identifier for the resource. Example: Universal Product Code (UPC), National * Stock Number (NSN). */ public synchronized void setIdentifiers(final Collection<? extends Identifier> newValues) { identifiers = copyCollection(newValues, identifiers, Identifier.class); }