rdftemplate

Library for generating XML documents from RDF data using templates
git clone https://code.djc.id.au/git/rdftemplate/

src/doc/sphinx/spring.rst (1328B) - raw

      1 Integrating with Spring
      2 =======================
      3 
      4 Evaluating selector expressions
      5 -------------------------------
      6 
      7 You can define a :java:class:`SelectorFactory 
      8 <au.id.djc.rdftemplate.selector.SelectorFactory>` bean in your application 
      9 context:
     10 
     11 .. code-block:: xml
     12 
     13     <bean id="selectorFactory" class="au.id.djc.rdftemplate.selector.EternallyCachingSelectorFactory">
     14         <constructor-arg>
     15             <bean class="au.id.djc.rdftemplate.selector.AntlrSelectorFactory">
     16                 <property name="adaptationFactory">
     17                     <bean class="com.example.MyAdaptationFactory" />
     18                 </property>
     19                 <property name="predicateResolver">
     20                     <bean class="com.example.MyPredicateResolver" />
     21                 </property>
     22                 <property name="namespacePrefixMap">
     23                     <bean class="com.example.MyNamespacePrefixMapper" />
     24                 </property>
     25             </bean>
     26         </constructor-arg>
     27     </bean>
     28 
     29 Rendering templates
     30 -------------------
     31 
     32 Similarly, a :java:class:`TemplateInterpolator` bean can be defined:
     33 
     34 .. code-block:: xml
     35 
     36     <bean class="au.id.djc.rdftemplate.TemplateInterpolator">
     37         <constructor-arg ref="selectorFactory" />
     38     </bean>
     39 
     40 Views in Spring Web MVC
     41 -----------------------
     42 
     43 .. todo:: RDFTemplateViewResolver