Project

General

Profile

« Previous | Next » 

Revision 62615

Branch to fix bug in production JSON format

View differences:

modules/uoa-search/branches/uoa-search-pre-3.9.4/pom.xml
1
<?xml version="1.0"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
	<parent>
4
		<groupId>eu.dnetlib</groupId>
5
		<artifactId>dnet45-parent</artifactId>
6
		<version>1.0.0</version>
7
	</parent>
8
	<modelVersion>4.0.0</modelVersion>
9
	<groupId>eu.dnetlib</groupId>
10
	<artifactId>uoa-search</artifactId>
11
	<packaging>jar</packaging>
12
	<version>3.9.3</version>
13
	<scm>
14
                <developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/uoa-search/tags/uoa-search-3.9.3</developerConnection> 
15
        </scm>
16

  
17
    <repositories>
18
        <!-- Cloudera Repositories -->
19
        <repository>
20
            <snapshots>
21
                <enabled>false</enabled>
22
            </snapshots>
23
            <id>cloudera-central</id>
24
            <name>cloundera-libs-release</name>
25
            <url>http://maven.research-infrastructures.eu/nexus/content/repositories/cloudera-central</url>
26
        </repository>
27
        <repository>
28
            <id>cloudera-snapshots</id>
29
            <name>cloudera-libs-snapshot</name>
30
            <url>http://maven.research-infrastructures.eu/nexus/content/repositories/cloudera-snapshots</url>
31
        </repository>
32
        <repository>
33
            <id>typesafe</id>
34
            <name>typesafe-releases</name>
35
            <url>http://maven.research-infrastructures.eu/nexus/content/repositories/typesafe</url>
36
        </repository>
37
    </repositories>
38

  
39
	<dependencies>
40
		<dependency>
41
			<groupId>junit</groupId>
42
			<artifactId>junit</artifactId>
43
			<version>${junit.version}</version>
44
			<scope>test</scope>
45
		</dependency>
46
		<dependency>
47
			<groupId>eu.dnetlib</groupId>
48
			<artifactId>uoa-commons</artifactId>
49
			<version>[2.0.0, 3.0.0)</version>
50
		</dependency>
51
		<dependency>
52
			<groupId>org.mockito</groupId>
53
			<artifactId>mockito-all</artifactId>
54
			<version>1.6</version>
55
		</dependency>
56
		<dependency>
57
			<groupId>org.apache.solr</groupId>
58
			<artifactId>solr-solrj</artifactId>
59
			<version>7.2.1</version>
60
            <exclusions>
61
                <exclusion>
62
                    <groupId>org.apache.zookeeper</groupId>
63
                    <artifactId>zookeeper</artifactId>
64
                </exclusion>
65
            </exclusions>
66
		</dependency>
67
        <dependency>
68
            <groupId>org.apache.zookeeper</groupId>
69
            <artifactId>zookeeper</artifactId>
70
            <version>3.4.5-cdh4.3.0</version>
71
        </dependency>
72
		<dependency>
73
			<groupId>eu.dnetlib</groupId>
74
			<artifactId>cnr-cql-utils</artifactId>
75
			<version>[2.0.0, 3.0.0)</version>
76
			<scope>compile</scope>
77
		</dependency>
78
		<dependency>
79
			<groupId>eu.dnetlib</groupId>
80
			<artifactId>cnr-blackboard-common</artifactId>
81
			<version>[2.2.1, 3.0.0)</version>
82
		</dependency>
83

  
84
		<!-- Spring MVC framework -->
85
		<dependency>
86
			<groupId>org.springframework</groupId>
87
			<artifactId>spring-webmvc</artifactId>
88
			<version>${spring.version}</version>
89
		</dependency>
90

  
91
		<dependency>
92
			<groupId>org.apache.velocity</groupId>
93
			<artifactId>velocity</artifactId>
94
			<version>1.7</version>
95
		</dependency>
96

  
97
		<dependency>
98
			<groupId>asm</groupId>
99
			<artifactId>asm</artifactId>
100
			<version>3.3.1</version>
101
		</dependency>
102
		<dependency>
103
			<groupId>com.sun.jersey</groupId>
104
			<artifactId>jersey-bundle</artifactId>
105
			<version>1.19</version>
106
		</dependency>
107
		<dependency>
108
			<groupId>org.json</groupId>
109
			<artifactId>json</artifactId>
110
			<version>20140107</version>
111
		</dependency>
112
		<dependency>
113
			<groupId>com.sun.jersey</groupId>
114
			<artifactId>jersey-server</artifactId>
115
			<version>1.19</version>
116
		</dependency>
117
		<dependency>
118
			<groupId>com.sun.jersey</groupId>
119
			<artifactId>jersey-core</artifactId>
120
			<version>1.19</version>
121
		</dependency>
122
		<dependency>
123
			<groupId>commons-validator</groupId>
124
			<artifactId>commons-validator</artifactId>
125
			<version>1.6</version>
126
		</dependency>
127
		<dependency>
128
			<groupId>org.eclipse.persistence</groupId>
129
			<artifactId>org.eclipse.persistence.moxy</artifactId>
130
			<version>2.5.0</version>
131
		</dependency>
132
		<dependency>
133
			<groupId>com.sun.jersey.contribs</groupId>
134
			<artifactId>jersey-spring</artifactId>
135
			<version>1.8</version>
136
			<exclusions>
137
				<exclusion>
138
					<groupId>org.springframework</groupId>
139
					<artifactId>spring</artifactId>
140
				</exclusion>
141
				<exclusion>
142
					<groupId>org.springframework</groupId>
143
					<artifactId>spring-core</artifactId>
144
				</exclusion>
145
				<exclusion>
146
					<groupId>org.springframework</groupId>
147
					<artifactId>spring-web</artifactId>
148
				</exclusion>
149
				<exclusion>
150
					<groupId>org.springframework</groupId>
151
					<artifactId>spring-beans</artifactId>
152
				</exclusion>
153
				<exclusion>
154
					<groupId>org.springframework</groupId>
155
					<artifactId>spring-context</artifactId>
156
				</exclusion>
157
				<exclusion>
158
					<groupId>org.springframework</groupId>
159
					<artifactId>spring-utils</artifactId>
160
				</exclusion>
161
				<exclusion>
162
					<groupId>org.springframework</groupId>
163
					<artifactId>spring-aop</artifactId>
164
				</exclusion>
165
			</exclusions>
166
		</dependency>
167
		<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
168
		<dependency>
169
			<groupId>com.google.code.gson</groupId>
170
			<artifactId>gson</artifactId>
171
			<version>2.3.1</version>
172
		</dependency>
173
		<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
174
		<dependency>
175
			<groupId>org.apache.commons</groupId>
176
			<artifactId>commons-lang3</artifactId>
177
			<version>3.5</version>
178
		</dependency>
179

  
180
		<dependency>
181
			<groupId>io.prometheus</groupId>
182
			<artifactId>simpleclient</artifactId>
183
			<version>0.6.0</version>
184
		</dependency>
185

  
186
		<dependency>
187
			<groupId>io.prometheus</groupId>
188
			<artifactId>simpleclient_servlet</artifactId>
189
			<version>0.6.0</version>
190
		</dependency>
191

  
192
		<dependency>
193
			<groupId>io.prometheus</groupId>
194
			<artifactId>simpleclient_hotspot</artifactId>
195
			<version>0.6.0</version>
196
		</dependency>
197

  
198
		<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus -->
199
		<dependency>
200
			<groupId>io.micrometer</groupId>
201
			<artifactId>micrometer-registry-prometheus</artifactId>
202
			<version>1.2.0</version>
203
		</dependency>
204

  
205
		<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-spring-legacy -->
206
		<dependency>
207
			<groupId>io.micrometer</groupId>
