common-workflow-language / common-workflow-language/cwlviewer

Expose schema.org annotations as text

Open
#180 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Java
Stars
52
Forks
29
Avg merge
5h 12m
Merged PRs (30d)
6

Description

## Description

Many workflows have http://schema.org annotations, and that is something we encourage as [best practice](https://view.commonwl.org/about). We don't expose them currently in the HTML (only in the RDF and Research Object).

We should find the most common ones and add them to the HTML where appropriate, in particular like
http://schema.org/license or http://schema.org/author

(A separate issue is that we should include our RDF with schema.org annotations in a `` JSON-LD tag)

## Which Schema.org properties are used?

I ran this SPARQL query against the production instance to find what was used. Note that it detects any annotation within the graph after parsing a CWL file, so the annotation might not be on the workflow itself (in fact some of them are nested under a different annotation, like details of an address).

```sparql
PREFIX cwl: <https://w3id.org/cwl/cwl#>
PREFIX schema: <http://schema.org/>

SELECT ?p (COUNT(?g) AS ?count)
WHERE {
SELECT DISTINCT ?g ?p WHERE {
GRAPH ?g {
?s ?p ?o .
}
FILTER ( strstarts(str(?p), "http://schema.org/"))
}
}
GROUP BY ?p
ORDER BY DESC(?count)
```

"p" | "count"
-- | --
"http://schema.org/license" | "128"
"http://schema.org/copyrightHolder" | "114"
"http://schema.org/about" | "14"
"http://schema.org/applicationCategory" | "14"
"http://schema.org/author" | "14"
"http://schema.org/codeRepository" | "14"
"http://schema.org/creator" | "14"
"http://schema.org/department" | "14"
"http://schema.org/description" | "14"
"http://schema.org/discussionUrl" | "14"
"http://schema.org/downloadUrl" | "14"
"http://schema.org/email" | "14"
"http://schema.org/isPartOf" | "14"
"http://schema.org/location" | "14"
"http://schema.org/mainEntity" | "14"
"http://schema.org/member" | "14"
"http://schema.org/name" | "14"
"http://schema.org/programmingLanguage" | "14"
"http://schema.org/publication" | "14"
"http://schema.org/sameAs" | "14"
"http://schema.org/softwareVersion" | "14"
"http://schema.org/targetProduct" | "14"
"http://schema.org/url" | "14"
"http://schema.org/addressCountry" | "7"
"http://schema.org/addressLocality" | "7"
"http://schema.org/addressRegion" | "7"
"http://schema.org/downloadURL" | "7"
"http://schema.org/legalName" | "7"
"http://schema.org/logo" | "7"
"http://schema.org/postalCode" | "7"
"http://schema.org/streetAddress" | "7"
"http://schema.org/telephone" | "7"
"http://schema.org/worksFor" | "7"

### Other properties

```sparql
PREFIX cwl: <https://w3id.org/cwl/cwl#>
PREFIX schema: <http://schema.org/>

SELECT ?p (COUNT(?g) AS ?count)
WHERE {
SELECT DISTINCT ?g ?p WHERE {
GRAPH ?g {
?s ?p ?o .
}
FILTER (! strstarts(str(?p), "http://schema.org/"))
FILTER (! strstarts(str(?p), "https://w3id.org/cwl/"))

}
}
GROUP BY ?p
ORDER BY DESC(?count)
````

"p" | "count"
-- | --
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" | "501"
"http://www.w3.org/1999/02/22-rdf-syntax-ns#first" | "497"
"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" | "497"
"rdfs:label" | "312"
"rdfs:comment" | "237"
"dct:creator" | "32"
"foaf:mbox" | "32"
"foaf:name" | "32"
"dct:contributor" | "18"
"https://schema.org/citation" | "8"
"http://purl.org/dc/terms/creator" | "6"
"http://xmlns.com/foaf/0.1/mbox" | "6"
"http://xmlns.com/foaf/0.1/name" | "6"
"http://edamontology.org/citation" | "1"
"http://edamontology.org/comment_handle" | "1"
"http://edamontology.org/created_in" | "1"
"http://edamontology.org/deprecation_comment" | "1"
"http://edamontology.org/documentation" | "1"
"http://edamontology.org/example" | "1"
"http://edamontology.org/file_extension" | "1"
"http://edamontology.org/isdebtag" | "1"
"http://edamontology.org/media_type" | "1"
"http://edamontology.org/next_id" | "1"
"http://edamontology.org/obsolete_since" | "1"
"http://edamontology.org/oldParent" | "1"
"http://edamontology.org/ontology_used" | "1"
"http://edamontology.org/organisation" | "1"
"http://edamontology.org/regex" | "1"
"http://edamontology.org/uiTip" | "1"
"http://purl.obolibrary.org/obo/date" | "1"
"http://purl.obolibrary.org/obo/default-relationship-id-prefix" | "1"
"http://purl.obolibrary.org/obo/idspace" | "1"
"http://purl.obolibrary.org/obo/is_anti_symmetric" | "1"
"http://purl.obolibrary.org/obo/is_metadata_tag" | "1"
"http://purl.obolibrary.org/obo/is_reflexive" | "1"
"http://purl.obolibrary.org/obo/is_symmetric" | "1"
"http://purl.obolibrary.org/obo/remark" | "1"
"http://purl.obolibrary.org/obo/transitive_over" | "1"
"http://purl.org/dc/elements/1.1/creator" | "1"
"http://purl.org/dc/elements/1.1/format" | "1"
"http://purl.org/dc/elements/1.1/title" | "1"
"http://usefulinc.com/ns/doap#Version" | "1"
"http://www.geneontology.org/formats/oboInOwl#comment" | "1"
"http://www.geneontology.org/formats/oboInOwl#consider" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasAlternativeId" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasDbXRef" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasDbXref" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasDefinition" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasExactSynonym" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym" | "1"
"http://www.geneontology.org/formats/oboInOwl#hasSubset" | "1"
"http://www.geneontology.org/formats/oboInOwl#inSubset" | "1"
"http://www.geneontology.org/formats/oboInOwl#isCyclic" | "1"
"http://www.geneontology.org/formats/oboInOwl#replacedBy" | "1"
"http://www.geneontology.org/formats/oboInOwl#savedBy" | "1"
"http://www.w3.org/2000/01/rdf-schema#comment" | "1"
"http://www.w3.org/2000/01/rdf-schema#domain" | "1"
"http://www.w3.org/2000/01/rdf-schema#isDefinedBy" | "1"
"http://www.w3.org/2000/01/rdf-schema#label" | "1"
"http://www.w3.org/2000/01/rdf-schema#range" | "1"
"http://www.w3.org/2000/01/rdf-schema#seeAlso" | "1"
"http://www.w3.org/2000/01/rdf-schema#subClassOf" | "1"
"http://www.w3.org/2000/01/rdf-schema#subPropertyOf" | "1"
"http://www.w3.org/2002/07/owl#annotatedProperty" | "1"
"http://www.w3.org/2002/07/owl#annotatedSource" | "1"
"http://www.w3.org/2002/07/owl#annotatedTarget" | "1"
"http://www.w3.org/2002/07/owl#deprecated" | "1"
"http://www.w3.org/2002/07/owl#disjointWith" | "1"
"http://www.w3.org/2002/07/owl#inverseOf" | "1"
"http://www.w3.org/2002/07/owl#onProperty" | "1"
"http://www.w3.org/2002/07/owl#someValuesFrom" | "1"
"http://www.w3.org/2002/07/owl#unionOf" | "1"
"http://xmlns.com/foaf/0.1/page" | "1"

Note how some of these are not correctly namespaced, like `foaf:` or `dct:` -- might or might not be related to common-workflow-language/cwltool#427.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.