Académique Documents
Professionnel Documents
Culture Documents
Developers Guide
i2b2 Workbench
1.6.2 1.6
Table of Contents
DOCUMENT
MANAGEMENT................................................................................................................................. 4
ABOUT
THIS
GUIDE .............................................................................................................................................. 5
1.
PREREQUISITES............................................................................................................................................ 6
1.1.
THIRD
PARTY
SOFTWARE ................................................................................................................................... 6
1.1.1.
Java
JDK.............................................................................................................................................. 6
1.1.2.
Eclipse................................................................................................................................................. 6
1.2.
I2B2
SOFTWARE .............................................................................................................................................. 6
1.2.1.
i2b2
Workbench
Source
Code............................................................................................................. 6
2.
INSTALL ..................................................................................................................................................... 11
2.1.
I2B2
WORKBENCH
PROJECT
FILES ..................................................................................................................... 11
2.2.
SETTING
UP
THE
I2B2
WORKBENCH
WITHIN
ECLIPSE ............................................................................................. 12
2.2.1.
Starting
up
Eclipse ............................................................................................................................ 12
2.2.2.
Importing
the
i2b2
Workbench
projects........................................................................................... 14
2.3.
BUILDING
THE
I2B2
WORKBENCH
WITHIN
THE
ECLIPSE
IDE.................................................................................... 21
2.3.1.
Java
Compiler
Settings ..................................................................................................................... 21
2.3.2.
Cleaning
and
Building
the
Projects ................................................................................................... 25
3.
CONFIGURE
THE
I2B2
WORKBENCH ........................................................................................................... 33
3.1.
DEFINE
HIVE
LOCATION ................................................................................................................................... 33
3.1.1.
Access
i2b2Workbench.properties
file
within
Eclipse
application .................................................... 33
3.1.2.
Editing
the
i2b2Workbench.properties
file ....................................................................................... 34
3.2.
DEFINE
RUN
CONFIGURATIONS ......................................................................................................................... 36
3.2.1.
Accessing
Run
Configurations
Window ............................................................................................ 36
3.2.2.
Main
Tab .......................................................................................................................................... 39
3.2.3.
Arguments
Tab ................................................................................................................................. 43
3.2.4.
Plug-Ins
Tab ...................................................................................................................................... 46
4.
EXECUTE .................................................................................................................................................... 48
4.1.
DIFFERENT
METHODS
TO
RUN
AN
ECLIPSE
APPLICATION ........................................................................................ 48
4.2.
RUNNING
THE
I2B2
WORKBENCH ..................................................................................................................... 50
4.3.
RECONFIGURING
THE
DEFAULT
LAYOUT .............................................................................................................. 52
4.3.1.
Adding
a
View................................................................................................................................... 52
4.3.2.
Moving
a
View.................................................................................................................................. 54
4.3.3.
Removing
a
view .............................................................................................................................. 54
5.
6.
PACKAGE
STRUCTURE................................................................................................................................ 55
ECLIPSE
(I2B2)
FEATURE ............................................................................................................................. 56
6.1.
CREATING
A
NEW
FEATURE
PROJECT .............................................................................................................. 56
6.2.
FEATURE
MANIFEST
(FEATURE.XML) .................................................................................................................. 64
6.2.1.
Opening
the
Feature
Manifest
Editor ............................................................................................... 64
6.2.2.
Overview
Tab.................................................................................................................................... 65
6.2.3.
Information
Tab................................................................................................................................ 66
6.2.3.1.
6.2.3.2.
6.2.3.3.
Feature
Description .......................................................................................................................................66
Copyright
Notice ............................................................................................................................................67
License
Agreement ........................................................................................................................................68
Page 2 of 84
6.2.4.
6.2.5. 6.2.6.
6.2.6.1.
Included
Features
Tab ...................................................................................................................... 76
Dependencies
Tab ............................................................................................................................ 77
Installation
Tab................................................................................................................................. 79
Build
Tab........................................................................................................................................... 80
Feature.xml
Tab................................................................................................................................ 81
Build.properties
Tab ......................................................................................................................... 82
Dependency
Properties .................................................................................................................................79
LICENSE ..................................................................................................................................................... 84
Page 3 of 84
DOCUMENT MANAGEMENT
Date
Author
Description of change
07/22/10 08/14/12
Create 1.6 version of document. Updated with latest information for the 1.6 release of the i2b2 software. Added information about Hive Configuration. Documented any differences between Windows and Macintosh.
Page 4 of 84
Page 5 of 84
1.1.2. Eclipse
You can download version 3.7 of the Eclipse SDK (Indigo) from the Eclipse website by going to: http://www.eclipse.org/downloads To install Eclipse, extract the downloaded zip file into a directory such as C:\
If you install a newer version of Eclipse, be sure to install it in an area separate from any previous Eclipse installations.
Further information regarding the eclipse product can be found on their website (http://www.eclipse.org/documentation/)
Page 6 of 84
3. Once the software page loads, scroll down to the section called Downloadables. 4. Click on the Source Code box.
5. Information about the latest version and a list of zip files available for download will appear. 6. Select the appropriate file to download.
Page 7 of 84
The name of the file shown in the above image may vary slightly depending on the version of the i2b2 software you are downloading. The file name will always start with i2b2Workbench-src and the last part of the name is dependent on the version of the software in the zip file. Example: 1605 means the zip file contains version 1.6.05 of the i2b2 Workbench.
7. The Download page will open. At this point, if you are not already a registered user you will need to do so. If you are a returning user you can click on the file download link.
Page 8 of 84
8. The next step is to review the i2b2 license and choose to either accept or decline. a. If you choose to Decline you will be brought back to the main i2b2 Software page. b. If you agree with the license click on Accept to continue with the download. 9. The Save dialog box will open.
Windows:
Macintosh:
10. Click on the Save button and the zip file will be saved to your Download folder.
Page 9 of 84
Depending on your browser and its version you may need to select a target directory to save the zip file.
Page 10 of 84
This zip file contains the following Eclipse projects: 1. BuildAssist 2. edu.harvard.i2b2.common 3. edu.harvard.i2b2.eclipse 4. edu.harvard.i2b2.eclipse.features.core 5. edu.harvard.i2b2.eclipse.plugins.analysis 6. edu.harvard.i2b2.eclipse.plugins.commons_apache 7. edu.harvard.i2b2.eclipse.plugins.explorer 8. edu.harvard.i2b2.eclipse.plugins.jdnc_support 9. edu.harvard.i2b2.eclipse.plugins.log 10. edu.harvard.i2b2.eclipse.plugins.ontology 11. edu.harvard.i2b2.eclipse.plugins.previousQuery 12. edu.harvard.i2b2.eclipse.plugins.query 13. edu.harvard.i2b2.eclipse.plugins.webservicesAxis2 14. edu.harvard.i2b2.eclipse.plugins.workplace 15. edu.harvard.i2b2.eclipse.plugins.xml_support_jaxb 16. edu.harvard.i2b2.eclipse.plugins.xml_support_jdom 17. edu.harvard.i2b2.xml
For additional information on the above projects please see the section called Package Structure.
Page 11 of 84
4. Select a workspace whose pathname does not contain spaces. Example (correct): c:\workspace\i2b2workbench Example (incorrect): c:\eclipse workspace\i2b2workbench 5. If launching Eclipse for the first time you will be greeted by a Welcome page. 6. In the right upper corner of the page there is an icon of an arrow that says Workbench. Click on this icon to startup the Eclipse SDK.
Page 12 of 84
Page 13 of 84
Page 14 of 84
3. Select Import. 4. The Import wizard will open to the Select page.
Page 15 of 84
5. Double click on the folder called General. 6. Click on Existing Projects into Workspace.
Page 16 of 84
7. Click on the Next button. 8. The Import Projects page of the import wizard will open. 9. Click on the radial dial next to Select archive file.
Page 17 of 84
10. Enter the path of the i2b2 archive file or browse for the location where you downloaded the i2b2Workbench-src-xxx.zip file. (Step was done in the Prerequisite section called i2b2 Workbench Source Code)
Page 18 of 84
11. Highlight the zip file by clicking on its name. 12. Click on the Open button. 13. All the projects in the zip file will now be listed in the Projects section of the Import Projects page.
Page 19 of 84
14. Verify all the projects are checked off. 15. Click on the Finish button. 16. Once the projects have finished importing they will appear in your Eclipse workbench.
Page 20 of 84
Page 21 of 84
6. In the left navigation bar, click on Java compiler to display the Java compiler settings.
Page 23 of 84
Page 24 of 84
Page 25 of 84
5. On the sub-menu there are two Ant-Build options, select the second occurrence.
Page 26 of 84
Page 27 of 84
7. Verify the following settings: a. The clean-all and build-all boxes are checked. b. The target execution order is: clean-all, build-all c. If it is not in the correct order, simply click on the Order button and change the order.
Page 28 of 84
8. Click on the Run button to execute. 9. Once the build has finished you should see BUILD SUCCESSFUL in the console view.
Page 29 of 84
10. The last step in the build process is to refresh all the projects. a. Select all the projects. b. Using the right mouse button, click on any one of the highlighted projects. c. A pop-up menu will display. d. Select Refresh.
Page 30 of 84
e. A window will open showing the status of the refresh process. f. Once the refresh has finished the status window will close.
Eclipse will automatically build your workbench once the refresh has finished.
11. Verify there are no errors once the process of building the workbench has completed. There are two ways to check for errors:
Page 31 of 84
b. Look at the Problems view to see if there are any errors listed.
If an error does occur you may want to try and repeat the steps shown above (build / refresh). Sometimes this will fix any errors that occur during the build process.
Page 32 of 84
The second to last line is the information for HarvardDemo The last line is an example that can be edited with your information
1. Edit the following information: a. Remove the pound sign (#) at the beginning of the line as this denotes a comment. If it is not removed the i2b2 Workbench will ignore the string and you will not be able to log onto that domain. b. Update YourSite with the named of your domain. Keep in mind this is case sensitive. c. Update jbossHost:jbossPort with the name of your jboss host and its port.
If you do not want to see HarvardDemo as an option when logging into the i2b2 Workbench you can either remove it or comment it out by placing a pound sign (#) in front of the string.
2. If you have more than one environment you can include all of them in this on properties file by doing the following: a. Copy the string you just edited to a new line. b. Update the domain and jboss information with the correct information for the additional hive. c. Make sure you advance the number at the beginning of the string (I2b2) Example:
I2b2.1=HarvardDemo,REST,http://webservices.i2b2.org/i2b2/rest/PMService/
Partners HealthCare System, Inc Page 35 of 84
I2b2.2=TestDomain,REST,http://mytestJboss.org:jbossPort/i2b2/rest/PMService/ I2b2.3=ProdDomain,REST,http://mytestJboss.org:jbossPort/i2b2/rest/PMService/
Page 36 of 84
Page 37 of 84
Page 38 of 84
The next three sections outline the process of setting up the configuration information on the Main, Arguments, and Plug-ins tabs.
Page 39 of 84
2. Highlight Eclipse Application by clicking on its name. 3. Click on the New button ( ) located above the navigation bar. 4. The following will occur: a. A new configuration called New_configuration will appear under Eclipse Application. b. On the right side of the Run Configurations window, the Create, manage, and run configurations wizard will open to the Main tab.
Page 40 of 84
6. In the Program to Run section, verify the radial dial next to Run a product is selected.
Page 41 of 84
7. Click on the down arrow to display the drop-down list. 8. Select edu.harvard.i2b2.eclipse.product from the drop down list.
Windows:
Macintosh:
Page 42 of 84
Windows:
Keep the following arguments that Eclipse will default automatically. If not then they need to be added. -Xms40m -Xmx384m Add the following arguments: -Djava.endorsed.dirs=endorsed_lib -Dorg.osgi.framework.bootdelegation=*
Partners HealthCare System, Inc Page 43 of 84
The value defined at Xmx is equal to the amount of physical memory on your computer. If needed you can increase this value to equal the physical memory on your computer.
Macintosh:
Keep the following arguments that Eclipse will default automatically. If not then they need to be added. -Xms40m -Xmx512m -Dorg.eclipse.swt.internal.carbon.smallFonts Remove the following arguments that Eclipse will default automatically. -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread Add the following arguments: -Djava.endorsed.dirs=endorsed_lib -Dorg.eclipse.swt.internal.carbon.noFocusRing -Dorg.osgi.framework.bootdelegation=*
Page 44 of 84
5. Click on the Workspace button. 6. The Folder Selection window will open.
7. Select edu.harvard.i2b2.eclipse.
Partners HealthCare System, Inc Page 45 of 84
8. Click on the OK button. 9. The Other field will be populated with the workspace information.
Page 46 of 84
At this time we recommend that you click on the Apply button to save your settings.
Page 47 of 84
METHOD 1:
Click on the Run button from within the Run Configuration window.
See section called Accessing Run Configurations Window if you need to know how to access this window.
METHOD 2:
Using the right mouse button to display the pop-up menu and selecting Run As and then Eclipse Application.
Page 48 of 84
METHOD 3:
Page 49 of 84
Page 50 of 84
3. Enter your user name and password. For the HarvardDemo site you can enter the following user credentials. User name: demo Password: demouser
4. Click on the Login button. 5. The Choose a Project dialog box will open.
The project dialog box will only appear if you have access to multiple projects. If you only have access to one project you will be brought to the Welcome page.
6. Accept the default project by simply clicking on the Go button. 7. The desktop of the i2b2 Workbench will open.
Page 51 of 84
Page 52 of 84
3. Using your mouse, hover over Show View to display the sub-menu listing all the core views.
4. Click on the name of the view you want to add. 5. The view will be added to the desktop area of the i2b2 Workbench.
Core views are those views that are associated with the i2b2 cells that are part of the core hive. Select other to see a list of all views including the optional ones.
Description Provides a visualization of the analysis results for queries that users run in the i2b2 Workbench. Allows users to search for concepts and modifiers. Displays the help documentation for the active view. Displays the i2b2 vocabulary concepts and modifiers that are maintained in the Ontology Management Cell of the i2b2 Hive. Displays the most recent queries run by a user. The results associated to the
Previous Queries
Page 53 of 84
query are also available for viewing. Query Tool The Query Tool view is designed to simplify the process of retrieving information from the database associated to the i2b2 Workbench. Displays the information in a graphical representation of a chronological sequence of events Information in the Workplace view is related to the most common concepts and queries that an individual uses and in essence becomes their personal workspace. The main objectives of this view are: Save and organize user specific items. Share information with other project users. Project managers can view the workplace for individual team members.
Timeline View
Workplace
Page 54 of 84
5. PACKAGE STRUCTURE
The archive file contains the projects listed below. The project / directory edu.harvard.i2b2.eclipse is considered the base plug-in for the i2b2 Workbench and contains the property and configuration files.
Description Files to build the i2b2 Workbench. Common core exception, jaxb, and utilities used by i2b2 hive. The base plug-in for our development (namely the user interface for the top panel) The base features plug-in for the i2b2 core views. User interface for the Analysis view. Third party jars needed for common functions. User interface for the Timeline view. Third party jars needed for the user interface support Third party jars needed for logging User interface for the Ontology views User interface for the Previous Query view User interface for the Query view Third party jars needed for web service support User interface for the Workplace view Third party jars needed for jaxb / message processing Third party jars needed for jdom / message processing XSD for the hive
edu.harvard.i2b2.eclipse
edu.harvard.i2b2.features.core edu.harvard.i2b2.plugins.analysis edu.harvard.i2b2.plugins.commons_apache edu.harvard.i2b2.plugins.exporer edu.harvard.i2b2.plugins.jdnc_support edu.harvard.i2b2.plugins.log edu.harvard.i2b2.plugins.ontology edu.harvard.i2b2.plugins.previousQuery edu.harvard.i2b2.plugins.query edu.harvard.i2b2.plugins.webservicesAxis2 edu.harvard.i2b2.plugins.workplace edu.harvard.i2b2.plugins.xml_support_jaxb edu.harvard.i2b2.plugins.xml_support_jdom edu.harvard.i2b2.plugins.xml
Page 55 of 84
The following sections outline the process of creating a Feature plug-in for the i2b2 Workbench. For information on how to install the feature from within the i2b2 Workbench please see the Installation Guide for the i2b2 Workbench.
1. On the Eclipse menu bar click on File. 2. A drop-down menu will display. 3. Using your mouse, hover over New to display a sub-menu.
Page 56 of 84
Page 57 of 84
5. The New dialog box will open to the Select a Wizard page.
Page 58 of 84
6. Double click on Plug-in Development to open the folder. 7. Click on Feature Project.
Page 59 of 84
8. Click on the Next button. 9. The New Feature dialog box will open to the Feature Properties page.
Page 60 of 84
10. At the Project Name field enter the name of the new feature project.
As you enter the Project Name the Feature ID and Feature Name fields will automatically be populated.
11. Enter the provider of this feature at the Feature Provider field.
Page 61 of 84
12. Click on the Next button. 13. The Referenced Plug-ins and Fragments page will open. 14. Select the plug-in(s) you want to include in the feature.
Page 62 of 84
If the custom plug-in you created does not appear in the list try building it again and make sure you refresh and build your workspace.
15. Click on the Finish button. 16. The feature project is created and now appears in your workspace.
Page 63 of 84
Page 64 of 84
Page 65 of 84
Page 66 of 84
6.2.3.2.
COPYRIGHT NOTICE Clicking on the tab for the Copyright Notice page will allow you to enter any copyright information that is required for this feature.
Page 67 of 84
6.2.3.3.
LICENSE AGREEMENT The information you enter on the License Agreement page will appear during the installation of the feature in the i2b2 Workbench. Users will have to accept the license in order to continue with the installation process. If they do not want to accept the license then they will not be able to install the feature.
Page 68 of 84
Depending on your version of Eclipse you may have the option to Share your license with all the plug-in features that you develop.
Page 69 of 84
6.2.3.4.
SITES TO VISIT The Sites to Visit page is an optional page that you can use to provide your users with a list of additional update sites.
Page 70 of 84
Page 71 of 84
6.2.4.1.
ADDING PLUG-INS AND FRAGMENTS The following explains how to add a plug-in and / or a fragment that will be included in this feature. 1. Click on the Add button in the Plug-ins and Fragments section. 2. The Plug-in Selection dialog box will open.
Page 72 of 84
3. At the Select a Plug-in prompt type in the name of the plug-in or fragment you want to add.
As you begin typing the name, a list of available plug-ins and fragments will appear in the Matching Items box.
4. Select the plug-in and / or fragment you want to add. 5. Click on the OK button. 6. The plug-in and / or fragment will be added to the list.
6.2.4.2.
REMOVING PLUG-INS AND FRAGMENTS The following explains how to remove a plug-in and / or a fragment from the list of items to be included. Once it is removed it will no longer be packaged with the feature when it is built. 1. Using the right mouse button, click on the name of the plug-in or fragment to be deleted. 2. A pop-up menu will display. 3. Select Delete from the pop-up menu.
Page 73 of 84
6.2.4.3.
UPDATE THE VERSION OF PLUG-INS AND FRAGMENTS When a feature is first created the initial version of the plug-ins / fragments in the feature is set to 0.0.0. Therefore, it is important that you update them to reflect the correct version information.
1. Select all the plug-ins / fragments in the list. 2. Click on the Versions button. 3. The Features Version dialog box will open.
Page 74 of 84
4. Select Copy versions from plug-in and fragment manifests. 5. Click on the Finish button. 6. The plug-ins / fragments will be updated with the version information in each of their respective manifests.
6.2.4.4.
UPDATE PLUG-IN DETAILS The Plug-in Details section is located in the top right corner of the Plug-ins page. The information that appears is dependent upon which plug-in is highlighted in the list on the left of the page. If you only have one plug-in or fragment then it will automatically display the information for it.
Page 75 of 84
The name and version information will default from the plug-in. You can add download and installation sizes as well as any environment information that is specific to the plug-in. All of this information is visible to the user when they are installing the feature from within the i2b2 Workbench.
It is important to identify any environment constraints so the user is aware of them before they install the feature on their current platform.
Page 76 of 84
Page 77 of 84
The dependencies page is not populated when you first create the feature. Therefore, it is important that you add them before building and deploying it.
1.
Manually
You select which plug-ins or features to include by clicking on the Add Plug-in or Add Feature buttons. This method will populate the list of dependencies based on the requirements defined by the plug-ins listed on the Plug-ins page. Simply click on the Computer button to update the list.
2.
Compute
Page 78 of 84
6.2.6.1.
DEPENDENCY PROPERTIES On the left side of the Dependencies page is a section called Dependency Properties. It is here that you can define a Version to match and Match Rule. The feature will not load if the version and the defined match criteria are not met.
Page 79 of 84
Page 80 of 84
Page 81 of 84
6.2.10.
Build.properties Tab
The build.properties page is the properties file for the feature. The information that appears on this page correlates with what is defined on the Build Configuration page.
Page 82 of 84
Page 83 of 84
7. LICENSE
The i2b2 source code is licensed under the i2b2 Software License 2.1. This includes but is not limited to all code in the edu.harvard.i2b2.* package namespace.
Page 84 of 84