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
AttributeDescriptor s |
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
AttributeDescriptor
sprotected String name
MetacardTypeImpl
public MetacardTypeImpl(String name, Set<AttributeDescriptor> descriptors)
name
- the name of this MetacardTypeImpl
descriptors
- the set of descriptors for this MetacardTypeImpl
public 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 MetacardTypeImpl
metacardType
- 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 MetacardTypeImpl
metacardTypes
- the set of MetacardType
s to compose this MetacardTypeImpl
public String getName()
MetacardType
MetacardType
. 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 MetacardType
MetacardType
, default is MetacardType.DEFAULT_METACARD_TYPE_NAME
;public Set<AttributeDescriptor> getAttributeDescriptors()
MetacardType
getAttributeDescriptors
in interface MetacardType
Collections.unmodifiableSet(Set)
public AttributeDescriptor getAttributeDescriptor(String attributeName)
MetacardType
AttributeDescriptor
for a particular Attribute
name.getAttributeDescriptor
in interface MetacardType
AttributeDescriptor
, null
if not found.This work is licensed under a Creative Commons Attribution 4.0 International License.