Custom properties are customizable metadata properties associated with Data resources in addition to the standard properties that LuciadFusion generates automatically. Custom properties are name-value pairs, with the name uniquely identifying the property and the value containing the information for that property. The value of a custom property can be of the types string, boolean, number, or date.
LuciadFusion can extract those properties when it’s crawling or uploading Data, or you can set them using the LuciadFusion Studio REST API. You can also retrieve properties set on the Data again using the REST API, and you can use them to query Data.
Extracting custom properties automatically
When data is added to LuciadFusion, either through crawling or through uploads, LuciadFusion generates metadata about that data, and makes it available as ISO 19115 metadata. LuciadFusion exposes some values inside that metadata as standard properties of a data resource. For instance, properties like title, type, abstract, keywords, bounds are available as properties on a data resource, but their origin is in the ISO metadata.
You add support for custom properties to LuciadFusion by plugging in a custom property decoder. When users add data to LuciadFusion, it uses that decoder to find and decode the custom properties for that data. LuciadFusion doesn’t provide a built-in custom property decoder, which means that it doesn’t decode custom properties of new data by default.
There are two main locations where a decoder can find custom properties:
-
In additional files located next to the main entry file of the data resource
-
In the ISO metadata of the data resource
Whether a decoder looks in the ISO metadata strongly depends on the configuration of the metadata decoders. When data is added to LuciadFusion, LuciadFusion also searches for metadata. LuciadFusion has built-in support for ISO 19139 XML metadata files, but you can add extra metadata decoders that support files with a proprietary metadata format. See the How to plug in your own metadata format article for more details on this subject. When LuciadFusion detects additional metadata files, they get decoded into ISO metadata.
How does this relate to custom properties? Assume a custom property is defined in a file located next to the data file.
-
If LuciadFusion detects that file as a metadata file, it gets decoded into ISO metadata and the custom property ends up in there. The location of the custom property in the ISO metadata tree depends on the metadata format and the metadata decoder. The custom property decoder can extract the custom property from this ISO metadata tree while decoding.
-
If LuciadFusion has no suitable metadata decoder for that file, a custom property decoder has to search and read that file by itself and extract the custom properties from it.
See the Extending LuciadFusion with custom properties tutorial for more information on how to create a custom property decoder for LuciadFusion.
Manage custom properties using the REST API
You can add, remove, or update custom properties using the REST API.
The PATCH /api/data/{id}
endpoint allows users to set the custom properties for a Data item.
The GET /api/data/{id}
endpoint allows users to obtain the custom properties for a Data item.
See the REST API Console and REST API documentation for more information on working with custom properties using the REST API. If a LuciadFusion instance is running, you can find these at http://localhost:8081/api/console and http://localhost:8081/api/documentation respectively.
The valid value ranges for numeric custom properties are listed below. The listed ranges are inclusive.
|
Querying data on custom properties using the REST API
It’s possible to query Data based on custom properties using the REST API.
To query Data, use the GET api/data/filter
REST API endpoint.
For more information on how to query Data and which operations are supported, see How to query data resources based on queryable properties.
See the REST API documentation for more information on all available REST APIs.
If a LuciadFusion instance is running, you can find the documentation at http://localhost:8081/api/documentation.