Package org.geotools.feature.type
Class ProfileImpl
- Object
-
- ProfileImpl
-
- All Implemented Interfaces:
Map<Name,AttributeType>,Schema
public class ProfileImpl extends Object implements Schema
A "sub" Schema used to select types for a specific use.This class uses a custom key set to subset a parent Schema, and is used as the return type of
SchemaImpl.profile.This Schema is not mutable, serving only as a view, you may however define a more specific subset if needed.
Schema is often used to place limitation on expressed content (as in the case of the GML Level 0 Profile), or used to define a non conflicting set of "bindings" for the TypeBuilder(s).
- Author:
- Jody Garnett, Refractions Research Inc.
-
-
Constructor Summary
Constructors Constructor Description ProfileImpl(Schema parent, Set<Name> profile)Subset parent schema with profile keys.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(AttributeType type)Adds a type to the schema.voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<Name,AttributeType>>entrySet()AttributeTypeget(Object key)StringgetURI()The uri of the schema.booleanisEmpty()Set<Name>keySet()Schemaprofile(Set<Name> profile)Profiles the schema, creating a new schema in the process.AttributeTypeput(Name key, AttributeType value)voidputAll(Map<? extends Name,? extends AttributeType> t)AttributeTyperemove(Object key)intsize()Collection<AttributeType>values()-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
getURI
public String getURI()
Description copied from interface:SchemaThe uri of the schema.This method is a convenience for
keySet().getURI().
-
profile
public Schema profile(Set<Name> profile)
Description copied from interface:SchemaProfiles 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.
-
size
public int size()
- Specified by:
sizein interfaceMap<Name,AttributeType>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceMap<Name,AttributeType>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<Name,AttributeType>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<Name,AttributeType>
-
get
public AttributeType get(Object key)
- Specified by:
getin interfaceMap<Name,AttributeType>
-
put
public AttributeType put(Name key, AttributeType value)
- Specified by:
putin interfaceMap<Name,AttributeType>
-
remove
public AttributeType remove(Object key)
- Specified by:
removein interfaceMap<Name,AttributeType>
-
putAll
public void putAll(Map<? extends Name,? extends AttributeType> t)
- Specified by:
putAllin interfaceMap<Name,AttributeType>
-
clear
public void clear()
- Specified by:
clearin interfaceMap<Name,AttributeType>
-
add
public void add(AttributeType type)
Description copied from interface:SchemaAdds a type to the schema.This method is a convenience for
put(type.getName(),type).
-
values
public Collection<AttributeType> values()
- Specified by:
valuesin interfaceMap<Name,AttributeType>
-
entrySet
public Set<Map.Entry<Name,AttributeType>> entrySet()
- Specified by:
entrySetin interfaceMap<Name,AttributeType>
-
-