Skip to content

Commit

Permalink
chore: migrate asset properties to temporary names conforming to json…
Browse files Browse the repository at this point in the history
…ld (#443)
  • Loading branch information
richardtreier authored Aug 22, 2023
1 parent bcd5d4c commit 6360d9e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
53 changes: 26 additions & 27 deletions src/app/core/services/asset-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,60 @@
* SSOT for asset property string names
*/

const edc = 'https://w3id.org/edc/v0.0.1/ns/';
const sovity = 'https://edc.jsonld.sovity.io/ns/';
const mds = 'http://w3id.org/mds#';

export const AssetProperties = {
// edc asset properties
id: 'asset:prop:id', // needs to start with urn:artifact:
name: 'asset:prop:name',
contentType: 'asset:prop:contenttype',
originator: 'asset:prop:originator',
originatorOrganization: 'asset:prop:originatorOrganization',
description: 'asset:prop:description',
version: 'asset:prop:version',
id: `${edc}id`,
name: `${sovity}name`,
contentType: `${sovity}contenttype`,
originator: `${sovity}originator`,
originatorOrganization: `${sovity}originatorOrganization`,
description: `${sovity}description`,
version: `${sovity}version`,

// our asset properties
keywords: 'asset:prop:keywords',
curatorOrganizationName: 'asset:prop:curatorOrganizationName',
language: 'asset:prop:language',
publisher: 'asset:prop:publisher',
standardLicense: 'asset:prop:standardLicense',
endpointDocumentation: 'asset:prop:endpointDocumentation',
keywords: `${sovity}keywords`,
curatorOrganizationName: `${sovity}curatorOrganizationName`,
language: `${sovity}language`,
publisher: `${sovity}publisher`,
standardLicense: `${sovity}standardLicense`,
endpointDocumentation: `${sovity}endpointDocumentation`,

// mds specific asset properties
dataCategory: 'http://w3id.org/mds#dataCategory',
dataSubcategory: 'http://w3id.org/mds#dataSubcategory',
dataModel: 'http://w3id.org/mds#dataModel',
geoReferenceMethod: 'http://w3id.org/mds#geoReferenceMethod',
transportMode: 'http://w3id.org/mds#transportMode',
dataCategory: `${mds}dataCategory`,
dataSubcategory: `${mds}dataSubcategory`,
dataModel: `${mds}dataModel`,
geoReferenceMethod: `${mds}geoReferenceMethod`,
transportMode: `${mds}transportMode`,

/**
* Whether this asset supports HTTP Method parameterization
*
* Example values: "true", "false"
*/
httpProxyMethod: 'asset:prop:datasource:http:hints:proxyMethod',
httpProxyMethod: `${sovity}datasource:http:hints:proxyMethod`,

/**
* Whether this asset supports HTTP Path parameterization
*
* Example values: "true", "false"
*/
httpProxyPath: 'asset:prop:datasource:http:hints:proxyPath',
httpProxyPath: `${sovity}datasource:http:hints:proxyPath`,

/**
* Whether this asset supports HTTP Query Param parameterization
*
* Example values: "true", "false"
*/
httpProxyQueryParams: 'asset:prop:datasource:http:hints:proxyQueryParams',
httpProxyQueryParams: `${sovity}datasource:http:hints:proxyQueryParams`,

/**
* Whether this asset supports HTTP Body parameterization
*
* Example values: "true", "false"
*/
httpProxyBody: 'asset:prop:datasource:http:hints:proxyBody',

/**
* @deprecated use {@link AssetProperties.curatorOrganizationName} instead
*/
_legacyCuratorOrganizationName: 'asset:prop:originatorOrganization',
httpProxyBody: `${sovity}datasource:http:hints:proxyBody`,
};
1 change: 0 additions & 1 deletion src/app/core/services/asset-property-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export class AssetPropertyMapper {
originator: opts?.connectorEndpoint ?? props[AssetProperties.originator],
originatorOrganization:
props[AssetProperties.curatorOrganizationName] ??
props[AssetProperties._legacyCuratorOrganizationName] ??
'Unknown Organization',
keywords,
description: props[AssetProperties.description],
Expand Down

0 comments on commit 6360d9e

Please sign in to comment.