Sree file dependencies

From PTAGISWiki

Jump to: navigation, search

It would be nice to build a tool that can parse the configuration files for SREE and find orphaned and widowed files. In order to do that, the relationships between config files needs to be mapped. Here is a first attempt at that map.

  • repository.xml (all known reports)
    • schedule-activity.xml (recently scheduled reports)
    • schedule.xml (currently scheduled reports?)
    • cvsindex.xml (all known output from reports)
      • ls cvswd

The entries displayed by My Queries should be present in repository.xml and have *srt files in sree/WEB-INF/classes/templates/<user>*srt So an integrity check would be to compare the listing of templates with the entries in repository.xml for that user.

Deployment dependencies

Working the dependency tree from the other direction, when deploying a single new report, there is a set of files that must also be deployed (or modified) to make the deployment successful.

Given a single SRT file, it may contain references to components that are located in query.xml, datasource.xml, and stylereport.srl. Here are ways to track those dependencies. Using the example of OSC_Site_Configuration.srt

  • The SRT will identify any parameter sheets it needs in <ParameterSheet>
<ParameterSheets>
<ParameterSheet><![CDATA[OSC_Site_Sheet]]></ParameterSheet>
<ParameterSheet><![CDATA[OSC_Config_Sheet]]></ParameterSheet>
</ParameterSheets>

Check for this dependency like so:

[rday@snapper sree-classes]$ unzip -l stylereport.srl parameterSheet/OSC*
Archive:  stylereport.srl
  Length     Date   Time    Name
 --------    ----   ----    ----
     5143  04-20-06 11:53   parameterSheet/OSC_Site_Sheet
    15314  04-20-06 11:53   parameterSheet/OSC_Config_Sheet
 --------                   -------
    20457                   2 files
  • The datasource in the SRT must be present in datasource.xml
<datasource name="sockeye" type="jdbc">

Check for this dependency like so:

[rday@snapper sree-classes]$ grep "datasource name.*sockeye" datasource.xml
<datasource name="sockeye" type="jdbc">
  • The query used in the SRT must be present in query.xml
<query name="allConfigurations" type="jdbc" datasource="sockeye">
<query name="currentConfiguration" type="jdbc" datasource="sockeye">

However, these queries happen to be local queries within the SRT, so they do not have external dependencies.

  • Other dependencies can be captured by looking for "filter class" in the SRT file:
[rday@snapper ptagis]$ grep "filter class" OSC_Site_Configuration.srt
<filter class="SourceAttr" type="0" source="siteListSQL" prefix="sockeye">
<filter class="ConditionAttr" >
<filter class="GroupAttr" sorted="false" >
<filter class="ColumnSelectionAttr" >
<filter class="SourceAttr" type="1" source="Interrogation Summary Model" prefix="sockeye">
<filter class="ConditionAttr" >
<filter class="GroupAttr" sorted="false" >
<filter class="ColumnSelectionAttr" >

This turns up the dependency on the Interrogation Summary Model which is a component of datasource.xml

Personal tools