{"id":21426099,"url":"https://github.com/bcdh/cql-module","last_synced_at":"2025-09-02T21:41:03.706Z","repository":{"id":57742068,"uuid":"67177257","full_name":"BCDH/cql-module","owner":"BCDH","description":"Corpus Query Language Module for eXist-db","archived":false,"fork":false,"pushed_at":"2023-11-22T15:31:13.000Z","size":40,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-24T12:26:46.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BCDH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-09-02T00:47:25.000Z","updated_at":"2023-10-15T09:31:18.000Z","dependencies_parsed_at":"2023-11-08T12:42:06.020Z","dependency_job_id":"246ba22c-7585-4f73-be76-b3bec6aef6b6","html_url":"https://github.com/BCDH/cql-module","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCDH%2Fcql-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCDH%2Fcql-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCDH%2Fcql-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BCDH%2Fcql-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BCDH","download_url":"https://codeload.github.com/BCDH/cql-module/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225970066,"owners_count":17553391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-22T21:39:56.682Z","updated_at":"2025-07-14T10:30:36.727Z","avatar_url":"https://github.com/BCDH.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Corpus Query Language module for Elemental or eXist-db\n[![Build Status](https://github.com/BCDH/cql-module/actions/workflows/ci.yml/badge.svg)](https://github.com/BCDH/cql-module/actions/workflows/ci.yml)\n[![Java 8+](https://img.shields.io/badge/java-8+-blue.svg)](http://java.oracle.com)\n[![License](https://img.shields.io/badge/license-GPL%202-blue.svg)](https://www.gnu.org/licenses/gpl-2.0.html)\n[![Maven Central](https://img.shields.io/maven-central/v/org.humanistika.exist.module/cql-module?logo=apachemaven\u0026label=maven+central\u0026color=green)](https://search.maven.org/search?q=g:org.humanistika.exist.module)\n\nThis is an XQuery Function Extension Module for Elemental or eXist-db. The module provides a CQL (Corpus Query Language) to XML parser based on [exquery/corpusql-parser](https://github.com/exquery/corpusql-parser).\n\n\n## Installation into Elemental or eXist-db\nYou can install the module into Elemental or eXist-db in either one of two ways:\n1. As an EXPath Package (.xar file)\n2. Directly as a XQuery Java Extension Module (.jar file)\n\n### Easy Option - EXPath Package Installation into eXist-db (.xar)\n1. Download the latest XAR file from the releases here: https://github.com/BCDH/cql-module/releases/\n   * or if you have [compiled](#compiling) the code yourself you can find the `cql-module-1.6.0-SNAPSHOT.xar` file in the `target` subfolder.\n\n2. You can take the .xar file and upload it via Elemental or eXist-db's EXPath Package Manager app from its Dashboard\n\n3. Restart Elemental (or eXist-db)\n\n### Advanced Option - Direct Installation into eXist-db (.jar)\n1. Download the latest Jar file from the releases here: https://github.com/BCDH/cql-module/releases/\n   * or if you have [compiled](#compiling) the code yourself you can find the `cql-module-1.6.0-SNAPSHOT-exist.jar` file in the `target` subfolder.\n\n2. Copy the .jar file to either `$ELEMENTAL_HOME/lib` (or substitute `$EXIST_HOME` instead of `$ELEMENTAL_HOME` for eXist-db).\n\n3. Edit `$ELEMENTAL_HOME/etc/conf.xml` and add the following to the `\u003cbuiltin-modules\u003e`:\n\n    ```xml\n    \u003cmodule uri=\"http://humanistika.org/ns/exist/module/cql\" class=\"org.humanistika.exist.module.cqlmodule.CQLModule\"/\u003e\n    ```\n4. Edit `$ELEMENTAL_HOME/etc/startup.xml` and add the following to the `\u003cdependencies\u003e`:\n\n   ```xml\n         \u003cdependency\u003e\n           \u003cgroupId\u003eorg.humanistika.exist.module\u003c/groupId\u003e\n           \u003cartifactId\u003ecql-module\u003c/artifactId\u003e\n           \u003cversion\u003e1.6.0-SNAPSHOT\u003c/version\u003e \u003c!-- NOTE: Modify this to the version you are using --\u003e\n           \u003crelativePath\u003ecql-module-1.6.0-SNAPSHOT-exist.jar\u003c/relativePath\u003e \u003c!-- NOTE: this should reflect the exact filename in lib folder that you copied earlier --\u003e\n         \u003c/dependency\u003e\n   ```\n\n5. Restart Elemental (or eXist-db)\n\n\n## Usage\nThe module exports a single function for use in your XQuery(s), for example:\n\n```xquery\nxquery version \"3.1\";\n\nimport module namespace cql = \"http://humanistika.org/ns/exist/module/cql\";\n\ncql:parse(\"[lemma='bob' \u0026amp; ana='x']\")\n```\n\nwould produce the output:\n\n```xml\n\u003ccql:query xmlns:cql=\"http://humanistika.org/ns/exist/module/cql\"\u003e\n    \u003ccql:position\u003e\n        \u003ccql:and\u003e\n            \u003ccql:attribute name=\"lemma\"\u003ebob\u003c/cql:attribute\u003e\n            \u003ccql:attribute name=\"ana\"\u003ex\u003c/cql:attribute\u003e\n        \u003c/cql:and\u003e\n    \u003c/cql:position\u003e\n\u003c/cql:query\u003e\n```\n\nFor further examples of the XML that will be produced see [CorpusQLXMLVisitorTest](https://github.com/BCDH/cql-module/blob/master/src/test/java/org/humanistika/exist/module/cqlmodule/CorpusQLXMLVisitorTest.java#L42)\n\n## Compiling\nRequirements: Java 8, Maven 3.\n\n1. `git clone https://github.com/bcdh/cql-module.git`\n\n2. `cd cql-module`\n\n3. `mvn package`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcdh%2Fcql-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcdh%2Fcql-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcdh%2Fcql-module/lists"}