RIF-CS Java API
RIF-CS Java API
The RIF-CS Java API assists Java developers to build and manipulate RIF-CS objects, avoiding repetitive XML API calls.
The functionality includes:
- Load an existing RIF-CS document into memory
- Add/modify/delete elements
- Generate a RIF-CS document and validate it against the RIF-CS schema
Although downloads of the JAR file are available on this page, we recommend also downloading the source code and looking through the examples (in the directory src/org/ands/rifcs/example
).
Version numbering
Please note that in general, the version numbering of the RIF-CS Java API does not correspond to the version numbering of the RIF-CS schema.
The latest version
You can download the latest version of the RIF-CS Java API from GitHub.
RIF-CS Java API 3.0.0
Version 3.0.0 is the latest release. It supports RIF-CS v1.6. Users upgrading from previous versions of the API should read the change history (available at the top-level of the API Javadoc page, and also in the source file src/overview.html
).
The sources are available from GitHub and in precompiled form here.
Archived versions
Below are earlier versions of the RIF-CS Java API.
RIF-CS Java API 2.0.0
Version 2.0.0 supports RIF-CS v1.5.
The sources are available from GitHub and in precompiled form here.
RIF-CS Java API 1.2.0
For RIF-CS v1.2.
RIF-CS Java API 1.0.1
Using the API with other XML APIs and Maven
A user has reported that certain combinations of particular versions of XML APIs and Maven may cause problems with the validation function of the API. If you use the following explicit dependencies in your Maven project:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
... then running the sample code, e.g., SampleRIFCSBuildCollectionV1Dot6Number1
, fails with validation errors. A workaround is to add the following dependency higher up in your pom.xml
:
<dependency>
<groupId>com.sun.xml.parsers</groupId>
<artifactId>jaxp-ri</artifactId>
<version>1.4.5</version>
</dependency>
Further background information is available at http://stackoverflow.com/questions/11677572/dealing-with-xerces-hell-in-java-maven.
Please contact services@ardc.edu.au with any comments, concerns, or other feedback.