Skip to content

Commit 9bfd666

Browse files
committed
Debugging, updates to make-profile.js
1 parent 85cb73f commit 9bfd666

File tree

7 files changed

+1570
-86
lines changed

7 files changed

+1570
-86
lines changed

make-profile.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const {LdacProfile} = require('./index.js');
1+
const {Profile} = require('ro-crate-editor-profiles');
22
const fs = require("fs")
33

4-
fs.writeFileSync("profile/profile.md", LdacProfile.generateSpec("profile-text/profile.md"));
4+
profile = require('ro-crate-editor-profiles/profiles/language-data-commons-collection-profile.json')
5+
fs.writeFileSync("profile/profile.md", Profile.generateSpec(profile, "profile-text/profile.md", "examples"));

package-lock.json

+22-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
},
2626
"dependencies": {
2727
"commander": "^9.4.1",
28-
"ro-crate": "^3.1.0"
28+
"lodash": "^4.17.21",
29+
"ro-crate": "^3.1.0",
30+
"ro-crate-editor-profiles": "github:Language-Research-Technology/ro-crate-editor-profiles"
2931
}
3032
}

profile/profile.md

+11-82
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,7 @@ and
8484

8585
A conformant RO-Crate:
8686

87-
- MUST have a `@type` attribute that that includes in its values `Dataset` and either `RepositoryCollection` or `RepositoryObject`
88-
89-
- MUST have a conformsTo which references the profile URL for either a Collection (https://purl.archive.org/language-data-commons/profile#Collection) or an Object (https://purl.archive.org/language-data-commons/profile#Object) but not both
90-
91-
- MUST have a `license` property with reference to an entity of type [File, DataReuseLicense] with an `@id` property that starts with `LICENSE` and a `URL` property that is a valid URL
92-
93-
- MUST have a `datePublished` property (per RO-Crate) exactly one value which is a string that parses as ISO-8601 to the level of at least a year. E.g.: 2000, 2000-10, 2000-10-01T12:34:56+10
94-
95-
- MUST have a `publisher` property (per RO-Crate) which MUST be have an ID which is a URL
96-
97-
98-
- SHOULD have property names which resolve using the supplied context
99-
100-
87+
undefined
10188

10289
![](media/structure.svg)
10390

@@ -181,27 +168,7 @@ The root dataset must have at least these @type values: ["Dataset",
181168

182169
### A RepositoryCollection:
183170

184-
- MUST have an @id property and the value must be a valid URI or "./"
185-
186-
- MUST have a type value of “RepositoryCollection” and MUST NOT have a type of “RepositoryObject”
187-
188-
- MUST have a single name value which is a string with one or more characters
189-
190-
- MUST have a conformsTo which references the Collection profile URL
191-
192-
- MUST have at least one `description` value which is a string with one or more characters
193-
194-
- MAY have one or more references to Collection or Object entities, which may be included in the crate or have MUST have @id properties which are URIs
195-
196-
- MAY have a `modality` property which SHOULD be a reference to one or more of the Language Data Commons Modality Terms: SpokenLanguage, WrittenLanguage, Song, Gesture, SignLanguage, WhistledLanguage (this information may be summarisable from collection members)
197-
198-
- MAY have a `linguisticGenre` property which is a reference to one or more of the Langauge Data Commons LinguistGenre Terms: Formulaic, Thesaurus, Dialogue, Oratory, Report, Ludic, Procedural, Narrative, Interview, Drama, Informational (this information may be summarisable from collection members)
199-
200-
- MAY have a `language` property which is a reference to one or more Language items
201-
202-
- MAY have a `contentLocation` property which is a reference to one or more `Place` items
203-
204-
171+
undefined
205172

206173
## Objects (#Object)
207174

@@ -249,15 +216,7 @@ these use the schema.org mechanism of DefinedTerm and DefinedTermSet.
249216

250217
### A RepositoryObject:
251218

252-
- MUST have a conformsTo which references the Object profile URL
253-
254-
- MAY have a `language` property which is a reference to one or more Language items
255-
256-
- MAY have a `contentLocation` property which is a reference to one or more `Place` items
257-
258-
- SHOULD have a hasPart property referencing at least one item of type [File, PrimaryMaterial] and MAY have [File, Annotation] and [File, DerivedMaterial] items which are inter-related using annotionOf, derivedFrom properties.
259-
260-
219+
undefined
261220

262221
## Files
263222

@@ -275,57 +234,27 @@ analysis of the `PrimaryMaterial` or `DerivedMaterial`.
275234

276235
#### A [File, PrimaryMaterial]:
277236

278-
- MUST have a @type value of “PrimaryMaterial" and MAY have other @type values
279-
280-
- MAY have a `modality` property which SHOULD be a reference to one or more of the Language Data Commons Modality Terms: SpokenLanguage, WrittenLanguage, Song, Gesture, SignLanguage, WhistledLanguage (this information may be summarisable from collection members)
281-
282-
- MUST a language property, or the RepositoryObject that is `partOf` MUST have a language property, referencing a Language item (language my be inhereted from the parent RepoObject)
283-
284-
237+
undefined
285238

286239
### DerivedMaterial
287240

288241
DerivedMaterial is a non-analytical derviation from PrimaryMaterial for example downsampled video or excerpted text.
289242

290243

291-
- MUST have a @type value of “DerivedMaterial" and MAY have other @type values
292-
293-
- MAY have a `modality` property which SHOULD be a reference to one or more of the Language Data Commons Modality Terms: SpokenLanguage, WrittenLanguage, Song, Gesture, SignLanguage, WhistledLanguage (this information may be summarisable from collection members)
294-
295-
- MUST a language property, or the RepositoryObject that is `partOf` MUST have a language property, referencing a Language item (language my be inhereted from the parent RepoObject)
296-
297-
- SHOULD have a derivedFrom property which references a PrimaryMaterial entity
298-
299-
244+
undefined
300245

301246

302247
#### a [File, DerivedMaterial]:
303248

304-
- MUST have a @type value of “DerivedMaterial" and MAY have other @type values
305-
306-
- MAY have a `modality` property which SHOULD be a reference to one or more of the Language Data Commons Modality Terms: SpokenLanguage, WrittenLanguage, Song, Gesture, SignLanguage, WhistledLanguage (this information may be summarisable from collection members)
307-
308-
- MUST a language property, or the RepositoryObject that is `partOf` MUST have a language property, referencing a Language item (language my be inhereted from the parent RepoObject)
309-
310-
- SHOULD have a derivedFrom property which references a PrimaryMaterial entity
311-
312-
249+
undefined
313250

314251
### Annotation
315252

316253
An annotation is a description or analysis of other material. More than one type of annotation may be present in a file.
317254

318255
#### a [File, Annotation]:
319256

320-
- MUST have a @type value of “Annotation" and MAY have other @type values
321-
322-
- MAY have an `annotationType` property which SHOULD be a reference to one or more of the Language Data Commons Modality Terms: SpokenLanguage, WrittenLanguage, Song, Gesture, SignLanguage, WhistledLanguage (this information may be summarisable from collection members)
323-
324-
- MAY have a `conformsTo` property which references a schema file which in turn MUST have `conformsTo` property of {"@id": "https://specs.frictionlessdata.io/table-schema/"}
325-
326-
- SHOULD have an `annotationOf` property which references another entity
327-
328-
257+
undefined
329258

330259
#### Describing the columns in CSV or other tabular data Annotation
331260

@@ -355,9 +284,7 @@ For example:
355284

356285
#### A [Language] entity:
357286

358-
- MUST have an @id property and the value must start with `https://collection.aiatsis.gov.au/austlang/language/` or `https://glottolog.org/resource/`
359-
360-
287+
undefined
361288

362289
## Places
363290

@@ -457,7 +384,7 @@ The place in which data was collected may be indicated using the `contentLocatio
457384
"@id": "https://purl.archive.org/language-data-commons/profile#Object"
458385
},
459386
"datePublished": "2019-09-25T23:52:02.000Z",
460-
"language": [
387+
"inLanguage": [
461388
{
462389
"@id": "https://glottolog.org/resource/languoid/id/bisl1239"
463390
},
@@ -592,3 +519,5 @@ Dakota: The University of North Dakota M.A.
592519
[ldac:PersonSnapshot]: https://purl.archive.org/language-data-commons/terms#PersonSnapshot
593520
[ldac:depositor]: https://purl.archive.org/language-data-commons/terms#depositor
594521
[ldac:compiler]: https://purl.archive.org/language-data-commons/terms#compiler
522+
523+
undefined

0 commit comments

Comments
 (0)