/** * Returns the name or the position of the first individual. If no individual is found in the list of parties, * then this method will search in the list of organization members. The later structure is used by our netCDF * reader. * * @param position {@code true} for returning the position name instead than individual name. * @return the name or position of the first individual, or {@code null}. * * @see #getIndividualName() * @see #getPositionName() */ private InternationalString getIndividual(final boolean position) { final Collection<AbstractParty> parties = getParties(); InternationalString name = getName(parties, DefaultIndividual.class, position); if (name == null && parties != null) { for (final AbstractParty party : parties) { if (party instanceof DefaultOrganisation) { name = getName(((DefaultOrganisation) party).getIndividual(), DefaultIndividual.class, position); if (name != null) { break; } } } } return name; }
/** * Returns the name or the position of the first individual. If no individual is found in the list of parties, * then this method will search in the list of organization members. The later structure is used by our netCDF * reader. * * @param position {@code true} for returning the position name instead than individual name. * @return the name or position of the first individual, or {@code null}. * * @see #getIndividualName() * @see #getPositionName() */ private InternationalString getIndividual(final boolean position) { final Collection<AbstractParty> parties = getParties(); InternationalString name = getName(parties, DefaultIndividual.class, position); if (name == null && parties != null) { for (final AbstractParty party : parties) { if (party instanceof DefaultOrganisation) { name = getName(((DefaultOrganisation) party).getIndividual(), DefaultIndividual.class, position); if (name != null) { break; } } } } return name; }
/** * Returns the name of the responsible organization. Only one of * {@link #getIndividualName() individualName}, {@code organisationName} * and {@link #getPositionName() positionName} shall be provided. * * <p>This implementation returns the name of the first {@code Organisation} * found in the collection of {@linkplain #getParties() parties}.</p> * * @return name of the responsible organization, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@code getName()} in {@link DefaultOrganisation}. */ @Override @Deprecated @XmlElement(name = "organisationName") @Dependencies("getParties") public InternationalString getOrganisationName() { return getName(getParties(), DefaultOrganisation.class, false); }
/** * Returns the name of the responsible organization. Only one of * {@link #getIndividualName() individualName}, {@code organisationName} * and {@link #getPositionName() positionName} shall be provided. * * <p>This implementation returns the name of the first {@code Organisation} * found in the collection of {@linkplain #getParties() parties}.</p> * * @return name of the responsible organization, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@code getName()} in {@link DefaultOrganisation}. */ @Override @Deprecated @XmlElement(name = "organisationName") @Dependencies("getParties") public InternationalString getOrganisationName() { return getName(getParties(), DefaultOrganisation.class, false); }