/** * Sets the telephone number of a facsimile machine for the responsible organization or individual. * This method writes in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact * that own this phone is known. * * @param newValues the new telephone number, or {@code null} if none. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #setNumber(String) number} * with {@code TelephoneType.FACSIMILE}. */ @Deprecated public void setFacsimiles(final Collection<? extends String> newValues) { ((LegacyTelephones) getFacsimiles()).setValues(newValues); } }
/** * Adds a new telephone number. As a special case if the first element is empty, then the telephone number * will be set in that element. We test only the first element because {@link DefaultTelephone#getOwner()} * initialize new collections as collection containing {@code DefaultTelephone.this}. * * @param value the telephone number to add. * @return {@code true} if the element has been added. */ @Override public boolean add(final String value) { // Null value happen with empty XML elements like <gco:CharacterString/> if (value == null || value.isEmpty()) { return false; } final Iterator<Telephone> it = elements.iterator(); if (it.hasNext()) { final Telephone telephone = it.next(); if (telephone instanceof DefaultTelephone && ((DefaultTelephone) telephone).isEmpty()) { if (update(telephone, value)) { return true; } } } return elements.add(wrap(value)); } }
/** * Returns the telephone numbers by which individuals can speak to the responsible organization or individual. * This method searches in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact that own * this phone is known. * * @return telephone numbers by which individuals can speak to the responsible organization or individual. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #getNumber() number} * with {@code TelephoneType.VOICE}. */ @Override @Deprecated @XmlElement(name = "voice") @Dependencies({"getNumber", "getNumberType"}) public final Collection<String> getVoices() { return new LegacyTelephones(getOwner(), UnsupportedCodeList.VOICE); }
/** * Returns the telephone numbers of a facsimile machine for the responsible organization or individual. * This method searches in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact * that own this phone is known. * * @return telephone numbers of a facsimile machine for the responsible organization or individual. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #getNumber() number} * code {@code TelephoneType.FACSIMILE}. */ @Override @Deprecated @XmlElement(name = "facsimile") @Dependencies({"getNumber", "getNumberType"}) public final Collection<String> getFacsimiles() { return new LegacyTelephones(getOwner(), UnsupportedCodeList.FACSIMILE); }
/** * Adds a new telephone number. As a special case if the first element is empty, then the telephone number * will be set in that element. We test only the first element because {@link DefaultTelephone#getOwner()} * initialize new collections as collection containing {@code DefaultTelephone.this}. * * @param value the telephone number to add. * @return {@code true} if the element has been added. */ @Override public boolean add(final String value) { // Null value happen with empty XML elements like <gco:CharacterString/> if (value == null || value.isEmpty()) { return false; } final Iterator<Telephone> it = elements.iterator(); if (it.hasNext()) { final Telephone telephone = it.next(); if (telephone instanceof DefaultTelephone && ((DefaultTelephone) telephone).isEmpty()) { if (update(telephone, value)) { return true; } } } return elements.add(wrap(value)); } }
/** * Sets the telephone numbers by which individuals can speak to the responsible organization or individual. * This method writes in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact that own * this phone is known. * * @param newValues the new telephone numbers, or {@code null} if none. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #setNumber(String) number} * code {@code TelephoneType.VOICE}. */ @Deprecated public void setVoices(final Collection<? extends String> newValues) { ((LegacyTelephones) getVoices()).setValues(newValues); }
/** * Returns the telephone numbers by which individuals can speak to the responsible organization or individual. * This method searches in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact that own * this phone is known. * * @return telephone numbers by which individuals can speak to the responsible organization or individual. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #getNumber() number} * with {@code TelephoneType.VOICE}. */ @Override @Deprecated @Dependencies({"getNumber", "getNumberType"}) @XmlElement(name = "voice", namespace = LegacyNamespaces.GMD) public final Collection<String> getVoices() { if (FilterByVersion.LEGACY_METADATA.accept()) { return new LegacyTelephones(getOwner(), UnsupportedCodeList.VOICE); } return null; }
/** * Sets the telephone numbers by which individuals can speak to the responsible organization or individual. * This method writes in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact that own * this phone is known. * * @param newValues the new telephone numbers, or {@code null} if none. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #setNumber(String) number} * code {@code TelephoneType.VOICE}. */ @Deprecated public void setVoices(final Collection<? extends String> newValues) { ((LegacyTelephones) getVoices()).setValues(newValues); }
/** * Returns the telephone numbers of a facsimile machine for the responsible organization or individual. * This method searches in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact * that own this phone is known. * * @return telephone numbers of a facsimile machine for the responsible organization or individual. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #getNumber() number} * code {@code TelephoneType.FACSIMILE}. */ @Override @Deprecated @Dependencies({"getNumber", "getNumberType"}) @XmlElement(name = "facsimile", namespace = LegacyNamespaces.GMD) public final Collection<String> getFacsimiles() { if (FilterByVersion.LEGACY_METADATA.accept()) { return new LegacyTelephones(getOwner(), UnsupportedCodeList.FACSIMILE); } return null; // Marshalling newer ISO 19115-3 document. }
/** * Sets the telephone number of a facsimile machine for the responsible organization or individual. * This method writes in the {@linkplain DefaultContact#getPhones() contact phones}, if the contact * that own this phone is known. * * @param newValues the new telephone number, or {@code null} if none. * * @deprecated As of ISO 19115:2014, replaced by a {@linkplain #setNumber(String) number} * with {@code TelephoneType.FACSIMILE}. */ @Deprecated public void setFacsimiles(final Collection<? extends String> newValues) { ((LegacyTelephones) getFacsimiles()).setValues(newValues); } }