{"id":20259650,"url":"https://github.com/nrc-cnrc/java-utils","last_synced_at":"2025-04-11T01:32:26.964Z","repository":{"id":52525846,"uuid":"301843227","full_name":"nrc-cnrc/java-utils","owner":"nrc-cnrc","description":"Collection of java utility classes — Ensemble de classes utilitaires java","archived":false,"fork":false,"pushed_at":"2022-11-30T20:28:50.000Z","size":1798,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T22:41:34.094Z","etag":null,"topics":["java","utilities"],"latest_commit_sha":null,"homepage":"","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/nrc-cnrc.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}},"created_at":"2020-10-06T20:12:28.000Z","updated_at":"2024-09-25T17:55:51.000Z","dependencies_parsed_at":"2023-01-22T07:00:19.964Z","dependency_job_id":null,"html_url":"https://github.com/nrc-cnrc/java-utils","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/nrc-cnrc%2Fjava-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2Fjava-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2Fjava-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2Fjava-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrc-cnrc","download_url":"https://codeload.github.com/nrc-cnrc/java-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248325234,"owners_count":21084895,"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":["java","utilities"],"created_at":"2024-11-14T11:15:47.505Z","updated_at":"2025-04-11T01:32:26.931Z","avatar_url":"https://github.com/nrc-cnrc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The java-utils project\n\n\n## Description\n  \n_java-utils_ is a collection of java utility classes used in various project at \nthe National Research Council of Canada.\n\nMany of these classes provide functionality similar to functionality found in \nframeworks like _Spring_. In such cases, the reason why we implemented our own \nversion of the functionality may be that our version:\n- is more lightweight and easier to use\n- provides some additional features\n- was implemented at a time when there was no existing alternative\n- or it could just be that we just did not know that there already was a usable \n  implementation available\n  \n_Java-utils_ is a _Maven_ project with several sub-modules:\n\n- _java-utils-core_: Modules that may be required by other modules. For example:\n     - Acquiring configuration values from different sources (environment \n       variable, java system properties, etc.)\n     - Various assertion classes for JUnit testing\n     - Safe deep cloning of objects\n     - Various debug and introspection utilities\n     - Pretty priting JSON objects\n     - File manipulation, including files that may be buried inside of JARS.\n     - Temporarily caputring STDOUT to string\n     \n- _java-utils-data_: Classes for acquiring and manipulating data, including: \n     - Reading CSV files\n     - Reading a stream of JSON objects from a file\n     - File globbing\n     - Searching the web using the Bing search API\n     - Acquiring text from one or more web pages\n     - Computing basic statistics (ex: Histogram)  \n     \n - _java-utils-elasticseach_: \"Streamlined\" API for using Elastic Search for \n        the purposes of Natural Language Processing\n    \n- _java-utils-string_: Various utility classes for processing strings\n     - Joining, splitting, simple tokenization\n     - Diffing strings with different costing models\n     \n - _java-utils-ui_: Classes for building and testing Command Line Interface \n        (CLI) or web-based UIs\n\n## Documentation\n\nThere is no documentation per-se. However, most classes have a JUnit test case \nthat starts with a section lableled \"DOCUMENTATION TESTS\".\n\nTests in this section provide well documented code examples that illustrate the \ndifferent ways in which the class and its methods can be used. \n\n# Installing _java-utils_\n\nAt the moment, binary jars for _java-utils_ are not available on any \npublic Maven artifactory. To use _java-utils_ in one of your projects, you must \ndownload it from GitHub and install it with maven command:\n\n    mvn clean install -DskipTests=true\n    \nYou can then include any _java-utils_ module in your project by adding an entry \nto your project's _pom.xml_ file. For example, to include module \n_java-utils-core_, you would add something like this to your pom:\n\n\t\t\u003cdependency\u003e\n\t\t\t\u003cgroupId\u003eca.nrc.java-utils\u003c/groupId\u003e\n\t\t\t\u003cartifactId\u003ejava-utils-core\u003c/artifactId\u003e\n\t\t\t\u003cversion\u003e1.0.25-SNAPSHOT\u003c/version\u003e\n\t\t\u003c/dependency\u003e\n\n## _java-utils_ properties\n\nSome of the _java-utils_ classes can be configured using properties whose names \nall start with _ca.nrc_. \n\nYou can configure those using either:\n\n- Environment variables\n- Java JRE system variables\n- The _ca_nrc_ properties file   \n\nThe first two approaches are self explanatory.\n\nFor the 3rd approach (_ca_nrc_ properties file), just create a properties file \ncalled _ca_nrc.properties_ and define all your _ca.nrc.*_ props in it. Then, point \nto this file using either an environment or JRE variable called _ca_nrc_.  \n\nFor example:\n\n       \n     # Using JRE variables  \n     java -Dca_nrc=/path/to/your/ca_nrc.properties etc...\n     \n     # Using environment variable\n     export ca_nrc=/path/to/your/ca_nrc.properties; java etc...\n     \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrc-cnrc%2Fjava-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrc-cnrc%2Fjava-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrc-cnrc%2Fjava-utils/lists"}