Interface Schema

  • All Superinterfaces:
    All Known Implementing Classes:
    GCOSchema, GMDSchema, GMLSchema, GMLSchema, GMLSchema, GMXSchema, GSRSchema, GSSSchema, GTSSchema, ProfileImpl, SchemaImpl, SimpleSchema, SMIL20LANGSchema, SMIL20Schema, XLINKSchema, XSSchema

    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( "", "PointType" ), ... );
       AttributeType lineStringType =
         new AttributeTypeImpl( new NameImpl( "", "LineStringType" ), ... );
       AttributeType polygonType =
         new AttributeTypeImpl( new NameImpl( "", "PolygonType" ), ... );
       //create a schema
       Schema schema = new SchemaImpl( "" );
       //add types to the schema
       schema.add( pointType );
       schema.add( lineStringType );
       schema.add( polygonType );

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

    Jody Garnett, Refractions Research, Inc., Justin Deoliveira, The Open Planning Project
    • Method Detail

      • getURI

        String getURI()
        The uri of the schema.

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

        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).

        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.

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