Skip to content

Tutorial on Compiling Wrappers

Yin Qu (屈垠) edited this page Jun 4, 2015 · 4 revisions

The Meta-Metadata Compiler compiles wrappers into target programming language classes for applications to easily use extracted metadata. Fields authored in the wrappers will become class members in the compiled classes. The extracted metadata will be returned from BigSemantics to applications as instances of compiled classes, readily accessible.

Currently, there are two compilers that generate Java and C# classes respectively. Compilers for other languages are also under development.

The compilers themselves are written in Java, using the same entry class. You need to fork and clone the wrapper repository before using them.

Using the Compilers

There are two ways of using the meta-metadata compiler for Java, depending on your scenario (the following assumes that you follow the the conventional folder layout):

  • If you work in Eclipse, you can simply run CompileMmdToJava.launch in project BigSemanticsSDK. Also run CompileMmdToCSharp.launch if you use BigSemantics in a C#-based project. You may need to refresh project BigSemanticsGeneratedClassesJava in Eclipse, since in some cases Eclipse fails to automatically recognize file changes.
  • If you don't have an Eclipse workspace set up, or you want to work from command line, you can run the Ant target compile-wrappers-java (and compile-wrappers-csharp if needed) in BigSemanticsSDK/build.xml. Using this method, you CANNOT change any built-in wrappers defined in "primitives.xml", such as <document>.