Sveino / Inst4CIM-KG

Instance of CIM Knowledge Graph
Apache License 2.0
5 stars 1 forks source link

fix props with multiple Ranges #125

Open VladimirAlexiev opened 1 week ago

VladimirAlexiev commented 1 week ago

This query

PREFIX afn: <http://jena.apache.org/ARQ/function#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select * {
  ?p1 rdfs:range ?r1.
  ?p1 rdfs:range ?r2.
  filter(str(?r1) < str(?r2))
} order by ?p1
Finds 43 props with multiple ranges, which is a mistake. p1 r1 r2
1 dm: DifferenceModel.forwardDifferences rdf: Statement rdf: Statements
2 dm: DifferenceModel.preconditions rdf: Statement rdf: Statements
3 dm: DifferenceModel.reverseDifferences rdf: Statement rdf: Statements
4 md: Model.version xsd: integer xsd: string
5 dct: Resource1 md: Model dcat: Dataset
6 dct: Resource10 md: Model dcat: Dataset
7 dct: Resource11 md: Model dcat: Dataset
8 dct: Resource12 md: Model dcat: Dataset
9 dct: Resource13 md: Model dcat: Dataset
10 dct: Resource2 md: Model dcat: Dataset
11 dct: Resource3 md: Model dcat: Dataset
12 dct: Resource4 md: Model dcat: Dataset
13 dct: Resource5 md: Model dcat: Dataset
14 dct: Resource6 md: Model dcat: Dataset
15 dct: accessRights md: Model dcat: Dataset
16 dct: accrualPeriodicity md: Model dcat: Dataset
17 dct: conformsTo md: Model dcat: Dataset
18 dct: license md: Model dcat: Dataset
19 dct: references md: Model dcat: Dataset
20 dct: replaces md: Model dcat: Dataset
21 dct: source md: Model dcat: Dataset
22 dct: spatial md: Model dcat: Dataset
23 dct: type md: Model dcat: Dataset
24 dcat: Resource7 md: Model dcat: Dataset
25 dcat: Resource8 md: Model dcat: Dataset
26 dcat: hasVersion md: Model dcat: Dataset
27 dcat: inSeries md: Model dcat: Dataset
28 dcat: isVersionOf md: Model dcat: Dataset
29 dcat: nextVersion md: Model dcat: Dataset
30 dcat: previousVersion md: Model dcat: Dataset
31 dcat: seriesMember md: Model dcat: Dataset
32 prov: Entity md: Model dcat: Dataset
33 prov: wasGeneratedBy md: Model dcat: Dataset
34 eumd: Model1 md: Model dcat: Dataset
35 eumd: Model2 md: Model dcat: Dataset
36 eumd: processType md: Model dcat: Dataset
37 eumd: usedSettings md: Model dcat: Dataset
38 dcat- cim: alternativeVersionOf md: Model dcat: Dataset
39 dcat- cim: hasAlternativeVersion md: Model dcat: Dataset
40 dcat- cim: hasPreferredVersion md: Model dcat: Dataset
41 dcat- cim: preferredVersion md: Model dcat: Dataset
42 nc: CsConverter.CsConverterSchedule nc: CsConverterRegularSchedule nc: CsConverterSchedule
43 nc: EnergyConnection.EnergyConnectionSchedule nc: EnergyConnectionRegularSchedule nc: EnergyConnectionSchedule
VladimirAlexiev commented 1 week ago

Note: this query finds props with multiple domains:

PREFIX afn: <http://jena.apache.org/ARQ/function#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select * {
  ?p1 rdfs:domain ?d1.
  ?p1 rdfs:domain ?d2.
  filter(str(?d1) < str(?d2))
} order by ?p1

All of them are props that are "undecided" between md:Model and dcat:Dataset

griddigit-ci commented 1 day ago

OK. Need to check from where this is coming. Then we fix. especially the last 2 seem strange