public class MetacardTypeImpl extends Object implements MetacardType
MetacardType, used by BasicTypes to create the
BasicTypes.BASIC_METACARD.
This class is Serializable and care should be taken with compatibility if
changes are made.
For what constitutes a compatible change in serialization, see Sun's Guidelines.
| Modifier and Type | Field and Description |
|---|---|
protected Set<AttributeDescriptor> |
descriptors
Set of
AttributeDescriptors |
protected String |
name
The name of this
MetacardTypeImpl |
DEFAULT_METACARD_TYPE_NAME| Constructor and Description |
|---|
MetacardTypeImpl(String name,
List<MetacardType> metacardTypes)
|
MetacardTypeImpl(String name,
MetacardType metacardType,
Set<AttributeDescriptor> additionalDescriptors)
Creates a
MetacardTypeImpl with the provided name, MetacardType, and set of
additional AttributeDescriptors. |
MetacardTypeImpl(String name,
Set<AttributeDescriptor> descriptors)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
AttributeDescriptor |
getAttributeDescriptor(String attributeName)
Get the
AttributeDescriptor for a particular Attribute name. |
Set<AttributeDescriptor> |
getAttributeDescriptors()
|
String |
getName()
Gets the name of this
MetacardType. |
int |
hashCode() |
protected transient Set<AttributeDescriptor> descriptors
AttributeDescriptorsprotected String name
MetacardTypeImplpublic MetacardTypeImpl(String name, Set<AttributeDescriptor> descriptors)
name - the name of this MetacardTypeImpldescriptors - the set of descriptors for this MetacardTypeImplpublic MetacardTypeImpl(String name, MetacardType metacardType, Set<AttributeDescriptor> additionalDescriptors)
MetacardTypeImpl with the provided name, MetacardType, and set of
additional AttributeDescriptors.
additionalDescriptors and the descriptors in metacardType will be combined
to form the set of descriptors for this MetacardTypeImpl.
Essentially, this is a convenience constructor for creating a new MetacardTypeImpl
that extends an existing MetacardType.
name - the name of this MetacardTypeImplmetacardType - the base MetacardType, cannot be nulladditionalDescriptors - the descriptors to add to this MetacardTypeImpl in
addition to the descriptors in metacardType, cannot be null or emptyIllegalArgumentException - if metacardType or additionalDescriptors is
null, or if additionalDescriptors is emptypublic MetacardTypeImpl(String name, List<MetacardType> metacardTypes)
name - the name of this MetacardTypeImplmetacardTypes - the set of MetacardTypes to compose this MetacardTypeImplpublic String getName()
MetacardTypeMetacardType. A MetacardType name must be unique. Two separate
MetacardType objects that do not have the same set of AttributeDescriptors should not have the
same name.getName in interface MetacardTypeMetacardType, default is MetacardType.DEFAULT_METACARD_TYPE_NAME;public Set<AttributeDescriptor> getAttributeDescriptors()
MetacardTypegetAttributeDescriptors in interface MetacardTypeCollections.unmodifiableSet(Set)public AttributeDescriptor getAttributeDescriptor(String attributeName)
MetacardTypeAttributeDescriptor for a particular Attribute name.getAttributeDescriptor in interface MetacardTypeAttributeDescriptor, null if not found.This work is licensed under a Creative Commons Attribution 4.0 International License.