208
			<artifactId>micrometer-spring-legacy</artifactId>
209
			<version>1.2.0</version>
210
		</dependency>
211

  
212

  
213
		<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
214
		<!-- AspectJ -->
215
		<dependency>
216
			<groupId>org.aspectj</groupId>
217
			<artifactId>aspectjrt</artifactId>
218
			<version>1.9.4</version>
219
		</dependency>
220
		<dependency>
221
			<groupId>org.aspectj</groupId>
222
			<artifactId>aspectjweaver</artifactId>
223
			<version>1.9.4</version>
224
		</dependency>
225

  
226
        <!-- https://mvnrepository.com/artifact/org.apache.maven/maven-model -->
227
        <dependency>
228
            <groupId>org.apache.maven</groupId>
229
            <artifactId>maven-model</artifactId>
230
            <version>3.3.9</version>
231
        </dependency>
232

  
233

  
234

  
235
    </dependencies>
236

  
237
	<build>
238
		<plugins>
239
			<plugin>
240
				<groupId>org.apache.maven.plugins</groupId>
241
				<artifactId>maven-compiler-plugin</artifactId>
242
				<configuration>
243
					<source>1.8</source>
244
					<target>1.8</target>
245
				</configuration>
246
			</plugin>
247
		</plugins>
248
	</build>
249
</project>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/eu/dnetlib/data/search/transform/config/vocabularies/programmes.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<RESOURCE_PROFILE>
3
    <HEADER>
4
        <RESOURCE_IDENTIFIER value=""/>
5
        <RESOURCE_TYPE value="VocabularyDSResourceType"/>
6
        <RESOURCE_KIND value="VocabularyDSResources"/>
7
        <RESOURCE_URI value="String"/>
8
        <DATE_OF_CREATION value="2008-06-25T14:50:49+02:00"/>
9
    </HEADER>
10
    <BODY>
11
        <CONFIGURATION>
12
            <VOCABULARY_NAME>Programmes</VOCABULARY_NAME>
13
            <VOCABULARY_DESCRIPTION>Programmes descriptions</VOCABULARY_DESCRIPTION>
14
            <TERMS>
15
                <TERM encoding="FP7::SP1" english_name="Cooperation" native_name="">
16
                    <SYNONYMS/>
17
                </TERM>
18
                <TERM encoding="FP7::SP2" english_name="Ideas" native_name="">
19
                    <SYNONYMS/>
20
                </TERM>
21
                <TERM encoding="FP7::SP3" english_name="People" native_name="">
22
                    <SYNONYMS/>
23
                </TERM>
24
                <TERM encoding="FP7::SP4" english_name="Capacities" native_name="">
25
                    <SYNONYMS/>
26
                </TERM>
27
                <TERM encoding="FP7::SP5" english_name="Euratom" native_name="">
28
                    <SYNONYMS/>
29
                </TERM>
30
                <TERM encoding="Wellcome Trust::Grants Management Awards (VIP &amp; Open Access)" english_name="Grants Management Awards (VIP &amp; Open Access)" native_name="">
31
                    <SYNONYMS/>
32
                </TERM>
33
                <TERM encoding="Wellcome Trust::Medicine, Society and History" english_name="Medicine, Society and History" native_name="">
34
                    <SYNONYMS/>
35
                </TERM>                
36
                <TERM encoding="Wellcome Trust::Molecules, Genes and Cells" english_name="Molecules, Genes and Cells" native_name="">
37
                    <SYNONYMS/>
38
                </TERM>                
39
                <TERM encoding="Wellcome Trust::Immunology and Infectious Disease" english_name="Immunology and Infectious Disease" native_name="">
40
                    <SYNONYMS/>
41
                </TERM>
42
                <TERM encoding="Wellcome Trust::Infection &amp; Immunity Panel" english_name="Infection &amp; Immunity Panel" native_name="">
43
                    <SYNONYMS/>
44
                </TERM>                
45
                <TERM encoding="Wellcome Trust::Neurosciences and Mental Health, Molecular and Cellular Neurosciences, Cognitive and Higher Systems" english_name="Neurosciences and Mental Health, Molecular and Cellular Neurosciences, Cognitive and Higher Systems" native_name="">
46
                    <SYNONYMS/>
47
                </TERM>
48
                <TERM encoding="Wellcome Trust::Populations and Public Health" english_name="Populations and Public Health" native_name="">
49
                    <SYNONYMS/>
50
                </TERM>                
51
                <TERM encoding="Wellcome Trust::Technology Transfer Division" english_name="Technology Transfer Division" native_name="">
52
                    <SYNONYMS/>
53
                </TERM>
54
                <TERM encoding="Wellcome Trust::Physiological Sciences" english_name="Physiological Sciences" native_name="">
55
                    <SYNONYMS/>
56
                </TERM>                              
57
            </TERMS>
58
        </CONFIGURATION>
59
        <STATUS>
60
            <LAST_UPDATE value="2008-06-25T14:50:49+02:00"/>
61
        </STATUS>
62
        <SECURITY_PARAMETERS>String</SECURITY_PARAMETERS>
63
    </BODY>
64
</RESOURCE_PROFILE>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/json.xsl
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3

  
4
    <!-- Turn off auto-insertion of <?xml> tag and set indenting on -->
5
    <xsl:output method="text" encoding="utf-8" indent="yes"/>
6

  
7
    <!-- strip whitespace from whitespace-only nodes -->
8
    <xsl:strip-space elements="*"/>
9

  
10
    <!-- create a key for every element in the document using its name -->
11
    <xsl:key name="names" match="*" use="concat(generate-id(..),'/',name())"/>
12

  
13
    <!-- start with the root element -->
14
    <xsl:template match="/">
15
        <!-- first element needs brackets around it as template does not do that -->
16
        <xsl:text>{ </xsl:text>
17
        <!-- call the template for elements using one unique name at a time -->
18
        <xsl:apply-templates select="*[generate-id(.) = generate-id(key('names', concat(generate-id(..),'/',name()))[1])]" >
19
            <xsl:sort select="name()" data-type="number"/>
20
        </xsl:apply-templates>
21
        <xsl:text> }</xsl:text>
22
    </xsl:template>
23

  
24
    <xsl:template name="escape-string">
25
        <xsl:param name="s"/>
26
        <xsl:text>"</xsl:text>
27
        <xsl:call-template name="escape-bs-string">
28
            <xsl:with-param name="s" select="$s"/>
29
        </xsl:call-template>
30
        <xsl:text>"</xsl:text>
31
    </xsl:template>
32

  
33
    <xsl:template name="escape-bs-string">
34
        <xsl:param name="s"/>
35
        <xsl:choose>
36
            <xsl:when test="contains($s,'\')">
37
                <xsl:call-template name="escape-quot-string">
38
                    <xsl:with-param name="s" select="concat(substring-before($s,'\'),'\\')"/>
39
                </xsl:call-template>
40
                <xsl:call-template name="escape-bs-string">
41
                    <xsl:with-param name="s" select="substring-after($s,'\')"/>
42
                </xsl:call-template>
43
            </xsl:when>
44
            <xsl:otherwise>
45
                <xsl:call-template name="escape-quot-string">
46
                    <xsl:with-param name="s" select="$s"/>
47
                </xsl:call-template>
48
            </xsl:otherwise>
49
        </xsl:choose>
50
    </xsl:template>
51

  
52
    <xsl:template name="escape-quot-string">
53
        <xsl:param name="s"/>
54
        <xsl:choose>
55
            <xsl:when test="contains($s,'&quot;')">
56
                <xsl:call-template name="encode-string">
57
                    <xsl:with-param name="s" select="concat(substring-before($s,'&quot;'),'\&quot;')"/>
58
                </xsl:call-template>
