STK Java API - STK Access Constraint Plugin
Description
Access Constraints are used to model visibility between objects during access computations. Access Constraints can be defined by developers and users of STK via a plugin architecture in many software programming languages including Java.
What's included in this API?
The API to develop, run, and deploy an STK Access Constraint Java Plugin based on the STK Java API includes the following lists of libraries, packages, and javadocs:
JAR libraries:
- agi.core.jar
- agi.stk.attr.jar
- agi.stk.plugin.util.jar
- agi.stk.plugin.accessconstraint.jar
- agi.stk.plugin.astrogator.plugin.jar
- agi.stk.plugin.crdn.jar
- agi.stk.plugin.stk.jar
- agi.stkutil.jar
- agi.stkvgt.jar
- agi.stkgraphics.jar
- agi.stkstkobjects.jar
- agi.stkobjects.astrogator.jar
- agi.stkobjects.aviator.jar
JNI native libraries:
- AgJNICore.dll/libagjnicore.so
- AgJNIStkAttr.dll/libagjnistkattr.so
- AgJNIStkPluginUtil.dll/libagjnistkpluginutil.so
- AgJNIStkPluginAccessConstraint.dll/libagjnistkpluginaccessconstraint.so
- AgJNIStkPluginAstrogatorPlugin.dll/libagjnistkpluginastrogatorplugin.so
- AgJNIStkPluginCrdn.dll/libagjnistkplugincrdn.so
- AgJNIStkPluginStk.dll/libagjnistkpluginstk.so
- AgJNIStkUtil.dll/libagjnistkutil.so
- AgJNIStkVGT.dll/libagjnistkvgt.so
- AgJNIStkGraphics.dll/libagjnistkgraphics.so
- AgJNIStkObjects.dll/libagjnistkobjects.so
- AgJNIStkGator.dll/libagjnistkgator.so
- AgJNIStkAvtr.dll/libagjnistkavtr.so
Packages:
- agi.*
- agi.core.*
- agi.stk.attr.*
- agi.stk.plugin.util.*
- agi.stk.plugin.accessconstraints.*
- agi.stk.plugin.astrogator.plugin.*
- agi.stk.plugin.crdn.*
- agi.stk.plugin.stk.*
- agi.stkutil.*
- agi.stkvgt.*
- agi.stkgraphics.*
- agi.stkobjects.*
- agi.stkobjects.astrogator.*
- agi.stkobjects.aviator.*
Documentation
Documentation for including Javadocs in Eclipse IDE
The following STK Access Constraint Java Plugin samples are provided within the STK and STK engine install:
- Extend_Plugin_AccessConstraint_Common - Sample that shows common reusable code and configuration for all Access Constraint plugins.
- Extend_Plugin_AccessConstraint_Config - Sample that shows how to provide runtime configuration via the STK GUI or Object Model.
- Extend_Plugin_AccessConstraint_NIIRS - Sample that calculates a modified form of the NIIRS image quality metric.
- Extend_Plugin_AccessConstraint_Range - Sample that uses the range between objects as its metric.
To use these samples:
- Build these samples in Eclipse by referring to the Eclipse samples configuration page.
- Locate the STK installation's Access Constraints.xml. The default installation location for instance:
- Copy Access Constraints.xml to your STK plugin configuration user directory, which is
C:\Users\<user id>\Documents\STK_ODTK 13\Config\Plugins
for Windows users (or<STK_CONFIG_DIR>/<STK version>/Config/Plugins
for LINUX users). - Locate the three sample Access Constraint JavaPlugin entries for your chosen platform in the comment block that start with the following:
- Copy the three entries seen above to the uncommented section under the Access Constraint Plugins category element within the XML file.
- In the copied JavaPlugin element entries, if the sample plugin's compiled .class files (and package structure) are not located in the directory specified by the ClassPath entry, then change it to the directory location of the plugin's *.class file's base package space.
- Refer to STK documentation for configuration of Access Constraints during computation to use the above plugin samples.
Platform | Path |
---|---|
Windows | <Install_Dir>\CodeSamples\Extend\Constraints\Access Constraints.xml |
Linux | <Install_Dir>/CodeSamples/Extend/Constraints/Access Constraints.xml |
<JavaPlugin DisplayName="Java ...
Development/Runtime Configuration
Development Environments
Use the above listed JAR and JNI native libraries as input to the following development environment configurations:
- Standalone environment - Instructions to configure a non-gui development environment for developing the Java plugin application.
- Eclipse IDE - Instructions to configure an Eclipse Java plugin application development project.
Use the samples listed above as reference for implementing the IAgAccessConstraintPlugin and IAgUtPluginConfig interfaces.
Deployment
Deployment instructions for a STK Access Constraint Java Plugin application:
- Follow the appropriate installation instructions for the STK or STK Engine product.
- Install your STK Access Constraint Java Plugin JAR file and its dependent JAR files to your preferred installation location.
- Create an Access Constraint Plugin XML file.
- Create a JavaPlugin element entry within the Access Constraint Plugin category element scope.
- Change the DisplayName attribute to a meaningful name for your plugin that will be displayed in the STK GUI.
- Change the ClassName attribute to the fully package qualified name of your plugin Java class.
- Change the ClassPath attribute to contain a semi-colon separated list of the absolute file paths to the JAR files that contain your plugin as well as JARs that your plugin depend upon.
- Copy your Access Constraint Plugin XML file to the STK or STK Engine installation's Plugins directory if it is writable. The default installation location for instance:
- Refer to the STK documentation on how to configure your scenario to use your Access Constraint Java plugin during Access computations.
Make sure the name of your Access Constraint XML file is unique as to not conflict with other plugin xml files.
Do NOT include the AGI Plugin JARs, as these are automatically configured/loaded by STK at runtime.
Platform | Path |
---|---|
Windows 64bit | <Install_Dir>\Plugins\<Name of plugin xml file>.xml |
Linux | <Install_Dir>/Plugins/<Name of plugin xml file>.xml |
If this is not a writable location,
copy your Access Constraint Plugin XML file to the STK Plugin configuration user directory, which typically is <STK User Area>\Config\Plugins
on windows and <STK_CONFIG_DIR>/<STKVERSION>/Config/Plugins
on LINUX.
FAQ
A set of frequently asked questions/issues and their answers/solutions.
Topics
- How/when do I run my Access Constraint Java plugin application?
- Do I need a main method declared?
- How do I provide configurable variable within my plugin via the STK GUI?
- How do I provide configurable variable within my plugin via the Object Model?
How/when do I run my Access Constraint Java plugin application?
STK is responsible for creating and initializing your plugin when necessary during an Access Computation. Please refer to Access Constraint Plugin Lifecycle for details.
Do I need a main method declared?
You do NOT need to declare a main method within your plugin. The latest installed JRE on the deployed machine and your Java plugin class (which you indicated in the ClassName attribute of your JavaPlugin entry within your plugin xml file) will be embedded/started within STK.
How do I provide configurable variable within my plugin via the STK GUI?
For an example, refer to the Extend_Plugin_AccessConstraint_Config.
How do I provide configurable variable within my plugin via the Object Model?
For an example refer to Extend_Plugin_AccessConstraint_Config.