Class RelatedItemColumn.Specification

java.lang.Object
net.sf.basedb.clients.web.extensions.list.RelatedItemColumn.Specification
Enclosing class:
RelatedItemColumn

public static class RelatedItemColumn.Specification extends Object
Represents a specification for loading a related parent or child item. The general format is: /DIRECTION/ITEMTYPE/subtype-id/property where DIRECTION: PARENT or CHILD ITEMTYPE: Item.name() value for the related item subtype-id: Id of an ItemSubtype or a RawDataType. It can also include an extra filter on an annotation: subtype-id&annotationtype-id=value or item list: subtype-id&list=id property: a specification of what value to retrieve from the related item. It can have different formats: - #annotationtype-id: Id of an annotation type - !extension-id#action-id: Id of an extension and ListColumnAction to use for loading the value Otherwise it is interpreted as a property that is defined on the targeted instance.
Since:
3.19.4
  • Field Details

    • expression

      String expression
    • directionRaw

      String directionRaw
    • direction

    • allowDoublingBack

      boolean allowDoublingBack
    • sourceType

      Item sourceType
    • targetType

      Item targetType
    • subtype

      String subtype
    • subtypeName

      String subtypeName
    • filterAnnotationType

      String filterAnnotationType
    • filterAnnotationTypeName

      String filterAnnotationTypeName
    • filterAnnotationValue

      String filterAnnotationValue
    • filterItemList

      String filterItemList
    • filterItemListName

      String filterItemListName
    • property

      String property
    • annotationId

      int annotationId
    • extensionId

      String extensionId
    • actionId

      String actionId
    • multiHop

      boolean multiHop
  • Constructor Details

    • Specification

      public Specification()
  • Method Details

    • parse

      public static RelatedItemColumn.Specification parse(Item sourceType, String expression)
    • getExpression

      public String getExpression()
      Get the full expression that defines the targeted item and property.
    • getDirectionRaw

      public String getDirectionRaw()
      Get the raw value of the DIRECTION.
    • getDirection

      public SyncFilter.SourceItemTransform getDirection()
      Get the parsed value of the DIRECTION.
    • isDoublingBackAllowed

      public boolean isDoublingBackAllowed()
      Enabled on a multi-hop path if the path down to the related child from the parent item is allowed to traverse the same items as the path up from the source child item to the parent.
    • getSourceType

      public Item getSourceType()
      Get the source item type. This is not part of the expression, but is taken from the current list.
    • getTargetType

      public Item getTargetType()
      Get the target ITEMTYPE from the expression.
    • getSubtype

      public String getSubtype()
      Get the target subtype from the expression.
    • getSubtypeName

      public String getSubtypeName()
      Get the name of the targeted subtype. This may not always be available.
    • getProperty

      public String getProperty()
      Get the property from the expression.
    • getAnnotationId

      public int getAnnotationId()
      Get the annotation id from the expression. Only available if the property represents an annotation (it starts with '#').
    • getExtensionId

      public String getExtensionId()
      Get the extension id from the expression. Only available if the property represents an extension (it starts with '!').
    • getActionId

      public String getActionId()
      Get the action id from the expression. Only available if the property represents an extension (it starts with '!').
    • isMultiHop

      public boolean isMultiHop()
      If the property starts with a '/' it is a multi-hop specification. A multi-hop specification must be from child->parent->child and must not have more than two hops.
    • generateTitle

      public String generateTitle(String title)
      Generates a title using target item type and subtype as prefix.
    • generateExportTitle

      public String generateExportTitle(String title)
      Generates an export title using target item type and subtype as prefix.
    • generateSubtitle

      public String generateSubtitle()
    • generateTooltip

      public String generateTooltip(String tooltip)
      Generates a tooltip using target item type and subtype as prefix.
    • withPrefix

      private String withPrefix(String prefix, String s)
      Return prefix+string if string is not null or the empty string otherwise.
    • getItemSubtype

      public ItemSubtype getItemSubtype(DbControl dc)
    • getFilterAnnotationType

      public AnnotationType getFilterAnnotationType(DbControl dc)
    • getFilterItemList

      public ItemList getFilterItemList(DbControl dc)
    • getRawDataType

      public RawDataType getRawDataType()
    • createTargetTypeRestriction

      public Restriction createTargetTypeRestriction(DbControl dc)
    • createTargetTypeQuery

      public ItemQuery<?> createTargetTypeQuery(DbControl dc)