You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As updates and additions are made, they will be added to a /betatest sub-folder which will make them accessible to users via github.io without affecting people who are using the latest numbered release (e.g. v1.5). When previewers in the betatest branch are included in the next release (e.g. v1.6), sites may wish to change their registration of the tools to use the stable version as the betatest version may continue to receive changes.
1799
1799
1800
+
### CDI Previewer
1801
+
1802
+
```bash
1803
+
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
1804
+
'{
1805
+
"displayName":"View CDI Metadata",
1806
+
"description":"View DDI Cross-Domain Integration (CDI) metadata file using SHACL shapes.",
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ The Spreadsheet Previewer was contributed by [anncie-pcss](https://github.com/an
84
84
85
85
[Max Planck Digital Library](https://github.com/MPDL) contributed the ZIP Previewer.
86
86
87
-
[erykkul](https://github.com/erykkul) contributed the Markdown (MD) Previewer and the RO-Crate previewer.
87
+
[erykkul](https://github.com/erykkul) contributed the Markdown (MD) Previewer, the RO-Crate previewer, and the CDI (DDI Cross-Domain Integration) previewer. The CDI previewer displays all JSON-LD data nodes and properties with real-time SHACL validation, smart property classification (required/optional/extra fields), support for complex nested objects, and editing capabilities. See [https://github.com/libis/cdi-viewer](https://github.com/libis/cdi-viewer) for the source code, documentation and implementation details.
88
88
89
89
[Jan Range](https://github.com/JR-1991) contributed the H5Web Previewer, Rich Html Previewer.
# do we need to deal with schema:Dataset with parent = @graph? pyshacl work with these rules
19
+
# for graph serialization.
20
+
sh:select """
21
+
PREFIX schema: <http://schema.org/>
22
+
PREFIX ex: <https://example.org/>
23
+
SELECT ?this
24
+
WHERE {
25
+
?this a schema:Dataset .
26
+
MINUS {
27
+
?parent a schema:Dataset .
28
+
?parent ?p ?this .
29
+
FILTER (?parent != ?this)
30
+
FILTER (?p != schema:about)
31
+
}
32
+
}
33
+
""" ;
34
+
] ;
35
+
36
+
sh:property
37
+
cdifd:resourceIdentifierProperty,
38
+
cdifd:nameProperty,
39
+
cdifd:rightsProperty,
40
+
cdifd:dateModifiedProperty
41
+
.
42
+
43
+
cdifd:resourceIdentifierProperty
44
+
# identifier for the resource described by the graph node, implement as either xsd:string or
45
+
# schema:PropertyValue with required [either scheme:url or schema:value]
46
+
a sh:PropertyShape ;
47
+
sh:path schema:identifier ;
48
+
sh:minCount 1 ;
49
+
sh:or (
50
+
[sh:datatype xsd:string ;]
51
+
[sh:class schema:PropertyValue ;
52
+
sh:property
53
+
[sh:path schema:propertyID ;
54
+
sh:datatype xsd:string ;
55
+
sh:severity sh:Warning ;
56
+
sh:message "If specifying an identifier via the PropertyValue, the scheme (authority, domain) within which the identifier is assigned and unique must be identifed, either by name or preferably using a URI. See https://registry.identifiers.org/registry"
57
+
];
58
+
sh:or (
59
+
[sh:property
60
+
[sh:path schema:url ;
61
+
sh:datatype xsd:string ;
62
+
sh:message "if possible, provide a resolvable URI that will provide a representation of the identified resource."
63
+
]]
64
+
[sh:property
65
+
[sh:path schema:value ;
66
+
sh:datatype xsd:string ;
67
+
sh:message "The identifer string; include applicable prefix (e.g. doi:, ark:, http:, isbn:)"
68
+
]]
69
+
)
70
+
]
71
+
);
72
+
sh:message "An identifier for the documented resource must be provided"
73
+
.
74
+
75
+
cdifd:nameProperty
76
+
# names must be a literal, .
77
+
a sh:PropertyShape ;
78
+
sh:path schema:name;
79
+
sh:minCount 1 ;
80
+
sh:datatype xsd:string ;
81
+
sh:minLength 5 ;
82
+
sh:message "a name for the person must be provided, and have a length of at least 5 characters."
83
+
.
84
+
85
+
cdifd:rightsProperty
86
+
a sh:PropertyShape ;
87
+
# some indication of rights is required, either a license or statement on conditions of access
# use schema:CreativeWork to implement a labeled link, only URL is required, but schema:name is expected
93
+
[sh:class schema:CreativeWork;
94
+
sh:property
95
+
[
96
+
sh:path schema:url ;
97
+
sh:minCount 1 ;
98
+
sh:datatype xsd:string ;
99
+
# sh:pattern "^[a-zA-Z][a-zA-Z0-9+.-]*:[^\\s]*$";
100
+
sh:pattern "^https?:\\/\\/[^\\s]+$" ;
101
+
sh:message "value must be a resolvable URL, but we aren't testing to see if the URL resolves..... Can't get xsd:anyURI to work with JSON Schema validation..."
102
+
]
103
+
]
104
+
);
105
+
sh:minCount 1 ;
106
+
sh:message "To meet the requirements for FAIR data, information about licenses or other security, usage, or access limitations must be described"
107
+
.
108
+
109
+
cdifd:dateModifiedProperty
110
+
a sh:PropertyShape ;
111
+
sh:path schema:dateModified;
112
+
# pyshacl doesn't seem to work validating xsd:date or xsd:dateTime in JSON-LD
0 commit comments