Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fresnel:Format definitions #462

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 184 additions & 13 deletions source/vocab/display.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@id": "Resource-chips",
"@type": "fresnel:Lens",
"classLensDomain": "Resource",
"showProperties": [
"showProperties": [
{"alternateProperties": ["title", "prefLabel", "label", "name", "code", "uri"]},
"isPartOf",
"isDefinedBy"
Expand Down Expand Up @@ -276,7 +276,7 @@
"showProperties": [
{"alternateProperties": [ "value", "marc:hiddenValue" ]},
"typeNote",
"hasNote"
"hasNote"
]
},
"ImageBitDepth": {
Expand Down Expand Up @@ -572,7 +572,7 @@
"label"
]
},
"concerning"
"concerning"
]
}
}
Expand Down Expand Up @@ -689,7 +689,6 @@
"cartographicAttributes",
"isPartOf",
{"inverseOf": "instanceOf"}

]
},
"DataCatalog": {
Expand All @@ -704,7 +703,7 @@
"@type": "fresnel:Lens",
"classLensDomain": "Dataset",
"fresnel:extends": {"@id": "Dataset-chips"},
"showProperties": [
"showProperties": [
"fresnel:super",
"contribution",
"description",
Expand Down Expand Up @@ -898,7 +897,7 @@
"@id": "Person-cards",
"classLensDomain": "Person",
"fresnel:extends": {"@id": "Person-chips"},
"showProperties": [
"showProperties": [
"fresnel:super",
"hasVariant",
"seeAlso",
Expand All @@ -915,7 +914,7 @@
"@id": "Family-cards",
"classLensDomain": "Family",
"fresnel:extends": {"@id": "Family-chips"},
"showProperties": [
"showProperties": [
"fresnel:super",
"hasTypeOfFamily",
"hasVariant",
Expand All @@ -931,7 +930,7 @@
"@id": "Jurisdiction-cards",
"classLensDomain": "Jurisdiction",
"fresnel:extends": {"@id": "Jurisdiction-chips"},
"showProperties": [
"showProperties": [
"fresnel:super",
"hasVariant",
"seeAlso",
Expand All @@ -948,7 +947,7 @@
"@id": "Meeting-cards",
"classLensDomain": "Meeting",
"fresnel:extends": {"@id": "Meeting-chips"},
"showProperties": [
"showProperties": [
"fresnel:super",
"hasVariant",
"seeAlso",
Expand All @@ -963,15 +962,15 @@
"@id": "Organization-cards",
"classLensDomain": "Organization",
"fresnel:extends": {"@id": "Organization-chips"},
"showProperties": [
"showProperties": [
"fresnel:super",
"hasVariant",
"seeAlso",
"description",
"disambiguatingDescription",
"activityStartDate",
"activityEndDate",
"identifiedBy",
"activityEndDate",
"identifiedBy",
"nationality" ]
},
"Concept": {
Expand Down Expand Up @@ -1436,14 +1435,186 @@
},
"formatters": {
"termComponentList-format": {
"TODO": "fix vue-client and remove me",
"@id": "termComponentList-format",
"@type": "fresnel:Format",
"fresnel:propertyFormatDomain": "termComponentList",
"fresnel:valueFormat": {
"fresnel:contentAfter": "--",
"fresnel:contentLast": ""
"fresnel:contentLast": ""
}
}
}
},
"formatters": {
"termComponentList-format": {
"@id": "termComponentList-format",
"@type": "fresnel:Format",
"fresnel:propertyFormatDomain": "termComponentList",
"fresnel:valueFormat": {
"fresnel:contentAfter": "--",
"fresnel:contentLast": ""
}
},
"commaBeforeProperty-format": {
"TODO": "fullerFormOfName skrivs alltid med parenteser i libris nu, ska det vara så?",
"@id": "commaBeforeProperty-format",
"@type": "fresnel:Format",
"fresnel:propertyFormatDomain": [
"lifeSpan",
"familyName",
"givenName",
"name",
"marc:numeration",
"lifeSpan",
"marc:titlesAndOtherWordsAssociatedWithAName",
"fullerFormOfName"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": ", ",
"fresnel:contentFirst": ""
}
},
"agent-place-format": {
"@id": "agent-place-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"Agent"
],
"fresnel:propertyFormatDomain": [
"place"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": " (",
"fresnel:contentFirst": "(",
"fresnel:contentAfter": ")",
"fresnel:contentLast": ")"
}
},
"ProvisionActivity-comma-format": {
"@id": "ProvisionActivity-comma-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"ProvisionActivity"
],
"fresnel:propertyFormatDomain": [
"place",
"year",
"startYear",
"date",
"marc:publicationStatus"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": ", ",
"fresnel:contentFirst": ""
}
},
"ProvisionActivity-endYear-format": {
"TODO": "endYear without startYear? fresnel:contentNoValue on startYear? but we only want it when endYear is present",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the opposite of course.
We need a way to create virtual properties in showProperties or something.
(this is not what fresnel:mergeProperties does. It just merges the values of multiple properties to a single one)

"@id": "ProvisionActivity-endYear-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"ProvisionActivity"
],
"fresnel:propertyFormatDomain": [
"endYear"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": "-",
"fresnel:contentFirst": "-"
}
},
"ProvisionActivity-colon-before-agent-format": {
"@id": "ProvisionActivity-colon-before-agent-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"ProvisionActivity"
],
"fresnel:propertyFormatDomain": [
"agent"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": " : ",
"fresnel:contentFirst": ""
}
},
"ProvisionActivity-activity-separator-format": {
"NOTE": "",
"TODO": "this is in between prov activities, what about after other props? valueFormat on publication, manufacture?",
"@id": "ProvisionActivity-activity-separator-format",
"@type": "fresnel:Format",
"fresnel:propertyFormatDomain": [
"provisionActivity"
],
"fresnel:valueFormat": {
"fresnel:contentBefore": "; ",
"fresnel:contentFirst": ""
}
},
"ProvisionActivity-hasPart-separator-format": {
"@id": "ProvisionActivity-hasPart-separator-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"ProvisionActivity"
],
"fresnel:propertyFormatDomain": [
"hasPart",
"place"
],
"fresnel:valueFormat": {
"fresnel:contentBefore": "; ",
"fresnel:contentFirst": ""
}
},
"Contribution-role-format": {
"@id": "Contribution-role-format",
"@type": "fresnel:Format",
"fresnel:propertyStyle": "light",
"fresnel:classFormatDomain": [
"Contribution"
],
"fresnel:propertyFormatDomain": [
"role"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": " (",
"fresnel:contentFirst": "(",
"fresnel:contentAfter": ")",
"fresnel:contentLast": ")"
}
},
"ISBD-area-format": {
"@id": "ISBD-area-format",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"Resource"
],
"fresnel:propertyFormatDomain": [
"hasTitle",
"editionStatement"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": ". — ",
"fresnel:contentFirst": ""
}
},
"default-separators": {
"@id": "default-separators",
"@type": "fresnel:Format",
"fresnel:classFormatDomain": [
"Resource"
],
"fresnel:propertyFormatDomain": [
"*"
],
"fresnel:propertyFormat": {
"fresnel:contentBefore": " • ",
"fresnel:contentFirst": ""
},
"fresnel:valueFormat": {
"fresnel:contentBefore": ", ",
"fresnel:contentFirst": ""
}
}
}
}