org.opengis.feature.type
Interface Schema

Show UML class diagram
All Superinterfaces:
Map<Name,AttributeType>

public interface Schema
extends Map<Name,AttributeType>

A collection of AttributeType.

A schema is organized as a map of Name to AttributeType. In each name,type tuple, the name matches the name of the type.

   //create some attribute types
   AttributeType pointType =
     new AttributeTypeImpl( new NameImpl( "http://www.opengis.net/gml", "PointType" ), ... );
   AttributeType lineStringType =
     new AttributeTypeImpl( new NameImpl( "http://www.opengis.net/gml", "LineStringType" ), ... );
   AttributeType polygonType =
     new AttributeTypeImpl( new NameImpl( "http://www.opengis.net/gml", "PolygonType" ), ... );

   //create a schema
   Schema schema = new SchemaImpl( "http://www.opengis.net/gml" );

   //add types to the schema
   schema.add( pointType );
   schema.add( lineStringType );
   schema.add( polygonType );
 

The intention of a schema is to provide a reusable set of attribute types. These types are used when building attribute instances.


Nested Class Summary
 
Nested classes/interfaces inherited from interface Map
Map.Entry<K,V>
 
Method Summary
 void add(AttributeType type)
          Adds a type to the schema.
 String getURI()
          The uri of the schema.
 Schema profile(Set<Name> profile)
          Profiles the schema, creating a new schema in the process.
 
Methods inherited from interface Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getURI

String getURI()
The uri of the schema.

This method is a convenience for keySet().getURI().

Returns:
The uri of the schema.

add

void add(AttributeType type)
Adds a type to the schema.

This method is a convenience for put(type.getName(),type).

Parameters:
type - The type to add.

profile

Schema profile(Set<Name> profile)
Profiles the schema, creating a new schema in the process.

A profile of a schema is a subset of the schema, and it also a schema itself.

Used to select a subset of types for a specific application. Profiles often are used to express limitiations of a source of data.

Parameters:
profile - The set of names which corresond to entries that will make up the profile.
Returns:
The profile of the original schema.


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