Stuart McCulloch | f317322 | 2012-06-07 21:57:32 +0000 | [diff] [blame^] | 1 | package aQute.lib.spring; |
| 2 | |
| 3 | import java.util.*; |
| 4 | |
| 5 | import aQute.lib.osgi.*; |
| 6 | |
| 7 | /** |
| 8 | * This component is called when we find a resource in the META-INF/*.xml |
| 9 | * pattern. We parse the resource and and the imports to the builder. |
| 10 | * |
| 11 | * Parsing is done with XSLT (first time I see the use of having XML for the |
| 12 | * Spring configuration files!). |
| 13 | * |
| 14 | * @author aqute |
| 15 | * |
| 16 | */ |
| 17 | public class SpringXMLType extends XMLTypeProcessor { |
| 18 | |
| 19 | protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { |
| 20 | List<XMLType> types = new ArrayList<XMLType>(); |
| 21 | |
| 22 | String header = analyzer.getProperty("Bundle-Blueprint", "OSGI-INF/blueprint"); |
| 23 | process(types,"extract.xsl", header, ".*\\.xml"); |
| 24 | header = analyzer.getProperty("Spring-Context", "META-INF/spring"); |
| 25 | process(types,"extract.xsl", header, ".*\\.xml"); |
| 26 | |
| 27 | return types; |
| 28 | } |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | } |