Overview
Documents the index viewer and how the data integration works.
Details
The index viewer data is configurable and often IP controlled, so it can not be simply included in the project build. To accommodate this, the index viewer data is made available through a Maven artifact whose access can be appropriately controlled. For the development environment, it can be downloaded and built locally too.
Also see Customizing the Index Viewer.
Configuring the Index Viewer Data
The index viewer data is packaged as part of the config artifact used to build/deploy the server. To see how to include index viewer data, consider the dev-windows project. There are three important parts to this:
The index viewer group/artifact/version are specified in the pom.xml file
<index.viewer.groupId>org.ihtsdo.otf.mapping</index.viewer.groupId> <index.viewer.artifactId>index-viewer-data-empty</index.viewer.artifactId> <index.viewer.version>${releaseVersion}</index.viewer.version>
The pom.xml file includes an execution of the maven dependency plugin to unpack this indicated dependency
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack-index-viewer-data</id> <phase>process-sources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <!-- These are set by the properties in the read-project-properties call. They can be manually overridden with -D as desired. --> <groupId>${index.viewer.groupId}</groupId> <artifactId>${index.viewer.artifactId}</artifactId> <version>${index.viewer.version}</version> <type>zip</type> <outputDirectory>${project.build.directory}/config/resources</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin>
The src/main/assembly/config.xml file includes this unpacked artifact directory.
<fileSet> <directory>target/config/resources</directory> <outputDirectory>/</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet>
When the server itself is built, the resources of the config dependency are included in the .war → thus a default build will include the "empty" index viewer data. The "prod" build, you will see, includes real index viewer data hosted in the IHTSDO nexus repository.
Deploying the Servier Without Index Viewer Data
If an installation is being created that does not have terminologies that use external index data, then make use of the "index-viewer-data-empty" artifact. This is included by default in the project itself. See the dev-windows configuration described above.
Maven Releases
The ICD10 index data has been packaged into a Maven release and made available on the IHTSDO Nexus server. See the Settings.xml Page
<dependency> <groupId>org.ihtsdo.otf.mapping</groupId> <artifactId>index-viewer-data-icd10</artifactId> <version>1.4.1</version> </dependency>
The "empty" index viewer data project has also been packaged as a maven release and been made
available on the IHTSDO Nexus server.
<dependency> <groupId>org.ihtsdo.otf.mapping</groupId> <artifactId>index-viewer-data-empty</artifactId> <version>1.0.0</version> </dependency>
Updating Index Data
If new versions of index data become available, the project needs to be rebuilt and redeployed via Maven.