Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a8783939 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- Added generation of minimal library for small devices

parent 27b1feb0
Branches
Tags
No related merge requests found
#######################################################################
# Alignment API micro edition #
# 13/05/2011, version 4.2 #
#######################################################################
Copyright (C) 2011 INRIA.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
Read the LICENSE.TXT file for the terms of the LGPL license.
WHAT IS THIS
------------
This folder contains necessary tool for generating a stripped down
version of the Alignment API so that it can be embedded in a small
platform (the target being the Android platform).
WHAT IS INCLUDED
----------------
microalign.jar = Alignment API + implementation + parser
- evaluation - matchers - server - util
Only the libraries related to Jena are used:
Jena (+ icu4j and iri), log4j, xerces (+resolver) and xsdlib (+relaxngDatatype).
OTHER PROFILES
--------------
Of course, you can define other profiles by modifying the build.xml file.
We are considering, introducing a pair of other profiles:
- picoalign: an even smaller package without jena and edoal
- aservlite: a minimal Alignment server version
HOW TO GENERATE
---------------
$ ant compileall ==> compile the strict necessary
$ ant jar ==> generate the microalign.jar library
$ ant zip ==> gerenate the malign.zip file with necessary jars
HOW TO USE
----------
Move the content of the zip file in the lib(s) directory of your Android
project.
The microalign.jar may be used alone if a version of Jena is already embedded.
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Id$ -->
<!-- See JEoid : TOTEST now -->
<project name="alignoid" default="compile" basedir=".">
<!-- this is useful but introduces, Xlint:path warnings -->
<filelist id="mujar" dir="../../lib">
<!-- JEoid: maybe check better those which are necessary -->
<!-- would better be a named fileset first -->
<file name="align.jar"/>
<file name="jena/icu4j.jar"/>
<file name="jena/iri.jar"/>
<file name="jena/jena.jar"/>
<file name="log4j/commons-logging.jar"/>
<file name="log4j/log4j.jar"/>
<file name="log4j/slf4j-api.jar"/>
<file name="log4j/slf4j-log4j.jar"/>
<file name="xerces/resolver.jar"/>
<file name="xerces/xercesImpl.jar"/>
<file name="xsdlib/xsdlib.jar"/>
<file name="xsdlib/relaxngDatatype.jar"/>
</filelist>
<fileset id="musrc" dir="../../src">
<include name="fr/inrialpes/exmo/**/*.java"/>
<exclude name="fr/inrialpes/exmo/ontowrap/owlapi10/**/*.java"/>
<exclude name="fr/inrialpes/exmo/ontowrap/owlapi30/**/*.java"/>
<exclude name="fr/inrialpes/exmo/ontowrap/skosapi/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/gen/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/ling/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/service/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/util/**/*.java"/>
<!-- for picoalign -->
<!--exclude name="fr/inrialpes/exmo/align/impl/edoal/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/parser/RDFParser.java"/-->
<exclude name="fr/inrialpes/exmo/align/impl/aggr/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/method/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/eval/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/BasicEvaluator.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/BasicOntologyNetwork.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/DistanceAlignment.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/IDDLOntologyNetwork.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/InstanceBasedMatrixMeasure.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/MatrixMeasure.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/Similarity.java"/>
</fileset>
<path id="classpath">
<filelist refid="mujar"/>
</path>
<!-- tested -->
<target name="usage" depends="init">
<echo>ant _target_ _options_
usage: this message
init: sets necessary variables
compile: incrementaly compiles sources
compileall: recompiles all sources
testindep: tests if selected files are really self sufficient
jar: archives compiled code
zip: creates a new zip file
clean: clean-up before release
-Dversion=${version}.${svn.revision}
</echo>
</target>
<!-- tested -->
<target name="init">
<condition property="tempdir" value="${tempdir}" else="/tmp">
<isset property="tempdit"/>
</condition>
<property name="jarclasspath" value="log4j/commons-logging.jar log4j/log4j.jar log4j/slf4j-api.jar log4j/slf4j-log4j.jar jena/jena.jar jena/iri.jar jena/icu4j.jar xerces/xercesImpl.jar xerces/resolver.jar align.jar microalign.jar"/>
<tstamp><format locale="fr,fr" pattern="dd/MM/yyyy" property="date"/></tstamp>
<exec executable="svnversion" outputproperty="svn.rev" failifexecutionfails="false"/>
<condition property="svn.revision" value="${svn.rev}" else="nosvn">
<isset property="svn.rev"/>
</condition>
<property name="version" value="${version.major}.${version.minor}"/>
<tstamp>
<format property="curyear" pattern="yyyy" locale="fr"/>
</tstamp>
<property name="login" value="${user.name}"/>
<property name="debug" value="off"/>
<property name="rep" value="svn+ssh://scm.gforge.inria.fr/svn/alignapi"/>
<filter token="DATE" value="${date}"/>
<filter token="VERS" value="${version}"/>
</target>
<!-- tested -->
<!-- JEoid: not even sure it is necessary to recompile
the otherway would be to select these files from classes and to do
the jar/apk
-->
<target name="compile" depends="init">
<echo message="Compiling..."/>
<property name="javacargs" value="-deprecation" />
<mkdir dir="classes"/>
<javac deprecation="yes" nowarn="no" verbose="no" srcdir="../../src/" destdir="classes" encoding="iso8859-15">
<!-- JEoid: would be better to be positive rather than negative... -->
<compilerarg value="${javacargs}"/>
<classpath refid="classpath" />
<!-- That would be too simple -->
<!--fileset refid="musrc"/-->
<include name="fr/inrialpes/exmo/**/*.java"/>
<exclude name="fr/inrialpes/exmo/ontowrap/owlapi10/**/*.java"/>
<exclude name="fr/inrialpes/exmo/ontowrap/owlapi30/**/*.java"/>
<exclude name="fr/inrialpes/exmo/ontowrap/skosapi/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/gen/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/ling/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/service/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/util/**/*.java"/>
<!-- for picoalign -->
<!--exclude name="fr/inrialpes/exmo/align/impl/edoal/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/parser/RDFParser.java"/-->
<exclude name="fr/inrialpes/exmo/align/impl/aggr/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/method/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/eval/**/*.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/BasicEvaluator.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/BasicOntologyNetwork.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/DistanceAlignment.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/IDDLOntologyNetwork.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/InstanceBasedMatrixMeasure.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/MatrixMeasure.java"/>
<exclude name="fr/inrialpes/exmo/align/impl/Similarity.java"/>
</javac>
</target>
<!-- tested -->
<target name="compileall" depends="init">
<echo message="Erasing..."/>
<delete>
<fileset dir="." includes="classes/**/*.class"/>
</delete>
<antcall target="cleanjar"/>
<antcall target="jar"/>
</target>
<target name="testindep" depends="init">
<echo message="Testing ..."/>
<antcall target="clean"/>
<!-- copy to src only what is necessary -->
<copy todir="src">
<fileset refid="musrc"/>
</copy>
<!-- compile all with the restricted path -->
<mkdir dir="classes"/>
<property name="javacargs" value="-deprecation" />
<javac deprecation="yes" nowarn="no" verbose="no" srcdir="src" destdir="classes" encoding="iso8859-15">
<compilerarg value="${javacargs}"/>
<classpath refid="classpath"/>
</javac>
<antcall target="clean"/>
</target>
<!-- tested -->
<target name="jar" depends="compile">
<echo message="Jarchiving..."/>
<delete file="lib/microalign.jar"/>
<jar jarfile="lib/microalign.jar">
<manifest>
<attribute name="Built-Date" value="${date}"/>
<attribute name="Class-Path" value="${jarclasspath}"/>
<attribute name="Implementation-Title" value="Minimal Alignment API implementation"/>
<attribute name="Implementation-Version" value="${version}.${version.update}"/>
<attribute name="Bundle-Name" value="Minimal Alignment API implementation"/>
<attribute name="Bundle-SymbolicName" value="microalign"/>
<attribute name="Bundle-Version" value="${version}.${version.update}"/>
<attribute name="Bundle-Copyright" value="INRIA, 2003-2011"/>
<attribute name="Bundle-Date" value="${date}"/>
<attribute name="Bundle-License" value="GNU Lesser General Public License 2.1 or above"/>
<attribute name="Export-package" value="fr.inrialpes.exmo.align.impl,fr.inrialpes.exmo.align.impl.edoal,fr.inrialpes.exmo.align.impl.rel,fr.inrialpes.exmo.align.impl.renderer,fr.inrialpes.exmo.align.parser,fr.inrialpes.exmo.ontowrap,fr.inrialpes.exmo.ontowrap.jena25"/>
<attribute name="Import-package" value="org.semanticweb.owl.align"/>
</manifest>
<fileset dir="classes" includes="fr/**/*.class"/>
<fileset dir="classes" includes="LICENSE.TXT"/>
</jar>
</target>
<!-- tested -->
<target name="zip" depends="jar">
<echo message="Creating zip archive..."/>
<zip zipfile="${tempdir}/malign.zip">
<fileset dir="../../distrib" includes="LICENSE.TXT"/>
<filelist refid="mujar"/>
<fileset dir="./lib" includes="microalign.jar"/>
</zip>
</target>
<!-- tested -->
<target name="cleanjar" depends="init">
<echo message="Erasing..."/>
<delete file="lib/microalign.jar"/>
</target>
<!-- tested -->
<target name="clean">
<echo message="Cleaning..."/>
<delete dir="classes" />
<delete dir="lib" />
<delete dir="src" />
</target>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment