├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom-issue.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ └── build-and-publish.yml ├── .gitignore ├── .nvmrc ├── CHARTER.md ├── CONTRIBUTING.md ├── DEVELOPERS.md ├── LICENSE ├── README.md ├── _headers ├── _redirects ├── accord_logo_large.png ├── assets ├── fonts │ ├── Graphik-100-Italic.otf │ ├── Graphik-100-Italic.woff │ ├── Graphik-100-Italic.woff2 │ ├── Graphik-100.otf │ ├── Graphik-100.woff │ ├── Graphik-100.woff2 │ ├── Graphik-200-Italic.otf │ ├── Graphik-200-Italic.woff │ ├── Graphik-200-Italic.woff2 │ ├── Graphik-200.otf │ ├── Graphik-200.woff │ ├── Graphik-200.woff2 │ ├── Graphik-300-Italic.otf │ ├── Graphik-300-Italic.woff │ ├── Graphik-300-Italic.woff2 │ ├── Graphik-300.otf │ ├── Graphik-300.woff │ ├── Graphik-300.woff2 │ ├── Graphik-400-Italic.otf │ ├── Graphik-400-Italic.woff │ ├── Graphik-400-Italic.woff2 │ ├── Graphik-400.otf │ ├── Graphik-400.woff │ ├── Graphik-400.woff2 │ ├── Graphik-500-Italic.otf │ ├── Graphik-500-Italic.woff │ ├── Graphik-500-Italic.woff2 │ ├── Graphik-500.otf │ ├── Graphik-500.woff │ ├── Graphik-500.woff2 │ ├── Graphik-600-Italic.otf │ ├── Graphik-600-Italic.woff │ ├── Graphik-600-Italic.woff2 │ ├── Graphik-600.otf │ ├── Graphik-600.woff │ ├── Graphik-600.woff2 │ ├── Graphik-700-Italic.otf │ ├── Graphik-700-Italic.woff │ ├── Graphik-700-Italic.woff2 │ ├── Graphik-700.otf │ ├── Graphik-700.woff │ ├── Graphik-700.woff2 │ ├── Graphik-800-Italic.otf │ ├── Graphik-800-Italic.woff │ ├── Graphik-800-Italic.woff2 │ ├── Graphik-800.otf │ ├── Graphik-800.woff │ ├── Graphik-800.woff2 │ ├── Graphik-900-Italic.otf │ ├── Graphik-900-Italic.woff │ ├── Graphik-900-Italic.woff2 │ ├── Graphik-900.otf │ ├── Graphik-900.woff │ └── Graphik-900.woff2 └── images │ ├── A-MARK-ACCORDPROJECT-ONELINE-white.svg │ ├── APLogo.png │ ├── LF-logo.png │ ├── accord_logo.png │ ├── background.jpg │ └── noise.png ├── build.js ├── concertoVersions.js ├── fonts.css ├── package-lock.json ├── package.json ├── src ├── accordproject │ ├── contract.cto │ ├── contract@0.2.0.cto │ ├── obligation.cto │ ├── obligation@0.2.0.cto │ ├── party.cto │ ├── party@0.2.0.cto │ ├── runtime.cto │ └── runtime@0.2.0.cto ├── address.cto ├── address@0.2.0.cto ├── binary.cto ├── binary@0.2.0.cto ├── calendar │ ├── calendar.cto │ └── calendar@0.2.0.cto ├── cicero │ ├── base.cto │ ├── base@0.2.0.cto │ ├── contract.cto │ ├── contract@0.2.0.cto │ ├── dom.cto │ ├── dom@0.2.0.cto │ ├── runtime.cto │ └── runtime@0.2.0.cto ├── color.cto ├── color@0.2.0.cto ├── concerto │ ├── decorators.cto │ ├── decorators@0.2.0.cto │ ├── metamodel.cto │ ├── metamodel@0.2.0.cto │ ├── metamodel@0.3.0.cto │ ├── metamodel@0.4.0.cto │ ├── metamodel@1.0.0.cto │ └── scalar.cto ├── contact@1.0.0.cto ├── creative │ ├── creativeWork.cto │ └── creativeWork@0.2.0.cto ├── docusign │ ├── connect.cto │ ├── connect@0.2.0.cto │ ├── connect@0.3.0.cto │ └── connect@0.4.0.cto ├── ergo │ ├── monitor.cto │ ├── monitor@0.2.0.cto │ ├── options.cto │ └── options@0.2.0.cto ├── finance │ ├── bond.cto │ ├── bond@0.2.0.cto │ ├── bond@0.3.0.cto │ ├── loan.cto │ ├── loan@0.2.0.cto │ └── loan@0.3.0.cto ├── fpml5 │ ├── confirmation.cto │ └── confirmation@0.2.0.cto ├── geo.cto ├── geo@0.2.0.cto ├── iot │ ├── iot.cto │ └── iot@0.2.0.cto ├── isda │ ├── org.isda.cdm.cto │ └── org.isda.cdm@0.2.0.cto ├── markdown │ ├── ciceromark.cto │ ├── ciceromark@0.2.0.cto │ ├── ciceromark@0.3.0.cto │ ├── ciceromark@0.3.1.cto │ ├── ciceromark@0.3.2.cto │ ├── ciceromark@0.3.3.cto │ ├── ciceromark@0.4.0.cto │ ├── ciceromark@0.5.0.cto │ ├── ciceromark@0.6.0.cto │ ├── commonmark.cto │ ├── commonmark@0.2.0.cto │ ├── commonmark@0.4.0.cto │ ├── commonmark@0.5.0.cto │ ├── templatemark.cto │ ├── templatemark@0.1.1.cto │ ├── templatemark@0.1.2.cto │ ├── templatemark@0.1.3.cto │ ├── templatemark@0.2.0.cto │ ├── templatemark@0.3.0.cto │ ├── templatemark@0.4.0.cto │ └── templatemark@0.5.0.cto ├── money.cto ├── money@0.2.0.cto ├── money@0.3.0.cto ├── organization.cto ├── organization@0.2.0.cto ├── patents │ ├── patent.cto │ └── patent@0.2.0.cto ├── payment │ ├── endorsement.cto │ ├── endorsement@0.2.0.cto │ ├── endorsement@0.3.0.cto │ ├── payment.cto │ ├── payment@0.2.0.cto │ └── payment@0.3.0.cto ├── person.cto ├── person@0.2.0.cto ├── product.cto ├── product@0.2.0.cto ├── signature │ ├── block.cto │ ├── block@0.2.0.cto │ ├── block@0.3.0.cto │ ├── signature.cto │ ├── signature@0.2.0.cto │ └── signature@0.3.0.cto ├── time.cto ├── time@0.2.0.cto ├── time@0.3.0.cto ├── timezone.cto ├── timezone@0.2.0.cto ├── trademark │ ├── trademark.cto │ └── trademark@0.2.0.cto ├── usa │ ├── business.cto │ ├── business@0.2.0.cto │ ├── entity.cto │ ├── entity@0.2.0.cto │ ├── residency.cto │ ├── residency@0.2.0.cto │ ├── state.cto │ ├── state@0.2.0.cto │ └── state@0.3.0.cto ├── v2.0 │ └── time.cto ├── value.cto └── value@0.2.0.cto ├── styles.css └── views ├── index.njk ├── model.njk └── page.njk /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | # Bug Report 🐛 12 | 13 | 14 | ## Expected Behavior 15 | 16 | 17 | ## Current Behavior 18 | 19 | 20 | ## Possible Solution 21 | 22 | 23 | ## Steps to Reproduce 24 | 25 | 26 | 1. 27 | 2. 28 | 3. 29 | 4. 30 | 31 | ## Context (Environment) 32 | 33 | 34 | ### Desktop 35 | - OS: [e.g. macOS] 36 | - Browser: [e.g. Chrome, Safari] 37 | - Version: [e.g. 0.22.15] 38 | 39 | ## Detailed Description 40 | 41 | 42 | ## Possible Implementation 43 | 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom Issue 3 | about: For miscellaneous, such as questions, discussions, etc. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | # Discussion 🗣 12 | 13 | 14 | ## Context 15 | 16 | 17 | ## Detailed Description 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | # Feature Request 🛍️ 12 | 13 | 14 | ## Use Case 15 | 16 | 17 | ## Possible Solution 18 | 19 | 20 | ## Context 21 | 22 | 23 | 24 | ## Detailed Description 25 | 26 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Closes # 5 | 6 | 7 | ### Changes 8 | 9 | 10 | - 11 | - 12 | 13 | ### Flags 14 | 15 | - 16 | - 17 | 18 | ### Screenshots or Video 19 | 20 | 21 | ### Related Issues 22 | - Issue # 23 | - Pull Request # 24 | 25 | ### Author Checklist 26 | - [ ] Ensure you provide a [DCO sign-off](https://github.com/probot/dco#how-it-works) for your commits using the `--signoff` option of git commit. 27 | - [ ] Vital features and changes captured in unit and/or integration tests 28 | - [ ] Commits messages follow [AP format](https://github.com/accordproject/techdocs/blob/master/DEVELOPERS.md#commit-message-format) 29 | - [ ] Extend the documentation, if necessary 30 | - [ ] Merging to `master` from `fork:branchname` 31 | -------------------------------------------------------------------------------- /.github/workflows/build-and-publish.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy 2 | 3 | env: 4 | SERVER_ROOT: https://models.accordproject.org 5 | 6 | on: 7 | push: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | env: 17 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 18 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 19 | 20 | strategy: 21 | matrix: 22 | node-version: [20.x] 23 | 24 | steps: 25 | - name: Checkout code 26 | uses: actions/checkout@v2 27 | 28 | - name: Use Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v1 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | 33 | - name: NPM Install 34 | if: github.ref == 'refs/heads/main' 35 | run: npm install 36 | 37 | - name: NPM Build 38 | run: npm run build 39 | if: github.ref == 'refs/heads/main' 40 | 41 | - name: Set S3 42 | if: github.ref == 'refs/heads/main' 43 | run: | 44 | echo "AWS_S3_BUCKET=${{secrets.AWS_S3_BUCKET}}" >> $GITHUB_ENV 45 | 46 | - name: Deploy to S3 47 | uses: jakejarvis/s3-sync-action@master 48 | with: 49 | args: --acl public-read --follow-symlinks --delete 50 | env: 51 | SOURCE_DIR: 'build' 52 | 53 | - name: Invalidate Cloudfront 54 | uses: chetan/invalidate-cloudfront-action@master 55 | env: 56 | DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} 57 | PATHS: '/*' 58 | AWS_REGION: ${{ secrets.AWS_REGION }} 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | # 14 | 15 | # Logs 16 | logs 17 | *.log 18 | npm-debug.log* 19 | 20 | # Runtime data 21 | pids 22 | *.pid 23 | *.seed 24 | 25 | # License files 26 | license-*.txt 27 | 28 | # Directory for instrumented libs generated by jscoverage/JSCover 29 | lib-cov 30 | 31 | # Coverage directory used by tools like istanbul 32 | coverage 33 | 34 | # nyc test coverage 35 | .nyc_output 36 | 37 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 38 | .grunt 39 | 40 | # node-waf configuration 41 | .lock-wscript 42 | 43 | # Compiled binary addons (http://nodejs.org/api/addons.html) 44 | build/Release 45 | 46 | # Dependency directories 47 | node_modules 48 | jspm_packages 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional REPL history 54 | .node_repl_history 55 | 56 | # idea 57 | .idea 58 | 59 | # Mac OS X files 60 | .DS_Store 61 | *.swp 62 | 63 | # vscode folder 64 | .vscode 65 | 66 | #Build 67 | build 68 | 69 | # windows junk 70 | thumbs.db 71 | 72 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v14.15.1 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Accord Project Model Library Contribution Guide 2 | 3 | ## ❗ Accord Project Contribution Guide ❗ 4 | We'd love for you to contribute to our source code and to make Accord Project Model Library technology even better than it is today! Please refer to the [Accord Project Contribution guidelines][apcontribute] we'd like you to follow. 5 | 6 | [apcontribute]: https://github.com/accordproject/techdocs/blob/master/CONTRIBUTING.md -------------------------------------------------------------------------------- /DEVELOPERS.md: -------------------------------------------------------------------------------- 1 | # Model Library Development Guide 2 | 3 | Note that all the models in this repository use `import *** from http://` style imports to reference models, which makes each model self-contained. It does mean however that if you introduce a new model and its dependency in the same pull-request then the publish will fail, because the dependency is not yet published. In this scenario 4 | you should re-run the build action (on Github). 5 | 6 | ## ❗ Accord Project Development Guide ❗ 7 | We'd love for you to help develop improvements to Accord Project technology! Please refer to the [Accord Project Development guidelines][apdev] we'd like you to follow. 8 | 9 | [apdev]: https://github.com/accordproject/techdocs/blob/master/DEVELOPERS.md -------------------------------------------------------------------------------- /_headers: -------------------------------------------------------------------------------- 1 | /*.cto 2 | Access-Control-Allow-Origin: * -------------------------------------------------------------------------------- /_redirects: -------------------------------------------------------------------------------- 1 | /v2.0/time.html /time@0.2.0.html -------------------------------------------------------------------------------- /accord_logo_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/accord_logo_large.png -------------------------------------------------------------------------------- /assets/fonts/Graphik-100-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-100-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-100-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-100-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-100-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-100-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-100.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-100.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-100.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-100.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-100.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-100.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-200-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-200-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-200-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-200-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-200-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-200-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-200.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-200.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-200.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-200.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-200.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-200.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-300-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-300-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-300-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-300-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-300-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-300-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-300.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-300.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-300.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-300.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-400-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-400-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-400-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-400-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-400-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-400-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-400.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-400.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-400.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-400.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-500-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-500-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-500-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-500-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-500-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-500-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-500.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-500.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-500.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-500.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-600-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-600-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-600-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-600-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-600-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-600-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-600.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-600.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-600.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-600.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-700-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-700-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-700-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-700-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-700-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-700-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-700.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-700.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-700.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-700.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-800-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-800-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-800-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-800-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-800-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-800-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-800.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-800.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-800.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-800.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-800.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-800.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-900-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-900-Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-900-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-900-Italic.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-900-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-900-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Graphik-900.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-900.otf -------------------------------------------------------------------------------- /assets/fonts/Graphik-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-900.woff -------------------------------------------------------------------------------- /assets/fonts/Graphik-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/fonts/Graphik-900.woff2 -------------------------------------------------------------------------------- /assets/images/A-MARK-ACCORDPROJECT-ONELINE-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 11 | 13 | 16 | 17 | 19 | 21 | 23 | 26 | 28 | 30 | 32 | 34 | 37 | 38 | 40 | 41 | -------------------------------------------------------------------------------- /assets/images/APLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/images/APLogo.png -------------------------------------------------------------------------------- /assets/images/LF-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/images/LF-logo.png -------------------------------------------------------------------------------- /assets/images/accord_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/images/accord_logo.png -------------------------------------------------------------------------------- /assets/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/images/background.jpg -------------------------------------------------------------------------------- /assets/images/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/accordproject/models/661a06d08c36cc7eba98ad3c8d57c6c3b2f3cf31/assets/images/noise.png -------------------------------------------------------------------------------- /concertoVersions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | 'use strict'; 16 | 17 | const concertoFromVersion = (version) => ({ 18 | ModelManager: require(`concerto-core-${version}`).ModelManager, 19 | concertoVersion: require(`concerto-core-${version}`).version.version, 20 | ModelFile: require(`concerto-core-${version}`).ModelFile, 21 | MetaModel: require(`concerto-core-${version}`).MetaModel, 22 | FileWriter: version !== '0.82' ? require(`concerto-util-${version}`).FileWriter : require(`concerto-tools-${version}`).FileWriter, 23 | CodeGen: require(`concerto-tools-${version}`).CodeGen, 24 | Parser: version !== '0.82' ? require(`concerto-cto-${version}`).Parser : null, 25 | }); 26 | 27 | /** 28 | * This is a little confusing, because we conflate CTO syntax version 29 | * with the version of the Concerto library that can be used to parse the CTO synax. 30 | * So the default version is now 2.0.0, because anything other than 0.82 CTO syntax or lower 31 | * should be compatible with version 2.0.x of the CTO parser 32 | */ 33 | module.exports = { 34 | // We're forced to use version 2 by default, because we want to force strict mode in version 3. 35 | // Older models do not have version declarations and we can't modify them retrospectively 36 | defaultVersion: '2.0.0', 37 | // '0.82.11': concertoFromVersion('0.82'), 38 | '2.0.0': concertoFromVersion('2.0'), 39 | '3.6.0': concertoFromVersion('3.6'), 40 | }; 41 | -------------------------------------------------------------------------------- /fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: Graphik; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url(/assets/fonts/Graphik-400.woff) format("woff2"), 6 | url(/assets/fonts/Graphik-400.woff) format("woff"); 7 | } 8 | @font-face { 9 | font-family: Graphik; 10 | font-style: normal; 11 | font-weight: 500; 12 | src: url(/assets/fonts/Graphik-500.woff2) format("woff2"), 13 | url(/assets/fonts/Graphik-500.woff) format("woff"); 14 | } 15 | @font-face { 16 | font-family: Graphik; 17 | font-style: normal; 18 | font-weight: 600; 19 | src: url(/assets/fonts/Graphik-600.woff2) format("woff2"), 20 | url(/assets/fonts/Graphik-600.woff) format("woff"); 21 | } 22 | @font-face { 23 | font-family: Graphik; 24 | font-style: italic; 25 | font-weight: 400; 26 | src: url(/assets/fonts/Graphik-400-Italic.woff2) format("woff2"), 27 | url(/assets/fonts/Graphik-400-Italic.woff) format("woff"); 28 | } 29 | @font-face { 30 | font-family: Graphik; 31 | font-style: normal; 32 | font-weight: 200; 33 | src: url(/assets/fonts/Graphik-200.woff2) format("woff2"), 34 | url(/assets/fonts/Graphik-200.woff) format("woff"); 35 | } 36 | @font-face { 37 | font-family: Graphik; 38 | font-style: normal; 39 | font-weight: 300; 40 | src: url(/assets/fonts/Graphik-300.woff2) format("woff2"), 41 | url(/assets/fonts/Graphik-300.woff) format("woff"); 42 | } 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@accordproject/models", 3 | "version": "0.2.0", 4 | "description": "This repository host all Accord Project models. Models are captured using the Concerto modeling language; a platform and runtime neutral typed schema language.", 5 | "engines": { 6 | "node": ">=18", 7 | "npm": ">=10" 8 | }, 9 | "main": "build.js", 10 | "scripts": { 11 | "build": "node build.js", 12 | "start": "serve ./build" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/accordproject/models.git" 17 | }, 18 | "devDependencies": { 19 | "adm-zip": "^0.4.16", 20 | "bulma": "^0.7.5", 21 | "concerto-core-0.82": "npm:@accordproject/concerto-core@0.82.11", 22 | "concerto-core-2.0": "npm:@accordproject/concerto-core@2.1.0", 23 | "concerto-core-3.6": "npm:@accordproject/concerto-core@3.19.4", 24 | "concerto-cto-2.0": "npm:@accordproject/concerto-cto@2.1.0", 25 | "concerto-cto-3.6": "npm:@accordproject/concerto-cto@3.19.4", 26 | "concerto-tools-0.82": "npm:@accordproject/concerto-tools@0.82.11", 27 | "concerto-tools-2.0": "npm:@accordproject/concerto-tools@2.1.0", 28 | "concerto-tools-3.6": "npm:@accordproject/concerto-codegen@3.29.10", 29 | "concerto-util-2.0": "npm:@accordproject/concerto-util@2.1.0", 30 | "concerto-util-3.6": "npm:@accordproject/concerto-util@3.19.4", 31 | "fs-extra": "^6.0.1", 32 | "lodash": "^4.17.20", 33 | "mkdirp": "^1.0.4", 34 | "nunjucks": "^3.2.4", 35 | "plantuml-encoder": "^1.4.0", 36 | "rimraf": "^2.7.1", 37 | "semver": "^6.3.0", 38 | "serve": "^14.0.1", 39 | "showdown": "^1.9.1" 40 | }, 41 | "keywords": [ 42 | "accord", 43 | "legal", 44 | "model", 45 | "composer" 46 | ], 47 | "author": "Accord Project", 48 | "license": "Apache-2.0", 49 | "bugs": { 50 | "url": "https://github.com/accordproject/models/issues" 51 | }, 52 | "homepage": "https://github.com/accordproject/models#readme", 53 | "dependencies": { 54 | "@accordproject/concerto-core": "^3.19.4", 55 | "@accordproject/concerto-codegen": "^3.29.10" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/accordproject/contract.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.contract 18 | 19 | /** 20 | * Contract Data 21 | * -- Describes the structure of contracts and clauses 22 | */ 23 | 24 | /* A contract is a asset -- This contains the contract data */ 25 | abstract asset Contract identified by contractId { 26 | o String contractId 27 | } 28 | 29 | /* A clause is an asset -- This contains the clause data */ 30 | abstract asset Clause identified by clauseId { 31 | o String clauseId 32 | } 33 | -------------------------------------------------------------------------------- /src/accordproject/contract@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | 17 | namespace org.accordproject.contract@0.2.0 18 | 19 | /** 20 | * Contract Data 21 | * -- Describes the structure of contracts and clauses 22 | */ 23 | 24 | /* A contract is a asset -- This contains the contract data */ 25 | abstract asset Contract identified by contractId { 26 | o String contractId 27 | } 28 | 29 | /* A clause is an asset -- This contains the clause data */ 30 | abstract asset Clause identified by clauseId { 31 | o String clauseId 32 | } 33 | -------------------------------------------------------------------------------- /src/accordproject/obligation.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.obligation 18 | 19 | import org.accordproject.runtime.Obligation from https://models.accordproject.org/accordproject/runtime.cto 20 | import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money@0.2.0.cto 21 | 22 | /** 23 | * Useful Obligations 24 | * -- Predefined obligations for general use in Accord Project templates 25 | */ 26 | 27 | event PaymentObligation extends Obligation { 28 | o MonetaryAmount amount 29 | o String description 30 | } 31 | 32 | event NotificationObligation extends Obligation { 33 | o String title 34 | o String message 35 | } 36 | -------------------------------------------------------------------------------- /src/accordproject/obligation@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | 17 | namespace org.accordproject.obligation@0.2.0 18 | 19 | import org.accordproject.runtime@0.2.0.Obligation from https://models.accordproject.org/accordproject/runtime@0.2.0.cto 20 | import org.accordproject.money@0.3.0.MonetaryAmount from https://models.accordproject.org/money@0.3.0.cto 21 | 22 | /** 23 | * Useful Obligations 24 | * -- Predefined obligations for general use in Accord Project templates 25 | */ 26 | 27 | event PaymentObligation extends Obligation { 28 | o MonetaryAmount amount 29 | o String description 30 | } 31 | 32 | event NotificationObligation extends Obligation { 33 | o String title 34 | o String message 35 | } 36 | -------------------------------------------------------------------------------- /src/accordproject/party.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.party 18 | 19 | /* A party to a contract */ 20 | participant Party identified by partyId { 21 | o String partyId 22 | } 23 | -------------------------------------------------------------------------------- /src/accordproject/party@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | 17 | namespace org.accordproject.party@0.2.0 18 | 19 | /* A party to a contract */ 20 | participant Party identified by partyId { 21 | o String partyId 22 | } 23 | -------------------------------------------------------------------------------- /src/accordproject/runtime.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.runtime 18 | 19 | import org.accordproject.contract.Contract from https://models.accordproject.org/accordproject/contract.cto 20 | 21 | /** 22 | * Runtime API 23 | * -- Describes input and output of calls to a contract's clause 24 | */ 25 | 26 | /* A request is a transaction */ 27 | transaction Request { 28 | } 29 | 30 | /* A response is a transaction */ 31 | transaction Response { 32 | } 33 | 34 | /* An event that represents an obligation that needs to be fulfilled */ 35 | abstract event Obligation identified { 36 | /* A back reference to the governing contract that emitted this obligation */ 37 | --> Contract contract 38 | 39 | /* The party that is obligated */ 40 | --> Participant promisor optional 41 | 42 | /* The party that receives the performance */ 43 | --> Participant promisee optional 44 | 45 | /* The time before which the obligation is fulfilled */ 46 | o DateTime deadline optional 47 | } 48 | 49 | /* A contract state is an asset -- The runtime state of the contract */ 50 | asset State { 51 | } 52 | -------------------------------------------------------------------------------- /src/accordproject/runtime@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | 17 | namespace org.accordproject.runtime@0.2.0 18 | 19 | import org.accordproject.contract@0.2.0.Contract from https://models.accordproject.org/accordproject/contract@0.2.0.cto 20 | 21 | /** 22 | * Runtime API 23 | * -- Describes input and output of calls to a contract's clause 24 | */ 25 | 26 | /* A request is a transaction */ 27 | transaction Request { 28 | } 29 | 30 | /* A response is a transaction */ 31 | transaction Response { 32 | } 33 | 34 | /* An event that represents an obligation that needs to be fulfilled */ 35 | abstract event Obligation identified { 36 | /* A back reference to the governing contract that emitted this obligation */ 37 | --> Contract contract 38 | 39 | /* The party that is obligated */ 40 | --> Participant promisor optional 41 | 42 | /* The party that receives the performance */ 43 | --> Participant promisee optional 44 | 45 | /* The time before which the obligation is fulfilled */ 46 | o DateTime deadline optional 47 | } 48 | 49 | /* A contract state is an asset -- The runtime state of the contract */ 50 | asset State { 51 | } 52 | -------------------------------------------------------------------------------- /src/address.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.address 16 | 17 | /** 18 | * Based on http://schema.org/PostalAddress 19 | */ 20 | concept PostalAddress { 21 | o String streetAddress optional 22 | o String postalCode optional 23 | o String postOfficeBoxNumber optional 24 | o String addressRegion optional 25 | o String addressLocality optional 26 | o String addressCountry optional 27 | } -------------------------------------------------------------------------------- /src/address@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.address@0.2.0 16 | 17 | /** 18 | * Based on http://schema.org/PostalAddress 19 | */ 20 | concept PostalAddress { 21 | o String streetAddress optional 22 | o String postalCode optional 23 | o String postOfficeBoxNumber optional 24 | o String addressRegion optional 25 | o String addressLocality optional 26 | o String addressCountry optional 27 | } -------------------------------------------------------------------------------- /src/binary.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.binary 16 | 17 | abstract asset BinaryResource identified by identifier { 18 | o String identifier 19 | o String name 20 | o String mimeType 21 | o String encoding default="base64" 22 | } 23 | 24 | asset BinaryReference extends BinaryResource { 25 | } 26 | 27 | asset BinaryFile extends BinaryResource { 28 | o String content 29 | } 30 | -------------------------------------------------------------------------------- /src/binary@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.binary@0.2.0 16 | 17 | abstract asset BinaryResource identified by identifier { 18 | o String identifier 19 | o String name 20 | o String mimeType 21 | o String encoding default="base64" 22 | } 23 | 24 | asset BinaryReference extends BinaryResource { 25 | } 26 | 27 | asset BinaryFile extends BinaryResource { 28 | o String content 29 | } 30 | -------------------------------------------------------------------------------- /src/calendar/calendar.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.calendar 16 | 17 | import org.accordproject.time.Duration from https://models.accordproject.org/time@0.2.0.cto 18 | import org.accordproject.geo.GeoCoordinates from https://models.accordproject.org/geo.cto 19 | 20 | /** 21 | * This is based on RFC 5545 22 | * Credit to https://github.com/rianjs/ical.net/blob/master/v2/ical.NET/Interfaces/Components/IEvent.cs 23 | * for the basic structure of the model 24 | */ 25 | 26 | /** 27 | * An abstract type 28 | */ 29 | abstract asset CalendarComponent identified by uid { 30 | o String uid 31 | } 32 | 33 | /** 34 | * An abstract type 35 | */ 36 | abstract asset UniqueComponent extends CalendarComponent { 37 | o String[] attendee optional 38 | o String[] comment optional 39 | o DateTime dtstamp optional 40 | o String organizer optional 41 | o String[] requestStatuses optional 42 | o String url optional 43 | } 44 | 45 | /** 46 | * An abstract type 47 | */ 48 | abstract asset RecurringComponent extends UniqueComponent { 49 | o String[] attachements optional 50 | o String[] categories optional 51 | o String classType optional 52 | o String[] contacts optional 53 | o DateTime created optional 54 | o String description optional 55 | o DateTime lastModified optional 56 | o Integer priority optional 57 | o String[] related optional 58 | o Integer sequence optional 59 | o String summary optional 60 | } 61 | 62 | /** 63 | * An alarm in a calendar 64 | */ 65 | asset VAlarm extends CalendarComponent { 66 | o String alarmAction optional 67 | o String attachment optional 68 | o String[] attendees optional 69 | o String description optional 70 | o Duration duration optional 71 | o Integer repeat optional 72 | o String summary optional 73 | } 74 | 75 | /** 76 | * An event in a calendar 77 | */ 78 | asset VEvent extends RecurringComponent { 79 | o DateTime dtend optional 80 | o Duration duration optional 81 | o DateTime end optional 82 | 83 | o Boolean isAllDay optional 84 | o GeoCoordinates geo optional 85 | o String location optional 86 | o String[] resources optional 87 | o String transparency optional 88 | o Boolean isActive optional 89 | } 90 | 91 | /** 92 | * An freebusy in a calendar 93 | */ 94 | asset VFreebusy extends UniqueComponent { 95 | o DateTime dtstart optional 96 | o DateTime dtend optional 97 | o DateTime start optional 98 | o DateTime end optional 99 | } 100 | 101 | /** 102 | * An journal entry in a calendar 103 | */ 104 | asset VJournal extends RecurringComponent { 105 | } 106 | 107 | /** 108 | * An todo entry in a calendar 109 | */ 110 | asset VTodo extends RecurringComponent { 111 | o DateTime completed optional 112 | o DateTime due optional 113 | o Duration duration optional 114 | o GeoCoordinates geo optional 115 | o String location optional 116 | o Integer percentComplete optional 117 | o String[] resources optional 118 | o String todo optional 119 | } -------------------------------------------------------------------------------- /src/cicero/base.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.base 16 | 17 | /** 18 | * System model for Accord Project models. If you use the CiceroModelManager 19 | * from the @accordproject/cicero-core npm module you do not need to import this file. 20 | */ 21 | abstract asset Asset { } 22 | 23 | abstract participant Participant { } 24 | 25 | abstract transaction Transaction identified by transactionId { 26 | o String transactionId 27 | } 28 | 29 | abstract event Event identified by eventId { 30 | o String eventId 31 | } -------------------------------------------------------------------------------- /src/cicero/base@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.base@0.2.0 16 | 17 | /** 18 | * System model for Accord Project models. If you use the CiceroModelManager 19 | * from the @accordproject/cicero-core npm module you do not need to import this file. 20 | */ 21 | abstract asset Asset { } 22 | 23 | abstract participant Participant { } 24 | 25 | abstract transaction Transaction identified by transactionId { 26 | o String transactionId 27 | } 28 | 29 | abstract event Event identified by eventId { 30 | o String eventId 31 | } -------------------------------------------------------------------------------- /src/cicero/contract.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.cicero.contract 16 | 17 | /** 18 | * Contract Data 19 | * -- Describes the structure of contracts and clauses 20 | */ 21 | 22 | /* A contract state is an asset -- The runtime state of the contract */ 23 | asset AccordContractState identified by stateId { 24 | o String stateId 25 | } 26 | 27 | /* A party to a contract */ 28 | participant AccordParty identified by partyId { 29 | o String partyId 30 | } 31 | 32 | /* A contract is a asset -- This contains the contract data */ 33 | abstract asset AccordContract identified by contractId { 34 | o String contractId 35 | --> AccordParty[] parties optional 36 | } 37 | 38 | /* A clause is an asset -- This contains the clause data */ 39 | abstract asset AccordClause identified by clauseId { 40 | o String clauseId 41 | } 42 | -------------------------------------------------------------------------------- /src/cicero/contract@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.cicero.contract@0.2.0 16 | 17 | /** 18 | * Contract Data 19 | * -- Describes the structure of contracts and clauses 20 | */ 21 | 22 | /* A contract state is an asset -- The runtime state of the contract */ 23 | asset AccordContractState identified by stateId { 24 | o String stateId 25 | } 26 | 27 | /* A party to a contract */ 28 | participant AccordParty identified by partyId { 29 | o String partyId 30 | } 31 | 32 | /* A contract is a asset -- This contains the contract data */ 33 | abstract asset AccordContract identified by contractId { 34 | o String contractId 35 | --> AccordParty[] parties optional 36 | } 37 | 38 | /* A clause is an asset -- This contains the clause data */ 39 | abstract asset AccordClause identified by clauseId { 40 | o String clauseId 41 | } 42 | -------------------------------------------------------------------------------- /src/cicero/runtime.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | // requires: concerto-core:<=0.82.11 16 | namespace org.accordproject.cicero.runtime 17 | 18 | import org.accordproject.cicero.contract.AccordContract from https://models.accordproject.org/cicero/contract.cto 19 | import org.accordproject.cicero.contract.AccordContractState from https://models.accordproject.org/cicero/contract.cto 20 | import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money.cto 21 | 22 | /** 23 | * Contract API 24 | * -- Describes input and output of calls to a contract's clause 25 | */ 26 | 27 | /* A request is a transaction */ 28 | transaction Request {} 29 | 30 | /* A response is a transaction */ 31 | transaction Response {} 32 | 33 | /* An Error is a transaction */ 34 | abstract transaction ErrorResponse {} 35 | 36 | /* An event that represents an obligation that needs to be fulfilled */ 37 | abstract event Obligation { 38 | /* A back reference to the governing contract that emitted this obligation */ 39 | --> AccordContract contract 40 | 41 | /* The party that is obligated */ 42 | --> Participant promisor optional // TODO make this mandatory once proper party support is in place 43 | 44 | /* The party that receives the performance */ 45 | --> Participant promisee optional // TODO make this mandatory once proper party support is in place 46 | 47 | /* The time before which the obligation is fulfilled */ 48 | o DateTime deadline optional 49 | } 50 | 51 | event PaymentObligation extends Obligation{ 52 | o MonetaryAmount amount 53 | o String description 54 | } 55 | 56 | event NotificationObligation extends Obligation { 57 | o String title 58 | o String message 59 | } 60 | 61 | /* A payload has contract data, a request and a state */ 62 | concept Payload { 63 | o AccordContract contract // the contract data 64 | o Request request 65 | o AccordContractState state optional 66 | } 67 | 68 | /* If the call to a contract's clause succeeds, it returns a response, a list of events and a new state */ 69 | concept Success { 70 | o Response response 71 | o AccordContractState state 72 | o Event[] emit 73 | } 74 | /* If the call to a contract's clause fails, it returns and error */ 75 | concept Failure { 76 | o ErrorResponse error 77 | } 78 | 79 | /** 80 | * The functional signature for a contract call is as follows: 81 | * clausecall : String contractName -> String clauseName -> Payload payload -> Success | Failure 82 | */ 83 | -------------------------------------------------------------------------------- /src/cicero/runtime@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | namespace org.accordproject.cicero.runtime@0.2.0 17 | 18 | import org.accordproject.cicero.contract@0.2.0.{AccordContract, AccordContractState} from https://models.accordproject.org/cicero/contract@0.2.0.cto 19 | import org.accordproject.money@0.3.0.MonetaryAmount from https://models.accordproject.org/money@0.3.0.cto 20 | 21 | /** 22 | * Contract API 23 | * -- Describes input and output of calls to a contract's clause 24 | */ 25 | 26 | /* A request is a transaction */ 27 | transaction Request {} 28 | 29 | /* A response is a transaction */ 30 | transaction Response {} 31 | 32 | /* An Error is a transaction */ 33 | abstract transaction ErrorResponse {} 34 | 35 | /* An event that represents an obligation that needs to be fulfilled */ 36 | abstract event Obligation { 37 | /* A back reference to the governing contract that emitted this obligation */ 38 | --> AccordContract contract 39 | 40 | /* The party that is obligated */ 41 | --> Participant promisor optional // TODO make this mandatory once proper party support is in place 42 | 43 | /* The party that receives the performance */ 44 | --> Participant promisee optional // TODO make this mandatory once proper party support is in place 45 | 46 | /* The time before which the obligation is fulfilled */ 47 | o DateTime deadline optional 48 | } 49 | 50 | event PaymentObligation extends Obligation{ 51 | o MonetaryAmount amount 52 | o String description 53 | } 54 | 55 | event NotificationObligation extends Obligation { 56 | o String title 57 | o String message 58 | } 59 | 60 | /* A payload has contract data, a request and a state */ 61 | concept Payload { 62 | o AccordContract contract // the contract data 63 | o Request request 64 | o AccordContractState state optional 65 | } 66 | 67 | /* If the call to a contract's clause succeeds, it returns a response, a list of events and a new state */ 68 | concept Success { 69 | o Response response 70 | o AccordContractState state 71 | o Event[] emit 72 | } 73 | /* If the call to a contract's clause fails, it returns and error */ 74 | concept Failure { 75 | o ErrorResponse error 76 | } 77 | 78 | /** 79 | * The functional signature for a contract call is as follows: 80 | * clausecall : String contractName -> String clauseName -> Payload payload -> Success | Failure 81 | */ 82 | -------------------------------------------------------------------------------- /src/color.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.color 16 | 17 | enum Color { 18 | o Red // Red 19 | o Orange // Orange 20 | o Yellow // Yellow 21 | o Green // Green 22 | o Blue // Blue 23 | } -------------------------------------------------------------------------------- /src/color@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.color@0.2.0 16 | 17 | enum Color { 18 | o Red // Red 19 | o Orange // Orange 20 | o Yellow // Yellow 21 | o Green // Green 22 | o Blue // Blue 23 | } -------------------------------------------------------------------------------- /src/concerto/decorators.cto: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * DecoratorCommandSet defines a set of instructions to add or update decorators 4 | * on model elements. 5 | */ 6 | namespace org.accordproject.decoratorcommands 7 | 8 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel@0.3.0.cto 9 | 10 | /** 11 | * A reference to an existing named & versioned DecoratorCommandSet 12 | */ 13 | concept DecoratorCommandSetReference { 14 | o String name 15 | o String version 16 | } 17 | 18 | /** 19 | * Whether to upsert or append the decorator 20 | */ 21 | enum CommandType { 22 | o UPSERT 23 | o APPEND 24 | } 25 | 26 | /** 27 | * Which models elements to add the decorator to. Any null 28 | * elements are 'wildcards'. 29 | */ 30 | concept CommandTarget { 31 | o String namespace optional 32 | o String declaration optional 33 | o String property optional 34 | o String type optional 35 | } 36 | 37 | /** 38 | * Applies a decorator to a given target 39 | */ 40 | concept Command { 41 | o CommandTarget target 42 | o Decorator decorator 43 | o CommandType type 44 | } 45 | 46 | /** 47 | * A named and versioned set of commands. Includes are supported for modularity/reuse. 48 | */ 49 | concept DecoratorCommandSet { 50 | o String name 51 | o String version 52 | o DecoratorCommandSetReference[] includes optional 53 | o Command[] commands 54 | } 55 | -------------------------------------------------------------------------------- /src/concerto/decorators@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | /** 16 | * DecoratorCommandSet defines a set of instructions to add or update decorators 17 | * on model elements. 18 | */ 19 | concerto version "^3.0.0" 20 | namespace org.accordproject.decoratorcommands@0.2.0 21 | 22 | import concerto.metamodel@0.4.0.Decorator from https://models.accordproject.org/concerto/metamodel@0.4.0.cto 23 | 24 | /** 25 | * A reference to an existing named & versioned DecoratorCommandSet 26 | */ 27 | concept DecoratorCommandSetReference { 28 | o String name 29 | o String version 30 | } 31 | 32 | /** 33 | * Whether to upsert or append the decorator 34 | */ 35 | enum CommandType { 36 | o UPSERT 37 | o APPEND 38 | } 39 | 40 | /** 41 | * Which models elements to add the decorator to. Any null 42 | * elements are 'wildcards'. 43 | */ 44 | concept CommandTarget { 45 | o String namespace optional 46 | o String declaration optional 47 | o String property optional 48 | o String type optional 49 | } 50 | 51 | /** 52 | * Applies a decorator to a given target 53 | */ 54 | concept Command { 55 | o CommandTarget target 56 | o Decorator decorator 57 | o CommandType type 58 | } 59 | 60 | /** 61 | * A named and versioned set of commands. Includes are supported for modularity/reuse. 62 | */ 63 | concept DecoratorCommandSet { 64 | o String name 65 | o String version 66 | o DecoratorCommandSetReference[] includes optional 67 | o Command[] commands 68 | } 69 | -------------------------------------------------------------------------------- /src/concerto/scalar.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 3.2.0" 16 | 17 | namespace concerto.scalar@1.0.0 18 | 19 | /** 20 | * An UUID type for concerto fields 21 | */ 22 | scalar UUID extends String default="00000000-0000-0000-0000-000000000000" regex=/^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$/ 23 | -------------------------------------------------------------------------------- /src/contact@1.0.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.contact@1.0.0 16 | 17 | /* 18 | * Definitions in this file do not enforce character constraints (for example, using 19 | * regular expressions or digits). It is the responsibility of the application to enforce 20 | * theseconstraints. This allows broader compatibility between systems and agreements which 21 | * may have different requirements. 22 | */ 23 | 24 | /* 25 | * An email address without enclosing angle brackets 26 | * 27 | * Note: There is a restriction in RFC 2821 on the length of an 28 | * address in MAIL and RCPT commands of 254 characters 29 | * https://www.rfc-editor.org/errata_search.php?rfc=3696 30 | */ 31 | scalar EmailAddress extends String length=[,254] 32 | 33 | /* 34 | * A representation of telephone numbers to define commonly used structures 35 | */ 36 | concept PhoneNumber { 37 | /* 38 | * A formatted E.123 national number, potentially including spaces parentheses 39 | * and separators (e.g. '-'). Does not include an International Prefix, extension, 40 | * trunk prefix or alternate endings. 41 | * https://www.itu.int/rec/T-REC-E.123-200102-I/en 42 | */ 43 | o String number length=[0,32] 44 | 45 | /* 46 | * A standardized E.164 international telephone number without formatting such 47 | * as spaces, parentheses or separators (e.g. '-'). Includes the International Prefix 48 | * and Subscriber Number (National Destination Code and Base Number). Does not 49 | * include an extension, trunk prefix or alternate endings. 50 | * https://www.itu.int/rec/T-REC-E.164-201011-I/en 51 | */ 52 | o String normalizedNumber length=[,15] optional 53 | 54 | /* 55 | * An E.164 Network Address Extension / Sub-address ("Ext.", Direct Dial In, 56 | * or Direct Inward Dial) number. Does not include a "Ext." characters. 57 | * https://www.itu.int/rec/T-REC-E.164-201011-I/en 58 | */ 59 | o String extension length=[0,6] optional 60 | 61 | /* 62 | * The International Prefix or Country Code (CC) for the telephone number. Includes 63 | * the leading '+' character or zeros. The International Prefix has 1-3 digits. 64 | * https://www.itu.int/rec/T-REC-E.164-201011-I/en 65 | */ 66 | o String countryCode length=[0,7] optional 67 | } 68 | -------------------------------------------------------------------------------- /src/creative/creativeWork.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.creativework 16 | 17 | import org.accordproject.time.Duration from https://models.accordproject.org/time@0.2.0.cto 18 | import org.accordproject.person.Person from https://models.accordproject.org/person.cto 19 | import org.accordproject.organization.Organization from https://models.accordproject.org/organization.cto 20 | 21 | /** 22 | * Based on https://schema.org/CreativeWork 23 | */ 24 | 25 | enum BookGenre { 26 | o Fantasy 27 | o Romance 28 | } 29 | 30 | enum Medium { 31 | o Audio 32 | o Print 33 | o Video 34 | } 35 | 36 | concept CreativeWork { 37 | o Person[] creators 38 | o DateTime dateCreated 39 | o Medium medium 40 | o String title optional 41 | } 42 | 43 | concept Album extends CreativeWork { 44 | o Song[] songs 45 | } 46 | 47 | concept Book extends CreativeWork { 48 | o Organization publisher 49 | o BookGenre genre 50 | } 51 | 52 | enum MusicGenre { 53 | o Rock 54 | o Rap 55 | o Country 56 | o Pop 57 | o Jazz 58 | o Grime 59 | o ThrashMetal 60 | } 61 | 62 | concept Song extends CreativeWork { 63 | o Duration duration 64 | o MusicGenre genre 65 | o Person[] performers 66 | } 67 | -------------------------------------------------------------------------------- /src/creative/creativeWork@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.creativework@0.2.0 16 | 17 | import org.accordproject.time@0.3.0.Duration from https://models.accordproject.org/time@0.3.0.cto 18 | import org.accordproject.person@0.2.0.Person from https://models.accordproject.org/person@0.2.0.cto 19 | import org.accordproject.organization@0.2.0.Organization from https://models.accordproject.org/organization@0.2.0.cto 20 | 21 | /** 22 | * Based on https://schema.org/CreativeWork 23 | */ 24 | 25 | enum BookGenre { 26 | o Fantasy 27 | o Romance 28 | } 29 | 30 | enum Medium { 31 | o Audio 32 | o Print 33 | o Video 34 | } 35 | 36 | concept CreativeWork { 37 | o Person[] creators 38 | o DateTime dateCreated 39 | o Medium medium 40 | o String title optional 41 | } 42 | 43 | concept Album extends CreativeWork { 44 | o Song[] songs 45 | } 46 | 47 | concept Book extends CreativeWork { 48 | o Organization publisher 49 | o BookGenre genre 50 | } 51 | 52 | enum MusicGenre { 53 | o Rock 54 | o Rap 55 | o Country 56 | o Pop 57 | o Jazz 58 | o Grime 59 | o ThrashMetal 60 | } 61 | 62 | concept Song extends CreativeWork { 63 | o Duration duration 64 | o MusicGenre genre 65 | o Person[] performers 66 | } 67 | -------------------------------------------------------------------------------- /src/ergo/monitor.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ergo.monitor 16 | 17 | /** 18 | * CPU time for a compilation phase (single phase, cummulative for that phase, total since process started) 19 | */ 20 | concept Phase { 21 | o String name 22 | o Double single 23 | o Double cummulative 24 | o Double total 25 | o Phase[] subphases 26 | } 27 | 28 | /** 29 | * Monitor 30 | */ 31 | concept Monitor { 32 | o Phase[] phases 33 | } 34 | -------------------------------------------------------------------------------- /src/ergo/monitor@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.ergo.monitor@0.2.0 16 | 17 | /** 18 | * CPU time for a compilation phase (single phase, cummulative for that phase, total since process started) 19 | */ 20 | concept Phase { 21 | o String name 22 | o Double single 23 | o Double cummulative 24 | o Double total 25 | o Phase[] subphases 26 | } 27 | 28 | /** 29 | * Monitor 30 | */ 31 | concept Monitor { 32 | o Phase[] phases 33 | } 34 | -------------------------------------------------------------------------------- /src/ergo/options.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ergo.options 16 | 17 | concept Options { 18 | o Boolean wrapVariables 19 | o Boolean template 20 | } 21 | -------------------------------------------------------------------------------- /src/ergo/options@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.ergo.options@0.2.0 16 | 17 | concept Options { 18 | o Boolean wrapVariables 19 | o Boolean template 20 | } 21 | -------------------------------------------------------------------------------- /src/finance/bond.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.finance.bond 16 | 17 | import org.accordproject.organization.Organization from https://models.accordproject.org/organization.cto 18 | import org.accordproject.time.Duration from https://models.accordproject.org/time.cto 19 | import org.accordproject.money.CurrencyCode from https://models.accordproject.org/money.cto 20 | 21 | enum CouponType { 22 | o FIXED 23 | o FLOATING 24 | } 25 | 26 | concept PaymentFrequency { 27 | o Integer periodMultiplier 28 | o Duration period 29 | } 30 | 31 | /** 32 | * Definition of a Bond, based on the FpML schema: 33 | * http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/elements/bond.html 34 | * 35 | */ 36 | concept Bond { 37 | o String[] instrumentId 38 | o String description optional 39 | o CurrencyCode currency optional 40 | o String[] exchangeId 41 | o String clearanceSystem optional 42 | o String definition optional 43 | o String seniority optional 44 | o CouponType couponType optional 45 | o Double couponRate optional 46 | o DateTime maturity 47 | o Double parValue 48 | o Double faceAmount 49 | o PaymentFrequency paymentFrequency 50 | o String dayCountFraction 51 | --> Organization issuer 52 | } 53 | 54 | asset BondAsset identified by ISINCode { 55 | o String ISINCode 56 | o Bond bond 57 | } 58 | -------------------------------------------------------------------------------- /src/finance/bond@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.finance.bond 16 | 17 | import org.accordproject.organization.Organization from https://models.accordproject.org/organization.cto 18 | import org.accordproject.time.Duration from https://models.accordproject.org/time@0.2.0.cto 19 | import org.accordproject.money.CurrencyCode from https://models.accordproject.org/money@0.2.0.cto 20 | 21 | enum CouponType { 22 | o FIXED 23 | o FLOATING 24 | } 25 | 26 | concept PaymentFrequency { 27 | o Integer periodMultiplier 28 | o Duration period 29 | } 30 | 31 | /** 32 | * Definition of a Bond, based on the FpML schema: 33 | * http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/elements/bond.html 34 | * 35 | */ 36 | concept Bond { 37 | o String[] instrumentId 38 | o String description optional 39 | o CurrencyCode currency optional 40 | o String[] exchangeId 41 | o String clearanceSystem optional 42 | o String definition optional 43 | o String seniority optional 44 | o CouponType couponType optional 45 | o Double couponRate optional 46 | o DateTime maturity 47 | o Double parValue 48 | o Double faceAmount 49 | o PaymentFrequency paymentFrequency 50 | o String dayCountFraction 51 | --> Organization issuer 52 | } 53 | 54 | asset BondAsset identified by ISINCode { 55 | o String ISINCode 56 | o Bond bond 57 | } 58 | -------------------------------------------------------------------------------- /src/finance/bond@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.finance.bond@0.3.0 16 | 17 | import org.accordproject.organization@0.2.0.Organization from https://models.accordproject.org/organization@0.2.0.cto 18 | import org.accordproject.time@0.3.0.Duration from https://models.accordproject.org/time@0.3.0.cto 19 | import org.accordproject.money@0.3.0.CurrencyCode from https://models.accordproject.org/money@0.3.0.cto 20 | 21 | enum CouponType { 22 | o FIXED 23 | o FLOATING 24 | } 25 | 26 | concept PaymentFrequency { 27 | o Integer periodMultiplier 28 | o Duration period 29 | } 30 | 31 | /** 32 | * Definition of a Bond, based on the FpML schema: 33 | * http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/elements/bond.html 34 | * 35 | */ 36 | concept Bond { 37 | o String[] instrumentId 38 | o String description optional 39 | o CurrencyCode currency optional 40 | o String[] exchangeId 41 | o String clearanceSystem optional 42 | o String definition optional 43 | o String seniority optional 44 | o CouponType couponType optional 45 | o Double couponRate optional 46 | o DateTime maturity 47 | o Double parValue 48 | o Double faceAmount 49 | o PaymentFrequency paymentFrequency 50 | o String dayCountFraction 51 | --> Organization issuer 52 | } 53 | 54 | asset BondAsset identified by ISINCode { 55 | o String ISINCode 56 | o Bond bond 57 | } 58 | -------------------------------------------------------------------------------- /src/finance/loan.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.finance.loan 16 | 17 | import org.accordproject.time.Duration from https://models.accordproject.org/time.cto 18 | import org.accordproject.money.CurrencyCode from https://models.accordproject.org/money.cto 19 | import org.accordproject.money.CryptoCurrencyCode from https://models.accordproject.org/money.cto 20 | 21 | enum CurrencyType { 22 | o MONETARY 23 | o CRYPTOMONETARY 24 | } 25 | 26 | concept PaymentFrequency { 27 | o Integer periodMultiplier 28 | o Duration period 29 | } 30 | 31 | /** 32 | * Definition of a Loan, based on the FpML schema: 33 | * http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/complexTypes/Loan.html 34 | * 35 | */ 36 | concept Loan { 37 | o String[] instrumentId 38 | o String description optional 39 | o CurrencyType currencyType 40 | o CurrencyCode currencyCode optional 41 | o CryptoCurrencyCode cryptoCurrencyCode optional 42 | o String[] exchangeId optional 43 | o String clearanceSystem optional 44 | o String definition optional 45 | o String lein optional 46 | o String facilityType optional 47 | o DateTime maturity 48 | o DateTime creditAgreementDate 49 | o String tranche optional 50 | } 51 | -------------------------------------------------------------------------------- /src/finance/loan@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.finance.loan 16 | 17 | import org.accordproject.time.Duration from https://models.accordproject.org/time@0.2.0.cto 18 | import org.accordproject.money.CurrencyCode from https://models.accordproject.org/money@0.2.0.cto 19 | import org.accordproject.money.DigitalCurrencyCode from https://models.accordproject.org/money@0.2.0.cto 20 | 21 | enum CurrencyType { 22 | o MONETARY 23 | o CRYPTOMONETARY 24 | } 25 | 26 | concept PaymentFrequency { 27 | o Integer periodMultiplier 28 | o Duration period 29 | } 30 | 31 | /** 32 | * Definition of a Loan, based on the FpML schema: 33 | * http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/complexTypes/Loan.html 34 | * 35 | */ 36 | concept Loan { 37 | o String[] instrumentId 38 | o String description optional 39 | o CurrencyType currencyType 40 | o CurrencyCode currencyCode optional 41 | o DigitalCurrencyCode DigitalCurrencyCode optional 42 | o String[] exchangeId optional 43 | o String clearanceSystem optional 44 | o String definition optional 45 | o String lien optional 46 | o String facilityType optional 47 | o DateTime maturity 48 | o DateTime creditAgreementDate 49 | o String tranche optional 50 | } 51 | -------------------------------------------------------------------------------- /src/finance/loan@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.finance.loan@0.2.0 16 | 17 | import org.accordproject.time@0.3.0.Duration from https://models.accordproject.org/time@0.3.0.cto 18 | import org.accordproject.money@0.3.0.CurrencyCode from https://models.accordproject.org/money@0.3.0.cto 19 | import org.accordproject.money@0.3.0.DigitalCurrencyCode from https://models.accordproject.org/money@0.3.0.cto 20 | 21 | enum CurrencyType { 22 | o MONETARY 23 | o CRYPTOMONETARY 24 | } 25 | 26 | concept PaymentFrequency { 27 | o Integer periodMultiplier 28 | o Duration period 29 | } 30 | 31 | /** 32 | * Definition of a Loan, based on the FpML schema: 33 | * http://www.fpml.org/spec/fpml-5-3-2-wd-2/html/reporting/schemaDocumentation/schemas/fpml-asset-5-3_xsd/complexTypes/Loan.html 34 | * 35 | */ 36 | concept Loan { 37 | o String[] instrumentId 38 | o String description optional 39 | o CurrencyType currencyType 40 | o CurrencyCode currencyCode optional 41 | o DigitalCurrencyCode DigitalCurrencyCode optional 42 | o String[] exchangeId optional 43 | o String clearanceSystem optional 44 | o String definition optional 45 | o String lien optional 46 | o String facilityType optional 47 | o DateTime maturity 48 | o DateTime creditAgreementDate 49 | o String tranche optional 50 | } 51 | -------------------------------------------------------------------------------- /src/iot/iot.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.iot 16 | 17 | enum ClickType { 18 | o SINGLE 19 | o DOUBLE 20 | o LONG 21 | } 22 | 23 | /** 24 | * Abstract button press from a device 25 | */ 26 | abstract transaction GenericButtonPress { 27 | o String serialNumber optional 28 | o String batteryVoltage optional 29 | } 30 | /** 31 | * Based on the JSON payload for the AWS IoT Button 32 | */ 33 | transaction ButtonPress extends GenericButtonPress { 34 | o ClickType clickType optional 35 | } 36 | 37 | /** 38 | * A single button press. E.g for Flic. 39 | */ 40 | transaction SingleButtonPress extends GenericButtonPress { 41 | } 42 | 43 | /** 44 | * A double button press. E.g for Flic. 45 | */ 46 | transaction DoubleButtonPress extends GenericButtonPress { 47 | } 48 | 49 | /** 50 | * A long button press. E.g for Flic. 51 | */ 52 | transaction LongButtonPress extends GenericButtonPress { 53 | } -------------------------------------------------------------------------------- /src/iot/iot@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.iot@0.2.0 16 | 17 | enum ClickType { 18 | o SINGLE 19 | o DOUBLE 20 | o LONG 21 | } 22 | 23 | /** 24 | * Abstract button press from a device 25 | */ 26 | abstract transaction GenericButtonPress { 27 | o String serialNumber optional 28 | o String batteryVoltage optional 29 | } 30 | /** 31 | * Based on the JSON payload for the AWS IoT Button 32 | */ 33 | transaction ButtonPress extends GenericButtonPress { 34 | o ClickType clickType optional 35 | } 36 | 37 | /** 38 | * A single button press. E.g for Flic. 39 | */ 40 | transaction SingleButtonPress extends GenericButtonPress { 41 | } 42 | 43 | /** 44 | * A double button press. E.g for Flic. 45 | */ 46 | transaction DoubleButtonPress extends GenericButtonPress { 47 | } 48 | 49 | /** 50 | * A long button press. E.g for Flic. 51 | */ 52 | transaction LongButtonPress extends GenericButtonPress { 53 | } -------------------------------------------------------------------------------- /src/markdown/ciceromark.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ciceromark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark.cto 18 | import org.accordproject.commonmark.List from https://models.accordproject.org/markdown/commonmark.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | concept Clause extends Child { 25 | o String clauseid 26 | o String src 27 | } 28 | 29 | abstract concept VariableValue extends Child { 30 | o String value 31 | } 32 | 33 | abstract concept IdentifiedVariableValue extends VariableValue { 34 | o String id 35 | } 36 | 37 | concept Variable extends IdentifiedVariableValue { 38 | } 39 | 40 | concept ComputedVariable extends VariableValue { 41 | } 42 | 43 | concept ConditionalVariable extends IdentifiedVariableValue { 44 | } 45 | 46 | concept ListVariable extends List { 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ciceromark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark.cto 18 | import org.accordproject.commonmark.List from https://models.accordproject.org/markdown/commonmark.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | concept Clause extends Child { 25 | o String clauseid 26 | o String src 27 | } 28 | 29 | abstract concept VariableValue extends Child { 30 | o String value 31 | o String format optional 32 | } 33 | 34 | abstract concept IdentifiedVariableValue extends VariableValue { 35 | o String id 36 | } 37 | 38 | concept Variable extends IdentifiedVariableValue { 39 | } 40 | 41 | concept ComputedVariable extends VariableValue { 42 | } 43 | 44 | concept ConditionalVariable extends IdentifiedVariableValue { 45 | o String whenTrue 46 | o String whenFalse 47 | } 48 | 49 | concept ListVariable extends List { 50 | } 51 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ciceromark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.2.0.cto 18 | 19 | /** 20 | * A model for Accord Project extensions to commonmark 21 | */ 22 | 23 | abstract concept Element extends Child { 24 | o String name 25 | o String elementType optional 26 | } 27 | 28 | concept Variable extends Element { 29 | o String value 30 | o String identifiedBy optional 31 | } 32 | 33 | concept FormattedVariable extends Variable { 34 | o String format 35 | } 36 | 37 | concept EnumVariable extends Variable { 38 | o String[] enumValues 39 | } 40 | 41 | concept Formula extends Element { 42 | o String value 43 | o String[] dependencies optional 44 | o String code optional 45 | } 46 | 47 | abstract concept Block extends Element { 48 | } 49 | 50 | concept Clause extends Block { 51 | o String src optional 52 | } 53 | 54 | concept Conditional extends Block { 55 | o Boolean isTrue 56 | o Child[] whenTrue 57 | o Child[] whenFalse 58 | } 59 | 60 | concept Optional extends Block { 61 | o Boolean hasSome 62 | o Child[] whenSome 63 | o Child[] whenNone 64 | } 65 | 66 | concept ListBlock extends Block { 67 | o String type 68 | o String tight 69 | o String start optional 70 | o String delimiter optional 71 | } 72 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.3.1.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ciceromark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.2.0.cto 18 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | abstract concept Element extends Child { 25 | o String name 26 | o String elementType optional 27 | o Decorator[] decorators optional 28 | } 29 | 30 | concept Variable extends Element { 31 | o String value 32 | o String identifiedBy optional 33 | } 34 | 35 | concept FormattedVariable extends Variable { 36 | o String format 37 | } 38 | 39 | concept EnumVariable extends Variable { 40 | o String[] enumValues 41 | } 42 | 43 | concept Formula extends Element { 44 | o String value 45 | o String[] dependencies optional 46 | o String code optional 47 | } 48 | 49 | abstract concept Block extends Element { 50 | } 51 | 52 | concept Clause extends Block { 53 | o String src optional 54 | } 55 | 56 | concept Conditional extends Block { 57 | o Boolean isTrue 58 | o Child[] whenTrue 59 | o Child[] whenFalse 60 | } 61 | 62 | concept Optional extends Block { 63 | o Boolean hasSome 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept ListBlock extends Block { 69 | o String type 70 | o String tight 71 | o String start optional 72 | o String delimiter optional 73 | } 74 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.3.2.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ciceromark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.2.0.cto 18 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel@0.2.0.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | abstract concept Element extends Child { 25 | o String name 26 | o String elementType optional 27 | o Decorator[] decorators optional 28 | } 29 | 30 | concept Variable extends Element { 31 | o String value 32 | o String identifiedBy optional 33 | } 34 | 35 | concept FormattedVariable extends Variable { 36 | o String format 37 | } 38 | 39 | concept EnumVariable extends Variable { 40 | o String[] enumValues 41 | } 42 | 43 | concept Formula extends Element { 44 | o String value 45 | o String[] dependencies optional 46 | o String code optional 47 | } 48 | 49 | abstract concept Block extends Element { 50 | } 51 | 52 | concept Clause extends Block { 53 | o String src optional 54 | } 55 | 56 | concept Conditional extends Block { 57 | o Boolean isTrue 58 | o Child[] whenTrue 59 | o Child[] whenFalse 60 | } 61 | 62 | concept Optional extends Block { 63 | o Boolean hasSome 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept ListBlock extends Block { 69 | o String type 70 | o String tight 71 | o String start optional 72 | o String delimiter optional 73 | } 74 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.3.3.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.ciceromark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.4.0.cto 18 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel@0.2.0.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | abstract concept Element extends Child { 25 | o String name 26 | o String elementType optional 27 | o Decorator[] decorators optional 28 | } 29 | 30 | concept Variable extends Element { 31 | o String value 32 | o String identifiedBy optional 33 | } 34 | 35 | concept FormattedVariable extends Variable { 36 | o String format 37 | } 38 | 39 | concept EnumVariable extends Variable { 40 | o String[] enumValues 41 | } 42 | 43 | concept Formula extends Element { 44 | o String value 45 | o String[] dependencies optional 46 | o String code optional 47 | } 48 | 49 | abstract concept Block extends Element { 50 | } 51 | 52 | concept Clause extends Block { 53 | o String src optional 54 | } 55 | 56 | concept Conditional extends Block { 57 | o Boolean isTrue 58 | o Child[] whenTrue 59 | o Child[] whenFalse 60 | } 61 | 62 | concept Optional extends Block { 63 | o Boolean hasSome 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept ListBlock extends Block { 69 | o String type 70 | o String tight 71 | o String start optional 72 | o String delimiter optional 73 | } 74 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.4.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.ciceromark@0.4.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@0.4.0.Decorator from https://models.accordproject.org/concerto/metamodel@0.4.0.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | abstract concept Element extends Child { 25 | o String name 26 | o String elementType optional 27 | o Decorator[] decorators optional 28 | } 29 | 30 | concept Variable extends Element { 31 | o String value 32 | o String identifiedBy optional 33 | } 34 | 35 | concept FormattedVariable extends Variable { 36 | o String format 37 | } 38 | 39 | concept EnumVariable extends Variable { 40 | o String[] enumValues 41 | } 42 | 43 | concept Formula extends Element { 44 | o String value 45 | o String[] dependencies optional 46 | o String code optional 47 | } 48 | 49 | abstract concept Block extends Element { 50 | } 51 | 52 | concept Clause extends Block { 53 | o String src optional 54 | } 55 | 56 | concept Conditional extends Block { 57 | o Boolean isTrue 58 | o Child[] whenTrue 59 | o Child[] whenFalse 60 | } 61 | 62 | concept Optional extends Block { 63 | o Boolean hasSome 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept ListBlock extends Block { 69 | o String type 70 | o String tight 71 | o String start optional 72 | o String delimiter optional 73 | } 74 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.5.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.ciceromark@0.5.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@1.0.0.Decorator from https://models.accordproject.org/concerto/metamodel@1.0.0.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | abstract concept Element extends Child { 25 | o String name 26 | o String elementType optional 27 | o Decorator[] decorators optional 28 | } 29 | 30 | concept Variable extends Element { 31 | o String value 32 | o String identifiedBy optional 33 | } 34 | 35 | concept FormattedVariable extends Variable { 36 | o String format 37 | } 38 | 39 | concept EnumVariable extends Variable { 40 | o String[] enumValues 41 | } 42 | 43 | concept Formula extends Element { 44 | o String value 45 | o String[] dependencies optional 46 | o String code optional 47 | } 48 | 49 | abstract concept Block extends Element { 50 | } 51 | 52 | concept Clause extends Block { 53 | o String src optional 54 | } 55 | 56 | concept Conditional extends Block { 57 | o Boolean isTrue 58 | o Child[] whenTrue 59 | o Child[] whenFalse 60 | } 61 | 62 | concept Optional extends Block { 63 | o Boolean hasSome 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept ListBlock extends Block { 69 | o String type 70 | o String tight 71 | o String start optional 72 | o String delimiter optional 73 | } 74 | -------------------------------------------------------------------------------- /src/markdown/ciceromark@0.6.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.ciceromark@0.6.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@1.0.0.Decorator from https://models.accordproject.org/concerto/metamodel@1.0.0.cto 19 | 20 | /** 21 | * A model for Accord Project extensions to commonmark 22 | */ 23 | 24 | abstract concept Element extends Child { 25 | o String name 26 | o String elementType optional 27 | o Decorator[] decorators optional 28 | } 29 | 30 | concept Variable extends Element { 31 | o String value 32 | o String identifiedBy optional 33 | } 34 | 35 | concept FormattedVariable extends Variable { 36 | o String format 37 | } 38 | 39 | concept EnumVariable extends Variable { 40 | o String[] enumValues 41 | } 42 | 43 | concept Formula extends Element { 44 | o String value 45 | o String[] dependencies optional 46 | o String code optional 47 | } 48 | 49 | abstract concept Block extends Element { 50 | } 51 | 52 | concept Clause extends Block { 53 | o String src optional 54 | } 55 | 56 | concept Contract extends Block { 57 | o String src optional 58 | } 59 | 60 | concept Conditional extends Block { 61 | o Boolean isTrue 62 | o Child[] whenTrue 63 | o Child[] whenFalse 64 | } 65 | 66 | concept Optional extends Block { 67 | o Boolean hasSome 68 | o Child[] whenSome 69 | o Child[] whenNone 70 | } 71 | 72 | concept ListBlock extends Block { 73 | o String type 74 | o String tight 75 | o String start optional 76 | o String delimiter optional 77 | } 78 | -------------------------------------------------------------------------------- /src/markdown/commonmark.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.commonmark 16 | 17 | /** 18 | * A model for a commonmark format markdown file 19 | */ 20 | 21 | abstract concept Node { 22 | o String text optional 23 | o Node[] nodes optional 24 | o Integer line optional 25 | o Integer column optional 26 | o Integer position optional 27 | o Integer startTagPosition optional 28 | } 29 | 30 | abstract concept Root extends Node { 31 | } 32 | 33 | abstract concept Child extends Node { 34 | } 35 | 36 | concept Text extends Child { 37 | } 38 | 39 | concept Attribute { 40 | o String name 41 | o String value 42 | } 43 | concept TagInfo { 44 | o String tagName 45 | o String attributeString 46 | o Attribute[] attributes 47 | o String content 48 | o Boolean closed 49 | } 50 | 51 | concept CodeBlock extends Child { 52 | o String info optional 53 | o TagInfo tag optional 54 | } 55 | 56 | concept Code extends Child { 57 | o String info optional 58 | } 59 | 60 | concept HtmlInline extends Child { 61 | o TagInfo tag optional 62 | } 63 | 64 | concept HtmlBlock extends Child { 65 | o TagInfo tag optional 66 | } 67 | 68 | concept Emph extends Child { 69 | } 70 | 71 | concept Strong extends Child { 72 | } 73 | 74 | concept BlockQuote extends Child { 75 | } 76 | 77 | concept Heading extends Child { 78 | o String level 79 | } 80 | 81 | concept ThematicBreak extends Child { 82 | } 83 | 84 | concept Softbreak extends Child { 85 | } 86 | 87 | concept Linebreak extends Child { 88 | } 89 | 90 | concept Link extends Child { 91 | o String destination 92 | o String title 93 | } 94 | 95 | concept Image extends Child { 96 | o String destination 97 | o String title 98 | } 99 | 100 | concept Paragraph extends Child { 101 | } 102 | 103 | concept List extends Child { 104 | o String type 105 | o String start optional 106 | o String tight 107 | o String delimiter optional 108 | } 109 | 110 | concept Item extends Child { 111 | } 112 | 113 | concept Document extends Root { 114 | o String xmlns 115 | } 116 | -------------------------------------------------------------------------------- /src/markdown/commonmark@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.commonmark 16 | 17 | /** 18 | * A model for a commonmark format markdown file 19 | */ 20 | 21 | abstract concept Node { 22 | o String text optional 23 | o Node[] nodes optional 24 | o Integer startLine optional 25 | o Integer endLine optional 26 | } 27 | 28 | abstract concept Root extends Node { 29 | } 30 | 31 | abstract concept Child extends Node { 32 | } 33 | 34 | concept Text extends Child { 35 | } 36 | 37 | concept Attribute { 38 | o String name 39 | o String value 40 | } 41 | concept TagInfo { 42 | o String tagName 43 | o String attributeString 44 | o Attribute[] attributes 45 | o String content 46 | o Boolean closed 47 | } 48 | 49 | concept CodeBlock extends Child { 50 | o String info optional 51 | o TagInfo tag optional 52 | } 53 | 54 | concept Code extends Child { 55 | o String info optional 56 | } 57 | 58 | concept HtmlInline extends Child { 59 | o TagInfo tag optional 60 | } 61 | 62 | concept HtmlBlock extends Child { 63 | o TagInfo tag optional 64 | } 65 | 66 | concept Emph extends Child { 67 | } 68 | 69 | concept Strong extends Child { 70 | } 71 | 72 | concept BlockQuote extends Child { 73 | } 74 | 75 | concept Heading extends Child { 76 | o String level 77 | } 78 | 79 | concept ThematicBreak extends Child { 80 | } 81 | 82 | concept Softbreak extends Child { 83 | } 84 | 85 | concept Linebreak extends Child { 86 | } 87 | 88 | concept Link extends Child { 89 | o String destination 90 | o String title 91 | } 92 | 93 | concept Image extends Child { 94 | o String destination 95 | o String title 96 | } 97 | 98 | concept Paragraph extends Child { 99 | } 100 | 101 | concept List extends Child { 102 | o String type 103 | o String start optional 104 | o String tight 105 | o String delimiter optional 106 | } 107 | 108 | concept Item extends Child { 109 | } 110 | 111 | concept Document extends Root { 112 | o String xmlns 113 | } 114 | -------------------------------------------------------------------------------- /src/markdown/commonmark@0.4.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.commonmark 16 | 17 | /** 18 | * A model for a commonmark format markdown file 19 | */ 20 | 21 | abstract concept Node { 22 | o String text optional 23 | o Node[] nodes optional 24 | o Integer startLine optional 25 | o Integer endLine optional 26 | } 27 | 28 | abstract concept Root extends Node { 29 | } 30 | 31 | abstract concept Child extends Node { 32 | } 33 | 34 | concept Text extends Child { 35 | } 36 | 37 | concept Attribute { 38 | o String name 39 | o String value 40 | } 41 | concept TagInfo { 42 | o String tagName 43 | o String attributeString 44 | o Attribute[] attributes 45 | o String content 46 | o Boolean closed 47 | } 48 | 49 | concept CodeBlock extends Child { 50 | o String info optional 51 | o TagInfo tag optional 52 | } 53 | 54 | concept Code extends Child { 55 | o String info optional 56 | } 57 | 58 | concept HtmlInline extends Child { 59 | o TagInfo tag optional 60 | } 61 | 62 | concept HtmlBlock extends Child { 63 | o TagInfo tag optional 64 | } 65 | 66 | concept Emph extends Child { 67 | } 68 | 69 | concept Strong extends Child { 70 | } 71 | 72 | concept BlockQuote extends Child { 73 | } 74 | 75 | concept Heading extends Child { 76 | o String level 77 | } 78 | 79 | concept ThematicBreak extends Child { 80 | } 81 | 82 | concept Softbreak extends Child { 83 | } 84 | 85 | concept Linebreak extends Child { 86 | } 87 | 88 | concept Link extends Child { 89 | o String destination 90 | o String title 91 | } 92 | 93 | concept Image extends Child { 94 | o String destination 95 | o String title 96 | } 97 | 98 | concept Paragraph extends Child { 99 | } 100 | 101 | concept List extends Child { 102 | o String type 103 | o String start optional 104 | o String tight 105 | o String delimiter optional 106 | } 107 | 108 | concept Item extends Child { 109 | } 110 | 111 | concept Document extends Root { 112 | o String xmlns 113 | } 114 | 115 | concept Table extends Child{ 116 | } 117 | 118 | concept TableHead extends Child{ 119 | } 120 | 121 | concept TableBody extends Child{ 122 | } 123 | 124 | concept TableRow extends Child{ 125 | } 126 | 127 | concept HeaderCell extends Child{ 128 | } 129 | 130 | concept TableCell extends Child{ 131 | } -------------------------------------------------------------------------------- /src/markdown/commonmark@0.5.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.commonmark@0.5.0 16 | 17 | /** 18 | * A model for a commonmark format markdown file 19 | */ 20 | 21 | abstract concept Node { 22 | o String text optional 23 | o Node[] nodes optional 24 | o Integer startLine optional 25 | o Integer endLine optional 26 | } 27 | 28 | abstract concept Root extends Node { 29 | } 30 | 31 | abstract concept Child extends Node { 32 | } 33 | 34 | concept Text extends Child { 35 | } 36 | 37 | concept Attribute { 38 | o String name 39 | o String value 40 | } 41 | concept TagInfo { 42 | o String tagName 43 | o String attributeString 44 | o Attribute[] attributes 45 | o String content 46 | o Boolean closed 47 | } 48 | 49 | concept CodeBlock extends Child { 50 | o String info optional 51 | o TagInfo tag optional 52 | } 53 | 54 | concept Code extends Child { 55 | o String info optional 56 | } 57 | 58 | concept HtmlInline extends Child { 59 | o TagInfo tag optional 60 | } 61 | 62 | concept HtmlBlock extends Child { 63 | o TagInfo tag optional 64 | } 65 | 66 | concept Emph extends Child { 67 | } 68 | 69 | concept Strong extends Child { 70 | } 71 | 72 | concept BlockQuote extends Child { 73 | } 74 | 75 | concept Heading extends Child { 76 | o String level 77 | } 78 | 79 | concept ThematicBreak extends Child { 80 | } 81 | 82 | concept Softbreak extends Child { 83 | } 84 | 85 | concept Linebreak extends Child { 86 | } 87 | 88 | concept Link extends Child { 89 | o String destination 90 | o String title 91 | } 92 | 93 | concept Image extends Child { 94 | o String destination 95 | o String title 96 | } 97 | 98 | concept Paragraph extends Child { 99 | } 100 | 101 | concept List extends Child { 102 | o String type 103 | o String start optional 104 | o String tight 105 | o String delimiter optional 106 | } 107 | 108 | concept Item extends Child { 109 | } 110 | 111 | concept Document extends Root { 112 | o String xmlns 113 | } 114 | 115 | concept Table extends Child{ 116 | } 117 | 118 | concept TableHead extends Child{ 119 | } 120 | 121 | concept TableBody extends Child{ 122 | } 123 | 124 | concept TableRow extends Child{ 125 | } 126 | 127 | concept HeaderCell extends Child{ 128 | } 129 | 130 | concept TableCell extends Child{ 131 | } -------------------------------------------------------------------------------- /src/markdown/templatemark.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.templatemark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.2.0.cto 18 | 19 | /** 20 | * A model for Accord Project template extensions to commonmark 21 | */ 22 | abstract concept ElementDefinition extends Child { 23 | o String name // Add Concerto regex 24 | o String elementType optional 25 | } 26 | 27 | concept VariableDefinition extends ElementDefinition { 28 | o String identifiedBy optional 29 | } 30 | 31 | concept FormattedVariableDefinition extends VariableDefinition { 32 | o String format 33 | } 34 | 35 | concept EnumVariableDefinition extends VariableDefinition { 36 | o String[] enumValues 37 | } 38 | 39 | concept FormulaDefinition extends ElementDefinition { 40 | o String[] dependencies optional // name of variables on which the formula depends 41 | o String code // Ergo expression 42 | } 43 | 44 | abstract concept BlockDefinition extends ElementDefinition { 45 | } 46 | 47 | concept ClauseDefinition extends BlockDefinition { 48 | } 49 | 50 | concept ContractDefinition extends BlockDefinition { 51 | } 52 | 53 | concept WithDefinition extends BlockDefinition { 54 | } 55 | 56 | concept ConditionalDefinition extends BlockDefinition { 57 | o Child[] whenTrue 58 | o Child[] whenFalse 59 | } 60 | 61 | concept OptionalDefinition extends BlockDefinition { 62 | o Child[] whenSome 63 | o Child[] whenNone 64 | } 65 | 66 | concept ListBlockDefinition extends BlockDefinition { 67 | o String type 68 | o String tight 69 | o String start optional 70 | o String delimiter optional 71 | } 72 | 73 | concept JoinDefinition extends BlockDefinition { 74 | o String separator 75 | } 76 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.1.1.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.templatemark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.2.0.cto 18 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel.cto 19 | 20 | /** 21 | * A model for Accord Project template extensions to commonmark 22 | */ 23 | abstract concept ElementDefinition extends Child { 24 | o String name // Add Concerto regex 25 | o String elementType optional 26 | o Decorator[] decorators optional 27 | } 28 | 29 | concept VariableDefinition extends ElementDefinition { 30 | o String identifiedBy optional 31 | } 32 | 33 | concept FormattedVariableDefinition extends VariableDefinition { 34 | o String format 35 | } 36 | 37 | concept EnumVariableDefinition extends VariableDefinition { 38 | o String[] enumValues 39 | } 40 | 41 | concept FormulaDefinition extends ElementDefinition { 42 | o String[] dependencies optional // name of variables on which the formula depends 43 | o String code // Ergo expression 44 | } 45 | 46 | abstract concept BlockDefinition extends ElementDefinition { 47 | } 48 | 49 | concept ClauseDefinition extends BlockDefinition { 50 | } 51 | 52 | concept ContractDefinition extends BlockDefinition { 53 | } 54 | 55 | concept WithDefinition extends BlockDefinition { 56 | } 57 | 58 | concept ConditionalDefinition extends BlockDefinition { 59 | o Child[] whenTrue 60 | o Child[] whenFalse 61 | } 62 | 63 | concept OptionalDefinition extends BlockDefinition { 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept JoinDefinition extends BlockDefinition { 69 | o String separator 70 | } 71 | 72 | concept ListBlockDefinition extends BlockDefinition { 73 | o String type 74 | o String tight 75 | o String start optional 76 | o String delimiter optional 77 | } 78 | 79 | concept ForeachBlockDefinition extends BlockDefinition { 80 | } 81 | 82 | concept WithBlockDefinition extends BlockDefinition { 83 | } 84 | 85 | concept ConditionalBlockDefinition extends BlockDefinition { 86 | o Child[] whenTrue 87 | o Child[] whenFalse 88 | } 89 | 90 | concept OptionalBlockDefinition extends BlockDefinition { 91 | o Child[] whenSome 92 | o Child[] whenNone 93 | } 94 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.1.2.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.templatemark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.2.0.cto 18 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel@0.2.0.cto 19 | 20 | /** 21 | * A model for Accord Project template extensions to commonmark 22 | */ 23 | abstract concept ElementDefinition extends Child { 24 | o String name // Add Concerto regex 25 | o String elementType optional 26 | o Decorator[] decorators optional 27 | } 28 | 29 | concept VariableDefinition extends ElementDefinition { 30 | o String identifiedBy optional 31 | } 32 | 33 | concept FormattedVariableDefinition extends VariableDefinition { 34 | o String format 35 | } 36 | 37 | concept EnumVariableDefinition extends VariableDefinition { 38 | o String[] enumValues 39 | } 40 | 41 | concept FormulaDefinition extends ElementDefinition { 42 | o String[] dependencies optional // name of variables on which the formula depends 43 | o String code // Ergo expression 44 | } 45 | 46 | abstract concept BlockDefinition extends ElementDefinition { 47 | } 48 | 49 | concept ClauseDefinition extends BlockDefinition { 50 | } 51 | 52 | concept ContractDefinition extends BlockDefinition { 53 | } 54 | 55 | concept WithDefinition extends BlockDefinition { 56 | } 57 | 58 | concept ConditionalDefinition extends BlockDefinition { 59 | o Child[] whenTrue 60 | o Child[] whenFalse 61 | } 62 | 63 | concept OptionalDefinition extends BlockDefinition { 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept JoinDefinition extends BlockDefinition { 69 | o String separator 70 | } 71 | 72 | concept ListBlockDefinition extends BlockDefinition { 73 | o String type 74 | o String tight 75 | o String start optional 76 | o String delimiter optional 77 | } 78 | 79 | concept ForeachBlockDefinition extends BlockDefinition { 80 | } 81 | 82 | concept WithBlockDefinition extends BlockDefinition { 83 | } 84 | 85 | concept ConditionalBlockDefinition extends BlockDefinition { 86 | o Child[] whenTrue 87 | o Child[] whenFalse 88 | } 89 | 90 | concept OptionalBlockDefinition extends BlockDefinition { 91 | o Child[] whenSome 92 | o Child[] whenNone 93 | } 94 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.1.3.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.templatemark 16 | 17 | import org.accordproject.commonmark.Child from https://models.accordproject.org/markdown/commonmark@0.4.0.cto 18 | import concerto.metamodel.Decorator from https://models.accordproject.org/concerto/metamodel@0.2.0.cto 19 | 20 | /** 21 | * A model for Accord Project template extensions to commonmark 22 | */ 23 | abstract concept ElementDefinition extends Child { 24 | o String name // Add Concerto regex 25 | o String elementType optional 26 | o Decorator[] decorators optional 27 | } 28 | 29 | concept VariableDefinition extends ElementDefinition { 30 | o String identifiedBy optional 31 | } 32 | 33 | concept FormattedVariableDefinition extends VariableDefinition { 34 | o String format 35 | } 36 | 37 | concept EnumVariableDefinition extends VariableDefinition { 38 | o String[] enumValues 39 | } 40 | 41 | concept FormulaDefinition extends ElementDefinition { 42 | o String[] dependencies optional // name of variables on which the formula depends 43 | o String code // Ergo expression 44 | } 45 | 46 | abstract concept BlockDefinition extends ElementDefinition { 47 | } 48 | 49 | concept ClauseDefinition extends BlockDefinition { 50 | } 51 | 52 | concept ContractDefinition extends BlockDefinition { 53 | } 54 | 55 | concept WithDefinition extends BlockDefinition { 56 | } 57 | 58 | concept ConditionalDefinition extends BlockDefinition { 59 | o Child[] whenTrue 60 | o Child[] whenFalse 61 | } 62 | 63 | concept OptionalDefinition extends BlockDefinition { 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept JoinDefinition extends BlockDefinition { 69 | o String separator 70 | } 71 | 72 | concept ListBlockDefinition extends BlockDefinition { 73 | o String type 74 | o String tight 75 | o String start optional 76 | o String delimiter optional 77 | } 78 | 79 | concept ForeachBlockDefinition extends BlockDefinition { 80 | } 81 | 82 | concept WithBlockDefinition extends BlockDefinition { 83 | } 84 | 85 | concept ConditionalBlockDefinition extends BlockDefinition { 86 | o Child[] whenTrue 87 | o Child[] whenFalse 88 | } 89 | 90 | concept OptionalBlockDefinition extends BlockDefinition { 91 | o Child[] whenSome 92 | o Child[] whenNone 93 | } 94 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.templatemark@0.2.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@0.4.0.Decorator from https://models.accordproject.org/concerto/metamodel@0.4.0.cto 19 | 20 | /** 21 | * A model for Accord Project template extensions to commonmark 22 | */ 23 | abstract concept ElementDefinition extends Child { 24 | o String name // Add Concerto regex 25 | o String elementType optional 26 | o Decorator[] decorators optional 27 | } 28 | 29 | concept VariableDefinition extends ElementDefinition { 30 | o String identifiedBy optional 31 | } 32 | 33 | concept FormattedVariableDefinition extends VariableDefinition { 34 | o String format 35 | } 36 | 37 | concept EnumVariableDefinition extends VariableDefinition { 38 | o String[] enumValues 39 | } 40 | 41 | concept FormulaDefinition extends ElementDefinition { 42 | o String[] dependencies optional // name of variables on which the formula depends 43 | o String code // Ergo expression 44 | } 45 | 46 | abstract concept BlockDefinition extends ElementDefinition { 47 | } 48 | 49 | concept ClauseDefinition extends BlockDefinition { 50 | } 51 | 52 | concept ContractDefinition extends BlockDefinition { 53 | } 54 | 55 | concept WithDefinition extends BlockDefinition { 56 | } 57 | 58 | concept ConditionalDefinition extends BlockDefinition { 59 | o Child[] whenTrue 60 | o Child[] whenFalse 61 | } 62 | 63 | concept OptionalDefinition extends BlockDefinition { 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept JoinDefinition extends BlockDefinition { 69 | o String separator 70 | } 71 | 72 | concept ListBlockDefinition extends BlockDefinition { 73 | o String type 74 | o String tight 75 | o String start optional 76 | o String delimiter optional 77 | } 78 | 79 | concept ForeachBlockDefinition extends BlockDefinition { 80 | } 81 | 82 | concept WithBlockDefinition extends BlockDefinition { 83 | } 84 | 85 | concept ConditionalBlockDefinition extends BlockDefinition { 86 | o Child[] whenTrue 87 | o Child[] whenFalse 88 | } 89 | 90 | concept OptionalBlockDefinition extends BlockDefinition { 91 | o Child[] whenSome 92 | o Child[] whenNone 93 | } 94 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.templatemark@0.3.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@1.0.0.Decorator from https://models.accordproject.org/concerto/metamodel@1.0.0.cto 19 | 20 | /** 21 | * A model for Accord Project template extensions to commonmark 22 | */ 23 | abstract concept ElementDefinition extends Child { 24 | o String name // Add Concerto regex 25 | o String elementType optional 26 | o Decorator[] decorators optional 27 | } 28 | 29 | concept VariableDefinition extends ElementDefinition { 30 | o String identifiedBy optional 31 | } 32 | 33 | concept FormattedVariableDefinition extends VariableDefinition { 34 | o String format 35 | } 36 | 37 | concept EnumVariableDefinition extends VariableDefinition { 38 | o String[] enumValues 39 | } 40 | 41 | concept FormulaDefinition extends ElementDefinition { 42 | o String[] dependencies optional // name of variables on which the formula depends 43 | o String code // Ergo expression 44 | } 45 | 46 | abstract concept BlockDefinition extends ElementDefinition { 47 | } 48 | 49 | concept ClauseDefinition extends BlockDefinition { 50 | } 51 | 52 | concept ContractDefinition extends BlockDefinition { 53 | } 54 | 55 | concept WithDefinition extends BlockDefinition { 56 | } 57 | 58 | concept ConditionalDefinition extends BlockDefinition { 59 | o Child[] whenTrue 60 | o Child[] whenFalse 61 | } 62 | 63 | concept OptionalDefinition extends BlockDefinition { 64 | o Child[] whenSome 65 | o Child[] whenNone 66 | } 67 | 68 | concept JoinDefinition extends BlockDefinition { 69 | o String separator 70 | } 71 | 72 | concept ListBlockDefinition extends BlockDefinition { 73 | o String type 74 | o String tight 75 | o String start optional 76 | o String delimiter optional 77 | } 78 | 79 | concept ForeachBlockDefinition extends BlockDefinition { 80 | } 81 | 82 | concept WithBlockDefinition extends BlockDefinition { 83 | } 84 | 85 | concept ConditionalBlockDefinition extends BlockDefinition { 86 | o Child[] whenTrue 87 | o Child[] whenFalse 88 | } 89 | 90 | concept OptionalBlockDefinition extends BlockDefinition { 91 | o Child[] whenSome 92 | o Child[] whenNone 93 | } 94 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.4.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.templatemark@0.4.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@1.0.0.Decorator from https://models.accordproject.org/concerto/metamodel@1.0.0.cto 19 | 20 | enum CodeType { 21 | o ES_2020 22 | } 23 | 24 | concept Code { 25 | o CodeType type 26 | o String contents 27 | } 28 | 29 | /** 30 | * A model for Accord Project template extensions to commonmark 31 | */ 32 | abstract concept ElementDefinition extends Child { 33 | o String name 34 | o String elementType optional 35 | o Decorator[] decorators optional 36 | } 37 | 38 | concept VariableDefinition extends ElementDefinition { 39 | o String identifiedBy optional 40 | } 41 | 42 | concept FormattedVariableDefinition extends VariableDefinition { 43 | o String format 44 | } 45 | 46 | concept EnumVariableDefinition extends VariableDefinition { 47 | o String[] enumValues 48 | } 49 | 50 | concept FormulaDefinition extends ElementDefinition { 51 | o String[] dependencies optional // name of variables on which the formula depends 52 | o Code code 53 | } 54 | 55 | abstract concept BlockDefinition extends ElementDefinition { 56 | } 57 | 58 | concept ClauseDefinition extends BlockDefinition { 59 | o Code condition optional 60 | } 61 | 62 | concept ContractDefinition extends BlockDefinition { 63 | } 64 | 65 | concept WithDefinition extends BlockDefinition { 66 | } 67 | 68 | concept ConditionalDefinition extends BlockDefinition { 69 | o Child[] whenTrue 70 | o Child[] whenFalse 71 | o Code condition optional 72 | o String[] dependencies optional 73 | } 74 | 75 | concept OptionalDefinition extends BlockDefinition { 76 | o Child[] whenSome 77 | o Child[] whenNone 78 | } 79 | 80 | concept JoinDefinition extends BlockDefinition { 81 | o String separator 82 | } 83 | 84 | concept ListBlockDefinition extends BlockDefinition { 85 | o String type 86 | o String tight 87 | o String start optional 88 | o String delimiter optional 89 | } 90 | 91 | concept ForeachBlockDefinition extends BlockDefinition { 92 | } 93 | 94 | concept WithBlockDefinition extends BlockDefinition { 95 | } 96 | 97 | concept ConditionalBlockDefinition extends BlockDefinition { 98 | o Child[] whenTrue 99 | o Child[] whenFalse 100 | o Code condition optional 101 | } 102 | 103 | concept OptionalBlockDefinition extends BlockDefinition { 104 | o Child[] whenSome 105 | o Child[] whenNone 106 | } 107 | -------------------------------------------------------------------------------- /src/markdown/templatemark@0.5.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.templatemark@0.5.0 16 | 17 | import org.accordproject.commonmark@0.5.0.Child from https://models.accordproject.org/markdown/commonmark@0.5.0.cto 18 | import concerto.metamodel@1.0.0.Decorator from https://models.accordproject.org/concerto/metamodel@1.0.0.cto 19 | 20 | /** 21 | * A model for Accord Project template extensions to commonmark 22 | */ 23 | 24 | /** 25 | * Identifiers for code strings in Formula Definition nodes 26 | */ 27 | enum CodeType { 28 | o TYPESCRIPT 29 | o ES_2020 30 | } 31 | 32 | /** 33 | * User provided code, along with a code language identifier 34 | */ 35 | concept Code { 36 | o CodeType type 37 | o String contents 38 | } 39 | 40 | abstract concept ElementDefinition extends Child { 41 | o String name 42 | o String elementType optional 43 | o Decorator[] decorators optional 44 | } 45 | 46 | concept VariableDefinition extends ElementDefinition { 47 | o String identifiedBy optional 48 | } 49 | 50 | concept FormattedVariableDefinition extends VariableDefinition { 51 | o String format 52 | } 53 | 54 | concept EnumVariableDefinition extends VariableDefinition { 55 | o String[] enumValues 56 | } 57 | 58 | concept FormulaDefinition extends ElementDefinition { 59 | o String[] dependencies optional // name of variables on which the formula depends 60 | o Code code 61 | } 62 | 63 | abstract concept BlockDefinition extends ElementDefinition { 64 | } 65 | 66 | concept ClauseDefinition extends BlockDefinition { 67 | o Code condition optional 68 | } 69 | 70 | concept ContractDefinition extends BlockDefinition { 71 | } 72 | 73 | concept WithDefinition extends BlockDefinition { 74 | } 75 | 76 | concept ConditionalDefinition extends BlockDefinition { 77 | o Child[] whenTrue 78 | o Child[] whenFalse 79 | o Code condition optional 80 | o String[] dependencies optional 81 | } 82 | 83 | concept OptionalDefinition extends BlockDefinition { 84 | o Child[] whenSome 85 | o Child[] whenNone 86 | } 87 | concept JoinDefinition extends BlockDefinition { 88 | // if separator is set, we just use that 89 | o String separator optional 90 | // if separator is not set, we use the Intl.ListFormat, paramaterized by locale, type and style 91 | o String locale optional 92 | o String type optional 93 | o String style optional 94 | } 95 | 96 | concept ListBlockDefinition extends BlockDefinition { 97 | o String type 98 | o String tight 99 | o String start optional 100 | o String delimiter optional 101 | } 102 | 103 | concept ForeachBlockDefinition extends BlockDefinition { 104 | } 105 | 106 | concept WithBlockDefinition extends BlockDefinition { 107 | } 108 | 109 | concept ConditionalBlockDefinition extends BlockDefinition { 110 | o Child[] whenTrue 111 | o Child[] whenFalse 112 | o Code condition optional 113 | } 114 | 115 | concept OptionalBlockDefinition extends BlockDefinition { 116 | o Child[] whenSome 117 | o Child[] whenNone 118 | } 119 | -------------------------------------------------------------------------------- /src/money.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.money 16 | 17 | /** 18 | * Represents an amount of Cryptocurrency 19 | */ 20 | concept CryptoMonetaryAmount { 21 | o Double doubleValue 22 | o CryptoCurrencyCode cryptoCurrencyCode 23 | } 24 | 25 | /** 26 | * Cyptocurrency codes. From https://en.wikipedia.org/wiki/List_of_cryptocurrencies 27 | */ 28 | enum CryptoCurrencyCode { 29 | o ADA 30 | o BCH 31 | o BTC 32 | o DASH 33 | o EOS 34 | o ETC 35 | o ETH 36 | o LTC 37 | o NEO 38 | o XLM 39 | o XMR 40 | o XRP 41 | o ZEC 42 | } 43 | 44 | /** 45 | * Represents an amount of money 46 | */ 47 | concept MonetaryAmount { 48 | o Double doubleValue // convert to fixed-point? 49 | o CurrencyCode currencyCode 50 | } 51 | 52 | /** 53 | * ISO 4217 codes. From https://en.wikipedia.org/wiki/ISO_4217 54 | * https://www.currency-iso.org/en/home/tables/table-a1.html 55 | */ 56 | enum CurrencyCode { 57 | o AED 58 | o AFN 59 | o ALL 60 | o AMD 61 | o ANG 62 | o AOA 63 | o ARS 64 | o AUD 65 | o AWG 66 | o AZN 67 | o BAM 68 | o BBD 69 | o BDT 70 | o BGN 71 | o BHD 72 | o BIF 73 | o BMD 74 | o BND 75 | o BOB 76 | o BOV 77 | o BRL 78 | o BSD 79 | o BTN 80 | o BWP 81 | o BYN 82 | o BZD 83 | o CAD 84 | o CDF 85 | o CHE 86 | o CHF 87 | o CHW 88 | o CLF 89 | o CLP 90 | o CNY 91 | o COP 92 | o COU 93 | o CRC 94 | o CUC 95 | o CUP 96 | o CVE 97 | o CZK 98 | o DJF 99 | o DKK 100 | o DOP 101 | o DZD 102 | o EGP 103 | o ERN 104 | o ETB 105 | o EUR 106 | o FJD 107 | o FKP 108 | o GBP 109 | o GEL 110 | o GHS 111 | o GIP 112 | o GMD 113 | o GNF 114 | o GTQ 115 | o GYD 116 | o HKD 117 | o HNL 118 | o HRK 119 | o HTG 120 | o HUF 121 | o IDR 122 | o ILS 123 | o INR 124 | o IQD 125 | o IRR 126 | o ISK 127 | o JMD 128 | o JOD 129 | o JPY 130 | o KES 131 | o KGS 132 | o KHR 133 | o KMF 134 | o KPW 135 | o KRW 136 | o KWD 137 | o KYD 138 | o KZT 139 | o LAK 140 | o LBP 141 | o LKR 142 | o LRD 143 | o LSL 144 | o LYD 145 | o MAD 146 | o MDL 147 | o MGA 148 | o MKD 149 | o MMK 150 | o MNT 151 | o MOP 152 | o MRU 153 | o MUR 154 | o MVR 155 | o MWK 156 | o MXN 157 | o MXV 158 | o MYR 159 | o MZN 160 | o NAD 161 | o NGN 162 | o NIO 163 | o NOK 164 | o NPR 165 | o NZD 166 | o OMR 167 | o PAB 168 | o PEN 169 | o PGK 170 | o PHP 171 | o PKR 172 | o PLN 173 | o PYG 174 | o QAR 175 | o RON 176 | o RSD 177 | o RUB 178 | o RWF 179 | o SAR 180 | o SBD 181 | o SCR 182 | o SDG 183 | o SEK 184 | o SGD 185 | o SHP 186 | o SLL 187 | o SOS 188 | o SRD 189 | o SSP 190 | o STN 191 | o SVC 192 | o SYP 193 | o SZL 194 | o THB 195 | o TJS 196 | o TMT 197 | o TND 198 | o TOP 199 | o TRY 200 | o TTD 201 | o TWD 202 | o TZS 203 | o UAH 204 | o UGX 205 | o USD 206 | o USN 207 | o UYI 208 | o UYU 209 | o UZS 210 | o VEF 211 | o VND 212 | o VUV 213 | o WST 214 | o XAF 215 | o XAG 216 | o XAU 217 | o XBA 218 | o XBB 219 | o XBC 220 | o XBD 221 | o XCD 222 | o XDR 223 | o XOF 224 | o XPD 225 | o XPF 226 | o XPT 227 | o XSU 228 | o XTS 229 | o XUA 230 | o XXX 231 | o YER 232 | o ZAR 233 | o ZMW 234 | o ZWL 235 | } 236 | -------------------------------------------------------------------------------- /src/organization.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.organization 16 | 17 | import org.accordproject.address.PostalAddress from https://models.accordproject.org/address.cto 18 | import org.accordproject.geo.Place from https://models.accordproject.org/geo.cto 19 | 20 | participant Organization identified by identifier { 21 | o String identifier 22 | o String name optional 23 | o String description optional 24 | o String duns optional 25 | o Place place optional 26 | } -------------------------------------------------------------------------------- /src/organization@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.organization@0.2.0 16 | 17 | import org.accordproject.geo@0.2.0.Place from https://models.accordproject.org/geo@0.2.0.cto 18 | 19 | participant Organization identified by identifier { 20 | o String identifier 21 | o String name optional 22 | o String description optional 23 | o String duns optional 24 | o Place place optional 25 | } -------------------------------------------------------------------------------- /src/patents/patent.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.patent 16 | 17 | import org.accordproject.address.PostalAddress from https://models.accordproject.org/address.cto 18 | import org.accordproject.geo.Country from https://models.accordproject.org/geo.cto 19 | import org.accordproject.geo.GeoCoordinates from https://models.accordproject.org/geo.cto 20 | import org.accordproject.person.Person from https://models.accordproject.org/person.cto 21 | import org.accordproject.usa.residency.Residency from https://models.accordproject.org/usa/residency.cto 22 | 23 | /** 24 | * This smart-contract model describes a United States (US) patent asset that may or may not have foreign counterparts 25 | * Drafted by Perkins-Coie 26 | */ 27 | 28 | /** 29 | * A Patent Asset Identifier 30 | */ 31 | concept PatentAssetIdentifier { 32 | o String assetNumber 33 | o AssetNumberStatus numberStatus 34 | o Country assetCountry optional 35 | } 36 | /** 37 | * A Patent Classifier 38 | */ 39 | concept PatentClassification { 40 | o String classificationSymbol optional 41 | o String classificationDescription optional 42 | } 43 | 44 | /** 45 | * An Inventor 46 | */ 47 | participant Inventor extends Person { 48 | o Country residentCountry optional 49 | o Residency inventorResidency optional 50 | } 51 | /** 52 | * An Applicant 53 | */ 54 | participant Applicant extends Person { 55 | } 56 | 57 | /** 58 | * An Assignee 59 | */ 60 | participant Assignee extends Person { 61 | } 62 | 63 | // AssetNumberStatus 64 | enum AssetNumberStatus { 65 | o APP // Application 66 | o PAT // Patent 67 | o PUB // Publication 68 | o REISS // Reissue 69 | o FOR // Foreign 70 | } 71 | 72 | // ApplicationType 73 | enum ApplicationType { 74 | o PROV // Provisional 75 | o NONPROV // Nonprovisional 76 | } 77 | // SubjectMatter 78 | enum SubjectMatter { 79 | o UTILITY // Utility 80 | o PLANT // Plant 81 | o DESIGN // Design 82 | } 83 | /** 84 | * http://schema.org/PatentAsset 85 | */ 86 | concept PatentAsset { 87 | o PatentAssetIdentifier[] assetIdentifier 88 | o String title optional 89 | o Inventor[] inventorIdentifier optional 90 | o Applicant applicantIdentifier optional 91 | o Assignee currentAssignee optional 92 | o Assignee originalAssignee optional 93 | o DateTime priorityDate optional 94 | o DateTime filingDate optional 95 | o DateTime issueDate optional 96 | o DateTime publicationDate optional 97 | o PatentClassification[] classifier optional 98 | o String attorneyDocketNumber optional 99 | o String customerNumber optional 100 | o String[] emailAddress optional 101 | o ApplicationType applicationType optional 102 | o SubjectMatter subjectMatter optional 103 | o Double numDrawings optional 104 | o Double pubFigure optional 105 | o PatentAsset[] priorApplication optional 106 | } 107 | -------------------------------------------------------------------------------- /src/patents/patent@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.patent@0.2.0 16 | 17 | import org.accordproject.address@0.2.0.PostalAddress from https://models.accordproject.org/address@0.2.0.cto 18 | import org.accordproject.geo@0.2.0.{Country, GeoCoordinates} from https://models.accordproject.org/geo@0.2.0.cto 19 | import org.accordproject.person@0.2.0.Person from https://models.accordproject.org/person@0.2.0.cto 20 | import org.accordproject.usa.residency@0.2.0.Residency from https://models.accordproject.org/usa/residency@0.2.0.cto 21 | 22 | /** 23 | * This smart-contract model describes a United States (US) patent asset that may or may not have foreign counterparts 24 | * Drafted by Perkins-Coie 25 | */ 26 | 27 | /** 28 | * A Patent Asset Identifier 29 | */ 30 | concept PatentAssetIdentifier { 31 | o String assetNumber 32 | o AssetNumberStatus numberStatus 33 | o Country assetCountry optional 34 | } 35 | /** 36 | * A Patent Classifier 37 | */ 38 | concept PatentClassification { 39 | o String classificationSymbol optional 40 | o String classificationDescription optional 41 | } 42 | 43 | /** 44 | * An Inventor 45 | */ 46 | participant Inventor extends Person { 47 | o Country residentCountry optional 48 | o Residency inventorResidency optional 49 | } 50 | /** 51 | * An Applicant 52 | */ 53 | participant Applicant extends Person { 54 | } 55 | 56 | /** 57 | * An Assignee 58 | */ 59 | participant Assignee extends Person { 60 | } 61 | 62 | // AssetNumberStatus 63 | enum AssetNumberStatus { 64 | o APP // Application 65 | o PAT // Patent 66 | o PUB // Publication 67 | o REISS // Reissue 68 | o FOR // Foreign 69 | } 70 | 71 | // ApplicationType 72 | enum ApplicationType { 73 | o PROV // Provisional 74 | o NONPROV // Nonprovisional 75 | } 76 | // SubjectMatter 77 | enum SubjectMatter { 78 | o UTILITY // Utility 79 | o PLANT // Plant 80 | o DESIGN // Design 81 | } 82 | /** 83 | * http://schema.org/PatentAsset 84 | */ 85 | concept PatentAsset { 86 | o PatentAssetIdentifier[] assetIdentifier 87 | o String title optional 88 | o Inventor[] inventorIdentifier optional 89 | o Applicant applicantIdentifier optional 90 | o Assignee currentAssignee optional 91 | o Assignee originalAssignee optional 92 | o DateTime priorityDate optional 93 | o DateTime filingDate optional 94 | o DateTime issueDate optional 95 | o DateTime publicationDate optional 96 | o PatentClassification[] classifier optional 97 | o String attorneyDocketNumber optional 98 | o String customerNumber optional 99 | o String[] emailAddress optional 100 | o ApplicationType applicationType optional 101 | o SubjectMatter subjectMatter optional 102 | o Double numDrawings optional 103 | o Double pubFigure optional 104 | o PatentAsset[] priorApplication optional 105 | } 106 | -------------------------------------------------------------------------------- /src/payment/endorsement.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.payment.endorsement 16 | 17 | import org.accordproject.money.CryptoMonetaryAmount from https://models.accordproject.org/money.cto 18 | 19 | /** This smart-contract model describes a routine that would transfer a cryptocurrency payment to be made by a separate smart contract (a “payment smart contract”) on a specified date to a payee to a transferee authorized by the payee. This can be thought of as equivalent to flipping a check or note over and writing “Pay to the order of” on the back, hence it is referred to as an “endorsement smart contract”. 20 | */ 21 | 22 | /** 23 | * http://schema.org/endorsement 24 | * 25 | * paymentAmount - includes value and cryptocurrency code that define the 26 | * output transmitted from payorAddress to be transferred. 27 | * payeeAddress - Beginning on the Due Date/Block No., the endorsement smart 28 | * contract would look for outputs sent to the payee’s Ethereum address. 29 | * smartContractAddress - The endorsement smart contract would check whether 30 | * outputs to the payeeAddress originated from the payment smart contract’s 31 | * Ethereum address. If so, the endorsement smart contract would check 32 | * whether the output matches the paymentAmount field value 33 | * transfereeAddress - If an output to the payeeAddress sent from the 34 | * smartContractAddress matches the paymentAmount field value, the 35 | * endorsement smart contract would generate a transaction transferring the 36 | * paymentAmount to the transferee’s Ethereum address using the output 37 | * received by the payeeAddress as the input for the transaction 38 | */ 39 | 40 | transaction Endorsement { 41 | o CryptoMonetaryAmount paymentAmount 42 | o DateTime dueDate 43 | o Double dueBlockNumber optional 44 | o String payeeAddress 45 | o String smartContractAddress 46 | o String transfereeAddress 47 | } 48 | -------------------------------------------------------------------------------- /src/payment/endorsement@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.payment.endorsement 16 | 17 | import org.accordproject.money.DigitalMonetaryAmount from https://models.accordproject.org/money@0.2.0.cto 18 | 19 | /** This smart-contract model describes a routine that would transfer a cryptocurrency payment to be made by a separate smart contract (a “payment smart contract”) on a specified date to a payee to a transferee authorized by the payee. This can be thought of as equivalent to flipping a check or note over and writing “Pay to the order of” on the back, hence it is referred to as an “endorsement smart contract”. 20 | */ 21 | 22 | /** 23 | * http://schema.org/endorsement 24 | * 25 | * paymentAmount - includes value and cryptocurrency code that define the 26 | * output transmitted from payorAddress to be transferred. 27 | * payeeAddress - Beginning on the Due Date/Block No., the endorsement smart 28 | * contract would look for outputs sent to the payee’s Ethereum address. 29 | * smartContractAddress - The endorsement smart contract would check whether 30 | * outputs to the payeeAddress originated from the payment smart contract’s 31 | * Ethereum address. If so, the endorsement smart contract would check 32 | * whether the output matches the paymentAmount field value 33 | * transfereeAddress - If an output to the payeeAddress sent from the 34 | * smartContractAddress matches the paymentAmount field value, the 35 | * endorsement smart contract would generate a transaction transferring the 36 | * paymentAmount to the transferee’s Ethereum address using the output 37 | * received by the payeeAddress as the input for the transaction 38 | */ 39 | 40 | transaction Endorsement { 41 | o DigitalMonetaryAmount paymentAmount 42 | o DateTime dueDate 43 | o Double dueBlockNumber optional 44 | o String payeeAddress 45 | o String smartContractAddress 46 | o String transfereeAddress 47 | } 48 | -------------------------------------------------------------------------------- /src/payment/endorsement@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.payment.endorsement@0.3.0 16 | 17 | import org.accordproject.money@0.3.0.DigitalMonetaryAmount from https://models.accordproject.org/money@0.3.0.cto 18 | 19 | /** This smart-contract model describes a routine that would transfer a cryptocurrency payment to be made by a separate smart contract (a “payment smart contract”) on a specified date to a payee to a transferee authorized by the payee. This can be thought of as equivalent to flipping a check or note over and writing “Pay to the order of” on the back, hence it is referred to as an “endorsement smart contract”. 20 | */ 21 | 22 | /** 23 | * http://schema.org/endorsement 24 | * 25 | * paymentAmount - includes value and cryptocurrency code that define the 26 | * output transmitted from payorAddress to be transferred. 27 | * payeeAddress - Beginning on the Due Date/Block No., the endorsement smart 28 | * contract would look for outputs sent to the payee’s Ethereum address. 29 | * smartContractAddress - The endorsement smart contract would check whether 30 | * outputs to the payeeAddress originated from the payment smart contract’s 31 | * Ethereum address. If so, the endorsement smart contract would check 32 | * whether the output matches the paymentAmount field value 33 | * transfereeAddress - If an output to the payeeAddress sent from the 34 | * smartContractAddress matches the paymentAmount field value, the 35 | * endorsement smart contract would generate a transaction transferring the 36 | * paymentAmount to the transferee’s Ethereum address using the output 37 | * received by the payeeAddress as the input for the transaction 38 | */ 39 | 40 | transaction Endorsement { 41 | o DigitalMonetaryAmount paymentAmount 42 | o DateTime dueDate 43 | o Double dueBlockNumber optional 44 | o String payeeAddress 45 | o String smartContractAddress 46 | o String transfereeAddress 47 | } 48 | -------------------------------------------------------------------------------- /src/payment/payment.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | // requires: concerto-core:<=0.82.11 15 | 16 | namespace org.accordproject.payment 17 | 18 | import org.accordproject.cicero.runtime.Request from https://models.accordproject.org/cicero/runtime.cto 19 | import org.accordproject.cicero.contract.AccordContract from https://models.accordproject.org/cicero/contract.cto 20 | 21 | /** 22 | * A request that indicates that a payment has been received 23 | */ 24 | transaction PaymentReceived extends Request { 25 | } 26 | -------------------------------------------------------------------------------- /src/payment/payment@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.payment 18 | 19 | import org.accordproject.runtime.Request from https://models.accordproject.org/accordproject/runtime.cto 20 | 21 | /** 22 | * A request that indicates that a payment has been received 23 | */ 24 | transaction PaymentReceived extends Request { 25 | } 26 | -------------------------------------------------------------------------------- /src/payment/payment@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.payment@0.3.0 16 | 17 | import org.accordproject.runtime@0.2.0.Request from https://models.accordproject.org/accordproject/runtime@0.2.0.cto 18 | 19 | /** 20 | * A request that indicates that a payment has been received 21 | */ 22 | transaction PaymentReceived extends Request { 23 | } 24 | -------------------------------------------------------------------------------- /src/person.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.person 16 | 17 | import org.accordproject.value.QuantitativeValue from https://models.accordproject.org/value.cto 18 | import org.accordproject.address.PostalAddress from https://models.accordproject.org/address.cto 19 | import org.accordproject.organization.Organization from https://models.accordproject.org/organization.cto 20 | import org.accordproject.geo.Place from https://models.accordproject.org/geo.cto 21 | import org.accordproject.geo.Country from https://models.accordproject.org/geo.cto 22 | import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money.cto 23 | import org.accordproject.product.Product from https://models.accordproject.org/product.cto 24 | 25 | enum Gender { 26 | o MALE 27 | o FEMALE 28 | o OTHER 29 | o UNKNOWN 30 | } 31 | 32 | /** 33 | * Based on http://schema.org/Person 34 | */ 35 | participant Person identified by identifier { 36 | o String identifier 37 | o String additionalName optional 38 | o PostalAddress address optional 39 | --> Organization affiliation optional 40 | --> Organization alumniOf optional 41 | o String award optional 42 | o DateTime birthDate optional 43 | o DateTime deathDate optional 44 | o Place birthPlace optional 45 | --> Person[] children optional 46 | --> Person[] colleagues optional 47 | o String email optional 48 | o String familyName optional 49 | o String faxNumber optional 50 | --> Person[] follows optional 51 | --> Organization funder optional 52 | o Gender gender optional 53 | o String givenName optional 54 | o String globalLocationNumber optional 55 | o QuantitativeValue height optional 56 | o PostalAddress homeLocation optional 57 | o String honorificPrefix optional 58 | o String honorificSuffix optional 59 | o String isicsV4 optional 60 | o String jobTitle optional 61 | --> Person[] knows optional 62 | --> Organization memberOf optional 63 | o String naics optional 64 | o Country nationality optional 65 | o MonetaryAmount netWorth optional 66 | --> Product owns optional 67 | --> Person parent optional 68 | --> Person relatedTo optional 69 | --> Person[] sibling optional 70 | --> Organization sponsor optional 71 | --> Person spouse optional 72 | o String taxId optional 73 | o String telephone optional 74 | o String vatId optional 75 | o QuantitativeValue weight optional 76 | --> Organization worksFor optional 77 | } -------------------------------------------------------------------------------- /src/person@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.person@0.2.0 16 | 17 | import org.accordproject.value@0.2.0.QuantitativeValue from https://models.accordproject.org/value@0.2.0.cto 18 | import org.accordproject.address@0.2.0.PostalAddress from https://models.accordproject.org/address@0.2.0.cto 19 | import org.accordproject.organization@0.2.0.Organization from https://models.accordproject.org/organization@0.2.0.cto 20 | import org.accordproject.geo@0.2.0.{Place, Country} from https://models.accordproject.org/geo@0.2.0.cto 21 | import org.accordproject.money@0.3.0.MonetaryAmount from https://models.accordproject.org/money@0.3.0.cto 22 | import org.accordproject.product@0.2.0.Product from https://models.accordproject.org/product@0.2.0.cto 23 | 24 | enum Gender { 25 | o MALE 26 | o FEMALE 27 | o OTHER 28 | o UNKNOWN 29 | } 30 | 31 | /** 32 | * Based on http://schema.org/Person 33 | */ 34 | participant Person identified by identifier { 35 | o String identifier 36 | o String additionalName optional 37 | o PostalAddress address optional 38 | --> Organization affiliation optional 39 | --> Organization alumniOf optional 40 | o String award optional 41 | o DateTime birthDate optional 42 | o DateTime deathDate optional 43 | o Place birthPlace optional 44 | --> Person[] children optional 45 | --> Person[] colleagues optional 46 | o String email optional 47 | o String familyName optional 48 | o String faxNumber optional 49 | --> Person[] follows optional 50 | --> Organization funder optional 51 | o Gender gender optional 52 | o String givenName optional 53 | o String globalLocationNumber optional 54 | o QuantitativeValue height optional 55 | o PostalAddress homeLocation optional 56 | o String honorificPrefix optional 57 | o String honorificSuffix optional 58 | o String isicsV4 optional 59 | o String jobTitle optional 60 | --> Person[] knows optional 61 | --> Organization memberOf optional 62 | o String naics optional 63 | o Country nationality optional 64 | o MonetaryAmount netWorth optional 65 | --> Product owns optional 66 | --> Person parent optional 67 | --> Person relatedTo optional 68 | --> Person[] sibling optional 69 | --> Organization sponsor optional 70 | --> Person spouse optional 71 | o String taxId optional 72 | o String telephone optional 73 | o String vatId optional 74 | o QuantitativeValue weight optional 75 | --> Organization worksFor optional 76 | } -------------------------------------------------------------------------------- /src/product.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.product 16 | 17 | import org.accordproject.value.QuantitativeValue from https://models.accordproject.org/value.cto 18 | import org.accordproject.address.PostalAddress from https://models.accordproject.org/address.cto 19 | import org.accordproject.organization.Organization from https://models.accordproject.org/organization.cto 20 | 21 | /** 22 | * http://schema.org/Product 23 | */ 24 | asset Product identified by identifier { 25 | o String identifier 26 | --> Organization Organization optional 27 | o String category optional 28 | o String color optional 29 | o QuantitativeValue depth optional 30 | o String gtin12 optional 31 | o String gtin13 optional 32 | o String gtin14 optional 33 | o String gtin8 optional 34 | o QuantitativeValue height optional 35 | } -------------------------------------------------------------------------------- /src/product@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.product@0.2.0 16 | 17 | import org.accordproject.value@0.2.0.QuantitativeValue from https://models.accordproject.org/value@0.2.0.cto 18 | import org.accordproject.address@0.2.0.PostalAddress from https://models.accordproject.org/address@0.2.0.cto 19 | import org.accordproject.organization@0.2.0.Organization from https://models.accordproject.org/organization@0.2.0.cto 20 | 21 | /** 22 | * http://schema.org/Product 23 | */ 24 | asset Product identified by identifier { 25 | o String identifier 26 | --> Organization Organization optional 27 | o String category optional 28 | o String color optional 29 | o QuantitativeValue depth optional 30 | o String gtin12 optional 31 | o String gtin13 optional 32 | o String gtin14 optional 33 | o String gtin8 optional 34 | o QuantitativeValue height optional 35 | } -------------------------------------------------------------------------------- /src/signature/block.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.signature.block 16 | 17 | import org.accordproject.cicero.contract.AccordClause from https://models.accordproject.org/cicero/contract.cto 18 | import org.accordproject.cicero.contract.AccordParty from https://models.accordproject.org/cicero/contract.cto 19 | 20 | /** 21 | * An abstract clause for a party scoped signature block 22 | */ 23 | abstract asset SignatureClause extends AccordClause { 24 | @Pdf("style", "background") 25 | @ContractEditor("readOnly", true, "opacity", 0) 26 | --> AccordParty signatory 27 | } -------------------------------------------------------------------------------- /src/signature/block@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.signature.block 18 | 19 | import org.accordproject.contract.Clause from https://models.accordproject.org/accordproject/contract.cto 20 | import org.accordproject.party.Party from https://models.accordproject.org/accordproject/party.cto 21 | 22 | /** 23 | * An abstract clause for a party scoped signature block 24 | */ 25 | abstract asset SignatureClause extends Clause { 26 | @Pdf("style", "background") 27 | @ContractEditor("readOnly", true, "opacity", 0) 28 | --> Party signatory 29 | } -------------------------------------------------------------------------------- /src/signature/block@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | 17 | namespace org.accordproject.signature.block@0.3.0 18 | 19 | import org.accordproject.contract@0.2.0.Clause from https://models.accordproject.org/accordproject/contract@0.2.0.cto 20 | import org.accordproject.party@0.2.0.Party from https://models.accordproject.org/accordproject/party@0.2.0.cto 21 | 22 | /** 23 | * An abstract clause for a party scoped signature block 24 | */ 25 | abstract asset SignatureClause extends Clause { 26 | @Pdf("style", "background") 27 | @ContractEditor("readOnly", true, "opacity", 0) 28 | --> Party signatory 29 | } -------------------------------------------------------------------------------- /src/signature/signature.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | // requires: concerto-core:<=0.82.11 15 | 16 | namespace org.accordproject.signature 17 | 18 | import org.accordproject.cicero.runtime.Request from https://models.accordproject.org/cicero/runtime.cto 19 | import org.accordproject.cicero.contract.AccordContract from https://models.accordproject.org/cicero/contract.cto 20 | import org.accordproject.cicero.contract.AccordClause from https://models.accordproject.org/cicero/contract.cto 21 | import org.accordproject.cicero.contract.AccordParty from https://models.accordproject.org/cicero/contract.cto 22 | 23 | /** 24 | * A request that indicates that a contract has been signed by all parties 25 | */ 26 | transaction ContractSigned extends Request { 27 | --> AccordContract contract 28 | } -------------------------------------------------------------------------------- /src/signature/signature@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version ">= 1.0.0" 16 | 17 | namespace org.accordproject.signature 18 | 19 | import org.accordproject.runtime.Request from https://models.accordproject.org/accordproject/runtime.cto 20 | import org.accordproject.contract.Contract from https://models.accordproject.org/accordproject/contract.cto 21 | 22 | /** 23 | * A request that indicates that a contract has been signed by all parties 24 | */ 25 | transaction ContractSigned extends Request { 26 | --> Contract contract 27 | } 28 | -------------------------------------------------------------------------------- /src/signature/signature@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | concerto version "^3.0.0" 16 | 17 | namespace org.accordproject.signature@0.3.0 18 | 19 | import org.accordproject.runtime@0.2.0.Request from https://models.accordproject.org/accordproject/runtime@0.2.0.cto 20 | import org.accordproject.contract@0.2.0.Contract from https://models.accordproject.org/accordproject/contract@0.2.0.cto 21 | 22 | /** 23 | * A request that indicates that a contract has been signed by all parties 24 | */ 25 | transaction ContractSigned extends Request { 26 | --> Contract contract 27 | } 28 | -------------------------------------------------------------------------------- /src/time.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | /** This model is deprecated, for Cicero 0.10 or later use v2.0/time.cto instead */ 16 | 17 | namespace org.accordproject.time 18 | 19 | /** 20 | * Units for a duration. 21 | */ 22 | enum TemporalUnit { 23 | o seconds 24 | o minutes 25 | o hours 26 | o days 27 | o weeks 28 | o years 29 | } 30 | 31 | /** 32 | * A duration. For example, 6 hours. 33 | */ 34 | concept Duration { 35 | o Long amount 36 | o TemporalUnit unit 37 | } 38 | -------------------------------------------------------------------------------- /src/time@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.time 16 | 17 | /** 18 | * Months of the year 19 | */ 20 | enum Month { 21 | o January 22 | o February 23 | o March 24 | o April 25 | o May 26 | o June 27 | o July 28 | o August 29 | o September 30 | o October 31 | o November 32 | o December 33 | } 34 | 35 | /** 36 | * Days of the week 37 | */ 38 | enum Day { 39 | o Monday 40 | o Tuesday 41 | o Wednesday 42 | o Thursday 43 | o Friday 44 | o Saturday 45 | o Sunday 46 | } 47 | 48 | /** 49 | * Units for a duration. 50 | */ 51 | enum TemporalUnit { 52 | o seconds 53 | o minutes 54 | o hours 55 | o days 56 | o weeks 57 | } 58 | 59 | /** 60 | * A duration. For example, 6 hours. 61 | */ 62 | concept Duration { 63 | o Long amount 64 | o TemporalUnit unit 65 | } 66 | 67 | /** 68 | * Units for a time period. 69 | */ 70 | enum PeriodUnit { 71 | o days 72 | o weeks 73 | o months 74 | o quarters 75 | o years 76 | } 77 | 78 | /** 79 | * A time period. For example, 2 months. 80 | */ 81 | concept Period { 82 | o Long amount 83 | o PeriodUnit unit 84 | } 85 | -------------------------------------------------------------------------------- /src/time@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | 16 | namespace org.accordproject.time@0.3.0 17 | 18 | /** 19 | * Months of the year 20 | */ 21 | enum Month { 22 | o January 23 | o February 24 | o March 25 | o April 26 | o May 27 | o June 28 | o July 29 | o August 30 | o September 31 | o October 32 | o November 33 | o December 34 | } 35 | 36 | /** 37 | * Days of the week 38 | */ 39 | enum Day { 40 | o Monday 41 | o Tuesday 42 | o Wednesday 43 | o Thursday 44 | o Friday 45 | o Saturday 46 | o Sunday 47 | } 48 | 49 | /** 50 | * Units for a duration. 51 | */ 52 | enum TemporalUnit { 53 | o seconds 54 | o minutes 55 | o hours 56 | o days 57 | o weeks 58 | } 59 | 60 | /** 61 | * A duration. For example, 6 hours. 62 | */ 63 | concept Duration { 64 | o Long amount 65 | o TemporalUnit unit 66 | } 67 | 68 | /** 69 | * Units for a time period. 70 | */ 71 | enum PeriodUnit { 72 | o days 73 | o weeks 74 | o months 75 | o quarters 76 | o years 77 | } 78 | 79 | /** 80 | * A time period. For example, 2 months. 81 | */ 82 | concept Period { 83 | o Long amount 84 | o PeriodUnit unit 85 | } 86 | -------------------------------------------------------------------------------- /src/timezone.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.timezone 16 | 17 | /** 18 | * IANA TimeZone database names 19 | * Source: https://gist.github.com/arodu/3b0f2cd901c07da0ef70 20 | */ 21 | enum TimeZone { 22 | o Pacific_Midway 23 | o Pacific_Honolulu 24 | o America_Anchorage 25 | o America_Tijuana 26 | o America_Los_Angeles 27 | o America_Phoenix 28 | o America_Chihuahua 29 | o America_Denver 30 | o America_Belize 31 | o America_Chicago 32 | o America_Mexico_City 33 | o America_Regina 34 | o America_Bogota 35 | o America_Jamaica 36 | o America_New_York 37 | o America_Indiana_Indianapolis 38 | o America_Caracas 39 | o America_Asuncion 40 | o America_Halifax 41 | o America_Cuiaba 42 | o America_Manaus 43 | o America_St_Johns 44 | o America_Sao_Paulo 45 | o America_Buenos_Aires 46 | o America_Cayenne 47 | o America_Godthab 48 | o America_Montevideo 49 | o America_Bahia 50 | o America_Santiago 51 | o America_Noronha 52 | o Atlantic_Azores 53 | o Atlantic_Cape_Verde 54 | o Europe_London 55 | o Africa_Casablanca 56 | o Africa_Monrovia 57 | o Europe_Amsterdam 58 | o Europe_Belgrade 59 | o Europe_Brussels 60 | o Europe_Warsaw 61 | o Africa_Algiers 62 | o Africa_Windhoek 63 | o Europe_Athens 64 | o Asia_Beirut 65 | o Africa_Cairo 66 | o Asia_Damascus 67 | o EET 68 | o Africa_Harare 69 | o Europe_Helsinki 70 | o Asia_Istanbul 71 | o Asia_Jerusalem 72 | o Europe_Kaliningrad 73 | o Africa_Tripoli 74 | o Asia_Amman 75 | o Asia_Baghdad 76 | o Asia_Kuwait 77 | o Europe_Minsk 78 | o Europe_Moscow 79 | o Africa_Nairobi 80 | o Asia_Tehran 81 | o Asia_Muscat 82 | o Asia_Baku 83 | o Europe_Samara 84 | o Indian_Mauritius 85 | o Asia_Tbilisi 86 | o Asia_Yerevan 87 | o Asia_Kabul 88 | o Asia_Tashkent 89 | o Asia_Yekaterinburg 90 | o Asia_Karachi 91 | o Asia_Kolkata 92 | o Asia_Colombo 93 | o Asia_Katmandu 94 | o Asia_Almaty 95 | o Asia_Dhaka 96 | o Asia_Novosibirsk 97 | o Asia_Rangoon 98 | o Asia_Bangkok 99 | o Asia_Krasnoyarsk 100 | o Asia_Chongqing 101 | o Asia_Irkutsk 102 | o Asia_Kuala_Lumpur 103 | o Australia_Perth 104 | o Asia_Taipei 105 | o Asia_Ulaanbaatar 106 | o Asia_Tokyo 107 | o Asia_Seoul 108 | o Asia_Yakutsk 109 | o Australia_Adelaide 110 | o Australia_Darwin 111 | o Australia_Brisbane 112 | o Australia_Canberra 113 | o Pacific_Guam 114 | o Australia_Hobart 115 | o Asia_Magadan 116 | o Asia_Vladivostok 117 | o Asia_Srednekolymsk 118 | o Pacific_Guadalcanal 119 | o Asia_Anadyr 120 | o Pacific_Auckland 121 | o Pacific_Fiji 122 | o Pacific_Tongatapu 123 | o Pacific_Apia 124 | } -------------------------------------------------------------------------------- /src/timezone@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.timezone@0.2.0 16 | 17 | /** 18 | * IANA TimeZone database names 19 | * Source: https://gist.github.com/arodu/3b0f2cd901c07da0ef70 20 | */ 21 | enum TimeZone { 22 | o Pacific_Midway 23 | o Pacific_Honolulu 24 | o America_Anchorage 25 | o America_Tijuana 26 | o America_Los_Angeles 27 | o America_Phoenix 28 | o America_Chihuahua 29 | o America_Denver 30 | o America_Belize 31 | o America_Chicago 32 | o America_Mexico_City 33 | o America_Regina 34 | o America_Bogota 35 | o America_Jamaica 36 | o America_New_York 37 | o America_Indiana_Indianapolis 38 | o America_Caracas 39 | o America_Asuncion 40 | o America_Halifax 41 | o America_Cuiaba 42 | o America_Manaus 43 | o America_St_Johns 44 | o America_Sao_Paulo 45 | o America_Buenos_Aires 46 | o America_Cayenne 47 | o America_Godthab 48 | o America_Montevideo 49 | o America_Bahia 50 | o America_Santiago 51 | o America_Noronha 52 | o Atlantic_Azores 53 | o Atlantic_Cape_Verde 54 | o Europe_London 55 | o Africa_Casablanca 56 | o Africa_Monrovia 57 | o Europe_Amsterdam 58 | o Europe_Belgrade 59 | o Europe_Brussels 60 | o Europe_Warsaw 61 | o Africa_Algiers 62 | o Africa_Windhoek 63 | o Europe_Athens 64 | o Asia_Beirut 65 | o Africa_Cairo 66 | o Asia_Damascus 67 | o EET 68 | o Africa_Harare 69 | o Europe_Helsinki 70 | o Asia_Istanbul 71 | o Asia_Jerusalem 72 | o Europe_Kaliningrad 73 | o Africa_Tripoli 74 | o Asia_Amman 75 | o Asia_Baghdad 76 | o Asia_Kuwait 77 | o Europe_Minsk 78 | o Europe_Moscow 79 | o Africa_Nairobi 80 | o Asia_Tehran 81 | o Asia_Muscat 82 | o Asia_Baku 83 | o Europe_Samara 84 | o Indian_Mauritius 85 | o Asia_Tbilisi 86 | o Asia_Yerevan 87 | o Asia_Kabul 88 | o Asia_Tashkent 89 | o Asia_Yekaterinburg 90 | o Asia_Karachi 91 | o Asia_Kolkata 92 | o Asia_Colombo 93 | o Asia_Katmandu 94 | o Asia_Almaty 95 | o Asia_Dhaka 96 | o Asia_Novosibirsk 97 | o Asia_Rangoon 98 | o Asia_Bangkok 99 | o Asia_Krasnoyarsk 100 | o Asia_Chongqing 101 | o Asia_Irkutsk 102 | o Asia_Kuala_Lumpur 103 | o Australia_Perth 104 | o Asia_Taipei 105 | o Asia_Ulaanbaatar 106 | o Asia_Tokyo 107 | o Asia_Seoul 108 | o Asia_Yakutsk 109 | o Australia_Adelaide 110 | o Australia_Darwin 111 | o Australia_Brisbane 112 | o Australia_Canberra 113 | o Pacific_Guam 114 | o Australia_Hobart 115 | o Asia_Magadan 116 | o Asia_Vladivostok 117 | o Asia_Srednekolymsk 118 | o Pacific_Guadalcanal 119 | o Asia_Anadyr 120 | o Pacific_Auckland 121 | o Pacific_Fiji 122 | o Pacific_Tongatapu 123 | o Pacific_Apia 124 | } -------------------------------------------------------------------------------- /src/usa/business.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.usa.business 16 | 17 | import org.accordproject.geo.GeoCoordinates from https://models.accordproject.org/geo.cto 18 | import org.accordproject.address.PostalAddress from https://models.accordproject.org/address.cto 19 | 20 | /** 21 | * Types of businesses in the USA 22 | * Taken from: https://en.wikipedia.org/wiki/List_of_business_entities#United_States 23 | */ 24 | enum BusinessEntity { 25 | o GENERAL_PARTNERSHIP 26 | o LP 27 | o LLP 28 | o LLLP 29 | o LLC 30 | o PLLC 31 | o CORP 32 | o PC 33 | o DBA 34 | } 35 | 36 | /** 37 | * Based on the state of Delaware API: 38 | * https://dev.socrata.com/foundry/data.delaware.gov/5zy2-grhr 39 | */ 40 | concept BusinessLicense { 41 | o String business_name 42 | o String category 43 | o DateTime current_license_valid_from 44 | o DateTime current_license_valid_to 45 | o PostalAddress address 46 | o Long license_number 47 | o GeoCoordinates geocoded_location 48 | } -------------------------------------------------------------------------------- /src/usa/business@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.usa.business@0.2.0 16 | 17 | import org.accordproject.geo@0.2.0.GeoCoordinates from https://models.accordproject.org/geo@0.2.0.cto 18 | import org.accordproject.address@0.2.0.PostalAddress from https://models.accordproject.org/address@0.2.0.cto 19 | 20 | /** 21 | * Types of businesses in the USA 22 | * Taken from: https://en.wikipedia.org/wiki/List_of_business_entities#United_States 23 | */ 24 | enum BusinessEntity { 25 | o GENERAL_PARTNERSHIP 26 | o LP 27 | o LLP 28 | o LLLP 29 | o LLC 30 | o PLLC 31 | o CORP 32 | o PC 33 | o DBA 34 | } 35 | 36 | /** 37 | * Based on the state of Delaware API: 38 | * https://dev.socrata.com/foundry/data.delaware.gov/5zy2-grhr 39 | */ 40 | concept BusinessLicense { 41 | o String business_name 42 | o String category 43 | o DateTime current_license_valid_from 44 | o DateTime current_license_valid_to 45 | o PostalAddress address 46 | o Long license_number 47 | o GeoCoordinates geocoded_location 48 | } -------------------------------------------------------------------------------- /src/usa/entity.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.usa.entity 16 | 17 | // EntityType 18 | enum EntityType { 19 | o Individual // Individual 20 | o Corporation // Corporation 21 | o Limited_Liability_Company // Limited Liability Company 22 | o Partnership // Partnership 23 | o Limited_Partnership // Limited Partnership 24 | o Joint_Venture // Joint Venture 25 | o Sole_Proprietorship // Sole Proprietorship 26 | o Trust // Trust 27 | o Estate // Estate 28 | o Other // Other 29 | } -------------------------------------------------------------------------------- /src/usa/entity@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.usa.entity@0.2.0 16 | 17 | // EntityType 18 | enum EntityType { 19 | o Individual // Individual 20 | o Corporation // Corporation 21 | o Limited_Liability_Company // Limited Liability Company 22 | o Partnership // Partnership 23 | o Limited_Partnership // Limited Partnership 24 | o Joint_Venture // Joint Venture 25 | o Sole_Proprietorship // Sole Proprietorship 26 | o Trust // Trust 27 | o Estate // Estate 28 | o Other // Other 29 | } -------------------------------------------------------------------------------- /src/usa/residency.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.usa.residency 16 | 17 | // Residency 18 | enum Residency { 19 | o US // US Residency 20 | o NON_US // Non US Residency 21 | o MIL // Active US Military Service 22 | } 23 | -------------------------------------------------------------------------------- /src/usa/residency@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.usa.residency@0.2.0 16 | 17 | // Residency 18 | enum Residency { 19 | o US // US Residency 20 | o NON_US // Non US Residency 21 | o MIL // Active US Military Service 22 | } 23 | -------------------------------------------------------------------------------- /src/usa/state.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.usa.state 16 | 17 | /** 18 | * States in the USA 19 | */ 20 | enum State { 21 | o AL 22 | o AK 23 | o AZ 24 | o AR 25 | o CA 26 | o CO 27 | o CT 28 | o DE 29 | o FL 30 | o GA 31 | o HI 32 | o ID 33 | o IL 34 | o IN 35 | o IA 36 | o KS 37 | o KY 38 | o LA 39 | o ME 40 | o MD 41 | o MA 42 | o MI 43 | o MN 44 | o MS 45 | o MO 46 | o MT 47 | o NE 48 | o NV 49 | o NH 50 | o NJ 51 | o NM 52 | o NY 53 | o NC 54 | o ND 55 | o OH 56 | o OK 57 | o OR 58 | o PA 59 | o RI 60 | o SC 61 | o SD 62 | o TN 63 | o TX 64 | o UT 65 | o VT 66 | o VA 67 | o WA 68 | o WV 69 | o WI 70 | o WY 71 | } -------------------------------------------------------------------------------- /src/usa/state@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.usa.state 16 | 17 | /** 18 | * States in the USA 19 | */ 20 | enum USState { 21 | o AL 22 | o AK 23 | o AZ 24 | o AR 25 | o CA 26 | o CO 27 | o CT 28 | o DE 29 | o FL 30 | o GA 31 | o HI 32 | o ID 33 | o IL 34 | o IN 35 | o IA 36 | o KS 37 | o KY 38 | o LA 39 | o ME 40 | o MD 41 | o MA 42 | o MI 43 | o MN 44 | o MS 45 | o MO 46 | o MT 47 | o NE 48 | o NV 49 | o NH 50 | o NJ 51 | o NM 52 | o NY 53 | o NC 54 | o ND 55 | o OH 56 | o OK 57 | o OR 58 | o PA 59 | o RI 60 | o SC 61 | o SD 62 | o TN 63 | o TX 64 | o UT 65 | o VT 66 | o VA 67 | o WA 68 | o WV 69 | o WI 70 | o WY 71 | } 72 | -------------------------------------------------------------------------------- /src/usa/state@0.3.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.usa.state@0.3.0 16 | 17 | /** 18 | * States in the USA 19 | */ 20 | enum USState { 21 | o AL 22 | o AK 23 | o AZ 24 | o AR 25 | o CA 26 | o CO 27 | o CT 28 | o DE 29 | o FL 30 | o GA 31 | o HI 32 | o ID 33 | o IL 34 | o IN 35 | o IA 36 | o KS 37 | o KY 38 | o LA 39 | o ME 40 | o MD 41 | o MA 42 | o MI 43 | o MN 44 | o MS 45 | o MO 46 | o MT 47 | o NE 48 | o NV 49 | o NH 50 | o NJ 51 | o NM 52 | o NY 53 | o NC 54 | o ND 55 | o OH 56 | o OK 57 | o OR 58 | o PA 59 | o RI 60 | o SC 61 | o SD 62 | o TN 63 | o TX 64 | o UT 65 | o VT 66 | o VA 67 | o WA 68 | o WV 69 | o WI 70 | o WY 71 | } 72 | -------------------------------------------------------------------------------- /src/v2.0/time.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.time 16 | 17 | /** 18 | * WARNING, this file has moved to 19 | * models.accordproject.org/time@0.2.0.cto 20 | * To take advantage of semantic versioning you should update your links. 21 | */ 22 | 23 | /** 24 | * Months of the year 25 | */ 26 | enum Month { 27 | o January 28 | o February 29 | o March 30 | o April 31 | o May 32 | o June 33 | o July 34 | o August 35 | o September 36 | o October 37 | o November 38 | o December 39 | } 40 | 41 | /** 42 | * Days of the week 43 | */ 44 | enum Day { 45 | o Monday 46 | o Tuesday 47 | o Wednesday 48 | o Thursday 49 | o Friday 50 | o Saturday 51 | o Sunday 52 | } 53 | 54 | /** 55 | * Units for a duration. 56 | */ 57 | enum TemporalUnit { 58 | o seconds 59 | o minutes 60 | o hours 61 | o days 62 | o weeks 63 | } 64 | 65 | /** 66 | * A duration. For example, 6 hours. 67 | */ 68 | concept Duration { 69 | o Long amount 70 | o TemporalUnit unit 71 | } 72 | 73 | /** 74 | * Units for a time period. 75 | */ 76 | enum PeriodUnit { 77 | o days 78 | o weeks 79 | o months 80 | o quarters 81 | o years 82 | } 83 | 84 | /** 85 | * A time period. For example, 2 months. 86 | */ 87 | concept Period { 88 | o Long amount 89 | o PeriodUnit unit 90 | } 91 | -------------------------------------------------------------------------------- /src/value.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | namespace org.accordproject.value 16 | 17 | /** 18 | * http://schema.org/QuantitativeValue 19 | */ 20 | concept QuantitativeValue { 21 | o String unitCode 22 | o String unitText optional 23 | o Double value 24 | } 25 | 26 | /** 27 | * SI units of mass 28 | */ 29 | enum UnitOfMass { 30 | o GRAM 31 | o KG 32 | o TONNE 33 | } 34 | 35 | /** 36 | * Units of Length 37 | */ 38 | enum UnitOfLength { 39 | o METER 40 | } 41 | 42 | /** 43 | * Units of Density 44 | */ 45 | enum UnitOfDensity { 46 | o KG_PER_CUBIC_METER 47 | } 48 | 49 | /** 50 | * Units of Volume 51 | */ 52 | enum UnitOfVolume { 53 | o CUBIC_METER 54 | } 55 | 56 | /** 57 | * Units of Temperature 58 | */ 59 | enum UnitOfTemperature { 60 | o KELVINS 61 | o CELSIUS 62 | o FAHRENHEIT 63 | } -------------------------------------------------------------------------------- /src/value@0.2.0.cto: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | concerto version "^3.0.0" 15 | namespace org.accordproject.value@0.2.0 16 | 17 | /** 18 | * http://schema.org/QuantitativeValue 19 | */ 20 | concept QuantitativeValue { 21 | o String unitCode 22 | o String unitText optional 23 | o Double value 24 | } 25 | 26 | /** 27 | * SI units of mass 28 | */ 29 | enum UnitOfMass { 30 | o GRAM 31 | o KG 32 | o TONNE 33 | } 34 | 35 | /** 36 | * Units of Length 37 | */ 38 | enum UnitOfLength { 39 | o METER 40 | } 41 | 42 | /** 43 | * Units of Density 44 | */ 45 | enum UnitOfDensity { 46 | o KG_PER_CUBIC_METER 47 | } 48 | 49 | /** 50 | * Units of Volume 51 | */ 52 | enum UnitOfVolume { 53 | o CUBIC_METER 54 | } 55 | 56 | /** 57 | * Units of Temperature 58 | */ 59 | enum UnitOfTemperature { 60 | o KELVINS 61 | o CELSIUS 62 | o FAHRENHEIT 63 | } -------------------------------------------------------------------------------- /views/index.njk: -------------------------------------------------------------------------------- 1 | {% extends "page.njk" %} 2 | 3 | {% block body %} 4 |
5 |
6 |
7 |

8 | Accord Project Model Repository 9 |

10 |

11 | This repository hosts all Accord Project models. Models are captured using the 12 | Concerto Modeling Language (CTO); a platform and runtime neutral typed schema language. The CTO 13 | meta-model provides just-enough functionality to capture most business models and maps naturally to many executions 14 | languages. Models can be used to define clauses and contracts, as well as domains models used within clauses and contracts. The CTO runtime stack is implemented in JavaScript and CTO instances serialize to JSON. CTO models 15 | can also be exported to Java, Go, XML Schema, and Typescript. For more on Concerto, read the Concerto project outline. 16 |

17 |
18 |
19 |
20 |
21 |
22 |

Model Namespaces

23 |
24 | 31 |
32 |
33 |
34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /views/model.njk: -------------------------------------------------------------------------------- 1 | {% extends "page.njk" %} 2 | 3 | {% block unfurl %} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {% endblock %} 16 | 17 | {% block body %} 18 |
19 |
20 |

21 | Namespace {{modelFile.getNamespace()}}{% if modelFile.getNamespace().includes("@")===false %}{{modelVersion}}{% endif %} 22 |

23 |

24 | Compatible with Concerto versions {{modelFile.concertoVersion}}. Has {{modelFile.getAllDeclarations().length}} declarations. 25 |

26 |

27 | Concerto 28 | {% if concerto.MetaModel %} 29 | JSON AST 30 | {% endif %} 31 | {% for gen in codeGenerators %} 32 | {{gen.name}} 33 | {% endfor %} 34 |

35 | 36 | 37 |

Declared Types

38 |
39 |
40 |       
41 |       {% for decl in modelFile.getAllDeclarations() %}import {{decl.getFullyQualifiedName()}} from {{serverRoot}}{{filePath}}.cto
42 |       {% endfor %}
43 |       
44 |
45 | 46 |

Dependencies

47 |
48 |
    49 | {% for ns, uri in modelFile.getExternalImports() %} 50 |
  • {{ns}}
  • 51 | {% else %} 52 |
  • None
  • 53 | {% endfor %} 54 |
55 |
56 | 57 |

Source

58 |
59 |
60 |     {{modelFile.getDefinitions()}}
61 |     
62 |
63 |
64 | {% endblock %} 65 | --------------------------------------------------------------------------------