59
                <xsl:call-template name="escape-quot-string">
60
                    <xsl:with-param name="s" select="substring-after($s,'&quot;')"/>
61
                </xsl:call-template>
62
            </xsl:when>
63
            <xsl:otherwise>
64
                <xsl:call-template name="encode-string">
65
                    <xsl:with-param name="s" select="$s"/>
66
                </xsl:call-template>
67
            </xsl:otherwise>
68
        </xsl:choose>
69
    </xsl:template>
70

  
71
    <xsl:template name="encode-string">
72
        <xsl:param name="s"/>
73
        <xsl:choose>
74
            <!-- tab -->
75
            <xsl:when test="contains($s,'&#x9;')">
76
                <xsl:call-template name="encode-string">
77
                    <xsl:with-param name="s" select="concat(substring-before($s,'&#x9;'),'\t',substring-after($s,'&#x9;'))"/>
78
                </xsl:call-template>
79
            </xsl:when>
80
            <!-- line feed -->
81
            <xsl:when test="contains($s,'&#xA;')">
82
                <xsl:call-template name="encode-string">
83
                    <xsl:with-param name="s" select="concat(substring-before($s,'&#xA;'),'\n',substring-after($s,'&#xA;'))"/>
84
                </xsl:call-template>
85
            </xsl:when>
86
            <!-- carriage return -->
87
            <xsl:when test="contains($s,'&#xD;')">
88
                <xsl:call-template name="encode-string">
89
                    <xsl:with-param name="s" select="concat(substring-before($s,'&#xD;'),'\r',substring-after($s,'&#xD;'))"/>
90
                </xsl:call-template>
91
            </xsl:when>
92
            <xsl:otherwise><xsl:value-of select="$s"/></xsl:otherwise>
93
        </xsl:choose>
94
    </xsl:template>
95

  
96
    <!-- this template handles elements -->
97
    <xsl:template match="*">
98
        <!-- count the number of elements with the same name -->
99
        <xsl:variable name="kctr" select="count(key('names', concat(generate-id(..),'/',name())))"/>
100
        <!-- iterate through by sets of elements with same name -->
101
        <xsl:for-each select="key('names', concat(generate-id(..),'/',name()))">
102
            <!-- deal with the element name and start of multiple element block -->
103
            <xsl:choose>
104
                <xsl:when test="($kctr > 1) and (position() = 1)">
105
                    <xsl:text>"</xsl:text>
106
                    <xsl:value-of select="name()"/>
107
                    <xsl:text>" : [ </xsl:text>
108
                </xsl:when>
109
                <xsl:when test="$kctr = 1 and name()!='result'">
110
                    <xsl:text>"</xsl:text>
111
                    <xsl:value-of select="name()"/>
112
                    <xsl:text>" : </xsl:text>
113
                </xsl:when>
114
                <xsl:when test="$kctr = 1 and name()='result'">
115
                    <xsl:text>"</xsl:text>
116
                    <xsl:value-of select="name()"/>
117
                    <xsl:text>" : [</xsl:text>
118
                </xsl:when>
119
            </xsl:choose>
120
            <!-- count number of elements, text nodes and attribute nodes -->
121
            <xsl:variable name="nctr" select="count(*|text()|@*)"/>
122
            <xsl:choose>
123
                <xsl:when test="$nctr = 0">
124
                    <!-- no contents at all -->
125
                    <xsl:text>null</xsl:text>
126
                </xsl:when>
127
                <xsl:otherwise>
128
                    <xsl:variable name="ctr" select="count(*)"/>
129
                    <xsl:variable name="tctr" select="count(text())"/>
130
                    <xsl:variable name="actr" select="count(@*)"/>
131
                    <!-- there will be contents so start an object -->
132
                    <xsl:text>{ </xsl:text>
133
                    <!-- handle attribute nodes -->
134
                    <xsl:if test="$actr > 0">
135
                        <xsl:apply-templates select="@*"/>
136
                        <xsl:if test="($tctr > 0) or ($ctr > 0)">
137
                            <xsl:text>, </xsl:text>
138
                        </xsl:if>
139
                    </xsl:if>
140
                    <!-- call template for child elements one unique name at a time -->
141
                    <xsl:if test="$ctr > 0">
142
                        <xsl:apply-templates select="*[generate-id(.) = generate-id(key('names', concat(generate-id(..),'/',name()))[1])]">
143
                            <xsl:sort select="name()" data-type="number"/>
144
                        </xsl:apply-templates>
145
                        <xsl:if test="$tctr > 0">
146
                            <xsl:text>, </xsl:text>
147
                        </xsl:if>
148
                    </xsl:if>
149
                    <!-- handle text nodes -->
150
                    <xsl:choose>
151
                        <xsl:when test="$tctr = 1">
152
                            <xsl:text>"$" : </xsl:text>
153
                            <xsl:apply-templates select="text()"/>
154
                        </xsl:when>
155
                        <xsl:when test="$tctr > 1">
156
                            <xsl:text>"$" : [ </xsl:text>
157
                            <xsl:apply-templates select="text()"/>
158
                            <xsl:text> ]</xsl:text>
159
                        </xsl:when>
160
                    </xsl:choose>
161
                    <xsl:text> }</xsl:text>
162
                </xsl:otherwise>
163
            </xsl:choose>
164
            <!-- special processing if we are in multiple element block -->
165
            <xsl:if test="$kctr > 1">
166
                <xsl:choose>
167
                    <xsl:when test="position() = last()">
168
                        <xsl:text> ]</xsl:text>
169
                    </xsl:when>
170
                    <xsl:otherwise>
171
                        <xsl:text>, </xsl:text>
172
                    </xsl:otherwise>
173
                </xsl:choose>
174
            </xsl:if>
175
            <xsl:if test="$kctr = 1 and name()='result'">
176
                <xsl:text> ]</xsl:text>
177
            </xsl:if>
178
        </xsl:for-each>
179
        <xsl:if test="position() != last()">
180
            <xsl:text>, </xsl:text>
181
        </xsl:if>
182
    </xsl:template>
183

  
184
    <!-- this template handle text nodes -->
185
    <xsl:template match="text()">
186
        <xsl:variable name="t" select="." />
187
        <xsl:choose>
188
            <!-- test to see if it is a number -->
189
            <xsl:when test="string(number($t)) != 'NaN' and not(starts-with($t,'+')) and (not(local-name(..)='code') and not(local-name(..)='subject')) and not(local-name(..)='originalId')">
190
                <xsl:value-of select="$t"/>
191
            </xsl:when>
192
            <!-- deal with any case booleans -->
193
            <xsl:when test="translate($t, 'TRUE', 'true') = 'true'">
194
                <xsl:text>true</xsl:text>
195
            </xsl:when>
196
            <xsl:when test="translate($t, 'FALSE', 'false') = 'false'">
197
                <xsl:text>false</xsl:text>
198
            </xsl:when>
199
            <!-- must be text -->
200
            <xsl:otherwise>
201
                <xsl:text>"</xsl:text>
202
                <xsl:call-template name="escape-bs-string">
203
                    <xsl:with-param name="s" select="$t"/>
204
                </xsl:call-template>
205
                <xsl:text>"</xsl:text>
206
            </xsl:otherwise>
207
        </xsl:choose>
208
        <xsl:if test="position() != last()">
209
            <xsl:text>, </xsl:text>
210
        </xsl:if>
211
    </xsl:template>
212

  
213
    <!-- this template handles attribute nodes -->
214
    <xsl:template match="@*">
215
        <!-- attach prefix to attribute names -->
216
        <xsl:text>"@</xsl:text>
217
        <xsl:value-of select="name()"/>
218
        <xsl:text>" : </xsl:text>
219
        <xsl:variable name="t" select="." />
220
        <xsl:choose>
221
            <xsl:when test="translate($t, 'TRUE', 'true') = 'true'">
222
                <xsl:text>true</xsl:text>
223
            </xsl:when> 
224
            <xsl:when test="translate($t, 'FALSE', 'false') = 'false'">
225
                <xsl:text>false</xsl:text>
226
            </xsl:when>
227
            <xsl:otherwise>
228
                <xsl:text>"</xsl:text>
229
                <xsl:value-of select="$t"/>
230
                <xsl:text>"</xsl:text>
231
            </xsl:otherwise>
232
        </xsl:choose>
233
        <xsl:if test="position() != last()">
234
            <xsl:text>, </xsl:text>
235
        </xsl:if>
236
    </xsl:template>
237

  
238
</xsl:stylesheet>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/configuration.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<configuration>
3
	<locales>
4
		<locale name="en_GB" default="true" />
5

  
6
	</locales>
7

  
8
	<vocabularies>
9
		<is_vocabulary name="languages" xml_name="dnet:languages" />
10
		<is_vocabulary name="countries" xml_name="dnet:countries" />
11
		<is_vocabulary name="documenttype" xml_name="dnet:publication_resource" />
12
		<is_vocabulary name="compatibility" xml_name="dnet:datasourceCompatibilityLevel" />
13
		<is_vocabulary name="taxonomy" xml_name="dnet:subject_classification_typologies" />
14
		<is_vocabulary name="datasource_type" xml_name="dnet:datasource_typologies" />
15
		<local_vocabulary name="funders" file="funders.xml" />
16
		<local_vocabulary name="funding_level0" file="funding_level0.xml" />
17
		<local_vocabulary name="funders_simple" file="funders_simple.xml" />
18
		<local_vocabulary name="sygma_funders" file="sygma_funders.xml" />
19
		<local_vocabulary name="areas" file="areas.xml" />
20
		<local_vocabulary name="programmes_simple" file="programmes_simple.xml" />
21
		<local_vocabulary name="programmes" file="programmes.xml" />
22
		<local_vocabulary name="accessModes" file="accessmode.xml" />
23
		<local_vocabulary name="datasource_type" file="datasource_type.xml" />
24
		<local_vocabulary name="project_funders" file="project_funders.xml" />
25
		<local_vocabulary name="sc39" file="sc39.xml" />
26
		<local_vocabulary name="community" file="community.xml"/>
27
		<local_vocabulary name="fos" file="fos.xml"/>
28
		<local_vocabulary name="sdg" file="sdg.xml"/>
29
	</vocabularies>
30

  
31
	<transformers>
32

  
33
		<transformer name="results_openaire">
34
			<transformation xslt="result.xsl" />
35
			<transformation match="language" change="value" vocabulary="languages" />
36
			<transformation match="funding.funding_level_0" change="value" vocabulary="funders" />
37
			<transformation match="funding.funding_level_1" change="value" vocabulary="programmes" />
38
			<transformation match="funding.funding_level_2" change="value" vocabulary="areas" />
39
			<transformation match="datasource.hostedby" change="value" vocabulary="datasources" />
40
			<transformation match="datasource.licenceid" change="value" vocabulary="accessModes" />
41
		</transformer>
42

  
43
		<transformer name="projects_openaire">
44
			<transformation xslt="project.xsl" />
45
		</transformer>
46

  
47
		<transformer name="datasources_openaire">
48
			<transformation xslt="datasource.xsl" />
49
			<transformation match="openairecompatibilityid" change="value" vocabulary="compatibility"/>
50
			<transformation match="datasourcetypeuiid" change="value" vocabulary="datasource_type"/>
51
		</transformer>
52

  
53
		<!-- valid for every browse result of every entity type -->
54
		<transformer name="results_openaire_browse">
55
			<transformation xslt="browse.xsl" />
56

  
57
			<transformation match="resultlanguageid.value" change="value" vocabulary="languages" />
58
			<transformation match="organizationcountryid.value" change="value" vocabulary="countries" />
59
			<transformation match="instancetypenameid.value" change="value" vocabulary="documenttype" />
60

  
61
			<transformation match="relfunderid.value" change="value" vocabulary="funders" />
62
			<transformation match="funderid.value" change="value" vocabulary="funders" />
63

  
64
			<transformation match="relfundinglevel0_id.value" change="value" vocabulary="funding_level0" />
65
			<transformation match="relfundinglevel1_id.value" change="value" vocabulary="programmes" />
66
			<transformation match="relfundinglevel2_id.value" change="value" vocabulary="areas" />
67

  
68
			<transformation match="fundinglevel0_id.value" change="value" vocabulary="funding_level0" />
69
			<transformation match="fundinglevel1_id.value" change="value" vocabulary="programmes" />
70
			<transformation match="fundinglevel2_id.value" change="value" vocabulary="areas" />
71

  
72
			<transformation match="communityid.value" change="value" vocabulary="community"/>
73

  
74
			<transformation match="collectedfromdatasourceid.value" change="value" vocabulary="datasources" />
75
			<transformation match="resulthostingdatasourceid.value" change="value" vocabulary="datasources" />
76
			<transformation match="resultcollectedfromdatasourceid.value" change="value" vocabulary="datasources" />
77

  
78
			<transformation match="datasourcecompatibilityid.value" change="value" vocabulary="compatibility"/>
79

  
80
			<transformation match="resultrightsid.value" change="value" vocabulary="accessModes" />
81
			<!--<transformation match="relprojectid.value" change="value" vocabulary="projects" />-->
82
			<transformation match="projectecsc39.value" change="value" vocabulary="sc39" />
83
			<transformation match="datasourcetypeuiid.value" change="value" vocabulary="datasource_type" />
84
		</transformer>
85

  
86
		<transformer name="organizations_openaire">
87
			<transformation xslt="organization.xsl" />
88
		</transformer>
89

  
90
		<transformer name="sygma2_publication">
91
			<transformation xslt="sygma2.xsl" />
92
		</transformer>
93
		<transformer name="sygma_dataset2">
94
			<transformation xslt="sygma_dataset2.xsl" />
95
		</transformer>
96

  
97
		<transformer name="dc">
98
			<transformation xslt="dc.xsl" />
99
		</transformer>
100

  
101
		<transformer name="csv_organization">
102
			<transformation xslt="csv_organization.xsl" />
103
		</transformer>
104

  
105
		<transformer name="csv_datasource">
106
			<transformation xslt="csv_datasource.xsl" />
107
		</transformer>
108

  
109
		<transformer name="csv_service">
110
			<transformation xslt="csv_service.xsl" />
111
		</transformer>
112

  
113
		<transformer name="csv_project">
114
			<transformation xslt="csv_project.xsl" />
115
		</transformer>
116

  
117
		<transformer name="csv_result">
118
			<transformation xslt="csv_result.xsl" />
119
		</transformer>
120

  
121
		<transformer name="csv-special_result">
122
			<transformation xslt="csv_result_special.xsl" />
123
		</transformer>
124

  
125
		<transformer name="csv_publication">
126
			<transformation xslt="csv_publication.xsl" />
127
		</transformer>
128

  
129
		<transformer name="csv-special_publication">
130
			<transformation xslt="csv_publication_special.xsl" />
131
		</transformer>
132

  
133
		<transformer name="csv_dataset">
134
			<transformation xslt="csv_publication.xsl" />
135
		</transformer>
136

  
137
		<transformer name="csv-special_dataset">
138
			<transformation xslt="csv_publication_special.xsl" />
139
		</transformer>
140

  
141
		<transformer name="csv_software">
142
			<transformation xslt="csv_publication.xsl" />
143
		</transformer>
144

  
145
		<transformer name="csv-special_software">
146
			<transformation xslt="csv_publication_special.xsl" />
147
		</transformer>
148

  
149
		<transformer name="csv_other">
150
			<transformation xslt="csv_publication.xsl" />
151
		</transformer>
152

  
153
		<transformer name="csv-special_other">
154
			<transformation xslt="csv_publication_special.xsl" />
155
		</transformer>
156

  
157
		<transformer name="html_result">
158
			<transformation xslt="html_result.xsl" />
159
		</transformer>
160

  
161
		<transformer name="html_publication">
162
			<transformation xslt="html_publication.xsl" />
163
		</transformer>
164

  
165
		<transformer name="html_dataset">
166
			<transformation xslt="html_publication.xsl" />
167
		</transformer>
168

  
169
		<transformer name="html_software">
170
			<transformation xslt="html_publication.xsl" />
171
		</transformer>
172

  
173
		<transformer name="html_other">
174
			<transformation xslt="html_publication.xsl" />
175
		</transformer>
176

  
177
	</transformers>
178

  
179
	<formatters>
180
		<formatter name="json" xslt="json.xsl"/>
181
		<formatter name="xml" xslt="simple.xsl"/>
182
		<formatter name="rss" xslt="rss.xsl" />
183
		<formatter name="csv" xslt="csv.xsl" />
184
		<formatter name="tsv" xslt="tsv.xsl" />
185
		<formatter name="project_csv" xslt="project_csv.xsl" />
186
		<formatter name="project_tsv" xslt="project_tsv.xsl" />
187
		<formatter name="publication_csv_notitle" xslt="publication_csv_notitle.xsl" />
188
		<formatter name="publication_tsv_notitle" xslt="publication_tsv_notitle.xsl" />
189
		<formatter name="project_html" xslt="project_html.xsl" />
190
		<formatter name="html" xslt="html.xsl" />
191
		<formatter name="sygma_publication" xslt="sygma.xsl"/>
192
		<formatter name="sygma2_publication_formatter" xslt="sygma2_formatter.xsl"/>
193
		<formatter name="sygma_dataset2_formatter" xslt="sygma_dataset2_formatter.xsl"/>
194
		<formatter name="sygma_dataset" xslt="sygma_dataset.xsl"/>
195
		<formatter name="vocabulary" xslt="vocabulary.xsl"/>
196

  
197
	</formatters>
198
</configuration>
199

  
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/sygma2.xsl
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
4
xmlns:oaf="http://namespace.openaire.eu/oaf"
5
xmlns:dc="http://purl.org/dc/elements/1.1/">
6
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
7

  
8
	<xsl:template match = "/">
9
		<response>
10
			<xsl:apply-templates select="response/header"/>
11
			<publications>
12
				<xsl:apply-templates select="/result"/>
13
			</publications>
14
		</response>
15
	</xsl:template>
16

  
17
	<xsl:template match="response/header">
18
		<header>
19
			<size><xsl:value-of select="size"/></size>
20
			<page><xsl:value-of select="page"/></page>
21
			<total><xsl:value-of select="total"/></total>
22
		</header>
23
	</xsl:template>
24

  
25
	<xsl:template match="result">
26
	<publication>
27
		<xsl:apply-templates select="//header"/>
28
		<xsl:apply-templates select="//oaf:result"/>
29
	</publication>
30
	</xsl:template>
31

  
32
<!-- HEADER
33
fields in header:
34
1. dri:objIdentifier 		[objIdentifier]
35
2. dri:repositoryId			X
36
3. dri:dateOfCollection		X
37
-->
38

  
39
<xsl:template match="text()">
40
	<xsl:value-of select="replace(., '[&#x007F;-&#x009F;]', ' ')"/>
41
</xsl:template>
42

  
43
<xsl:template match = "header">
44
	<openaireid>
45
		<xsl:value-of select='./dri:objIdentifier'/>
46
	</openaireid>
47
</xsl:template>
48

  
49
<xsl:template name="refereed" match="//instance/refereed[@classid='0001'][1]">
50
	<peerReviewed>true</peerReviewed>
51
	<publicationtype><xsl:value-of select="../instancetype/@classname"/></publicationtype>
52
	<pid_published>
53
						<xsl:attribute name="type">
54
							<xsl:value-of select="../pid/@classid"/>
55
						</xsl:attribute>
56
						<xsl:value-of select="../pid"/>
57
	</pid_published>
58
						<license><xsl:value-of select="../license"/></license>
59
</xsl:template>
60

  
61
<xsl:template name="instance" match="//instance[1]">
62
					<xsl:if test="./refereed[@classid='0000']">
63
						<peerReviewed/>
64
					</xsl:if>
65
					<xsl:if test="./refereed[@classid='0002']">
66
						<peerReviewed>false</peerReviewed>
67
					</xsl:if>
68
					<xsl:if test="not(./refereed)">
69
						<peerReviewed/>
70
					</xsl:if>
71
	<publicationtype><xsl:value-of select="./instancetype/@classname"/></publicationtype>
72
						<license><xsl:value-of select="./license"/></license>
73
</xsl:template>
74

  
75

  
76
	<xsl:template match = "oaf:result">
77

  
78
	<pids>
79
		<xsl:for-each select = "./pid">
80
			<xsl:choose>
81
				<xsl:when test="./@classid='doi'">
82
					<doi>
83
						<xsl:value-of select='.'/>
84
					</doi>
85
				</xsl:when>
86
				<xsl:when test="./@classid='handle'">
87
					<handle>
88
						<xsl:value-of select='.'/>
89
					</handle>
90
				</xsl:when>
91
				<xsl:when test="./@classidtest!= ''">
92
					<other>
93
						<xsl:attribute name="type">
94
							<xsl:value-of select="./@classid"/>
95
						</xsl:attribute>
96
						<xsl:value-of select='.'/>
97
					</other>
98
				</xsl:when>
99
			</xsl:choose>
100
		</xsl:for-each>
101
	</pids>
102

  
103
	<xsl:choose>
104
		<xsl:when test="count(//instance/refereed[@classid='0001']) > 0">
105
			<xsl:for-each select="(//instance/refereed[@classid='0001'])[1]">
106
				<peerReviewed>true</peerReviewed>
107
				<publicationtype><xsl:value-of select="../instancetype/@classname"/></publicationtype>
108
				<pid_published>
109
					<xsl:attribute name="type">
110
						<xsl:value-of select="../pid/@classid"/>
111
					</xsl:attribute>
112
					<xsl:value-of select="../pid"/>
113
				</pid_published>
114
				<license><xsl:value-of select="../license"/></license>
115
			</xsl:for-each>
116
		</xsl:when>
117
		<xsl:otherwise>
118
			<xsl:apply-templates select="//instance[1]"/>
119
		</xsl:otherwise>
120
	</xsl:choose>
121

  
122
	<xsl:for-each select = "./title">
123
		<title><xsl:value-of select='.'/></title>
124
	</xsl:for-each>
125

  
126
	<authors>
127
		<?xml-multiple?>
128
		<xsl:for-each select="./creator">
129
			<xsl:sort select="./@rank"/>
130
			<author>
131
				<xsl:if test="./@orcid">
132
					<xsl:attribute name="orcid">
133
						<xsl:value-of select='./@orcid'/>
134
					</xsl:attribute>
135
				</xsl:if>
136
				<xsl:value-of select='.'/>
137
			</author>
138
		</xsl:for-each>
139
	</authors>
140

  
141
	<xsl:for-each select = "./description">
142
		<description>
143
			<xsl:value-of select='.'/>
144
		</description>
145
	</xsl:for-each>
146

  
147
	<xsl:for-each select = "./journal">
148
		<journal>
149
				<name><xsl:value-of select="."/></name>
150
				<issn><xsl:value-of select="./@issn"/></issn>
151
				<eissn><xsl:value-of select="./@eissn"/></eissn>
152
				<lissn><xsl:value-of select="./@lissn"/></lissn>
153
				<issue><xsl:value-of select="./@iss"/></issue>
154
				<volume><xsl:value-of select="./@vol"/></volume>
155
		</journal>
156
	</xsl:for-each>
157

  
158
	<publisher>
159
		<xsl:value-of select = "./publisher"/>
160
	</publisher>
161

  
162
	<dateofacceptance>
163
		<xsl:value-of select = "./dateofacceptance"/>
164
	</dateofacceptance>
165

  
166
	<xsl:for-each select="./children/instance/webresource">
167
		<webresource><xsl:value-of select="url"/></webresource>
168
	</xsl:for-each>
169

  
170
	<bestaccessright>
171
		<xsl:value-of select="./bestaccessright/@classid"/>
172
	</bestaccessright>
173

  
174
	<embargoenddate>
175
		<xsl:value-of select="./embargoenddate"/>
176
	</embargoenddate>
177

  
178
	<processingchargeamount>
179
		<xsl:value-of select="./processingchargeamount"/>
180
	</processingchargeamount>
181

  
182
	<processingchargecurrency>
183
		<xsl:value-of select="./processingchargecurrency"/>
184
	</processingchargecurrency>
185

  
186
</xsl:template>
187

  
188
</xsl:stylesheet>
189

  
190

  
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/sygma2_formatter.xsl
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                xmlns="http://namespace.openaire.eu/sygma">
4
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
5

  
6
    <xsl:template match = "/">
7
        <response>
8
            <xsl:apply-templates select="response/header"/>
9
            <publications>
10
                <xsl:apply-templates select="response/results/response/publications"/>
11
            </publications>
12
        </response>
13
    </xsl:template>
14

  
15
    <xsl:template match="response/header">
16
        <header>
17
            <query><xsl:value-of select="query"/></query>
18
            <size><xsl:value-of select="size"/></size>
19
            <page><xsl:value-of select="page"/></page>
20
            <total><xsl:value-of select="total"/></total>
21
        </header>
22
    </xsl:template>
23

  
24

  
25
    <xsl:template match="response/results/response/publications">
26
        <xsl:apply-templates mode="copy-no-namespaces"/>
27
    </xsl:template>
28

  
29
    <xsl:template match="*" mode="copy-no-namespaces">
30
        <xsl:element name="{local-name()}">
31
            <xsl:copy-of select="@*"/>
32
            <xsl:apply-templates select="node()" mode="copy-no-namespaces"/>
33
        </xsl:element>
34
    </xsl:template>
35

  
36
    <xsl:template match="comment()| processing-instruction()" mode="copy-no-namespaces">
37
        <xsl:copy/>
38
    </xsl:template>
39

  
40

  
41

  
42
</xsl:stylesheet>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/sygma_dataset2.xsl
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                xmlns:dri="http://www.driver-repository.eu/namespace/dri"
4
                xmlns:oaf="http://namespace.openaire.eu/oaf"
5
                xmlns:dc="http://purl.org/dc/elements/1.1/">
6
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
7

  
8
    <xsl:template match = "/">
9
        <response>
10
            <xsl:apply-templates select="response/header"/>
11
            <datasets>
12
                <xsl:apply-templates select="/result"/>
13
            </datasets>
14
        </response>
15
    </xsl:template>
16

  
17
    <xsl:template match="response/header">
18
        <header>
19
            <size><xsl:value-of select="size"/></size>
20
            <page><xsl:value-of select="page"/></page>
21
            <total><xsl:value-of select="total"/></total>
22
        </header>
23
    </xsl:template>
24

  
25
    <xsl:template match="result">
26
        <dataset>
27
            <xsl:apply-templates select="//header"/>
28
            <xsl:apply-templates select="//oaf:result"/>
29
        </dataset>
30
    </xsl:template>
31

  
32
    <!-- HEADER
33
    fields in header:
34
    1. dri:objIdentifier 		[objIdentifier]
35
    2. dri:repositoryId			X
36
    3. dri:dateOfCollection		X
37
    -->
38

  
39
    <xsl:template match="text()">
40
        <xsl:value-of select="replace(., '[&#x007F;-&#x009F;]', ' ')"/>
41
    </xsl:template>
42

  
43
    <xsl:template match = "header">
44
        <openaireid>
45
            <xsl:value-of select='./dri:objIdentifier'/>
46
        </openaireid>
47
    </xsl:template>
48

  
49

  
50
    <xsl:template match = "oaf:result">
51

  
52
        <pids>
53
            <xsl:for-each select = "./pid">
54
                <xsl:choose>
55
                    <xsl:when test="./@classid='doi'">
56
                        <doi>
57
                            <xsl:value-of select='.'/>
58
                        </doi>
59
                    </xsl:when>
60
                    <xsl:when test="./@classid='handle'">
61
                        <handle>
62
                            <xsl:value-of select='.'/>
63
                        </handle>
64
                    </xsl:when>
65
                    <xsl:when test="./@classidtest!= ''">
66
                        <other>
67
                            <xsl:attribute name="type">
68
                                <xsl:value-of select="./@classid"/>
69
                            </xsl:attribute>
70
                            <xsl:value-of select='.'/>
71
                        </other>
72
                    </xsl:when>
73
                </xsl:choose>
74
            </xsl:for-each>
75
        </pids>
76

  
77
        <xsl:for-each select = "./title">
78
            <title><xsl:value-of select='.'/></title>
79
        </xsl:for-each>
80

  
81
        <authors>
82
            <xsl:for-each select="./creator">
83
                <xsl:sort select="./@rank"/>
84
                <author>
85
                    <xsl:if test="./@orcid">
86
                        <xsl:attribute name="orcid">
87
                            <xsl:value-of select='./@orcid'/>
88
                        </xsl:attribute>
89
                    </xsl:if>
90
                    <xsl:value-of select='.'/>
91
                </author>
92
            </xsl:for-each>
93
        </authors>
94

  
95
        <xsl:for-each select = "./description">
96
            <description>
97
                <xsl:value-of select='.'/>
98
            </description>
99
        </xsl:for-each>
100

  
101
        <xsl:for-each select="./children/instance/webresource">
102
            <webresource><xsl:value-of select="url"/></webresource>
103
        </xsl:for-each>
104

  
105
        <bestaccessright>
106
            <xsl:value-of select="./bestaccessright/@classid"/>
107
        </bestaccessright>
108

  
109
        <license>
110
            <xsl:value-of select="./children/instance[1]/license"/>
111
        </license>
112

  
113
        <relatedpublications>
114
            <xsl:apply-templates select="rels/rel/to[@type='publication']"/>
115
        </relatedpublications>
116

  
117
    </xsl:template>
118

  
119
    <xsl:template match="rels/rel/to[@type='publication']">
120
        <publication>
121
            <openaireid><xsl:value-of select="."/></openaireid>
122
            <doi><xsl:value-of select="../pid[@classid='doi']"/></doi>
123
            <title><xsl:value-of select="../title"/></title>
124
            <authors></authors>
125
            <sourcejournal></sourcejournal>
126
            <publisher><xsl:value-of select="../publisher"/></publisher>
127
            <dateofacceptance><xsl:value-of select="../dateofacceptance"/></dateofacceptance>
128
            <webresource></webresource>
129
            <bestaccessright></bestaccessright>
130
        </publication>
131
    </xsl:template>
132
</xsl:stylesheet>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/sygma_dataset2_formatter.xsl
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                xmlns="http://namespace.openaire.eu/sygma">
4
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
5

  
6
    <xsl:template match = "/">
7
        <response>
8
            <xsl:apply-templates select="response/header"/>
9
            <datasets>
