Skip to content

Commit

Permalink
Reorganize and comment for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Nov 6, 2017
1 parent 6a1ef6b commit 4e49454
Showing 1 changed file with 96 additions and 51 deletions.
147 changes: 96 additions & 51 deletions mdx/uk/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,68 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">


<!--
*****************************
*** ***
*** U T I L I T I E S ***
*** ***
*****************************
-->


<!--
uk_fix_mailto
Adds "mailto:" to md:EmailAddress elements which don't already have it.
-->
<bean id="uk_fix_mailto" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:uk/fix_mailto.xsl"/>


<!--
uk_stripAdminContacts
Remove any md:ContactPerson elements with contactType of "administrative".
-->
<bean id="uk_stripAdminContacts" parent="mda.ContactPersonFilterStage">
<property name="designatedTypes">
<list>
<value>administrative</value>
</list>
</property>
<property name="whitelistingTypes" value="false"/>
</bean>


<!--
Populate UKId values from entities.
-->
<bean id="uk_populateIds" parent="ukf.EntityDescriptorUKIdPopulationStage"/>


<!--
UK federation named EntitiesDescriptor assembler pipeline stage.
Name attribute is set to the federation URI. UK ordering is applied.
-->
<bean id="uk_assemble" parent="mda.EntitiesDescriptorAssemblerStage">
<property name="descriptorName" ref="uk_federation_uri"/>
<property name="itemOrderingStrategy">
<bean parent="ukf.UKEntityOrderingStrategy"/>
</property>
</bean>


<!--
***********************************************
*** ***
*** A G G R E G A T E H A N D L I N G ***
*** ***
***********************************************
-->


<!--
Location of various resources.
-->
Expand Down Expand Up @@ -102,26 +164,12 @@


<!--
uk_fetchFragmentFiles
Collects all the UK metadata "fragment files" from the /entities directory.
Each fragment file contains a single EntityDescriptor. The name of each
eligible file matches a particular regular expression.
*******************************************
*** ***
*** M E M B E R S D O C U M E N T ***
*** ***
*******************************************
-->
<bean id="uk_fetchFragmentFiles" parent="mda.DOMFilesystemSourceStage">
<property name="parserPool" ref="parserPool"/>
<property name="source">
<bean parent="File">
<constructor-arg value="${entities.dir}"/>
</bean>
</property>
<property name="sourceFileFilter">
<bean parent="ukf.RegexFileFilter">
<constructor-arg value="uk\d{6}.xml"/>
</bean>
</property>
</bean>


<!--
Expand Down Expand Up @@ -161,12 +209,12 @@


<!--
uk_fix_mailto
Adds "mailto:" to md:EmailAddress elements which don't already have it.
*************************************************
*** ***
*** U K f - S P E C I F I C C H E C K S ***
*** ***
*************************************************
-->
<bean id="uk_fix_mailto" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:uk/fix_mailto.xsl"/>


<!--
Expand Down Expand Up @@ -214,49 +262,46 @@


<!--
uk_processFragment
This stage performs any standard cleanup required for UK federation fragment files.
***************************************
*** ***
*** F R A G M E N T F I L E S ***
*** ***
***************************************
-->
<bean id="uk_processFragment" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:uk/fragment.xsl"/>


<!--
uk_stripAdminContacts
uk_processFragment
Remove any md:ContactPerson elements with contactType of "administrative".
This stage performs any standard cleanup required for UK federation fragment files.
-->
<bean id="uk_stripAdminContacts" parent="mda.ContactPersonFilterStage">
<property name="designatedTypes">
<list>
<value>administrative</value>
</list>
</property>
<property name="whitelistingTypes" value="false"/>
</bean>
<bean id="uk_processFragment" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:uk/fragment.xsl"/>


<!--
Populate UKId values from entities.
-->
<bean id="uk_populateIds" parent="ukf.EntityDescriptorUKIdPopulationStage"/>

uk_fetchFragmentFiles
<!--
UK federation named EntitiesDescriptor assembler pipeline stage.
Collects all the UK metadata "fragment files" from the /entities directory.
Name attribute is set to the federation URI. UK ordering is applied.
Each fragment file contains a single EntityDescriptor. The name of each
eligible file matches a particular regular expression.
-->
<bean id="uk_assemble" parent="mda.EntitiesDescriptorAssemblerStage">
<property name="descriptorName" ref="uk_federation_uri"/>
<property name="itemOrderingStrategy">
<bean parent="ukf.UKEntityOrderingStrategy"/>
<bean id="uk_fetchFragmentFiles" parent="mda.DOMFilesystemSourceStage">
<property name="parserPool" ref="parserPool"/>
<property name="source">
<bean parent="File">
<constructor-arg value="${entities.dir}"/>
</bean>
</property>
<property name="sourceFileFilter">
<bean parent="ukf.RegexFileFilter">
<constructor-arg value="uk\d{6}.xml"/>
</bean>
</property>
</bean>



<!--
Fetch and process the registered entities as a collection.
-->
Expand Down

0 comments on commit 4e49454

Please sign in to comment.