metadatacenter / cedar-artifact-library Goto Github PK
View Code? Open in Web Editor NEWTools for working with CEDAR model artifacts
License: Other
Tools for working with CEDAR model artifacts
License: Other
The different UI objects, ElementUI, TemplateUI, FieldUI have similar methods, but no common abstraction so I have to do instance checks and then casts to call methods. For example, when getting property order (TemplateUI and ElementUI) I cannot just call a getOrder method on the UI object.
Default values can be terms as well as strings (as far as I know). However, the parser only accepts default values that are strings.
Often I just want to get all chid artifacts of any given artifact. I typically do this for building a tree of a template. It would be convenient if there was a method (on Artifact) call getChildArtifacts
(or something similar) that returns a List<Artifact>
.
At the moment, I do something like this:
private List<SchemaArtifact> getChildren(SchemaArtifact schemaArtifact) {
var result = new ArrayList<SchemaArtifact>();
if(schemaArtifact instanceof TemplateSchemaArtifact tsa) {
result.addAll(tsa.getElementSchemas().values());
result.addAll(tsa.getFieldSchemas().values());
}
else if(schemaArtifact instanceof ElementSchemaArtifact esa) {
result.addAll(esa.getElementSchemas().values());
result.addAll(esa.getFieldSchemas().values());
}
return result;
}
Based on additions to model described in metadatacenter/cedar-model-validation-library#138, metadatacenter/cedar-model-validation-library#139, and metadatacenter/cedar-model-validation-library#140, add support for representing @language, continuePreviousLine and recommendedValue in the library.
RuntimeException is used at the moment, which is too general for callers to catch and do anything with. I suggest ParseException or ProcessingException with fields for message, location etc.
If fields or elements inside templates or elements have property associations, there is no way to retrieve the property IRIs.
The IRIs are enclosed inside the JSON Schema specification for the instance @context.
e.g., if a Study
template has a Study ID
field with a property association http://semantic-dicom.org/dcm#StudyID
the JSON Schema for the template will look as follows:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Study template schema",
"description": "Study template schema generated by the CEDAR Template Editor 2.6.19",
"properties": {
"@context": {
"type": "object",
....
"Study ID": {
"enum": [
"http://semantic-dicom.org/dcm#StudyID"
]
}
},
"required": [... ],
"additionalProperties": false
},
Add support for setting and retrieving artifact annotatations
Generate REDCap-compliant Excel spreadsheets from CEDAR templates
Some very tentative code here org.metadatacenter.artifacts.redcap.TemplateSchemaArtifact2REDCapConvertor
but a lot of detail work remains.
Consider this before the library gets wider use. Obviously there's some element of personal taste here,
Some of the method names contain acronyms or abbreviations, for example, getJsonLDID
, that are akward to read but moreover, modern style guides (e.g. the Google one) in essence say acronyms should be CamelCased. So, consider CamelCasing these, for example, getJsonLdId
.
FWIW, a few years ago I would name things OWLClass
or IRI
but now I'd use OwlClass
and Iri
after falling into line with wider community guidelines.
Write a wiki entry detailing use of library for translating JSON Schema templates, elements and fields in to Java POJOs, for translating instances into POJOs, and (when ready) generating JSON Schema and JSON-LD from schema and instance POJOs, respectively.
Link to this wiki from CEDAR Developer Documentation page: https://github.com/metadatacenter/cedar-docs/wiki/CEDAR-technical-documentation
The JSON below fails to parse because the parse is looking for an attribute called numTerms
. Not sure what this is.
{
"_valueConstraints": {
"requiredValue": false,
"multipleChoice": false,
"classes": [],
"branches": [],
"ontologies": [
{
"uri": "https://bioportal.bioontology.org/ontologies/MESH",
"acronym": "MESH",
"name": "MESH"
}
],
"literals": []
}
}
Library is not correctly recording that a field or element is multi-instance
This is related to #6 but I would like the children to be ordered consistently, as defined in the UI element.
This library currently supports YAML as an export format for artifacts.
Add support for YAML import of artifacts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.