10
                <xsl:apply-templates select="response/results/response/datasets"/>
11
            </datasets>
12
        </response>
13
    </xsl:template>
14

  
15
    <xsl:template match="response/header">
16
        <header>
17
            <query><xsl:value-of select="query"/></query>
18
            <size><xsl:value-of select="size"/></size>
19
            <page><xsl:value-of select="page"/></page>
20
            <total><xsl:value-of select="total"/></total>
21
        </header>
22
    </xsl:template>
23

  
24

  
25
    <xsl:template match="response/results/response/datasets">
26
        <xsl:apply-templates mode="copy-no-namespaces"/>
27
    </xsl:template>
28

  
29
    <xsl:template match="*" mode="copy-no-namespaces">
30
        <xsl:element name="{local-name()}">
31
            <xsl:copy-of select="@*"/>
32
            <xsl:apply-templates select="node()" mode="copy-no-namespaces"/>
33
        </xsl:element>
34
    </xsl:template>
35

  
36
    <xsl:template match="comment()| processing-instruction()" mode="copy-no-namespaces">
37
        <xsl:copy/>
38
    </xsl:template>
39

  
40

  
41

  
42
</xsl:stylesheet>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/csv_service.xsl
1

  
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
                xmlns:dri="http://www.driver-repository.eu/namespace/dri"
4
                xmlns:oaf="http://namespace.openaire.eu/oaf"
5
                xmlns:dc="http://purl.org/dc/elements/1.1/">
6

  
7
    <!-- Turn off auto-insertion of <?xml> tag and set indenting on -->
8
    <xsl:output method="text" encoding="utf-8" omit-xml-declaration="yes" media-type="text/csv" />
9

  
10
    <!-- strip whitespace from whitespace-only nodes -->
11
    <xsl:strip-space elements="*"/>
12

  
13
    <xsl:template match = "/">
14
        <xsl:apply-templates select="//oaf:datasource"/>
15
    </xsl:template>
16

  
17
    <!-- Name, Type, Compatibility, OAI-PMH, website -->
18
    <xsl:template match="oaf:datasource">
19

  
20
        <!-- Name -->
21
        <xsl:text>"</xsl:text>
22
        <xsl:value-of select="officialname"/>
23
        <xsl:text>",</xsl:text>
24

  
25
        <!-- Type
26
        <xsl:value-of select="datasourcetype/@classname"/>
27
        <xsl:text>,</xsl:text>
28
        -->
29
        <!-- Compatibility
30
        <xsl:value-of select="openairecompatibility/@classname"/>
31
        <xsl:text>,</xsl:text>
32
        -->
33

  
34
        <!-- OAI-PMH
35
        <xsl:value-of select="accessinfopackage"/>
36
        <xsl:text>,</xsl:text>
37
        -->
38

  
39
        <!-- website -->
40
        <xsl:value-of select="websiteurl"/>
41
        <xsl:text>&#xd;</xsl:text>
42

  
43
    </xsl:template>
44

  
45
</xsl:stylesheet>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/eu/dnetlib/data/search/springContext-transformation.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<beans xmlns="http://www.springframework.org/schema/beans"
4
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
5
	xmlns:context="http://www.springframework.org/schema/context"
6
	xmlns:cxf="http://cxf.apache.org/core" 
7
	xmlns:jaxws="http://cxf.apache.org/jaxws"
8
	xmlns:p="http://http://www.springframework.org/schema/p"
9
	xmlns:template="http://dnetlib.eu/springbeans/template"
10
	xmlns:t="http://dnetlib.eu/springbeans/t" 
11
	
12
	xsi:schemaLocation="
13
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
14
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
15
        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
16
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
17
	http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"
18
	default-autowire="byName">
19

  
20
	<!-- custom repository vocabulary loader -->
21
	<bean id="repositoryVocabularyLoader" depends-on="resultSetFactory"
22
		class="gr.uoa.di.driver.enabling.vocabulary.RepositoryVocabularyLoader">
23
		<property name="datasourceManagerService" ref="datasourceManagerServiceLocator" />
24
	</bean>
25

  
26
	<!-- Load configuration for service -->
27
	<bean id="configurationFactory" autowire="no" init-method="init"
28
		class="eu.dnetlib.data.search.transform.config.ConfigurationFactory">
29
		<property name="configurationName" value="${services.search.configurationPath}" />
30
		<property name="vocabulariesPath" value="${services.search.vocabulariesPath}"/>
31
	</bean>
32
	
33
	<bean id="configuration" factory-bean="configurationFactory" factory-method="createConfiguration">
34
		<constructor-arg  value="config"/>
35
	</bean>
36
	
37
	<bean id="indexVocabularyLoader" class="eu.dnetlib.data.search.utils.vocabulary.IndexVocabularyLoader">
38
		<property name="searchServiceLocator" ref="searchServiceLocator"/>
39
	</bean>
40
	
41
	<bean id="isVocabularyLoader" class="eu.dnetlib.data.search.utils.vocabulary.ISVocabularyLoader">
42
		<property name="lookup" ref="vocabularyLookUp"></property>
43
	</bean>
44
	
45
	<bean id="localVocabularyLoader" class="eu.dnetlib.data.search.utils.vocabulary.LocalVocabularyLoader"/>
46
	
47
	<bean id="vocabularyManager" class="eu.dnetlib.data.search.utils.vocabulary.VocabularyManagerImpl" 
48
		autowire="no" init-method="init">
49
		<property name="indexVocabularyLoader" ref="indexVocabularyLoader"/>
50
		<property name="isVocabularyLoader" ref="isVocabularyLoader"/>
51
		<property name="localVocabularyLoader" ref="localVocabularyLoader"/>
52
		<property name="config" ref="configuration"/>
53
	</bean>
54
	
55
	<bean id="vocabularyManagerWrapper" class="eu.dnetlib.data.search.utils.vocabulary.VocabularyManagerWrapper" >
56
		<property name="vocabularyManager" ref="vocabularyManager"/>	
57
	</bean>
58

  
59
	<bean id="transformerFactory"
60
		class="eu.dnetlib.data.search.transform.config.SearchRegistry">
61
		<property name="config" ref="configuration"/>
62
		<property name="vocabularyManager" ref="vocabularyManager"/>
63
	</bean>
64

  
65
</beans>
modules/uoa-search/branches/uoa-search-pre-3.9.4/src/main/resources/fos.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<RESOURCE_PROFILE>
3
    <HEADER>
4
        <RESOURCE_IDENTIFIER value=""/>
5
        <RESOURCE_TYPE value="VocabularyDSResourceType"/>
6
        <RESOURCE_KIND value="VocabularyDSResources"/>
7
        <RESOURCE_URI value="String"/>
8
        <DATE_OF_CREATION value="2008-06-25T14:50:49+02:00"/>
9
    </HEADER>
10
    <BODY>
11
        <CONFIGURATION>
12
            <VOCABULARY_NAME>FOS</VOCABULARY_NAME>
13
            <VOCABULARY_DESCRIPTION>FOS Labels</VOCABULARY_DESCRIPTION>
14
            <TERMS>
15
                <TERM code="01 natural sciences" english_name="natural sciences" native_name="">
16
                    <SYNONYMS/>
17
                </TERM>
18
                <TERM code="0101 mathematics" english_name="mathematics" native_name="">
19
                    <SYNONYMS/>
20
                </TERM>
21
                <TERM code="010101 applied mathematics" english_name="applied mathematics" native_name="">
22
                    <SYNONYMS/>
23
                </TERM>
24
                <TERM code="010102 general mathematics" english_name="general mathematics" native_name="">
25
                    <SYNONYMS/>
26
                </TERM>
27
                <TERM code="010103 numerical &#38; computational mathematics" english_name="numerical &#38; computational mathematics" native_name="">
