Class AnnotationTypeCategory

All Implemented Interfaces:
AccessControlled, Identifiable, Nameable, Ownable, Registered, Removable, Shareable

public class AnnotationTypeCategory extends CommonItem implements Registered
Objects of this class defines an annotation type category. The categories are used to group related AnnotationType:s.

An annotation type can belong to more than one category.

Version:
2.0
Author:
Dominic Oyeniran
See Also:
Last modified
$Date: 2006-05-11 (Thu, 11 May 2006) $
  • Field Details

  • Constructor Details

  • Method Details

    • getNew

      public static AnnotationTypeCategory getNew(DbControl dc) throws BaseException
      Creates a new AnnotationTypeCategory item.
      Parameters:
      dc - The DbControl which will be used for permission checking and database access
      Returns:
      The new AnnotationType item
      Throws:
      BaseException - If there is an error
    • getById

      Get an AnnotationTypeCategory item when you know the id.
      Parameters:
      dc - The DbControl which will be used for permission checking and database access
      id - The id of the item to load
      Returns:
      The AnnotationTypeCategory item
      Throws:
      ItemNotFoundException - If an item with the specified id is not found
      PermissionDeniedException - If the logged in user doesn't have Permission.READ permission to the item
      BaseException - If there is another error
    • getQuery

      public static ItemQuery<AnnotationTypeCategory> getQuery()
      Get a ItemQuery object configured to retrieve AnnotationTypeCategory items.
      Returns:
      An ItemQuery object
    • getData

      Description copied from class: BasicItem
      Get the BasicData object that holds all data for this item.
      Overrides:
      getData in class CommonItem
    • getType

      public Item getType()
      Description copied from interface: Identifiable
      Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.
      Specified by:
      getType in interface Identifiable
      Returns:
      A value indicating the type of item
    • getEntryDate

      public Date getEntryDate()
      Description copied from interface: Registered
      Get the date that the item was registered in the database.
      Specified by:
      getEntryDate in interface Registered
      Returns:
      A date or null if this is not known
    • setEntryDate

      public void setEntryDate(Date entryDate)
      Description copied from interface: Registered
      Set the date the entry was registered in the database. Implementations should only allow this property to be set before the item is first stored in the database. The intention of this method is to facilitate export/import of data between server.
      Specified by:
      setEntryDate in interface Registered
      Parameters:
      entryDate - A date or null to use today's date
    • getShortName

      public String getShortName()
      A short name can be used in some places instead of the normal name.
      Since:
      3.20
    • setShortName

      public void setShortName(String shortName)
      Set the short name.
      Since:
      3.20
    • getItemSubtype

      public ItemSubtype getItemSubtype()
      Get the item subtype that is linked to this category of annotations.
      Since:
      3.20
    • setItemSubtype

      public void setItemSubtype(ItemSubtype subtype)
      Set the item subtype that is linked to this category of annotations.
      Since:
      3.20
    • getSubCategoriesAnnotationType

      public AnnotationType getSubCategoriesAnnotationType()
      Short-cut for calling getItemSubtype().getSubCategoriesAnnotationType().
      Since:
      3.20
    • getSubCategoriesValueType

      public Type getSubCategoriesValueType()
      Short-cut for calling getSubCategoriesAnnotationType().getValueType()
      Since:
      3.20
    • getSubCategoriesEnumeration

      public <T> List<T> getSubCategoriesEnumeration()
      Short-cut for calling getSubCategoriesAnnotationType().getValues()
      Since:
      3.20
    • getSubCategoryValues

      public <T> List<T> getSubCategoryValues() throws BaseException
      Get the list of values that are used to match this category.
      Throws:
      BaseException
      Since:
      3.20
    • setSubCategoryValues

      public void setSubCategoryValues(List<?> values) throws PermissionDeniedException, InvalidDataException
      Set the list of values that should be used to match sub-categories. The list of values must be taken from the annotation type that is used as the sub-category annotation type on the associated item subtype.
      Throws:
      PermissionDeniedException
      InvalidDataException
      Since:
      3.20
      See Also:
    • getAnnotationTypes

      public ItemQuery<AnnotationType> getAnnotationTypes(Item itemType)
      Gets a query that returns the annotation types that are members of this category
      Parameters:
      itemType - Optional, limit the annotation types to those that are enabled for the specified item
      Returns:
      An ItemQuery object
    • isInCategory

      public boolean isInCategory(AnnotationType at)
      Checks if the given annotation type is a member in this category.
      Since:
      3.20