Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

SMILA/Project Concepts/Record Filter Concept

Record Filter Specification


Record filtering can be useful in different parts of the system

Therefore it should be provided as a generic functionality of the data model. Then we can

  • provide a set of named record filter definition in a central place.
  • refer to the names of record filters to be used in router and workflow engine configurations.
  • both use the common code to actually do the filtering


Technical Proposal

An initial record filter definition could consist of the following parts:

  • Name: Unique name of the filter for reference in using components (Router or workflow engine configuration)
  • List of attribute names: attributes to be kept in the filtered object. Additionaly a flag could determine if annotations are to be copied, too. In an initial implementtation it would be sufficient to have only top-level attributes here which means that the whole attribute tree with this name would be copied to the filtered object. It could be extended later to support attribute paths to specify filtering of sub-objects only.
  • List of annotation names: names of top level annotations of the record to be kept in filtered objects.


  <Filter name="example">
    <Attribute name="Mimetype"/>
    <Attribute name="Filesize"/>
    <Attribute name="Keywords" keepAnnotations="true"/> <!-- default is false -->
    <Annotation name="action"/>
  <!-- more filters -->

Using "*" as a wildcard for "all names" could ease definition of a filter that copies all attributes or annotations:

  <Filter name="all-attributes-no-anntations">
    <Attribute name="*"/>
  <Filter name="top-level-annotations-only">
    <Annotation name="*"/>

The Record Filter function is

Record filter(Record completeRecord)

We could also provide the RecordFilter as a service (to discuss).

Record filter(String filterName, Record completeRecord)

In each case the function would create a copy of the record containing only those attributes and annotations described by the filter definition.

Back to the top