|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@UML(identifier="RecordType",
specification=ISO_19103)
public interface RecordType
The type definition of a record. A RecordType defines dynamically
constructed data type. This interface has methods for data access, but no methods to dynamically
add members. This approach ensures that once a RecordType is constructed, it is immutable.
A RecordType is identified by a TypeName. It contains
an arbitrary amount of attribute types which are also identified
by TypeName. A RecordType may therefore contain another RecordType as a
member. This is a limited association because a named member may be defined to be a single
instance of some externally defined RecordType. This does not permit aggregation of any
kind.
This class can be think as the equivalent of the Java Class class.
Record,
RecordSchema| Method Summary | |
|---|---|
Map<MemberName,TypeName> |
getAttributeTypes()
Returns the dictionary of all (name, type) pairs in this record type. |
RecordSchema |
getContainer()
Returns the schema that contains this record type. |
Set<MemberName> |
getMembers()
Returns the set of attribute names defined in this RecordType's dictionary. |
TypeName |
getTypeName()
Returns the name that identifies this record type. |
boolean |
isInstance(Record record)
Determines if the specified record is compatible with this record type. |
TypeName |
locate(MemberName name)
Looks up the provided attribute name and returns the associated type name. |
| Method Detail |
|---|
@UML(identifier="typeName",
obligation=MANDATORY,
specification=ISO_19103)
TypeName getTypeName()
RecordType is contained in a record schema,
then the record type name should be a valid in the name space
of the record schema:
getContainer().getSchemaName().scope()
This method can be think as the equivalent of the Java Class.getName() method.
@UML(identifier="container",
obligation=OPTIONAL,
specification=ISO_19103)
RecordSchema getContainer()
@UML(identifier="attributeTypes",
obligation=MANDATORY,
specification=ISO_19103)
Map<MemberName,TypeName> getAttributeTypes()
Record.getAttributes()@Extension Set<MemberName> getMembers()
RecordType's dictionary.
If there are no attributes, this method returns the empty set. This method is functionally
equivalent to getAttributeTypes().keySet().
The name space associated with a RecordType contains only
members of this RecordType. There is no potential for conflict with subpackages.
This method can be think as the equivalent of the Java Class.getFields() method.
@UML(identifier="locate",
obligation=MANDATORY,
specification=ISO_19103)
TypeName locate(MemberName name)
null. This method is functionnaly
equivalent to getAttributeTypes().get(name).
This method can be think as the equivalent of the Java Class.getField(String) method.
Record.locate(org.opengis.util.MemberName)MemberName.getAttributeType() already provides
this information?@Extension boolean isInstance(Record record)
true if the specified record argument is non-null and the following condition
holds:
getMembers().containsAll(record.getAttributes().keySet())
This method can be think as the equivalent of the Java Class.isInstance(Object) method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||