HomeGuides
Log In
Guides

Spazio Selectors and Filebox Metadata management

There are many different service tasks that operate on metadata classes and values. This is because usually the pattern, in Filebox, is:
Metadata classes are like groups, for each metadataclass known and stored in a Fileset, we can find one or more Key/Value pairs which are the proper metadata name and value.

Metadata classes are stored in Filebox as DB tables/Views where every column is the name of the metadata belonging to that class, and the value as the db value itself.

This behaviour is standard and is applied for the following known MetadataClasses:

  1. "Generic Metadata" [SPFB_FILE_GENERIC_MD]
  2. "eMail Metadata" [SPFB_MAIL_SYS_MD]
  3. "Ghibli System" [SPFB_FILES_SYS_METADATA]
  4. "Spazio2 file" [SPFB_SP2_FILE_SYS_MD]

But that is not the only existing behavior, so more Service Tasks are needed to manage stuff. For example, there is another well known MetadataClass:

"Spazio2 selector" [SPFB_SP2_SEL_SYS_MD]

which contains all Spazio2 selectors that are written on a Fileset if it has been transported using Spazio2.

These selectors are not standard, they are stored in a DB table/View, but we won't face a column for each Metadata, but columns have a pattern and each tuple contains the Metadata itself, so something more than just Key/Value pair.

File Service Registry - Get Metadata

This one operates in a way to let the user get a List of Key/Value pairs for all the elements stored in a Fileset once the desired MetadataClass is selected.

This task operates on the following Metadata Classes:

  1. "Generic Metadata" [SPFB_FILE_GENERIC_MD]
  2. "eMail Metadata" [SPFB_MAIL_SYS_MD]
  3. "Ghibli System" [SPFB_FILES_SYS_METADATA]
  4. "Spazio2 file" [SPFB_SP2_FILE_SYS_MD]

The operator in the flow designer will choose a class and a variable where results will be placed. If nothing more is specified, the resulting variable will be a list of MetaName/MetaValue pairs for all the elements present in that metadataclass.

If the operator decides that the flow will return a single value, the "SingleValue" property will be configured with a MetadataName and doing so the resulting variable will only contain the MetaValue, null if not present, for that specific MetaName.
NOTE: Ghibli System Metadataclass is improper too. Filebox's side it is not managed as a metadataclass because all its values are stored in the Fileset itself, it's just a trick to treat them as Metadata.

File Service Registry - Set Generic Metadata

This brick stores a Metadata Name and its specified value on a Fileset ONLY for the Generic Metadata Class [SPFB_FILE_GENERIC_MD].

Spazio2 - Insert Selector

This brick will be inizialized with a FilesetID like previouses and then with all the required fields to create a new selector. All the data must be filled in according to Sp2 standards for SEL_CODE possible known values (4100 - 500 - 2010) and so on.

  1. AREA_TYPE
  2. SEL_CODE
  3. SEL_TYPE
  4. SEL_LENGTH
  5. SEL_NAME
  6. SEL_VALUE

Refer to Sp2 official documentation for the possible values on real case scenarios.

Spazio2 - Get Selector

This brick will be inizialized with a FilesetID then because of Sp2 selectors aren't Key/Value pairs the user must also provide the desired Selector Code to obtain its value in the desired output variable.
Selector Code is a MANDATORY field, the brick won't provide a List in the output variable containing all the Selectors set onto the Fileset, just the value if existing, null otherwise.

Spazio2 - Update Selector

This brick will be inizialized with a FilesetID, and a Selector Code like the previous one. The next required information is the Selector Value that needs to be updated.



This Service Task is an update value one, it won't insert anything if there are no Selectors on the Fileset having the specified Selector Code. So, if no Selector exists, you must use the Insert Selector, not the Update.

Example of how the value of a Spazio Selector is read into a variable

In this example, we are reading a spazio selector value into a variable named "selector" [ Output variable ].
We have to choose a selector code [ Spazio2 Selector code ]: 6100 in this example.

836