Skip to content

Commit

Permalink
fix(#3201): Remove data type xsd number and replace with semantic typ…
Browse files Browse the repository at this point in the history
…e so number (#3202)
  • Loading branch information
tenthe authored Sep 2, 2024
1 parent 9550ffc commit bb8c4a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

import { SemanticType } from './semantic-type';

export class DataType {
public static readonly XSD: string = 'http://www.w3.org/2001/XMLSchema#';

Expand All @@ -25,15 +27,14 @@ export class DataType {
public static readonly BOOLEAN = this.XSD + 'boolean';
public static readonly STRING = this.XSD + 'string';
public static readonly DOUBLE = this.XSD + 'double';
public static readonly NUMBER = this.XSD + 'number';

public static isNumberType(datatype: string): boolean {
return (
datatype === DataType.DOUBLE ||
datatype === DataType.INTEGER ||
datatype === DataType.LONG ||
datatype === DataType.FLOAT ||
datatype === DataType.NUMBER
datatype === SemanticType.SO_NUMBER
);
}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/dashboard/sdk/ep-requirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class EpRequirements {
}

static numberReq(): EventPropertyUnion {
return EpRequirements.datatypeReq(DataType.NUMBER);
return EpRequirements.datatypeReq(SemanticType.SO_NUMBER);
}

static stringReq(): EventPropertyUnion {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/dashboard/sdk/matching/datatype-match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

import { DataType } from '@streampipes/platform-services';
import { DataType, SemanticType } from '@streampipes/platform-services';

export class DatatypeMatch {
match(datatypeRequirement: string, datatypeOffer: string) {
Expand All @@ -31,7 +31,7 @@ export class DatatypeMatch {
}

subClassOf(offer: string, requirement: string): boolean {
if (!(requirement === DataType.NUMBER)) {
if (!(requirement === SemanticType.SO_NUMBER)) {
return false;
} else {
if (
Expand Down

0 comments on commit bb8c4a3

Please sign in to comment.