28
                    <SYNONYMS/>
29
                </TERM>
30
                <TERM code="010104 statistics &#38; probability" english_name="statistics &#38; probability" native_name="">
31
                    <SYNONYMS/>
32
                </TERM>
33
                <TERM code="0102 computer and information sciences" english_name="computer and information sciences" native_name="">
34
                    <SYNONYMS/>
35
                </TERM>
36
                <TERM code="010201 computation theory &#38; mathematics" english_name="computation theory &#38; mathematics" native_name="">
37
                    <SYNONYMS/>
38
                </TERM>
39
                <TERM code="0103 physical sciences" english_name="physical sciences" native_name="">
40
                    <SYNONYMS/>
41
                </TERM>
42
                <TERM code="010301 acoustics" english_name="acoustics" native_name="">
43
                    <SYNONYMS/>
44
                </TERM>
45
                <TERM code="010302 applied physics" english_name="applied physics" native_name="">
46
                    <SYNONYMS/>
47
                </TERM>
48
                <TERM code="010303 astronomy &#38; astrophysics" english_name="010303 astronomy &#38; astrophysics" native_name="">
49
                    <SYNONYMS/>
50
                </TERM>
51
                <TERM code="010304 chemical physics" english_name="chemical physics" native_name="">
52
                    <SYNONYMS/>
53
                </TERM>
54
                <TERM code="010305 fluids &#38; plasmas" english_name="fluids &#38; plasmas" native_name="">
55
                    <SYNONYMS/>
56
                </TERM>
57
                <TERM code="010306 general physics" english_name="general physics" native_name="">
58
                    <SYNONYMS/>
59
                </TERM>
60
                <TERM code="010307 mathematical physics" english_name="mathematical physics" native_name="">
61
                    <SYNONYMS/>
62
                </TERM>
63
                <TERM code="010308 nuclear &#38; particles physics" english_name="nuclear &#38; particles physics" native_name="">
64
                    <SYNONYMS/>
65
                </TERM>
66
                <TERM code="010309 optics" english_name="optics" native_name="">
67
                    <SYNONYMS/>
68
                </TERM>
69
                <TERM code="0104 chemical sciences" english_name="chemical sciences" native_name="">
70
                    <SYNONYMS/>
71
                </TERM>
72
                <TERM code="010401 analytical chemistry" english_name="analytical chemistry" native_name="">
73
                    <SYNONYMS/>
74
                </TERM>
75
                <TERM code="010402 general chemistry" english_name="general chemistry" native_name="">
76
                    <SYNONYMS/>
77
                </TERM>
78
                <TERM code="010403 inorganic &#38; nuclear chemistry" english_name="inorganic &#38; nuclear chemistry" native_name="">
79
                    <SYNONYMS/>
80
                </TERM>
81
                <TERM code="010404 medicinal &#38; biomolecular chemistry" english_name="medicinal &#38; biomolecular chemistry" native_name="">
82
                    <SYNONYMS/>
83
                </TERM>
84
                <TERM code="010405 organic chemistry" english_name="organic chemistry" native_name="">
85
                    <SYNONYMS/>
86
                </TERM>
87
                <TERM code="010406 physical chemistry" english_name="physical chemistry" native_name="">
88
                    <SYNONYMS/>
89
                </TERM>
90
                <TERM code="010407 polymers" english_name="polymers" native_name="">
91
                    <SYNONYMS/>
92
                </TERM>
93
                <TERM code="0105 earth and related environmental sciences" english_name="earth and related environmental sciences" native_name="">
94
                    <SYNONYMS/>
95
                </TERM>
96
                <TERM code="010501 environmental sciences" english_name="environmental sciences" native_name="">
97
                    <SYNONYMS/>
98
                </TERM>
99
                <TERM code="010502 geochemistry &#38; geophysics" english_name="geochemistry &#38; geophysics" native_name="">
100
                    <SYNONYMS/>
101
                </TERM>
102
                <TERM code="010503 geology" english_name="geology" native_name="">
103
                    <SYNONYMS/>
104
                </TERM>
105
                <TERM code="010504 meteorology &#38; atmospheric sciences" english_name="meteorology &#38; atmospheric sciences" native_name="">
106
                    <SYNONYMS/>
107
                </TERM>
108
                <TERM code="010505 oceanography" english_name="oceanography" native_name="">
109
                    <SYNONYMS/>
110
                </TERM>
111
                <TERM code="010506 paleontology" english_name="paleontology" native_name="">
112
                    <SYNONYMS/>
113
                </TERM>
114
                <TERM code="0106 biological sciences" english_name="biological sciences" native_name="">
115
                    <SYNONYMS/>
116
                </TERM>
117
                <TERM code="010601 ecology" english_name="ecology" native_name="">
118
                    <SYNONYMS/>
119
                </TERM>
120
                <TERM code="010602 entomology" english_name="entomology" native_name="">
121
                    <SYNONYMS/>
122
                </TERM>
123
                <TERM code="010603 evolutionary biology" english_name="evolutionary biology" native_name="">
124
                    <SYNONYMS/>
125
                </TERM>
126
                <TERM code="010604 marine biology &#38; hydrobiology" english_name="marine biology &#38; hydrobiology" native_name="">
127
                    <SYNONYMS/>
128
                </TERM>
129
                <TERM code="010605 ornithology" english_name="ornithology" native_name="">
130
                    <SYNONYMS/>
131
                </TERM>
132
                <TERM code="010606 plant biology &#38; botany" english_name="plant biology &#38; botany" native_name="">
133
                    <SYNONYMS/>
134
                </TERM>
135
                <TERM code="010607 zoology" english_name="zoology" native_name="">
136
                    <SYNONYMS/>
137
                </TERM>
138
                <TERM code="02 engineering and technology" english_name="engineering and technology" native_name="">
139
                    <SYNONYMS/>
140
                </TERM>
141
                <TERM code="0201 civil engineering" english_name="civil engineering" native_name="">
142
                    <SYNONYMS/>
143
                </TERM>
144
                <TERM code="020101 civil engineering" english_name="civil engineering" native_name="">
145
                    <SYNONYMS/>
146
                </TERM>
147
                <TERM code="0202 electrical engineering, electronic engineering, information engineering" english_name="electrical engineering, electronic engineering, information engineering" native_name="">
148
                    <SYNONYMS/>
149
                </TERM>
150
                <TERM code="020201 artificial intelligence &#38; image processing" english_name="artificial intelligence &#38; image processing" native_name="">
151
                    <SYNONYMS/>
152
                </TERM>
153
                <TERM code="020202 computer hardware &#38; architecture" english_name="computer hardware &#38; architecture" native_name="">
154
                    <SYNONYMS/>
155
                </TERM>
156
                <TERM code="020203 distributed computing" english_name="distributed computing" native_name="">
157
                    <SYNONYMS/>
158
                </TERM>
159
                <TERM code="020204 information systems" english_name="information systems" native_name="">
160
                    <SYNONYMS/>
161
                </TERM>
162
                <TERM code="020205 medical informatics" english_name="medical informatics" native_name="">
163
                    <SYNONYMS/>
164
                </TERM>
165
                <TERM code="020206 networking &#38; telecommunications" english_name="networking &#38; telecommunications" native_name="">
166
                    <SYNONYMS/>
167
                </TERM>
168
                <TERM code="020207 software engineering" english_name="software engineering" native_name="">
169
                    <SYNONYMS/>
170
                </TERM>
171
                <TERM code="020208 electrical &#38; electronic engineering" english_name="electrical &#38; electronic engineering" native_name="">
172
                    <SYNONYMS/>
173
                </TERM>
174
                <TERM code="020209 energy" english_name="energy" native_name="">
175
                    <SYNONYMS/>
176
                </TERM>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff