org.opengis.util
Interface Record


@UML(identifier="Record",
     specification=ISO_19103)
public interface Record

A list of logically related elements as (name, value) pairs in a dictionary. A record may be used as an implementation representation for features.

This class can be think as the equivalent of the Java Object class.

Since:
GeoAPI 2.1
See Also:
RecordType

Method Summary
 Map<MemberName,Object> getAttributes()
          Returns the dictionary of all (name, value) pairs in this record.
 RecordType getRecordType()
          Returns the type definition of record.
 Object locate(MemberName name)
          Returns the value for an attribute of the specified name.
 void set(MemberName name, Object value)
          Set the value for the attribute of the specified name.
 

Method Detail

getRecordType

@UML(identifier="recordType",
     obligation=OPTIONAL,
     specification=ISO_19103)
RecordType getRecordType()
Returns the type definition of record. All attributes named in this record must be defined in the returned record type. In other words, the following relationship must holds:

This method can be think as the equivalent of the Java Object.getClass() method.


getAttributes

@UML(identifier="attributes",
     obligation=MANDATORY,
     specification=ISO_19103)
Map<MemberName,Object> getAttributes()
Returns the dictionary of all (name, value) pairs in this record. The returned map shall not allows key addition. It may allows the replacement of existing keys only.

See Also:
RecordType.getAttributeTypes()

locate

@UML(identifier="locate",
     obligation=MANDATORY,
     specification=ISO_19103)
Object locate(MemberName name)
Returns the value for an attribute of the specified name. This is functionnaly equivalent to getAttributes().get(name). The type of the returned object is given by getRecordType().locate(name).

See Also:
RecordType.locate(org.opengis.util.MemberName)

set

@Extension
void set(MemberName name,
                   Object value)
         throws UnsupportedOperationException
Set the value for the attribute of the specified name. This is functionally equivalent to getAttributes().put(name,value). Remind that name keys are constrained to record type members only.

Parameters:
name - The name of the attribute to modify.
value - The new value for the attribute.
Throws:
UnsupportedOperationException - if this record is not modifiable.


Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.