Skip to content

Commit

Permalink
tweak the checks to look correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mcancellieri committed Sep 5, 2024
1 parent 9682a28 commit c35dec0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
34 changes: 17 additions & 17 deletions components/usrn-stat/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const StatUSRN = ({ className, content, usrnParams }) => {
const enrichmentChart = ({ coveredCount, totalCount }) => {
let isLoading = true
if (
valueOrDefault(coveredCount, 0) !== 0 &&
valueOrDefault(totalCount, 0) !== 0
valueOrDefault(coveredCount, -1) >= 0 &&
valueOrDefault(totalCount, -1) >= 0
)
isLoading = false

Expand Down Expand Up @@ -119,12 +119,14 @@ const StatUSRN = ({ className, content, usrnParams }) => {
)
break
case 'vocabulariesCOAR':
statusClass =
usrnVocabulariesCOAR && usrnVocabulariesCOAR > 0
? STATUS_YES
: STATUS_NO

statCreated = statusClass === STATUS_YES ? usrnVocabulariesCOAR : ''
statusClass = usrnVocabulariesCOAR ? STATUS_YES : STATUS_NO
statCreated =
valueOrDefault(usrnLicense, -1) >= 0
? enrichmentChart({
coveredCount: usrnVocabulariesCOAR,
totalCount: countMetadata,
})
: ''
break
case 'webAccessibility':
statusClass = supportsBetterMetadata ? STATUS_YES : STATUS_NO
Expand All @@ -136,15 +138,13 @@ const StatUSRN = ({ className, content, usrnParams }) => {
break
case 'licensingMetadata':
statusClass = usrnLicense ? STATUS_YES : STATUS_NO
statTextCreated =
statusClass === STATUS_YES ? (
<NumericValue
value={valueOrDefault(usrnLicense, 'Loading...')}
size="extra-small"
/>
) : (
''
)
statCreated =
valueOrDefault(usrnLicense, -1) >= 0
? enrichmentChart({
coveredCount: usrnLicense,
totalCount: countMetadata,
})
: ''
break
case 'ROR':
statusClass = rorId ? STATUS_YES : STATUS_NO
Expand Down
16 changes: 12 additions & 4 deletions texts/usrn/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ statusItems:
prefix: |
Percent of metadata records with a licence specified:
recommendation: |
Licensing and copyright information may be displayed in a machine-readable way, or by a text description. However, text descriptions such as “all rights reserved” may not be specific enough for other users to interpret. Much better is to provide a URL to the relevant Creative Common licence, for example, for the non-commercial CC-BY licence, https://creativecommons.org/licenses/by-nc/4.0/
Licensing and copyright information may be displayed in a machine-readable way, or by a text description.
However, text descriptions such as “all rights reserved” may not be specific enough for other users to interpret.
Much better is to provide a URL to the relevant Creative Commons licence, for example, for the non-commercial CC-BY licence, [https://creativecommons.org/licenses/by-nc/4.0/](https://creativecommons.org/licenses/by-nc/4.0/)
By clicking on this link, a human can see the precise meaning of this licence. Any machine can identify immediately, and unambiguously, what kind of licence is stated.
CORE promotes and advocates for the use of machine-readable licencing descriptions. In particular, we advise the use of the NISO Access License and Indicators (ALI) Schema.
Institutions may have a blanket policy that covers all content with a specific publisher, which usually means that individual documents contain no licensing information. However, a specific CC-BY licence enables exceptions to be made for individual documents and reduces ambiguity.
- id: uniquePersistentIdentifiers
isEnable: yes
Expand Down Expand Up @@ -185,10 +189,14 @@ statusItems:
[COAR (Confederation of Open Access Repositories)](https://vocabularies.coar-repositories.org/) vocabularies are structured sets of terms organized to provide
a common framework for the sharing and integration of data across different systems.
They comprise three types: Access rights, resource types, and version types.
recommendation: |
A metadata profile such as RIOXX can provide an easy way to share and use COAR vocabularies in your metadata.
- Access rights describe the access status of a resource, such as “embargoed access”, or “restricted access”.
- Resource types describe the type of resource, such as “patent”, “bibliography”, or “conference presentation”.
- Version types distinguish the various states of an academic article, including the version of record (VOR), the Author’s Original (AO), and the Author’s Accepted Manuscript (AM).
- Access rights: describe the access status of a resource, such as “embargoed access”, or “restricted access”.
- Resource type: describe the type of resource, such as “patent”, “bibliography”, or “conference presentation”.
- Version type: distinguish the various states of an academic article, including the version of record (VOR), the Author’s Original (AO), and the Author’s Accepted Manuscript (AM).
prefix: |
- id: embargoedDocuments
isEnable: yes
Expand Down

0 comments on commit c35dec0

Please sign in to comment.