Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Installation

AIF is built with Java version 11. You can download JDL 11 from several places:

If your current code is based on a version of Java earlier than Java 11, you may need to update your code as well. If you must remain in an earlier Java environment (JDK 8 through 10), see the section entitled, Building AIF with an earlier version of Java.

To install the Java code, do mvn install from the java directory in this repository using Apache Maven. Repeat this if you pull an updated version of the code. You can run the tests, which should output the examples, by doing mvn test.

Using the AIF Library

To use the library in Java, include the library generated by the installation above into your build script or tool. For gradle, for example, include the following in the dependencies in your build.gradle file:

dependencies { compile 'com.ncc:aida-interchange:1.1.0' }

In your code, import classes from the com.ncc.aif package. Then, create a model, add entities, relations, and events to the model, and then write the model out.

The file src/test/java/com/ncc/aif/ExamplesAndValidationTests.java has a series of examples showing how to add things to the model. The src/test/java/com/ncc/aif/ScalingTest.java file has examples of how to write the model out.

Running the Ontology Resource Generator

To generate the resource variables from a particular ontology file, please refer to the README located at src/main/java/com/ncc/aif/ont2javagen/README.md.

Additional Information about Individual Ontologies

There is another README located at src/main/resources/com/ncc/aif/ontologies/README.md that gives a description about each of the ontology files currently available in AIF.

Developing

If you need to edit the Java code:

  1. Install IntelliJ IDEA.
  2. "Import Project from Existing Sources"
  3. Choose the pom.xml for this repository and accept all defaults.

You should now be ready to go.

Building AIF with an earlier version of Java

To build AIF with Java 9 or 10, change the value of the <release> tag in the pom.xml file to 9 or 10 respectively.

To build with Java 8, replace the maven-compiler-plugin's <configuration> tag with:

<configuration>
  <source>8</source>
  <target>8</target>
  <compilerArgs>
    <arg>-Xbootclasspath:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar</arg>
  </compilerArgs>
</configuration>

Set the -Xbootclasspath to the path of your Java 8 runtime jar file (rt.jar).

Documentation

To generate the javadoc documentation, navigate to the java directory in the AIDA-Interchange-Format project. Run the following command:

$ javadoc -d build/docs/javadoc/ src/main/java/com/ncc/aif/*.java

This script will generate documentation in the form of HTML and place it within the build/docs/javadoc folder.