- Notifications
You must be signed in to change notification settings - Fork0
Lightweight Java library to validate UCDs (Unified Content Descriptors).
License
gmantele/ucidy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This GitHub repository contains the sources of a library aiming to validate anyUCD (Unified Content Descriptor). This current version aims to respect as muchas possible the definition provided by theIVOAstandard:An IVOA Standard for Unified Content Descriptors - Version 1.1.The parser is by default configured with the list of all validated UCD wordslisted inThe UCD1+ controlled vocabulary 1.5.
- Check whether each UCD word is:
- syntactically valid
- recognised (i.e. the word is among a list of well known UCD words)
- recommended by the IVOA (The UCD1+ controlled vocabulary 1.5)
- Possibility to customise the list of known UCD words(by default all validated UCD1+ are automatically loaded)
- Validate a full UCD with
- a list of human readable errors
- an automatic correction suggestion (particularly for typo)
- a list of advice to improve the readability of the UCD
- Detection of deprecated UCD words(when detected a clear error message isreturned and a correction suggestion is proposed)
- Different ways to search UCD words
- exact match
- starting with
- closest match(take into account possible typo)
- Support namespace prefix
This library is developed usingJava 1.8(should be compatible with Java 1.8 or newer).
The compiled JAR, the runnable JAR, the sources and the Javadoc API areavailable on GitHub forall releasesand especially for thelatest one.
This library is under the conditions of the LPGL-v3. SeeCOPYING.LESSERandCOPYING for moredetails.
I strongly encourage youto declare any issue you encounterhere. Thus, anybody who has the sameproblem can see whether his/her problem is already known. If the problem isknown the progress and/or comments about its resolution will be published.
In addition, if you have forked this repository and made some corrections onyour side which are likely to interest any other user of the libraries, please,send a pull requesthere. Ifthese modifications are in adequation with the IVOA definition and are not toospecific to your use case, they will be integrated (maybe after somemodifications) on this repository and thus made available to everybody.
No dependency.
Theresources
directory contains two files for the moment:
ucd1p-words.txt
. It lists all official IVOA UCD1+ words as providedathttps://www.ivoa.net/documents/UCD1+/20230125/ucd-list.txt.ucd1p-deprecated.txt
. This is a list of alldeprecated UCD1+ words asprovided athttps://www.ivoa.net/documents/UCD1+/20230125/ucd-list-deprecated.txt.
These files are loaded by the default parser initialised in the class UCDParser.
If the fileucd1p-words.txt
is renamed or removed, the default parser willraise a warning on the standard error output and will be initialized with anempty list of known UCD1+ words. Consequently, any UCD parsed using this parserwill be systematically flagged asnot recognised and sonot recommended.
The sources of these three libraries come with some JUnit test files. You canfind them in thetest
directory.
In thetest-lib
directory, you will find all JAR files needed to compile andrun these JUnit tests. You can use the tasktest
of the ANT script asexplained below.
At the root of the repository, there is an ANT script. It is able to generateJAR for sources, binaries and Javadoc.
This ANT script have the following main targets:
build
: Compile all classes of this project.test
DEFAULT: Compile all classes and run all the JUnit tests.javadoc
: Generate the Javadoc.publish
: Compile all classes and run all the JUnit tests. If these latterare passed, the library JAR (also runnable) is generated, in addition of a JARcontaining all the sources and of another with the complete Javadoc.
About
Lightweight Java library to validate UCDs (Unified Content Descriptors).