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

Merge develop into boolean dev #147

Open
wants to merge 114 commits into
base: feature/boolean-field
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
1e050e3
Produce version of component
Jun 29, 2023
4cb2163
Updating develop to next snapshot 2.6.33-SNAPSHOT
Jun 29, 2023
9a8c75b
Produce version of component
Jun 29, 2023
ada7212
Updating develop to next snapshot 2.6.34-SNAPSHOT
Jun 29, 2023
bd74fd9
Produce version of component
Jul 6, 2023
0e1585f
Updating develop to next snapshot 2.6.35-SNAPSHOT
Jul 6, 2023
2aa18f7
Produce version of component
Jul 6, 2023
2cdf140
Updating develop to next snapshot 2.6.36-SNAPSHOT
Jul 6, 2023
02e1ea2
Produce version of component
Jul 11, 2023
d3a9bba
Updating develop to next snapshot 2.6.37-SNAPSHOT
Jul 11, 2023
ba3ac6a
Regex added to value constraints
Jul 13, 2023
73de9af
Produce version of component
Jul 14, 2023
db861a0
Updating develop to next snapshot 2.6.38-SNAPSHOT
Jul 14, 2023
d6eace4
Produce version of component
Jul 17, 2023
1cb07d4
Updating develop to next snapshot 2.6.40-SNAPSHOT
Jul 17, 2023
aa01633
Produce version of component
Jul 20, 2023
5c81247
Updating develop to next snapshot 2.6.41-SNAPSHOT
Jul 20, 2023
35249bb
Produce version of component
Jul 21, 2023
31da859
Updating develop to next snapshot 2.6.42-SNAPSHOT
Jul 21, 2023
968e70d
Produce version of component
Oct 9, 2023
6d29421
Updating develop to next snapshot 2.6.43-SNAPSHOT
Oct 9, 2023
7a0951c
Produce version of component
Oct 9, 2023
f2567d6
Updating develop to next snapshot 2.6.43-SNAPSHOT
Oct 9, 2023
6b89ec1
Produce version of component
Oct 10, 2023
57a1802
Updating develop to next snapshot 2.6.44-SNAPSHOT
Oct 10, 2023
2d5b349
Produce version of component
Oct 10, 2023
4164805
Updating develop to next snapshot 2.6.45-SNAPSHOT
Oct 10, 2023
70c11f4
Produce version of component
Oct 18, 2023
b8e66be
Updating develop to next snapshot 2.6.46-SNAPSHOT
Oct 18, 2023
1caa683
now allow 'continuePreviousLine' in non-static fields
martinjoconnor Oct 27, 2023
81f5236
now allow 'recommendedValue' in non-static field _valueConstraint obj…
martinjoconnor Oct 27, 2023
85015bb
refactoring
martinjoconnor Oct 27, 2023
01c564f
refactoring
martinjoconnor Oct 27, 2023
647e915
refactoring
martinjoconnor Oct 30, 2023
6b283f9
refactoring
martinjoconnor Oct 30, 2023
68ec895
refactoring
martinjoconnor Oct 30, 2023
273a8dd
refactoring
martinjoconnor Oct 30, 2023
332fde2
refactoring
martinjoconnor Oct 30, 2023
065596a
refactoring
martinjoconnor Oct 30, 2023
de45961
refactoring
martinjoconnor Oct 30, 2023
58f4f34
refactoring
martinjoconnor Oct 31, 2023
49d5658
refactoring
Oct 31, 2023
99138ad
refactoring
martinjoconnor Oct 31, 2023
df9ad63
refactoring - removed redundancy
martinjoconnor Oct 31, 2023
091adab
refactoring - updated README
martinjoconnor Oct 31, 2023
44a66da
refactoring
martinjoconnor Oct 31, 2023
3287e48
refactoring
martinjoconnor Nov 1, 2023
1fe3abb
refactoring
martinjoconnor Nov 1, 2023
3280029
refactoring
martinjoconnor Nov 1, 2023
695a592
now support language tags for instances; field values pending
martinjoconnor Nov 1, 2023
06e5023
now support @language tags in lteral-valued fields
martinjoconnor Nov 1, 2023
21ef3ba
added more widelyused templated for testing
Nov 2, 2023
ab331ea
updated README; deleted old examples directory (all of which are now …
Nov 3, 2023
a34851d
https://github.com/metadatacenter/cedar-project/issues/1198
Nov 8, 2023
6b211eb
initial annotations support
martinjoconnor Nov 9, 2023
b92d768
more tests
martinjoconnor Nov 9, 2023
13118c6
cleanup
Nov 9, 2023
1523459
README update
Nov 9, 2023
586f871
cleanup
Nov 9, 2023
8f9d960
test cleanup
Nov 9, 2023
8da7b06
allow boolean and number as values for @value annotations
Nov 9, 2023
26f7892
cleanup
Nov 9, 2023
e7c1dfd
minor cleanup
Nov 9, 2023
57e33c2
added _ui type for (future) boolean field type
Nov 9, 2023
0e548df
Produce version of component
egyedia Nov 14, 2023
50ed600
Updating develop to next snapshot 2.6.47-SNAPSHOT
egyedia Nov 14, 2023
a8d7259
Fix pasted string
egyedia Nov 15, 2023
f2f5a31
Produce version of component
egyedia Nov 16, 2023
6a5210a
Updating develop to next snapshot 2.6.48-SNAPSHOT
egyedia Nov 16, 2023
cb8ff55
more annotation properties cleanup
martinjoconnor Dec 1, 2023
cbd862d
more annotation properties cleanup
martinjoconnor Dec 1, 2023
6b111ae
manually set snapshot version
martinjoconnor Dec 1, 2023
a704d3e
added template instance standalone command
Dec 7, 2023
cb42cad
Merge branch 'feature/issue-138-139-140' into develop
martinjoconnor Dec 7, 2023
28d2589
Produce version of component
egyedia Jan 5, 2024
35458ef
Updating develop to next snapshot 2.6.49-SNAPSHOT
egyedia Jan 5, 2024
7dde223
Produce version of component
egyedia Jan 5, 2024
c5413a3
Updating develop to next snapshot 2.6.50-SNAPSHOT
egyedia Jan 8, 2024
04b5a76
Produce version of component
egyedia Jan 9, 2024
dc0e7b7
Updating develop to next snapshot 2.6.51-SNAPSHOT
egyedia Jan 9, 2024
2d1aad9
Produce version of component
egyedia Jan 12, 2024
1c6c58d
Updating develop to next snapshot 2.6.52-SNAPSHOT
egyedia Jan 12, 2024
2ea31f5
show location of validator errors on command line tools
martinjoconnor Jan 19, 2024
6734c6e
Produce version of component
egyedia Jan 19, 2024
6ddfbe8
Updating develop to next snapshot 2.6.53-SNAPSHOT
egyedia Jan 19, 2024
ceee090
minor cleanup
martinjoconnor Jan 22, 2024
5841868
minor cleanup
Jan 29, 2024
e84c6b5
Produce version of component
egyedia Feb 1, 2024
821a80c
Updating develop to next snapshot 2.6.54-SNAPSHOT
egyedia Feb 1, 2024
e3de762
Produce version of component
egyedia Feb 15, 2024
04c839f
Updating develop to next snapshot 2.6.55-SNAPSHOT
egyedia Feb 15, 2024
959ac44
Produce version of component
egyedia Mar 22, 2024
06d7223
Updating develop to next snapshot 2.6.57-SNAPSHOT
egyedia Mar 22, 2024
e490acb
fix validate-element Java path in POM
martinjoconnor Apr 2, 2024
bab4f18
Produce version of component
egyedia Apr 13, 2024
e59025c
Updating develop to next snapshot 2.6.58-SNAPSHOT
egyedia Apr 13, 2024
bda3ac5
https://github.com/metadatacenter/cedar-template-editor/issues/982
egyedia Apr 23, 2024
1356311
Remove unnecessary test
egyedia Apr 23, 2024
7354c11
Reformat meta-schema files using jq
egyedia Apr 23, 2024
b41b891
Merge pull request #148 from metadatacenter/fix/ui-pages
egyedia Apr 23, 2024
c603282
Fixes: https://github.com/metadatacenter/cedar-template-editor/issues…
egyedia May 7, 2024
8e0b80b
Allow firs-level attribute-value field to be saved
egyedia May 7, 2024
e4fbb69
Merge pull request #151 from metadatacenter/fix/attribute-value-field
egyedia May 7, 2024
61a0b9b
Merge branch 'develop' into fix/saving-static-fields
egyedia May 23, 2024
f7bb232
Schemas regenerated
egyedia May 24, 2024
b624260
Merge pull request #150 from metadatacenter/fix/saving-static-fields
egyedia May 24, 2024
2961f5b
Produce version of component
egyedia May 31, 2024
8ede90b
Updating develop to next snapshot 2.6.59-SNAPSHOT
egyedia May 31, 2024
7d41adc
Produce version of component
Jun 11, 2024
e38593f
Updating develop to next snapshot 2.6.60-SNAPSHOT
Jun 11, 2024
81bff86
Produce version of component
Jun 19, 2024
8a09747
Updating develop to next snapshot 2.6.61-SNAPSHOT
Jun 19, 2024
4357aff
Produce version of component
Jun 26, 2024
afdba07
Updating develop to next snapshot 2.6.62-SNAPSHOT
Jun 26, 2024
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
Binary file removed .DS_Store
Binary file not shown.
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
# CEDAR Model Library
# CEDAR Model Validation Library

Provides a Java-based CEDAR library to validate JSON Schema-encoded CEDAR model artifacts.
Provides a Java-based CEDAR library to validate JSON Schema-encoded CEDAR schema artifacts (templates, elements, and fields) and JSON-LD-encoded instance artifacts (template instances).

Also provides command line Java- and Python-based validators

## Validation Library

The library provides a interface <tt>org.metadatacenter.model.validation.ModelValidator</tt> that contains
methods to validate CEDAR resources, such as, templates, elements, and fields. The libarary also provides its
implementation <tt>org.metadatacenter.model.validation.CedarValidator</tt> that uses a third-party Java library
called [JSON Schema Validator](https://github.com/java-json-tools/json-schema-validator).
The library provides an interface <tt>org.metadatacenter.model.validation.ModelValidator</tt> that contains
methods to validate CEDAR artifacts, such as, templates, elements, fields, and template instances.

### Generate Validation Schemas

The <tt>schema</tt> directory contains a collection of JSON Schema definitions which collectively form the CEDAR Resource Validation Schema.
The <tt>schema</tt> directory contains a collection of JSON Schema-encoded specifications, which collectively form the CEDAR Metamodel Schema.
We designed the schema definitions to be modular for easy development and reuse.

The <tt>CedarValidator</tt> requires the validation schema files stored in the Java <tt>resources</tt> directory. To get those files
we need to merge some of the schemas in the <tt>schema</tt> directory and assemble them into a standalone self-contained schema file.
We have already provided a script to perform the action in the <tt>scripts</tt> directory.
These specificartions are assembled into meta-sechemas to validate templates, elements and fields.

The <tt>CedarValidator</tt> uses these validation meta-schemas. They are stored in the Java <tt>resources</tt> directory.
To generate these meta-schemas we need to merge the invidiual schemas in the <tt>schema</tt> directory and assemble them into several standalone
self-contained meta-schemas. We have provided a script to do this assembly in the <tt>scripts</tt> directory.

cd scripts
./generate-schema.sh
./generate-meta-schemas.sh

The script will generate four schema files, i.e., <tt>template-schema.json</tt>, <tt>element-schema.json</tt>, <tt>field-schema.json</tt>
and <tt>static-field-schema.json</tt> in the <tt>src/main/resources</tt> directory.
The script will generate six meta-schema files (<tt>template-meta-schema.json</tt>, <tt>element-meta-schema.json</tt>,
<tt>literal-field-meta-schema.json</tt>, <tt>iri-field-meta-schema.json</tt>, <tt>static-field-meta-schema.json</tt>, and
<tt>multi-instance-field-meta-schema.json</tt>) in the <tt>src/main/resources</tt> directory.

The description about the components to generate each schema can be found in the YAML files in <tt>schema</tt> directory.
The description about the components to generate each meta-schema can be found in the YAML files in <tt>schema</tt> directory.

### Run Test in Java
### Command Line Validation in Java

Below are some examples to test the <tt>CedarValidator</tt> implementation.
Below are some command-line examples validate templates, elements, fields, and instances.

mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplate" -Dexec.args="./src/test/resources/templates/empty-template.json"
mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplate" -Dexec.args="./src/test/resources/templates/single-field-template.json"
mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplate" -Dexec.args="./src/test/resources/templates/multi-field-template.json"
mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplateElement" -Dexec.args="./src/test/resources/elements/empty-element.json"
mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplateElement" -Dexec.args="./src/test/resources/elements/multi-field-element.json"
mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplateField" -Dexec.args="./src/test/resources/fields/text-field.json"
mvn exec:java -Dexec.mainClass="org.metadatacenter.model.validation.exec.ValidateTemplateField" -Dexec.args="./src/test/resources/fields/constrained-text-field.json"
mvn exec:java@validate-template -Dexec.args="./src/test/resources/templates/empty-template.json"
mvn exec:java@validate-template -Dexec.args="./src/test/resources/templates/single-field-template.json"
mvn exec:java@validate-template -Dexec.args="./src/test/resources/templates/multi-field-template.json"
mvn exec:java@validate-element -Dexec.args="./src/test/resources/elements/empty-element.json"
mvn exec:java@validate-element -Dexec.args="./src/test/resources/elements/many-fields-element.json"
mvn exec:java@validate-field -Dexec.args="./src/test/resources/fields/text-field.json"
mvn exec:java@validate-field -Dexec.args="./src/test/resources/fields/constrained-text-field.json"
mvn exec:java@validate-instance -Dexec.args="./src/test/resources/templates/template-allowing-annotations.json ./src/test/resources/instances/instance-with-annotations.jsonld"

### Run Test in Python
### Command Line Validation in Python

Below are some examples to test Python <tt>jsonschema</tt> implementation (required Python 3.x).
Below are some examples to validate using Python <tt>jsonschema</tt> implementation (required Python 3.x).

cd scripts
./validate-template.sh ../src/test/resources/templates/empty-template.json
Expand Down
Binary file removed examples/.DS_Store
Binary file not shown.
42 changes: 0 additions & 42 deletions examples/NOTES.txt

This file was deleted.

118 changes: 0 additions & 118 deletions examples/elements/empty-element.json

This file was deleted.

Loading