Skip to content

fnss/fnss-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FNSS Java library

The FNSS Java library can parse XML files of topologies, traffic matrices and event schedules generated using the core FNSS library. The parsed files are converted in Java objects that can be used in Java-based simulators or emulators.

Project directory structure

The files of the Java FNSS library are organized in the following directories:

  • bin: compiled class files (generated by the build script)
  • dist: FNSS Java API built packages (generated by the build script)
  • doc: Javadoc documentation (generated by the build script)
  • examples: example code using the library
  • lib: third-party libraries used by FNSS Java library
  • src: source code
  • test: test code

Build

You can build the code or the documentation or run the tests by using the Ant build script (build.xml) provided. To do so, after making sure you have Ant installed on your system, open a command shell, move to the root folder of the Java library (it is the one containing the build.xml file) and then type:

$ ant

By default, this script will compile the entire code, run unit tests, create Javadoc documentation and package the library into Jar files. Generated Jar files will be saved in the dist directory. Compiled Javadoc documentation will be saved in the doc directory.

How to use

To use the FNSS Java library, you need to add the FNSS Jar file to the classpath of your project. The FNSS library is packaged in the file fnss-java-api-VERSION.jar which you can download from the FNSS website or you will find in the dist directory after building the library from source. In addition to that, you need to add to your classpath also all the third-party libraries used by FNSS, which are listed under the requirements section of this README file. For your convenience, we provided up-to-date Jar files of all FNSS dependencies in the lib directory. We also included them in the files fnss-java-api-VERSION-all.tar.gz and fnss-java-api-VERSION-all.zip which you can download from the FNSS website or find in the dist directory after building FNSS. After adding FNSS and all its dependencies to your classpath, you can start using FNSS by importing the package io.github.fnss in your code. To learn how to use the library, you can either look at the Javadoc documentation in the doc folder or look at some examples provided in the examples folder. Should you need any further information, please contact us and we'll be happy to help you.

Requirements

Java Libraries

  • JDOM 2 library. Used to parse XML files
  • JUNG 2.0. Used to support FNSS topologies to JUNG
  • JGraphT 0.8.3. Used to support FNSS topologies to JGraphT
  • Vecmath 1.3.1
  • COLT 1.2.0
  • Collections generic 4.0.1
  • Concurrent 1.3.4

License

The FNSS Java library is released under the terms of the BSD License. See LICENSE.txt.