public class DefaultTelephone extends ISOMetadata implements Telephone
Contact
had only one Telephone
instance, but that instance
could have an arbitrary amount of "voice" and "facsimile" numbers. The methods (now deprecated) were
DefaultContact.getPhone()
, getVoices()
and getFacsimiles()
.Contact
has an arbitrary amount of Telephone
instances, and
each telephone has exactly one number. The new methods are DefaultContact.getPhones()
,
getNumber()
and getNumberType()
.XML
instead.DefaultContact.getPhones()
,
Serialized FormDefined in the sis-metadata
module
identifiers, LOGGER
Constructor and Description |
---|
DefaultTelephone()
Constructs a default telephone.
|
DefaultTelephone(Telephone object)
Constructs a new instance initialized with the values from the specified metadata object.
|
Modifier and Type | Method and Description |
---|---|
static DefaultTelephone |
castOrCopy(Telephone object)
Returns a SIS metadata implementation with the values of the given arbitrary implementation.
|
Collection<String> |
getFacsimiles()
Deprecated.
As of ISO 19115:2014, replaced by a number
with
TelephoneType#FACSIMILE . |
String |
getNumber()
Returns the telephone number by which individuals can contact responsible organization or individual.
|
CodeList<?> |
getNumberType()
Returns the type of telephone number, or
null if none. |
Collection<String> |
getVoices()
Deprecated.
As of ISO 19115:2014, replaced by a number
with
TelephoneType#VOICE . |
void |
setFacsimiles(Collection<? extends String> newValues)
Deprecated.
As of ISO 19115:2014, replaced by a number
with
TelephoneType#FACSIMILE . |
void |
setNumber(String newValue)
Sets the telephone number by which individuals can contact responsible organization or individual.
|
void |
setNumberType(CodeList<?> newValue)
Sets the type of telephone number.
|
void |
setVoices(Collection<? extends String> newValues)
Deprecated.
As of ISO 19115:2014, replaced by a number
with
TelephoneType#VOICE . |
getIdentifierMap, getIdentifiers, getStandard
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullSet, singleton, unmodifiable, writeCollection, writeList, writeSet
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
public DefaultTelephone()
public DefaultTelephone(Telephone object)
object
- The metadata to copy values from, or null
if none.castOrCopy(Telephone)
public static DefaultTelephone castOrCopy(Telephone object)
null
, then this method returns null
.DefaultTelephone
, then it is returned unchanged.DefaultTelephone
instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
metadata contained in the given object are not recursively copied.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public String getNumber()
public void setNumber(String newValue)
newValue
- The new telephone number by which individuals can contact responsible organization or individual.public CodeList<?> getNumberType()
null
if none.
If non-null, the type can be "VOICE"
, "FACSIMILE"
or "SMS"
.
TelephoneType
code list
when GeoAPI will provide it (tentatively in GeoAPI 3.1).
null
if none.public void setNumberType(CodeList<?> newValue)
"VOICE"
, "FACSIMILE"
or "SMS"
.
TelephoneType
code list when GeoAPI will provide it
(tentatively in GeoAPI 3.1). In the meantime, users can define their own code list class as below:
final class UnsupportedCodeList extends CodeList<UnsupportedCodeList> { private static final List<UnsupportedCodeList> VALUES = new ArrayList<UnsupportedCodeList>(); // Need to declare at least one code list element. public static final UnsupportedCodeList MY_CODE_LIST = new UnsupportedCodeList("MY_CODE_LIST"); private UnsupportedCodeList(String name) { super(name, VALUES); } public static UnsupportedCodeList valueOf(String code) { return valueOf(UnsupportedCodeList.class, code); } @Override public UnsupportedCodeList[] family() { synchronized (VALUES) { return VALUES.toArray(new UnsupportedCodeList[VALUES.size()]); } } }
newValue
- The new type of telephone number.@Deprecated public final Collection<String> getVoices()
TelephoneType#VOICE
.@Deprecated public void setVoices(Collection<? extends String> newValues)
TelephoneType#VOICE
.newValues
- The new telephone numbers, or null
if none.@Deprecated public final Collection<String> getFacsimiles()
TelephoneType#FACSIMILE
.getFacsimiles
in interface Telephone
@Deprecated public void setFacsimiles(Collection<? extends String> newValues)
TelephoneType#FACSIMILE
.newValues
- The new telephone number, or null
if none.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.