Skip to content

Commit

Permalink
Fixed an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sahalali committed Aug 1, 2024
1 parent 8a3df73 commit 6cbc62e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/service/recon/recon.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ManifestService } from "../manifest";
import { QueryCondition, ReconciliationRequest, ReconciliationResponse, ReconciliationResults } from "../../dto";
import { Exception, ReconciliationServiceHelper } from "../../helper";
import { ReconRequestMatchTypeEnum } from "../../enum";
import { QUERIES } from "../../constant/recon-queries.constants";
import { ArtsdataProperties } from "../../constant/properties.constants";
import * as queryConstants from "../../constant/recon-queries.constants";
import * as propertyConstants from "../../constant/properties.constants";

@Injectable()
export class ReconciliationService {
Expand Down Expand Up @@ -69,7 +69,7 @@ export class ReconciliationService {
private _getSparqlQuery(name: string, isQueryByURI: boolean, type: string, limit: number | undefined): string {
const graphdbIndex: string = ReconciliationServiceHelper.getGraphdbIndex(type);

const rawQuery = isQueryByURI ? QUERIES.RECONCILIATION_QUERY_BY_URI : QUERIES.RECONCILIATION_QUERY;
const rawQuery = isQueryByURI ? queryConstants.QUERIES.RECONCILIATION_QUERY_BY_URI : queryConstants.QUERIES.RECONCILIATION_QUERY;
name = isQueryByURI ? (name.startsWith("K") ?
"<http://kg.artsdata.ca/resource/" + name + ">" :
"<" + name + ">") :
Expand Down Expand Up @@ -109,19 +109,19 @@ export class ReconciliationService {

private _resolvePropertyValue(value: string, property: string) {
switch (property) {
case ArtsdataProperties.START_DATE:
case ArtsdataProperties.END_DATE:
case propertyConstants.ArtsdataProperties.START_DATE:
case propertyConstants.ArtsdataProperties.END_DATE:
return `"${value}"^^xsd:dateTime`;
case ArtsdataProperties.SAME_AS:
case ArtsdataProperties.LOCATION:
case ArtsdataProperties.ORGANIZER:
case ArtsdataProperties.PERFORMER:
case ArtsdataProperties.ADDITIONAL_TYPE:
case ArtsdataProperties.MAIN_ENTITY_OF_PAGE:
case ArtsdataProperties.AUDIENCE:
case ArtsdataProperties.EVENT_STATUS:
case ArtsdataProperties.IN_LANGUAGE:
case ArtsdataProperties.SUB_EVENT:
case propertyConstants.ArtsdataProperties.SAME_AS:
case propertyConstants.ArtsdataProperties.LOCATION:
case propertyConstants.ArtsdataProperties.ORGANIZER:
case propertyConstants.ArtsdataProperties.PERFORMER:
case propertyConstants.ArtsdataProperties.ADDITIONAL_TYPE:
case propertyConstants.ArtsdataProperties.MAIN_ENTITY_OF_PAGE:
case propertyConstants.ArtsdataProperties.AUDIENCE:
case propertyConstants.ArtsdataProperties.EVENT_STATUS:
case propertyConstants.ArtsdataProperties.IN_LANGUAGE:
case propertyConstants.ArtsdataProperties.SUB_EVENT:
return `<${value}>`;
default:
return `'${value}'`;
Expand Down

0 comments on commit 6cbc62e

Please sign in to comment.