Publishing the Unit

To use the unit in the Isight environment, the unit must be published to the Library. It can be published either using the Library interface or by using the Command Line Client.

Publishing Using the Library Interface

To publish the unit using the Library interface:

Launch the Library interface using one of the following methods:

  • Execute the library file in your <Isight_install_directory>\<operating_system>\code\bin directory.

  • Click Library on the Design Gateway toolbar.

    Click Publish on the Library toolbar to initiate the publishing process.

For more information on using the Library, see Using the Isight Library in the Isight User’s Guide.

Publishing Using the Command Line Client

To publish the unit using the Command Line Client, type one of the following commands into a Command Line Interface on one line:

  • Windows: fipercmd.bat publish file:MyNewJar.jar type:metamodel

  • Linux: fipercmd publish file:MyNewJar.jar type:metamodel

You can also type fipercmd to start the Command Line Client in interactive mode and issue the publish command directly.

For more information on using the Command Line Client as well as the different modes available (including interactive mode), see Using the Command Line Client in the Isight User’s Guide.

*.unit Files

Isight supports a simple way to define and publish a new unit or an entire set of units using an .xml file with a .unit extension.

Note: The file fiperUnits_TEMPLATE.unit is located in the <Isight_install_directory>\<operating_system>\examples\development\units directory. This file explains how to create a custom *.unit file. Once the file has been created, it can be published from publishall, fiperCmd, or the SDKGenerator. The act of publishing this file creates all the necessary jars and places them in the library.Sample.unit file. This is the recommended way of creating units.

The following is a sample *.unit file that defines the category Length and the units meter and foot.

<?xml version="1.0" encoding="utf-8"?>
<fiper_Units>
   <Category package="com.engineous.unit" name="Length"
   base="Meter" displayName="Length" description="Distance between 
   two ends."></Category>
   <Unit package="com.engineous.unit" name="Meter"
   category="Length" factor="1" displayName="meter" symbol="m" 
   tags="SI" description="The meter is the length of the path 
   traveled by light in vacuum during a time interval of 
   1/299,792,458 of a second.">
   </Unit>
   <Unit package="com.engineous.unit" name="Foot"
   category="Length" factor="0.3048" displayName="Foot" 
   symbol="ft" tags="Non SI, English" description="A unit of 
   length, found in a number of different systems. The 
   international foot is 0.3048 meters.">
   </Unit>
</fiper_Units>