{"id":36426211,"url":"https://github.com/mdzhb/jt-oddl","last_synced_at":"2026-01-11T18:00:45.845Z","repository":{"id":57721395,"uuid":"166576416","full_name":"MDZhB/jt-oddl","owner":"MDZhB","description":"An Open Data Description Language parser for Java 9+.","archived":false,"fork":false,"pushed_at":"2022-05-11T00:24:12.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-06-30T20:37:57.849Z","etag":null,"topics":["java","java-9","openddl-parser","parser"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MDZhB.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-19T17:53:54.000Z","updated_at":"2022-02-26T05:06:48.000Z","dependencies_parsed_at":"2022-09-26T21:41:31.617Z","dependency_job_id":null,"html_url":"https://github.com/MDZhB/jt-oddl","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/MDZhB/jt-oddl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MDZhB%2Fjt-oddl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MDZhB%2Fjt-oddl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MDZhB%2Fjt-oddl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MDZhB%2Fjt-oddl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MDZhB","download_url":"https://codeload.github.com/MDZhB/jt-oddl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MDZhB%2Fjt-oddl/sbom","scorecard":{"id":87500,"data":{"date":"2025-08-11","repo":{"name":"github.com/MDZhB/jt-oddl","commit":"94966742db1a0d2cae1c1373b8937a2558599f3a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T07:14:31.206Z","repository_id":57721395,"created_at":"2025-08-15T07:14:31.207Z","updated_at":"2025-08-15T07:14:31.207Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28316914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","java-9","openddl-parser","parser"],"created_at":"2026-01-11T18:00:23.556Z","updated_at":"2026-01-11T18:00:45.741Z","avatar_url":"https://github.com/MDZhB.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jt-oddl\n[![Javadocs](https://www.javadoc.io/badge/com.github.mdzhb/jt-oddl.svg)](https://www.javadoc.io/doc/com.github.mdzhb/jt-oddl)\n\n## Overview\n`jt-oddl` is an [Open Data Description Language](http://www.openddl.org/) parser written in Java.\n\n## Getting started\n### Maven\nAdd the following to the `\u003cdependencies\u003e` element in your `pom.xml`:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.mdzhb\u003c/groupId\u003e\n  \u003cartifactId\u003ejt-oddl\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n### In Code\nTo parse an OpenDDL file, you need an `ODDLReader` and an implementation of the `ODDLListener` interface. The `ODDLReader` parses text read from a `Reader` or `InputStream`. Every time the `ODDLReader` encounters a valid language construct in the input, it calls the appropriate method in its `ODDLListener`.\n\nConsider the following example listener. For brevity, it only implements three of the methods specified in the `ODDLListener` interface.\n```java\n// this class generates a list of Structure objects; imagine the Structure class is defined elsewhere in your code\nclass StructureListener implements ODDLListener\u003cList\u003cStructure\u003e\u003e {\n    \n    /** this is the collection of structures our listener will return */\n    private final List\u003cStructure\u003e  structures = new ArrayList\u003c\u003e();\n    \n    /** a stack helps us handle nested structures */\n    private final Deque\u003cStructure\u003e stack = new ArrayDeque\u003c\u003e();\n    \n    // this method is called when the reader encounters the beginning of a custom structure\n    @Override\n    public void beginCustomStructure(IdentifierToken identifier, NameToken name, PropertyMap properties) {\n        stack.push(new Structure(identifier, name, properties));\n    }\n    \n    // this method is called when the reader reaches the end of a custom structure (i.e. the closing brace)\n    @Override\n    public void endCustomStructure(IdentifierToken identifier, NameToken name, PropertyMap properties) {\n        Structure struct = stack.pop();\n        if (stack.isEmpty()) { // this is a top-level structure\n            structures.add(struct);\n        } else { // this is a child structure\n            stack.peek().addChildStructure(struct);\n        }\n    }\n    \n    // this method is called when the reader reaches end of file\n    @Override\n    public List\u003cStructure\u003e end(int row, int col) {\n        return structures; // this return value is the object returned by ODDLReader.read()\n    }\n}\n```\nYou would use the `StructureListener` like this:\n```java\ntry (InputStream in = Files.newInputStream(Paths.get(\"myfile.oddl\"))) {\n    List\u003cStructure\u003e structures = new ODDLReader(in).read(new StructureListener());\n    // operate on your list of Structures...\n}\n```\n`ODDLToken` defines methods that convert tokens to more specific types without casting. This is useful when handling structure properties in your listener implementation, for example.\n```java\n@Override\npublic void beginCustomStructure(IdentifierToken identifier, NameToken name, PropertyMap properties) {\n    PropertyValueToken token = properties.get(\"propertyName\");\n    if (token.isFloat()) { // is this a float literal?\n        FloatToken ft = token.asFloat(); // it is, so this line is valid\n    }\n}\n```\n\nIf handling a large number of token types, it may be wiser to use a switch statement:\n```java\nswitch (token.getType()) {\n    case BOOL:\n        boolean bt = token.asBool().getValue();\n        break;\n    case FLOAT:\n        float ft = token.asFloat().getValue();\n        break;\n    // etc.\n}\n```\nThese \"downcasting\" methods throw an `IllegalArgumentException` when the token is not an instance of the desired class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdzhb%2Fjt-oddl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdzhb%2Fjt-oddl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdzhb%2Fjt-oddl/lists"}