Class MetacardTypeImpl

java.lang.Object
ddf.catalog.data.impl.MetacardTypeImpl
All Implemented Interfaces:
ddf.catalog.data.MetacardType, Serializable
Direct Known Subclasses:
QualifiedMetacardTypeImpl

public class MetacardTypeImpl extends Object implements ddf.catalog.data.MetacardType
Default implementation of the MetacardType, used by MetacardImpl to create the MetacardImpl.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.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The name of this MetacardTypeImpl

    Fields inherited from interface ddf.catalog.data.MetacardType

    DEFAULT_METACARD_TYPE_NAME, METACARD_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    MetacardTypeImpl(String name, ddf.catalog.data.MetacardType metacardType, Set<ddf.catalog.data.AttributeDescriptor> additionalDescriptors)
    Creates a MetacardTypeImpl with the provided name, MetacardType, and set of additional AttributeDescriptors.
    MetacardTypeImpl(String name, List<ddf.catalog.data.MetacardType> metacardTypes)
    Creates a MetacardTypeImpl with the provided name and MetacardTypes.
    MetacardTypeImpl(String name, Set<ddf.catalog.data.AttributeDescriptor> descriptors)
    Creates a MetacardTypeImpl with the provided name and AttributeDescriptors.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<ddf.catalog.data.AttributeDescriptor>
    add(ddf.catalog.data.AttributeDescriptor descriptor)
     
    Set<ddf.catalog.data.AttributeDescriptor>
    addAll(Set<ddf.catalog.data.AttributeDescriptor> descriptors)
     
    boolean
     
    ddf.catalog.data.AttributeDescriptor
     
    Set<ddf.catalog.data.AttributeDescriptor>
     
     
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      protected String name
      The name of this MetacardTypeImpl
  • Constructor Details

    • MetacardTypeImpl

      public MetacardTypeImpl(String name, Set<ddf.catalog.data.AttributeDescriptor> descriptors)
      Creates a MetacardTypeImpl with the provided name and AttributeDescriptors.
      Parameters:
      name - the name of this MetacardTypeImpl
      descriptors - the set of descriptors for this MetacardTypeImpl
    • MetacardTypeImpl

      public MetacardTypeImpl(String name, ddf.catalog.data.MetacardType metacardType, Set<ddf.catalog.data.AttributeDescriptor> additionalDescriptors)
      Creates a 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.

      Parameters:
      name - the name of this MetacardTypeImpl
      metacardType - the base MetacardType, cannot be null
      additionalDescriptors - the descriptors to add to this MetacardTypeImpl in addition to the descriptors in metacardType, cannot be null or empty
      Throws:
      IllegalArgumentException - if metacardType or additionalDescriptors is null, or if additionalDescriptors is empty
    • MetacardTypeImpl

      public MetacardTypeImpl(String name, List<ddf.catalog.data.MetacardType> metacardTypes)
      Creates a MetacardTypeImpl with the provided name and MetacardTypes.
      Parameters:
      name - the name of this MetacardTypeImpl
      metacardTypes - the set of MetacardTypes to compose this MetacardTypeImpl
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface ddf.catalog.data.MetacardType
    • getAttributeDescriptors

      public Set<ddf.catalog.data.AttributeDescriptor> getAttributeDescriptors()
      Specified by:
      getAttributeDescriptors in interface ddf.catalog.data.MetacardType
    • getAttributeDescriptor

      public ddf.catalog.data.AttributeDescriptor getAttributeDescriptor(String attributeName)
      Specified by:
      getAttributeDescriptor in interface ddf.catalog.data.MetacardType
    • addAll

      public Set<ddf.catalog.data.AttributeDescriptor> addAll(Set<ddf.catalog.data.AttributeDescriptor> descriptors)
    • add

      public Set<ddf.catalog.data.AttributeDescriptor> add(ddf.catalog.data.AttributeDescriptor descriptor)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object