|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Schema
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 |
|---|
String getURI()
This method is a convenience for keySet().getURI().
void add(AttributeType type)
This method is a convenience for put(type.getName(),type).
type - The type to add.Schema profile(Set<Name> profile)
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.
profile - The set of names which corresond to entries that will make
up the profile.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||