source: main/branches/3.0.1/ibisph-view/src/main/webapp/WEB-INF/config/spring/indicator.xml @ 25616

Last change on this file since 25616 was 25616, checked in by GarthBraithwaite_STG, 10 months ago

301 - removed ip json requests as they were never used anyway.

File size: 17.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4        IBIS-PH View System's "indicator profile" module related Spring properties.
5        These properties are all specific to the "indicator" type requests and
6        include indicator profile specific resources, controllers, and views.
7-->
8
9<beans default-lazy-init="false" default-autowire="no"
10        xmlns="http://www.springframework.org/schema/beans"
11        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
13>
14
15        <!--  M O D E L S   /   C O N T R O L L E R   R E S O R U C E S -->
16        <bean id="indicatorProfilePath" class="org.ibisph.model.StringHolder">
17                <constructor-arg value="indicator/profile/"/>
18        </bean>
19
20        <bean id="indicatorPreviewXMLBasePath" class="org.ibisph.model.StringHolder">
21                <description>
22                        Full base XML file path used by the preview controllers to get the
23                        admin app created IP and IPV XML files.  This path is either an
24                        admin app request URL, content URL, or explicit file path.  This
25                        value is used by the controller code via a FileDAO get call which
26                        uses a URL.
27                </description>
28                <constructor-arg value="#{commonPublishedXMLBasePath}#{indicatorProfilePath}preview/"/>
29        </bean>
30        <bean id="indicatorPreviewXMLBasePathURL" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
31                <property name="targetObject" ref="commonContextAndPathService"/>
32                <property name="targetMethod" value="getPathURL"/>
33                <property name="arguments"><list><value>#{indicatorPreviewXMLBasePath.string}</value></list></property>
34        </bean>
35
36
37        <!--  M O D E L   M A P S -->
38        <bean id="indicatorSelectedRelationNameModelMap" class="org.ibisph.indicatorprofile.modelmap.RelationNameFromHTTPRequest">
39                <property name="modelMapKey" value="RelationName"/>
40        </bean>
41
42        <bean id="indicatorPublishedIndicatorsXMLModelMap" class="org.ibisph.modelmap.ModelFromFilePathAndNameService">
43                <description>
44                        Published indicators with the primary XML model map key.  This model
45                        map is used for IP Indexes. Named XML to differentiate the parameter
46                        version of this model map (below).  Inconsistently named but XML
47                        indicates that it is the main XML model map.
48                </description>
49                <property name="modelMapKey"     value="#{commonXMLModelMapKey.string}"/>
50                <property name="getModelService" ref="commonPublishedDocumentModelService"/>
51                <property name="filePathAndName" value="indicator/published_indicators.xml"/>
52        </bean>
53        <bean id="indicatorPublishedIndicatorsModelMap" 
54                parent="indicatorPublishedIndicatorsXMLModelMap"
55        >
56                <description>
57                        Published indicators as w3c XML used as a 2ndary/transformation
58                        parameter XML model map.  Passed as a parameter to the XML/XSLT
59                        transformer.  Used for Community and Topic pages.  This is named
60                        without "Param" so that it's consistent with the other published
61                        XML file model maps that are passed as a w3c document parameter.
62                </description>
63                <property name="modelMapKey"     value="PublishedIndicators"/>
64        </bean>
65
66
67        <bean id="indicatorProfileFilePathModelMapProperties" abstract="true">
68                <description>
69                        Indicator base path primary XML model map properties used for most 
70                        indicator and IP modelmap based requests.  This model map uses the
71                        published XML file path URL service to provide the base published
72                        XML base path URL with rest of the filePath and actual IP filename
73                        being set via the request's last segment/filename.
74                </description>
75                <property name="modelMapKey" value="#{commonXMLModelMapKey.string}"/>
76                <property name="getModelService" ref="commonPublishedFilePathModelService"/>
77        </bean>
78        <bean id="indicatorProfileFilePathAndNameModelMap" 
79                class="org.ibisph.web.modelmap.ModelFromHTTPRequestPathLastSegment" 
80                parent="indicatorProfileFilePathModelMapProperties"
81        >
82                <description>
83                        Main IP path with filename URL model map used for all IP requests
84                        where the actual IP XML file name is the last segment in the request
85                        path.  This model map uses the published XML file path URL service
86                        to provide the base published XML base path + the filePath to provide
87                        the next sub path segments + the request's last segment which is the
88                        actual IP filename.
89                </description>
90                <property name="filePath" value="#{indicatorProfilePath.string}"/>
91        </bean>
92
93        <bean id="indicatorProfileBasePathModelMap" 
94                class="org.ibisph.modelmap.ModelFromFilePathAndNameService"
95        >
96                <description>
97                        IP filepath URL that is passed as an XSLT param so that XSLT code
98                        can to loop/access a bunch of IP XMLs.  Used for community IPs
99                        report and possibly other community pages like the Quick Facts
100                        demographic table etc.
101                </description>
102                <property name="modelMapKey"     value="IndicatorProfilePath"/>
103                <property name="filePathAndName" value="#{indicatorProfilePath.string}"/>
104                <property name="getModelService" ref="commonPublishedFilePathModelService"/>
105        </bean>
106
107        <bean id="indicatorIndicatorSetsModelMap" class="org.ibisph.modelmap.ModelFromFilePathAndNameService">
108                <description>
109                        The indicator sets IPs XML has 3 uses: 1) the IP sets index page
110                        2) the community controller that sets session values with on being
111                        an IP set name (so need dom4j access), and 3) the community IPs page
112                        XSLT to show and change to an alternative IP set.
113                </description>
114                <property name="modelMapKey"     value="IndicatorSets"/>
115                <property name="getModelService" ref="commonPublishedDocumentDAOService"/>
116                <property name="filePathAndName" value="indicator/indicator_sets.xml"/>
117        </bean>
118
119        <bean id="indicatorPreviewFilePathAndNameURLModelMap" class="org.ibisph.web.modelmap.ModelFromHTTPRequestPathLastSegment">
120                <description>
121                        The main XML model map for IP and IPV Preview requests.
122                </description>
123                <property name="modelMapKey" value="#{commonXMLModelMapKey.string}"/>
124                <property name="getModelService">
125                        <bean class="org.ibisph.model.URLPathGetModelService">
126                                <property name="basePath" ref="indicatorPreviewXMLBasePathURL"/>
127                        </bean>
128                </property> 
129        </bean>
130
131
132
133        <!--  C O N T R O L L E R S  -->
134        <bean id="indicatorAlphabeticalIndexController" parent="commonModelMapListController">
135                <property name="modelMapList">
136                        <list>
137                                <ref bean="indicatorPublishedIndicatorsXMLModelMap"/>
138                        </list>
139                </property>
140                <property name="view" ref="indicatorAlphabeticalIndexView"/>
141        </bean>
142        <bean id="indicatorDemographicIndexController" parent="indicatorAlphabeticalIndexController">
143                <property name="view" ref="indicatorDemographicIndexView"/>
144        </bean>
145        <bean id="indicatorDataSourceIndexController" parent="commonModelMapListController">
146                <property name="modelMapList">
147                        <list>
148                                <ref bean="indicatorPublishedIndicatorsXMLModelMap"/>
149                                <ref bean="commonDataSourcesModelMap"/>
150                        </list>
151                </property>
152                <property name="view" ref="indicatorDataSourceIndexView"/>
153        </bean>
154        <bean id="indicatorOrgUnitIndexController" parent="commonModelMapListController">
155                <property name="modelMapList">
156                        <list>
157                                <ref bean="indicatorPublishedIndicatorsXMLModelMap"/>
158                                <ref bean="commonOrgUnitsModelMap"/>
159                        </list>
160                </property>
161                <property name="view" ref="indicatorOrgUnitIndexView"/>
162        </bean>
163
164        <bean id="indicatorTableIndexController" parent="commonModelMapListController">
165                <property name="modelMapList">
166                        <list>
167                                <ref bean="indicatorPublishedIndicatorsXMLModelMap"/>
168                                <ref bean="commonDataSourcesModelMap"/>
169                                <ref bean="commonOrgUnitsModelMap"/>
170                        </list>
171                </property>
172                <property name="view" ref="indicatorTableIndexView"/>
173        </bean>
174
175        <bean id="indicatorIndicatorSetIndexController" parent="commonModelMapListController">
176                <property name="modelMapList">
177                        <list>
178                                <ref bean="indicatorPublishedIndicatorsXMLModelMap"/>
179                                <ref bean="indicatorIndicatorSetsModelMap"/>
180                        </list>
181                </property>
182                <property name="view" ref="indicatorIndicatorSetIndexView"/>
183        </bean>
184
185        <bean id="indicatorCategorizedIndexController" parent="commonModelMapListController">
186                <property name="modelMapList">
187                        <list>
188                                <bean class="org.ibisph.modelmap.ModelFromFilePathAndNameService" 
189                                        parent="commonXMLServiceModelMapProperties"
190                                >
191                                        <property name="getModelService" ref="commonPublishedDocumentModelService"/>
192                                        <property name="filePathAndName" value="indicator/CategorizedSelection.xml"/>
193                                </bean>
194                                <ref bean="indicatorPublishedIndicatorsModelMap"/>
195                        </list>
196                </property>
197                <property name="view" ref="indicatorCategorizedIndexView"/>
198        </bean>
199
200
201        <!--
202                MODIFIED DATE NOTE: For IP's that are on a remote machine/accessed via
203                URL, the modelmap is a file path not a document so the XML date can't be
204                accessed.  For IPVs the IPV XML is loaded in later model map processing
205                because it needs to determine the view XSLT to be used.  As such the XML
206                date is returned for view XMLs - even if the file is on a remote server. 
207                If this is a problem in the future then similar code can be applied to
208                open the IP XML and put into the map.
209        -->
210        <bean id="indicatorProfileControllerProperties" abstract="true" parent="commonModelMapListController">
211                <property name="modelMapList">
212                        <list>
213                                <ref bean="commonAncillaryValuesModelMap"/>
214                                <ref bean="commonDataSourcesModelMap"/>
215                                <ref bean="commonDimensionsModelMap"/>
216                                <ref bean="commonMeasuresModelMap"/>
217                                <ref bean="commonOrgUnitsModelMap"/>
218                                <ref bean="commonValueAttributesModelMap"/>
219                                <ref bean="commonValueTypesModelMap"/>
220                                <ref bean="indicatorProfileFilePathAndNameModelMap"/>
221                        </list>
222                </property>
223        </bean>
224        <bean id="indicatorImportantFactsController" parent="indicatorProfileControllerProperties">
225                <property name="view" ref="indicatorImportantFactsView"/>
226        </bean>
227        <bean id="indicatorServicesController" parent="indicatorProfileControllerProperties">
228                <property name="view" ref="indicatorServicesView"/>
229        </bean>
230        <bean id="indicatorResourcesController" parent="indicatorProfileControllerProperties">
231                <property name="view" ref="indicatorResourcesView"/>
232        </bean>
233
234        <bean id="indicatorSummaryViewController" parent="indicatorProfileControllerProperties">
235                <property name="view" ref="indicatorSummaryView"/>
236        </bean>
237
238        <bean id="indicatorCompleteViewController" parent="indicatorProfileControllerProperties">
239                <property name="view" ref="indicatorCompleteView"/>
240        </bean>
241
242        <bean id="indicatorViewController" parent="commonModelMapListController">
243                <description>
244                        v3 controller that loads the view XML to get the view's xslt view
245                        name can which is then set into the XSLT model map (mechanism for
246                        different view XSLT templates to be specified and applied).
247                </description>
248                <property name="modelMapList">
249                        <list>
250                                <ref bean="commonAncillaryValuesModelMap"/>
251                                <ref bean="commonDataSourcesModelMap"/>
252                                <ref bean="commonDimensionsModelMap"/>
253                                <ref bean="commonMeasuresModelMap"/>
254                                <ref bean="commonOrgUnitsModelMap"/>
255                                <ref bean="commonValueAttributesModelMap"/>
256                                <ref bean="commonValueTypesModelMap"/>
257                                <ref bean="indicatorProfileFilePathAndNameModelMap"/>
258                                <bean class="org.ibisph.indicatorprofile.modelmap.IndicatorViewViewTemplate">
259                                        <description>
260                                                Uses the complete path and filename url model to open
261                                                the IPV XML doc.  The IPV XML's VIEW_NAME element is then
262                                                read to determine the view XSLT template to load and be 
263                                                used for the view request.  The IPV XML doc is then put 
264                                                into the model map so the transform doesn't have to
265                                                parse the XML twice.  The XSLT model map is set to the
266                                                just determined XSLT path via the XSLT get model service. 
267                                        </description>
268                                        <property name="documentDAOService" ref="commonPublishedDocumentDAOService"/>
269                                        <property name="XSLTURLGetModelService" ref="commonXSLTFilePathModelService"/> 
270                                </bean>
271                        </list>
272                </property>
273                <property name="view" ref="commonXSLTTransformationView"/>
274        </bean>
275
276        <bean id="indicatorRelatedIndicatorsController" parent="commonModelMapListController">
277                <property name="modelMapList">
278                        <list>
279                                <ref bean="indicatorSelectedRelationNameModelMap"/>
280                                <ref bean="indicatorProfileFilePathAndNameModelMap"/>
281                                <ref bean="commonOrgUnitsModelMap"/>
282                        </list>
283                </property>
284                <property name="view" ref="indicatorRelatedIndicatorsView"/>
285        </bean>
286
287
288        <bean id="indicatorPreviewController" parent="commonModelMapListController">
289                <description>
290                        The main IP Preview request is very similar to the non preview version
291                        other than the preview XML path is used for the primary XML model.
292                </description>
293                <property name="modelMapList">
294                        <list>
295                                <ref bean="commonAncillaryValuesModelMap"/>
296                                <ref bean="commonDataSourcesModelMap"/>
297                                <ref bean="commonDimensionsModelMap"/>
298                                <ref bean="commonMeasuresModelMap"/>
299                                <ref bean="commonOrgUnitsModelMap"/>
300                                <ref bean="commonValueAttributesModelMap"/>
301                                <ref bean="commonValueTypesModelMap"/>
302                                <ref bean="indicatorPreviewFilePathAndNameURLModelMap"/>
303                        </list>
304                </property>
305                <property name="additionalHTTPResponseHeaders" ref="commonNoCacheHTTPResponseHeaders"/>
306                <property name="view" ref="indicatorCompleteView"/>
307        </bean>
308
309        <bean id="indicatorViewPreviewController" parent="commonModelMapListController">
310                <description>
311                        The IPV Preview request is likewise similar to the non preview version
312                        other than the preview XML path is used for the primary XML model.
313                </description>
314                <property name="modelMapList">
315                        <list>
316                                <ref bean="commonAncillaryValuesModelMap"/>
317                                <ref bean="commonDataSourcesModelMap"/>
318                                <ref bean="commonDimensionsModelMap"/>
319                                <ref bean="commonMeasuresModelMap"/>
320                                <ref bean="commonOrgUnitsModelMap"/>
321                                <ref bean="commonValueAttributesModelMap"/>
322                                <ref bean="commonValueTypesModelMap"/>
323                                <ref bean="indicatorPreviewFilePathAndNameURLModelMap"/>
324                                <bean class="org.ibisph.indicatorprofile.modelmap.IndicatorViewViewTemplate">
325                                        <property name="documentDAOService" ref="commonPublishedDocumentDAOService"/>
326                                        <property name="XSLTURLGetModelService" ref="commonXSLTFilePathModelService"/> 
327                                </bean>
328                        </list>
329                </property>
330                <property name="additionalHTTPResponseHeaders" ref="commonNoCacheHTTPResponseHeaders"/>
331                <property name="view" ref="commonXSLTTransformationView"/>
332        </bean>
333
334
335        <bean id="indicatorContentBlocksController" parent="indicatorProfileControllerProperties">
336                <property name="view" ref="indicatorContentBlocksView"/>
337        </bean>
338
339
340        <!--  V I E W S  -->
341        <bean id="indicatorAlphabeticalIndexView" parent="commonXSLTTransformationView">
342                <property name="XSLTPathAndFilename" value="html/indicator/index/alphabetical/AlphabeticalPage.xslt"/>
343        </bean>
344        <bean id="indicatorDataSourceIndexView" parent="commonXSLTTransformationView">
345                <property name="XSLTPathAndFilename" value="html/indicator/index/data_source/DataSourcePage.xslt"/>
346        </bean>
347        <bean id="indicatorOrgUnitIndexView" parent="commonXSLTTransformationView">
348                <property name="XSLTPathAndFilename" value="html/indicator/index/org_unit/OrgUnitPage.xslt"/>
349        </bean>
350        <bean id="indicatorDemographicIndexView" parent="commonXSLTTransformationView">
351                <property name="XSLTPathAndFilename" value="html/indicator/index/demographic/DemographicPage.xslt"/>
352        </bean>
353        <bean id="indicatorIndicatorSetIndexView" parent="commonXSLTTransformationView">
354                <property name="XSLTPathAndFilename" value="html/indicator/index/indicator_set/IndicatorSetPage.xslt"/>
355        </bean>
356        <bean id="indicatorTableIndexView" parent="commonXSLTTransformationView">
357                <property name="XSLTPathAndFilename" value="html/indicator/index/table/TablePage.xslt"/>
358        </bean>
359        <bean id="indicatorCategorizedIndexView" parent="commonXSLTTransformationView">
360                <property name="XSLTPathAndFilename" value="html/indicator/index/categorized/CategorizedPage.xslt"/>
361        </bean>
362
363        <bean id="indicatorSummaryView" parent="commonXSLTTransformationView">
364                <property name="XSLTPathAndFilename" value="html/indicator/profile/summary/SummaryPage.xslt"/>
365        </bean>
366        <bean id="indicatorCompleteView" parent="commonXSLTTransformationView">
367                <property name="XSLTPathAndFilename" value="html/indicator/profile/complete_profile/CompleteProfilePage.xslt"/>
368        </bean>
369
370        <bean id="indicatorImportantFactsView" parent="commonXSLTTransformationView">
371                <property name="XSLTPathAndFilename" value="html/indicator/profile/important_facts/ImportantFactsPage.xslt"/>
372        </bean>
373        <bean id="indicatorServicesView" parent="commonXSLTTransformationView">
374                <property name="XSLTPathAndFilename" value="html/indicator/profile/available_services/AvailableServicesPage.xslt"/>
375        </bean>
376        <bean id="indicatorResourcesView" parent="commonXSLTTransformationView">
377                <property name="XSLTPathAndFilename" value="html/indicator/profile/more_resources/MoreResourcesPage.xslt"/>
378        </bean>
379        <bean id="indicatorRelatedIndicatorsView" parent="commonXSLTTransformationView">
380                <property name="XSLTPathAndFilename" value="html/indicator/profile/related_indicators/RelatedIndicatorsPage.xslt"/>
381        </bean>
382
383        <bean id="indicatorContentBlocksView" parent="commonXSLTTransformationView">
384                <property name="XSLTPathAndFilename" value="html/indicator/profile/ContentBlocks.xslt"/>
385        </bean>
386        <bean id="indicatorViewJSONView" parent="commonXSLTTransformationView">
387                <property name="XSLTPathAndFilename" value="json/IndicatorViewDataset.xslt"/>
388        </bean>
389
390</beans>
391
392
393
Note: See TracBrowser for help on using the repository browser.