|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.util.RecordTypeImpl
public class RecordTypeImpl
The type definition of a record. Used to provide a record of data type (in a manner similar to a strongly typed Map).
Please note that a record is strongly typed (and may be better thought
of as a mathematical tuple). The "keys" are strictly controlled "MemberName
s"
and are usually defined in the context of a schema.
Constructor Summary | |
---|---|
RecordTypeImpl(org.opengis.util.RecordSchema parent,
org.opengis.util.TypeName typeName,
java.util.Collection<org.opengis.util.MemberName> members)
Creates a record with all attribute types specified. |
|
RecordTypeImpl(org.opengis.util.RecordSchema parent,
org.opengis.util.TypeName typeName,
java.util.Map<org.opengis.util.MemberName,org.opengis.util.TypeName> attributeTypes)
Creates a record with all attribute types specified. |
Method Summary | |
---|---|
java.util.Map<org.opengis.util.MemberName,org.opengis.util.TypeName> |
getAttributeTypes()
Returns the unmodifiable dictionary of all (name, type) pairs in this record type. |
org.opengis.util.RecordSchema |
getContainer()
Returns the schema that contains this record type. |
java.util.Set<org.opengis.util.MemberName> |
getMembers()
Returns the set of attribute names defined in this RecordType 's dictionary. |
org.opengis.util.TypeName |
getTypeName()
Returns the name that identifies this record type. |
boolean |
isInstance(org.opengis.util.Record record)
Determines if the specified record is compatible with this record type. |
org.opengis.util.TypeName |
locate(org.opengis.util.MemberName memberName)
Looks up the provided attribute name and returns the associated type name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RecordTypeImpl(org.opengis.util.RecordSchema parent, org.opengis.util.TypeName typeName, java.util.Collection<org.opengis.util.MemberName> members)
parent
- The schema that contains this record type.typeName
- The name that identifies this record type.members
- The name of the members to be included in this record type.public RecordTypeImpl(org.opengis.util.RecordSchema parent, org.opengis.util.TypeName typeName, java.util.Map<org.opengis.util.MemberName,org.opengis.util.TypeName> attributeTypes)
parent
- The schema that contains this record type.typeName
- The name that identifies this record type.attributeTypes
- Method Detail |
---|
public org.opengis.util.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()
getTypeName
in interface org.opengis.util.RecordType
public org.opengis.util.RecordSchema getContainer()
getContainer
in interface org.opengis.util.RecordType
public java.util.Map<org.opengis.util.MemberName,org.opengis.util.TypeName> getAttributeTypes()
getAttributeTypes
in interface org.opengis.util.RecordType
public java.util.Set<org.opengis.util.MemberName> getMembers()
RecordType
's dictionary.
If there are no attributes, this method returns the empty set. This method is functionally
equivalent to getAttributeTypes().keySet()
.
getMembers
in interface org.opengis.util.RecordType
public org.opengis.util.TypeName locate(org.opengis.util.MemberName memberName)
null
. This method
is functionnaly equivalent to
getAttributeTypes().get(name)
.
locate
in interface org.opengis.util.RecordType
public boolean isInstance(org.opengis.util.Record record)
true
if the specified record
argument is non-null and the following condition
holds:
getMembers().containsAll(record.getAttributes().keySet())
isInstance
in interface org.opengis.util.RecordType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |