Revision 39977
Added by Eri Katsari over 8 years ago
modules/dnet-openaire-stats/trunk/src/main/resources/eu/dnetlib/data/mapreduce/hbase/statsExport/applicationContext-Stats.xml | ||
---|---|---|
5 | 5 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> |
6 | 6 |
|
7 | 7 |
<!-- NOT USED-DEPRECATED --> |
8 |
<bean id="StatsJobDriver" class="eu.dnetlib.data.mapreduce.hbase.statsExport.drivers..StatsJobDriver">
|
|
8 |
<bean id="StatsJobDriver" class="eu.dnetlib.data.mapreduce.hbase.lodExport.drivers..StatsJobDriver">
|
|
9 | 9 |
|
10 | 10 |
<property name="outputPath" value="${Stats.outputPath}"> </property> |
11 | 11 |
<property name="nullNum" value="${Stats.nullNumericField}"> </property> |
... | ... | |
16 | 16 |
</bean> |
17 | 17 |
|
18 | 18 |
|
19 |
<bean id="SqoopDriver" class="eu.dnetlib.data.mapreduce.hbase.statsExport.drivers.SqoopDriver">
|
|
19 |
<bean id="SqoopDriver" class="eu.dnetlib.data.mapreduce.hbase.lodExport.drivers.SqoopDriver">
|
|
20 | 20 |
<property name="dbUser" value="${Stats.dbUser }"> </property> |
21 | 21 |
<property name="dbPass" value="${Stats.dbPass}"> </property> |
22 | 22 |
<property name="dbName" value="${Stats.dbName}"> </property> |
... | ... | |
33 | 33 |
</bean> |
34 | 34 |
|
35 | 35 |
|
36 |
<bean id="DBDriver" class="eu.dnetlib.data.mapreduce.hbase.statsExport.drivers.DBDriver">
|
|
36 |
<bean id="DBDriver" class="eu.dnetlib.data.mapreduce.hbase.lodExport.drivers.DBDriver">
|
|
37 | 37 |
<property name="statsDao" ref="statsDao"> </property> |
38 | 38 |
<property name="dbName" value="${Stats.dbName}"> </property> |
39 | 39 |
</bean> |
40 | 40 |
|
41 |
<bean id="statsJob" class="eu.dnetlib.data.mapreduce.hbase.statsExport.StatsJob"> </bean>
|
|
41 |
<bean id="statsJob" class="eu.dnetlib.data.mapreduce.hbase.lodExport.StatsJob"> </bean>
|
|
42 | 42 |
|
43 |
<bean id="statsDao" class="eu.dnetlib.data.mapreduce.hbase.statsExport.daos.SqlDAO">
|
|
43 |
<bean id="statsDao" class="eu.dnetlib.data.mapreduce.hbase.lodExport.daos.SqlDAO">
|
|
44 | 44 |
|
45 | 45 |
<property name="statsStore" ref="statsStore"> </property> |
46 | 46 |
</bean> |
47 |
<bean id="statsStore" class="eu.dnetlib.data.mapreduce.hbase.statsExport.daos.SqlStore">
|
|
47 |
<bean id="statsStore" class="eu.dnetlib.data.mapreduce.hbase.lodExport.daos.SqlStore">
|
|
48 | 48 |
|
49 | 49 |
<property name="dbUser" value="${Stats.dbUser }"> </property> |
50 | 50 |
<property name="dbPassword" value="${Stats.dbPass}"> </property> |
modules/dnet-openaire-stats/branches/full_export/dnet-openaire-stats (1).iml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|
3 |
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false"> |
|
4 |
<output url="file://$MODULE_DIR$/target/classes" /> |
|
5 |
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|
6 |
<content url="file://$MODULE_DIR$"> |
|
7 |
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|
8 |
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
|
9 |
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
|
10 |
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> |
|
11 |
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> |
|
12 |
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|
13 |
</content> |
|
14 |
<orderEntry type="inheritedJdk" /> |
|
15 |
<orderEntry type="sourceFolder" forTests="false" /> |
|
16 |
<orderEntry type="library" name="Maven: javax.xml:jaxp-api:1.4.2" level="project" /> |
|
17 |
<orderEntry type="library" name="Maven: net.sf.opencsv:opencsv:2.3" level="project" /> |
|
18 |
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.8" level="project" /> |
|
19 |
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.5" level="project" /> |
|
20 |
<orderEntry type="module-library"> |
|
21 |
<library name="Maven: jdk.tools:jdk.tools:1.7.0_05"> |
|
22 |
<CLASSES> |
|
23 |
<root url="jar:///usr/lib/jvm/java-7-oracle/lib/tools.jar!/" /> |
|
24 |
</CLASSES> |
|
25 |
<JAVADOC /> |
|
26 |
<SOURCES /> |
|
27 |
</library> |
|
28 |
</orderEntry> |
|
29 |
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.0-rc2" level="project" /> |
|
30 |
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.0-rc2" level="project" /> |
|
31 |
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" /> |
|
32 |
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.6" level="project" /> |
|
33 |
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.6" level="project" /> |
|
34 |
<orderEntry type="library" name="Maven: com.google.guava:guava-collections:r03" level="project" /> |
|
35 |
<orderEntry type="library" name="Maven: com.google.guava:guava-annotations:r03" level="project" /> |
|
36 |
<orderEntry type="library" name="Maven: com.google.guava:guava-primitives:r03" level="project" /> |
|
37 |
<orderEntry type="library" name="Maven: com.google.guava:guava-base:r03" level="project" /> |
|
38 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-mapreduce-jobs:0.0.5" level="project" /> |
|
39 |
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.3" level="project" /> |
|
40 |
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.2.2" level="project" /> |
|
41 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-index-solr-common:1.1.1" level="project" /> |
|
42 |
<orderEntry type="library" name="Maven: org.apache.solr:solr-solrj:4.7.0" level="project" /> |
|
43 |
<orderEntry type="library" name="Maven: commons-io:commons-io:2.1" level="project" /> |
|
44 |
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.0-alpha4" level="project" /> |
|
45 |
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0-beta1" level="project" /> |
|
46 |
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.3.1" level="project" /> |
|
47 |
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.5" level="project" /> |
|
48 |
<orderEntry type="library" name="Maven: org.noggit:noggit:0.5" level="project" /> |
|
49 |
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" /> |
|
50 |
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" /> |
|
51 |
<orderEntry type="library" name="Maven: com.google.guava:guava:14.0" level="project" /> |
|
52 |
<orderEntry type="library" name="Maven: com.mycila:xmltool:3.3" level="project" /> |
|
53 |
<orderEntry type="library" name="Maven: eu.dnetlib:cnr-misc-utils:1.0.1" level="project" /> |
|
54 |
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" /> |
|
55 |
<orderEntry type="library" name="Maven: jaxen:jaxen:1.1.6" level="project" /> |
|
56 |
<orderEntry type="library" name="Maven: saxonica:saxon:9.1.0.8" level="project" /> |
|
57 |
<orderEntry type="library" name="Maven: saxonica:saxon-dom:9.1.0.8" level="project" /> |
|
58 |
<orderEntry type="library" name="Maven: jgrapht:jgrapht:0.7.2" level="project" /> |
|
59 |
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.8.0" level="project" /> |
|
60 |
<orderEntry type="library" name="Maven: org.springframework:spring-test:4.0.0.RELEASE" level="project" /> |
|
61 |
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.0.0.RELEASE" level="project" /> |
|
62 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-mapreduce-submitter:2.0.1" level="project" /> |
|
63 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-hadoop-commons:1.0.4" level="project" /> |
|
64 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-common:2.0.0-cdh4.3.0" level="project" /> |
|
65 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-annotations:2.0.0-cdh4.3.0" level="project" /> |
|
66 |
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.2" level="project" /> |
|
67 |
<orderEntry type="library" name="Maven: org.apache.commons:commons-math:2.1" level="project" /> |
|
68 |
<orderEntry type="library" name="Maven: xmlenc:xmlenc:0.52" level="project" /> |
|
69 |
<orderEntry type="library" name="Maven: commons-net:commons-net:3.1" level="project" /> |
|
70 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jetty:6.1.26.cloudera.2" level="project" /> |
|
71 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jetty-util:6.1.26.cloudera.2" level="project" /> |
|
72 |
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.8" level="project" /> |
|
73 |
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-json:1.8" level="project" /> |
|
74 |
<orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.1" level="project" /> |
|
75 |
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" /> |
|
76 |
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.6" level="project" /> |
|
77 |
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.1" level="project" /> |
|
78 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.8.8" level="project" /> |
|
79 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.8.8" level="project" /> |
|
80 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-jaxrs:1.8.8" level="project" /> |
|
81 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-xc:1.8.8" level="project" /> |
|
82 |
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-server:1.8" level="project" /> |
|
83 |
<orderEntry type="library" name="Maven: asm:asm:3.3.1" level="project" /> |
|
84 |
<orderEntry type="library" scope="RUNTIME" name="Maven: tomcat:jasper-compiler:5.5.23" level="project" /> |
|
85 |
<orderEntry type="library" name="Maven: tomcat:jasper-runtime:5.5.23" level="project" /> |
|
86 |
<orderEntry type="library" name="Maven: commons-el:commons-el:1.0" level="project" /> |
|
87 |
<orderEntry type="library" name="Maven: net.java.dev.jets3t:jets3t:0.6.1" level="project" /> |
|
88 |
<orderEntry type="library" name="Maven: junit:junit:4.8.2" level="project" /> |
|
89 |
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.6" level="project" /> |
|
90 |
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" /> |
|
91 |
<orderEntry type="library" name="Maven: commons-digester:commons-digester:1.8" level="project" /> |
|
92 |
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.7.0" level="project" /> |
|
93 |
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils-core:1.8.0" level="project" /> |
|
94 |
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.8.5" level="project" /> |
|
95 |
<orderEntry type="library" name="Maven: org.apache.avro:avro:1.7.4" level="project" /> |
|
96 |
<orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.3" level="project" /> |
|
97 |
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.0.4.1" level="project" /> |
|
98 |
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.4.1" level="project" /> |
|
99 |
<orderEntry type="library" name="Maven: org.tukaani:xz:1.0" level="project" /> |
|
100 |
<orderEntry type="library" name="Maven: net.sf.kosmosfs:kfs:0.3" level="project" /> |
|
101 |
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.5.0" level="project" /> |
|
102 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-auth:2.0.0-cdh4.3.0" level="project" /> |
|
103 |
<orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.42" level="project" /> |
|
104 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-core:2.0.0-mr1-cdh4.3.0" level="project" /> |
|
105 |
<orderEntry type="library" name="Maven: hsqldb:hsqldb:1.8.0.10" level="project" /> |
|
106 |
<orderEntry type="library" name="Maven: org.eclipse.jdt:core:3.1.1" level="project" /> |
|
107 |
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.0.0.RELEASE" level="project" /> |
|
108 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-hdfs:2.0.0-cdh4.3.0" level="project" /> |
|
109 |
<orderEntry type="library" name="Maven: commons-daemon:commons-daemon:1.0.3" level="project" /> |
|
110 |
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.0.0.RELEASE" level="project" /> |
|
111 |
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.0.0.RELEASE" level="project" /> |
|
112 |
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.0.0.RELEASE" level="project" /> |
|
113 |
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" /> |
|
114 |
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.0.0.RELEASE" level="project" /> |
|
115 |
<orderEntry type="library" name="Maven: org.apache.hbase:hbase:0.94.6-cdh4.3.0" level="project" /> |
|
116 |
<orderEntry type="library" name="Maven: com.yammer.metrics:metrics-core:2.1.2" level="project" /> |
|
117 |
<orderEntry type="library" name="Maven: com.github.stephenc.high-scale-lib:high-scale-lib:1.1.1" level="project" /> |
|
118 |
<orderEntry type="library" name="Maven: org.apache.thrift:libthrift:0.9.0" level="project" /> |
|
119 |
<orderEntry type="library" name="Maven: org.jruby:jruby-complete:1.6.5" level="project" /> |
|
120 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jsp-2.1:6.1.14" level="project" /> |
|
121 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jsp-api-2.1:6.1.14" level="project" /> |
|
122 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:servlet-api-2.5:6.1.14" level="project" /> |
|
123 |
<orderEntry type="library" name="Maven: org.jamon:jamon-runtime:2.3.1" level="project" /> |
|
124 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-openaire-data-protos:3.3.0" level="project" /> |
|
125 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-openaireplus-mapping-utils:2.2.2" level="project" /> |
|
126 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-pace-core:1.3.1" level="project" /> |
|
127 |
<orderEntry type="library" name="Maven: edu.cmu:secondstring:1.0.0" level="project" /> |
|
128 |
<orderEntry type="library" name="Maven: com.typesafe:config:0.3.1" level="project" /> |
|
129 |
<orderEntry type="library" name="Maven: org.antlr:stringtemplate:3.2" level="project" /> |
|
130 |
<orderEntry type="library" name="Maven: org.antlr:antlr:2.7.7" level="project" /> |
|
131 |
<orderEntry type="library" name="Maven: org.json:json:20140107" level="project" /> |
|
132 |
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.9.3" level="project" /> |
|
133 |
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" /> |
|
134 |
<orderEntry type="library" name="Maven: org.apache.sqoop:sqoop:1.4.4" level="project" /> |
|
135 |
<orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901.jdbc4" level="project" /> |
|
136 |
<orderEntry type="library" name="Maven: eu.dnetlib:cnr-rmi-api:2.0.0" level="project" /> |
|
137 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-api:2.7.8" level="project" /> |
|
138 |
<orderEntry type="library" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.2.0" level="project" /> |
|
139 |
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.1" level="project" /> |
|
140 |
<orderEntry type="library" name="Maven: org.apache.ws.xmlschema:xmlschema-core:2.0.3" level="project" /> |
|
141 |
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1" level="project" /> |
|
142 |
<orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.3" level="project" /> |
|
143 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-jaxws:2.7.8" level="project" /> |
|
144 |
<orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" /> |
|
145 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-core:2.7.8" level="project" /> |
|
146 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-soap:2.7.8" level="project" /> |
|
147 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-databinding-jaxb:2.7.8" level="project" /> |
|
148 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-xml:2.7.8" level="project" /> |
|
149 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-simple:2.7.8" level="project" /> |
|
150 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-transports-http:2.7.8" level="project" /> |
|
151 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-addr:2.7.8" level="project" /> |
|
152 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-policy:2.7.8" level="project" /> |
|
153 |
<orderEntry type="library" name="Maven: org.apache.neethi:neethi:3.0.2" level="project" /> |
|
154 |
</component> |
|
155 |
</module> |
|
156 |
|
modules/dnet-openaire-stats/branches/full_export/dnet-openaire-stats-full.iml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|
3 |
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false"> |
|
4 |
<output url="file://$MODULE_DIR$/target/classes" /> |
|
5 |
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|
6 |
<content url="file://$MODULE_DIR$"> |
|
7 |
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|
8 |
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
|
9 |
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
|
10 |
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> |
|
11 |
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|
12 |
</content> |
|
13 |
<orderEntry type="inheritedJdk" /> |
|
14 |
<orderEntry type="sourceFolder" forTests="false" /> |
|
15 |
<orderEntry type="library" name="Maven: javax.xml:jaxp-api:1.4.2" level="project" /> |
|
16 |
<orderEntry type="library" name="Maven: net.sf.opencsv:opencsv:2.3" level="project" /> |
|
17 |
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.8" level="project" /> |
|
18 |
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.5" level="project" /> |
|
19 |
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.0-rc2" level="project" /> |
|
20 |
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.0-rc2" level="project" /> |
|
21 |
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" /> |
|
22 |
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.6" level="project" /> |
|
23 |
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.6" level="project" /> |
|
24 |
<orderEntry type="library" name="Maven: com.google.guava:guava-collections:r03" level="project" /> |
|
25 |
<orderEntry type="library" name="Maven: com.google.guava:guava-annotations:r03" level="project" /> |
|
26 |
<orderEntry type="library" name="Maven: com.google.guava:guava-primitives:r03" level="project" /> |
|
27 |
<orderEntry type="library" name="Maven: com.google.guava:guava-base:r03" level="project" /> |
|
28 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-mapreduce-jobs:0.0.5" level="project" /> |
|
29 |
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.3" level="project" /> |
|
30 |
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.2.2" level="project" /> |
|
31 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-index-solr-common:1.1.1" level="project" /> |
|
32 |
<orderEntry type="library" name="Maven: org.apache.solr:solr-solrj:4.7.0" level="project" /> |
|
33 |
<orderEntry type="library" name="Maven: commons-io:commons-io:2.1" level="project" /> |
|
34 |
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.0-alpha4" level="project" /> |
|
35 |
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0-beta1" level="project" /> |
|
36 |
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.3.1" level="project" /> |
|
37 |
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.5" level="project" /> |
|
38 |
<orderEntry type="library" name="Maven: org.noggit:noggit:0.5" level="project" /> |
|
39 |
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" /> |
|
40 |
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" /> |
|
41 |
<orderEntry type="library" name="Maven: com.google.guava:guava:14.0" level="project" /> |
|
42 |
<orderEntry type="library" name="Maven: com.mycila:xmltool:3.3" level="project" /> |
|
43 |
<orderEntry type="library" name="Maven: eu.dnetlib:cnr-misc-utils:1.0.1" level="project" /> |
|
44 |
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" /> |
|
45 |
<orderEntry type="library" name="Maven: jaxen:jaxen:1.1.6" level="project" /> |
|
46 |
<orderEntry type="library" name="Maven: saxonica:saxon:9.1.0.8" level="project" /> |
|
47 |
<orderEntry type="library" name="Maven: saxonica:saxon-dom:9.1.0.8" level="project" /> |
|
48 |
<orderEntry type="library" name="Maven: jgrapht:jgrapht:0.7.2" level="project" /> |
|
49 |
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.8.0" level="project" /> |
|
50 |
<orderEntry type="library" name="Maven: org.springframework:spring-test:4.0.0.RELEASE" level="project" /> |
|
51 |
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.0.0.RELEASE" level="project" /> |
|
52 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-mapreduce-submitter:2.0.1" level="project" /> |
|
53 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-hadoop-commons:1.0.4" level="project" /> |
|
54 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-common:2.0.0-cdh4.3.0" level="project" /> |
|
55 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-annotations:2.0.0-cdh4.3.0" level="project" /> |
|
56 |
<orderEntry type="module-library"> |
|
57 |
<library name="Maven: jdk.tools:jdk.tools:1.6"> |
|
58 |
<CLASSES> |
|
59 |
<root url="jar:///usr/lib/jvm/java-7-oracle/lib/tools.jar!/" /> |
|
60 |
</CLASSES> |
|
61 |
<JAVADOC /> |
|
62 |
<SOURCES /> |
|
63 |
</library> |
|
64 |
</orderEntry> |
|
65 |
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.2" level="project" /> |
|
66 |
<orderEntry type="library" name="Maven: org.apache.commons:commons-math:2.1" level="project" /> |
|
67 |
<orderEntry type="library" name="Maven: xmlenc:xmlenc:0.52" level="project" /> |
|
68 |
<orderEntry type="library" name="Maven: commons-net:commons-net:3.1" level="project" /> |
|
69 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jetty:6.1.26.cloudera.2" level="project" /> |
|
70 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jetty-util:6.1.26.cloudera.2" level="project" /> |
|
71 |
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.8" level="project" /> |
|
72 |
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-json:1.8" level="project" /> |
|
73 |
<orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.1" level="project" /> |
|
74 |
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" /> |
|
75 |
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.6" level="project" /> |
|
76 |
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.1" level="project" /> |
|
77 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.8.8" level="project" /> |
|
78 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.8.8" level="project" /> |
|
79 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-jaxrs:1.8.8" level="project" /> |
|
80 |
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-xc:1.8.8" level="project" /> |
|
81 |
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-server:1.8" level="project" /> |
|
82 |
<orderEntry type="library" name="Maven: asm:asm:3.3.1" level="project" /> |
|
83 |
<orderEntry type="library" scope="RUNTIME" name="Maven: tomcat:jasper-compiler:5.5.23" level="project" /> |
|
84 |
<orderEntry type="library" name="Maven: tomcat:jasper-runtime:5.5.23" level="project" /> |
|
85 |
<orderEntry type="library" name="Maven: commons-el:commons-el:1.0" level="project" /> |
|
86 |
<orderEntry type="library" name="Maven: net.java.dev.jets3t:jets3t:0.6.1" level="project" /> |
|
87 |
<orderEntry type="library" name="Maven: junit:junit:4.8.2" level="project" /> |
|
88 |
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.6" level="project" /> |
|
89 |
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" /> |
|
90 |
<orderEntry type="library" name="Maven: commons-digester:commons-digester:1.8" level="project" /> |
|
91 |
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.7.0" level="project" /> |
|
92 |
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils-core:1.8.0" level="project" /> |
|
93 |
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.8.5" level="project" /> |
|
94 |
<orderEntry type="library" name="Maven: org.apache.avro:avro:1.7.4" level="project" /> |
|
95 |
<orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.3" level="project" /> |
|
96 |
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.0.4.1" level="project" /> |
|
97 |
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.4.1" level="project" /> |
|
98 |
<orderEntry type="library" name="Maven: org.tukaani:xz:1.0" level="project" /> |
|
99 |
<orderEntry type="library" name="Maven: net.sf.kosmosfs:kfs:0.3" level="project" /> |
|
100 |
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.5.0" level="project" /> |
|
101 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-auth:2.0.0-cdh4.3.0" level="project" /> |
|
102 |
<orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.42" level="project" /> |
|
103 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-core:2.0.0-mr1-cdh4.3.0" level="project" /> |
|
104 |
<orderEntry type="library" name="Maven: hsqldb:hsqldb:1.8.0.10" level="project" /> |
|
105 |
<orderEntry type="library" name="Maven: org.eclipse.jdt:core:3.1.1" level="project" /> |
|
106 |
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.0.0.RELEASE" level="project" /> |
|
107 |
<orderEntry type="library" name="Maven: org.apache.hadoop:hadoop-hdfs:2.0.0-cdh4.3.0" level="project" /> |
|
108 |
<orderEntry type="library" name="Maven: commons-daemon:commons-daemon:1.0.3" level="project" /> |
|
109 |
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.0.0.RELEASE" level="project" /> |
|
110 |
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.0.0.RELEASE" level="project" /> |
|
111 |
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.0.0.RELEASE" level="project" /> |
|
112 |
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" /> |
|
113 |
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.0.0.RELEASE" level="project" /> |
|
114 |
<orderEntry type="library" name="Maven: org.apache.hbase:hbase:0.94.6-cdh4.3.0" level="project" /> |
|
115 |
<orderEntry type="library" name="Maven: com.yammer.metrics:metrics-core:2.1.2" level="project" /> |
|
116 |
<orderEntry type="library" name="Maven: com.github.stephenc.high-scale-lib:high-scale-lib:1.1.1" level="project" /> |
|
117 |
<orderEntry type="library" name="Maven: org.apache.thrift:libthrift:0.9.0" level="project" /> |
|
118 |
<orderEntry type="library" name="Maven: org.jruby:jruby-complete:1.6.5" level="project" /> |
|
119 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jsp-2.1:6.1.14" level="project" /> |
|
120 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:jsp-api-2.1:6.1.14" level="project" /> |
|
121 |
<orderEntry type="library" name="Maven: org.mortbay.jetty:servlet-api-2.5:6.1.14" level="project" /> |
|
122 |
<orderEntry type="library" name="Maven: org.jamon:jamon-runtime:2.3.1" level="project" /> |
|
123 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-openaire-data-protos:3.3.0" level="project" /> |
|
124 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-openaireplus-mapping-utils:2.2.2" level="project" /> |
|
125 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-pace-core:1.3.1" level="project" /> |
|
126 |
<orderEntry type="library" name="Maven: edu.cmu:secondstring:1.0.0" level="project" /> |
|
127 |
<orderEntry type="library" name="Maven: com.typesafe:config:0.3.1" level="project" /> |
|
128 |
<orderEntry type="library" name="Maven: org.antlr:stringtemplate:3.2" level="project" /> |
|
129 |
<orderEntry type="library" name="Maven: org.antlr:antlr:2.7.7" level="project" /> |
|
130 |
<orderEntry type="library" name="Maven: org.json:json:20140107" level="project" /> |
|
131 |
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.9.3" level="project" /> |
|
132 |
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" /> |
|
133 |
<orderEntry type="library" name="Maven: org.apache.sqoop:sqoop:1.4.4" level="project" /> |
|
134 |
<orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901.jdbc4" level="project" /> |
|
135 |
<orderEntry type="library" name="Maven: eu.dnetlib:cnr-rmi-api:2.0.0" level="project" /> |
|
136 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-api:2.7.8" level="project" /> |
|
137 |
<orderEntry type="library" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.2.0" level="project" /> |
|
138 |
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.1" level="project" /> |
|
139 |
<orderEntry type="library" name="Maven: org.apache.ws.xmlschema:xmlschema-core:2.0.3" level="project" /> |
|
140 |
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1" level="project" /> |
|
141 |
<orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.3" level="project" /> |
|
142 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-jaxws:2.7.8" level="project" /> |
|
143 |
<orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" /> |
|
144 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-core:2.7.8" level="project" /> |
|
145 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-soap:2.7.8" level="project" /> |
|
146 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-databinding-jaxb:2.7.8" level="project" /> |
|
147 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-xml:2.7.8" level="project" /> |
|
148 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-simple:2.7.8" level="project" /> |
|
149 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-transports-http:2.7.8" level="project" /> |
|
150 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-addr:2.7.8" level="project" /> |
|
151 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-policy:2.7.8" level="project" /> |
|
152 |
<orderEntry type="library" name="Maven: org.apache.neethi:neethi:3.0.2" level="project" /> |
|
153 |
</component> |
|
154 |
</module> |
|
155 |
|
modules/dnet-openaire-stats/branches/full_export/src/main/java/eu/dnetlib/data/mapreduce/hbase/statsExport/utils/Serializer.java | ||
---|---|---|
30 | 30 |
*/ |
31 | 31 |
public class Serializer { |
32 | 32 |
|
33 |
private static String DELIM;
|
|
34 |
private Logger log = Logger.getLogger(this.getClass());
|
|
35 |
private String NULL_STRING;
|
|
36 |
private String NULL_NUM;
|
|
37 |
//TODO no longer used
|
|
38 |
private static String ENCLOSED;
|
|
33 |
private static String DELIM;
|
|
34 |
private Logger log = Logger.getLogger(this.getClass());
|
|
35 |
private String NULL_STRING;
|
|
36 |
private String NULL_NUM;
|
|
37 |
//TODO no longer used
|
|
38 |
private static String ENCLOSED;
|
|
39 | 39 |
|
40 |
private FundingParser fundingParser = new FundingParser();
|
|
40 |
private FundingParser fundingParser = new FundingParser();
|
|
41 | 41 |
|
42 | 42 |
|
43 |
public Serializer() {
|
|
44 |
}
|
|
43 |
public Serializer() {
|
|
44 |
}
|
|
45 | 45 |
|
46 | 46 |
|
47 |
public String serialize(Oaf oaf) {
|
|
47 |
public String serialize(Oaf oaf) {
|
|
48 | 48 |
|
49 |
switch (oaf.getKind()) {
|
|
50 |
case entity:
|
|
51 |
OafEntity valueEntity = oaf.getEntity();
|
|
49 |
switch (oaf.getKind()) {
|
|
50 |
case entity:
|
|
51 |
OafEntity valueEntity = oaf.getEntity();
|
|
52 | 52 |
|
53 |
switch (valueEntity.getType()) {
|
|
54 |
case datasource:
|
|
53 |
switch (valueEntity.getType()) {
|
|
54 |
case datasource:
|
|
55 | 55 |
|
56 |
return buildDatasource(valueEntity);
|
|
56 |
return buildDatasource(valueEntity);
|
|
57 | 57 |
|
58 |
case organization:
|
|
58 |
case organization:
|
|
59 | 59 |
|
60 |
return buildOrganization(valueEntity);
|
|
60 |
return buildOrganization(valueEntity);
|
|
61 | 61 |
|
62 |
case project:
|
|
62 |
case project:
|
|
63 | 63 |
|
64 |
return buildProject(valueEntity);
|
|
65 |
case result:
|
|
64 |
return buildProject(valueEntity);
|
|
65 |
case result:
|
|
66 | 66 |
|
67 |
return buildResult(valueEntity);
|
|
68 |
case person:
|
|
69 |
return buildPerson(valueEntity);
|
|
70 |
default:
|
|
71 |
log.error("wrong type");
|
|
72 |
break;
|
|
73 |
}
|
|
74 |
break;
|
|
75 |
case relation:
|
|
76 |
OafRel valueRel = oaf.getRel();
|
|
67 |
return buildResult(valueEntity);
|
|
68 |
case person:
|
|
69 |
return buildPerson(valueEntity);
|
|
70 |
default:
|
|
71 |
log.error("wrong type");
|
|
72 |
break;
|
|
73 |
}
|
|
74 |
break;
|
|
75 |
case relation:
|
|
76 |
OafRel valueRel = oaf.getRel();
|
|
77 | 77 |
|
78 |
return buildRel(valueRel);
|
|
78 |
return buildRel(valueRel);
|
|
79 | 79 |
|
80 |
}
|
|
80 |
}
|
|
81 | 81 |
|
82 |
return null;
|
|
82 |
return null;
|
|
83 | 83 |
|
84 |
}
|
|
84 |
}
|
|
85 | 85 |
|
86 |
public String serialize(OafRel oaf) {
|
|
86 |
public String serialize(OafRel oaf) {
|
|
87 | 87 |
|
88 |
switch (oaf.getRelType()) {
|
|
89 |
case resultProject:
|
|
88 |
switch (oaf.getRelType()) {
|
|
89 |
case resultProject:
|
|
90 | 90 |
|
91 |
return getResultProject(oaf);
|
|
91 |
return getResultProject(oaf);
|
|
92 | 92 |
|
93 |
default:
|
|
94 |
return buildRel(oaf);
|
|
95 |
}
|
|
96 |
}
|
|
93 |
default:
|
|
94 |
return buildRel(oaf);
|
|
95 |
}
|
|
96 |
}
|
|
97 | 97 |
|
98 |
private String buildRel(OafRel Rel) {
|
|
99 |
return getStringField(Rel.getTarget());
|
|
100 |
}
|
|
98 |
private String buildRel(OafRel Rel) {
|
|
99 |
return getStringField(Rel.getTarget());
|
|
100 |
}
|
|
101 | 101 |
|
102 | 102 |
|
103 |
public HashMap<String, List<String>> extractRelations(Oaf oaf) { |
|
104 |
OafEntity valueEntity = oaf.getEntity(); |
|
105 |
switch (valueEntity.getType()) { |
|
106 |
case datasource: |
|
107 |
return getDatasourceLanguages(valueEntity); |
|
108 |
case result: |
|
109 |
HashMap<String, List<String>> relations = new HashMap<String, List<String>>(); |
|
110 |
relations.putAll(getResultLanguages(valueEntity)); |
|
111 |
//TODO no more resultTopics needed!!! |
|
112 |
// relations.putAll(getResultTopics(valueEntity)); |
|
113 |
relations.putAll(getResultClassifications(valueEntity)); |
|
114 |
relations.putAll(getResultDatasources(valueEntity)); |
|
115 |
relations.putAll(getResultConcepts(valueEntity)); |
|
116 |
return relations; |
|
117 |
default: |
|
103 |
public HashMap<String, List<String>> extractRelations(Oaf oaf) { |
|
104 |
OafEntity valueEntity = oaf.getEntity(); |
|
105 |
switch (valueEntity.getType()) { |
|
106 |
case datasource: |
|
107 |
return getDatasourceLanguages(valueEntity); |
|
108 |
case result: |
|
109 |
HashMap<String, List<String>> relations = new HashMap<String, List<String>>(); |
|
110 |
relations.putAll(getResultLanguages(valueEntity)); |
|
118 | 111 |
|
119 |
return null; |
|
120 |
} |
|
112 |
relations.putAll(getResultTopics(valueEntity)); |
|
113 |
relations.putAll(getResultClassifications(valueEntity)); |
|
114 |
relations.putAll(getResultDatasources(valueEntity)); |
|
115 |
relations.putAll(getResultConcepts(valueEntity)); |
|
116 |
return relations; |
|
117 |
default: |
|
121 | 118 |
|
122 |
} |
|
119 |
return null; |
|
120 |
} |
|
123 | 121 |
|
124 |
private String getResultProject(OafRel oaf) { |
|
125 |
String buff = new String(); |
|
126 |
String result = oaf.getTarget(); |
|
122 |
} |
|
127 | 123 |
|
124 |
private String getResultProject(OafRel oaf) { |
|
125 |
String buff = new String(); |
|
126 |
String result = oaf.getTarget(); |
|
128 | 127 |
|
129 |
buff += getStringField(result); |
|
130 |
// TODO is declared as int!!! |
|
131 |
long diff = DATEDIFF(oaf.getResultProject().getOutcome().getRelMetadata().getEnddate(), oaf.getResultProject().getOutcome().getRelMetadata().getStartdate()); |
|
132 |
if (diff < 0) { |
|
133 |
diff = 0; |
|
134 |
} |
|
135 |
buff += getNumericField(String.valueOf(diff)); |
|
136 | 128 |
|
129 |
buff += getStringField(result); |
|
130 |
// TODO is declared as int!!! |
|
131 |
long diff = DATEDIFF(oaf.getResultProject().getOutcome().getRelMetadata().getEnddate(), oaf.getResultProject().getOutcome().getRelMetadata().getStartdate()); |
|
132 |
if (diff < 0) { |
|
133 |
diff = 0; |
|
134 |
} |
|
135 |
buff += getNumericField(String.valueOf(diff)); |
|
137 | 136 |
|
138 |
return buff; |
|
139 |
} |
|
140 | 137 |
|
138 |
return buff; |
|
139 |
} |
|
141 | 140 |
|
142 |
private HashMap<String, List<String>> getDatasourceLanguages(OafEntity valueEntity) { |
|
143 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
144 |
List<String> buffs = new ArrayList<String>(); |
|
145 | 141 |
|
142 |
private HashMap<String, List<String>> getDatasourceLanguages(OafEntity valueEntity) { |
|
143 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
144 |
List<String> buffs = new ArrayList<String>(); |
|
146 | 145 |
|
147 |
Datasource d = valueEntity.getDatasource(); |
|
148 | 146 |
|
149 |
Metadata metadata = d.getMetadata();
|
|
147 |
Datasource d = valueEntity.getDatasource();
|
|
150 | 148 |
|
151 |
for (StringField lang : metadata.getOdlanguagesList()) {
|
|
149 |
Metadata metadata = d.getMetadata();
|
|
152 | 150 |
|
153 |
buffs.add(getStringField(lang.getValue())); |
|
154 |
} |
|
155 |
rels.put("datasourceLanguage", buffs); |
|
156 |
return rels; |
|
157 |
} |
|
151 |
for (StringField lang : metadata.getOdlanguagesList()) { |
|
158 | 152 |
|
159 |
private HashMap<String, List<String>> getResultLanguages(OafEntity valueEntity) { |
|
160 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
161 |
List<String> buffs = new ArrayList<String>(); |
|
162 |
Result d = valueEntity.getResult(); |
|
153 |
buffs.add(getStringField(lang.getValue())); |
|
154 |
} |
|
155 |
rels.put("datasourceLanguage", buffs); |
|
156 |
return rels; |
|
157 |
} |
|
163 | 158 |
|
164 |
eu.dnetlib.data.proto.ResultProtos.Result.Metadata metadata = d.getMetadata(); |
|
159 |
private HashMap<String, List<String>> getResultLanguages(OafEntity valueEntity) { |
|
160 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
161 |
List<String> buffs = new ArrayList<String>(); |
|
162 |
Result d = valueEntity.getResult(); |
|
165 | 163 |
|
166 |
if (metadata.getLanguage().getClassname() != null && !metadata.getLanguage().getClassname().isEmpty()) {
|
|
164 |
eu.dnetlib.data.proto.ResultProtos.Result.Metadata metadata = d.getMetadata();
|
|
167 | 165 |
|
168 |
buffs.add(getStringField(metadata.getLanguage().getClassname())); |
|
169 |
} |
|
170 |
rels.put("resultLanguage", buffs); |
|
171 |
return rels; |
|
166 |
if (metadata.getLanguage().getClassname() != null && !metadata.getLanguage().getClassname().isEmpty()) { |
|
172 | 167 |
|
173 |
} |
|
168 |
buffs.add(getStringField(metadata.getLanguage().getClassname())); |
|
169 |
} |
|
170 |
rels.put("resultLanguage", buffs); |
|
171 |
return rels; |
|
174 | 172 |
|
175 |
private HashMap<String, List<String>> getResultClassifications(OafEntity valueEntity) {
|
|
173 |
}
|
|
176 | 174 |
|
177 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
178 |
List<String> buffs = new ArrayList<String>(); |
|
179 |
Result result = valueEntity.getResult(); |
|
180 |
String classification = new String(); |
|
181 |
for (Instance instance : (result.getInstanceList())) { |
|
175 |
private HashMap<String, List<String>> getResultClassifications(OafEntity valueEntity) { |
|
182 | 176 |
|
183 |
if (instance.getInstancetype().getClassname() != null && !instance.getInstancetype().getClassname().isEmpty()) { |
|
184 |
classification += instance.getInstancetype().getClassname() + ';'; |
|
185 |
} |
|
177 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
178 |
List<String> buffs = new ArrayList<String>(); |
|
179 |
Result result = valueEntity.getResult(); |
|
180 |
String classification = new String(); |
|
181 |
for (Instance instance : (result.getInstanceList())) { |
|
186 | 182 |
|
187 |
} |
|
188 |
buffs.add(getStringField(classification)); |
|
189 |
rels.put("resultClassification", buffs); |
|
190 |
return rels; |
|
183 |
if (instance.getInstancetype().getClassname() != null && !instance.getInstancetype().getClassname().isEmpty()) { |
|
184 |
classification += instance.getInstancetype().getClassname() + ';'; |
|
185 |
} |
|
191 | 186 |
|
192 |
} |
|
187 |
} |
|
188 |
buffs.add(getStringField(classification)); |
|
189 |
rels.put("resultClassification", buffs); |
|
190 |
return rels; |
|
193 | 191 |
|
194 |
private HashMap<String, List<String>> getResultConcepts(OafEntity valueEntity) { |
|
195 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
196 |
List<String> buffs = new ArrayList<String>(); |
|
192 |
} |
|
197 | 193 |
|
198 |
Result result = valueEntity.getResult(); |
|
194 |
private HashMap<String, List<String>> getResultConcepts(OafEntity valueEntity) { |
|
195 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
196 |
List<String> buffs = new ArrayList<String>(); |
|
199 | 197 |
|
200 |
for (eu.dnetlib.data.proto.ResultProtos.Result.Context context : result.getMetadata().getContextList()) {
|
|
198 |
Result result = valueEntity.getResult();
|
|
201 | 199 |
|
202 |
buffs.add(getStringField(context.getId())); |
|
203 |
} |
|
204 |
rels.put("resultConcept", buffs); |
|
205 |
return rels; |
|
200 |
for (eu.dnetlib.data.proto.ResultProtos.Result.Context context : result.getMetadata().getContextList()) { |
|
206 | 201 |
|
207 |
} |
|
202 |
buffs.add(getStringField(context.getId())); |
|
203 |
} |
|
204 |
rels.put("resultConcept", buffs); |
|
205 |
return rels; |
|
208 | 206 |
|
209 |
private HashMap<String, List<String>> getResultDatasources(OafEntity valueEntity) {
|
|
207 |
}
|
|
210 | 208 |
|
211 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
212 |
List<String> buffs = new ArrayList<String>(); |
|
213 |
Result result = valueEntity.getResult(); |
|
209 |
private HashMap<String, List<String>> getResultDatasources(OafEntity valueEntity) { |
|
214 | 210 |
|
211 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>(); |
|
212 |
List<String> buffs = new ArrayList<String>(); |
|
213 |
Result result = valueEntity.getResult(); |
|
214 |
|
|
215 | 215 |
//TODO hosted by |
216 |
for (Instance instance : (result.getInstanceList())) {
|
|
216 |
for (Instance instance : (result.getInstanceList())) {
|
|
217 | 217 |
|
218 | 218 |
|
219 |
String hostedBy = instance.getHostedby().getKey();
|
|
220 |
if (hostedBy != null && !hostedBy.isEmpty()) {
|
|
221 |
buffs.add((getStringField(hostedBy)));
|
|
222 |
}
|
|
223 |
}
|
|
219 |
String hostedBy = instance.getHostedby().getKey();
|
|
220 |
if (hostedBy != null && !hostedBy.isEmpty()) {
|
|
221 |
buffs.add((getStringField(hostedBy)));
|
|
222 |
}
|
|
223 |
}
|
|
224 | 224 |
|
225 | 225 |
//TODO collected froms |
226 |
for (FieldTypeProtos.KeyValue collectedFromValue : (valueEntity.getCollectedfromList())) {
|
|
226 |
for (FieldTypeProtos.KeyValue collectedFromValue : (valueEntity.getCollectedfromList())) {
|
|
227 | 227 |
|
228 |
String collectedFrom = collectedFromValue.getKey();
|
|
229 |
if (collectedFrom != null && !collectedFrom.isEmpty()) buffs.add((getStringField(collectedFrom)));
|
|
228 |
String collectedFrom = collectedFromValue.getKey();
|
|
229 |
if (collectedFrom != null && !collectedFrom.isEmpty()) buffs.add((getStringField(collectedFrom)));
|
|
230 | 230 |
|
231 |
}
|
|
232 |
rels.put("resultDatasource", buffs);
|
|
233 |
return rels;
|
|
231 |
}
|
|
232 |
rels.put("resultDatasource", buffs);
|
|
233 |
return rels;
|
|
234 | 234 |
|
235 |
}
|
|
235 |
}
|
|
236 | 236 |
|
237 |
public static boolean isNumeric(String str) {
|
|
237 |
public static boolean isNumeric(String str) {
|
|
238 | 238 |
|
239 |
str = str.replaceAll("[^A-Za-z0-9 ]", "");
|
|
240 |
str = str.replaceAll(" ", "");
|
|
241 |
return str.matches("-?\\d+(\\.\\d+)?"); // match a number with optional
|
|
242 |
// '-' and decimal.
|
|
243 |
}
|
|
239 |
str = str.replaceAll("[^A-Za-z0-9 ]", "");
|
|
240 |
str = str.replaceAll(" ", "");
|
|
241 |
return str.matches("-?\\d+(\\.\\d+)?"); // match a number with optional
|
|
242 |
// '-' and decimal.
|
|
243 |
}
|
|
244 | 244 |
|
245 |
// TODO there are topics with "null" as value -> replace them
|
|
246 |
private boolean isValidTopic(String t) {
|
|
245 |
// TODO there are topics with "null" as value -> replace them
|
|
246 |
private boolean isValidTopic(String t) {
|
|
247 | 247 |
|
248 |
if (t == null || t.isEmpty()) {
|
|
249 |
return false;
|
|
250 |
}
|
|
248 |
if (t == null || t.isEmpty()) {
|
|
249 |
return false;
|
|
250 |
}
|
|
251 | 251 |
|
252 |
if (t.equals("") || t.equals(" ")) {
|
|
253 |
return false;
|
|
254 |
}
|
|
255 |
if (t.equals("null") || t.equals("Null") || t.equals("NULL")) {
|
|
256 |
return false;
|
|
257 |
}
|
|
252 |
if (t.equals("") || t.equals(" ")) {
|
|
253 |
return false;
|
|
254 |
}
|
|
255 |
if (t.equals("null") || t.equals("Null") || t.equals("NULL")) {
|
|
256 |
return false;
|
|
257 |
}
|
|
258 | 258 |
|
259 |
if (t.equals(ENCLOSED + ENCLOSED + DELIM) || t.equals(ENCLOSED + NULL_STRING + ENCLOSED + DELIM)) {
|
|
260 |
return false;
|
|
261 |
}
|
|
262 |
// skip dedups
|
|
263 |
if (t.contains("ddc:")) {
|
|
259 |
if (t.equals(ENCLOSED + ENCLOSED + DELIM) || t.equals(ENCLOSED + NULL_STRING + ENCLOSED + DELIM)) {
|
|
260 |
return false;
|
|
261 |
}
|
|
262 |
// skip dedups
|
|
263 |
if (t.contains("ddc:")) {
|
|
264 | 264 |
|
265 |
return false;
|
|
266 |
}
|
|
267 |
return true;
|
|
268 |
}
|
|
265 |
return false;
|
|
266 |
}
|
|
267 |
return true;
|
|
268 |
}
|
|
269 | 269 |
|
270 |
private HashMap<String, List<String>> getResultTopics(OafEntity valueEntity) {
|
|
271 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>();
|
|
272 |
List<String> buffs = new ArrayList<String>();
|
|
273 |
Result d = valueEntity.getResult();
|
|
270 |
private HashMap<String, List<String>> getResultTopics(OafEntity valueEntity) {
|
|
271 |
HashMap<String, List<String>> rels = new HashMap<String, List<String>>();
|
|
272 |
List<String> buffs = new ArrayList<String>();
|
|
273 |
Result d = valueEntity.getResult();
|
|
274 | 274 |
|
275 |
eu.dnetlib.data.proto.ResultProtos.Result.Metadata metadata = d.getMetadata();
|
|
275 |
eu.dnetlib.data.proto.ResultProtos.Result.Metadata metadata = d.getMetadata();
|
|
276 | 276 |
|
277 |
List<StructuredProperty> Topics = metadata.getSubjectList(); |
|
278 |
String buff = new String(); |
|
279 |
for (StructuredProperty topic : Topics) { |
|
280 |
// TODOs |
|
281 |
if (isValidTopic(topic.getValue())) { |
|
282 |
if (!isNumeric(topic.getValue())) { |
|
283 |
String t = getStringField(topic.getValue()); |
|
284 |
if (isValidTopic(t)) { |
|
285 |
buff += t + " "; |
|
277 |
List<StructuredProperty> Topics = metadata.getSubjectList(); |
|
286 | 278 |
|
287 |
} |
|
279 |
for (StructuredProperty topic : Topics) { |
|
280 |
// TODOs |
|
281 |
if (isValidTopic(topic.getValue())) { |
|
282 |
if (!isNumeric(topic.getValue())) { |
|
283 |
String t = getStringField(topic.getValue()); |
|
284 |
if (isValidTopic(t)) { |
|
285 |
buffs.add(getStringField(t)); |
|
286 |
} |
|
288 | 287 |
|
289 |
}
|
|
290 |
}
|
|
288 |
}
|
|
289 |
}
|
|
291 | 290 |
|
292 |
} |
|
293 |
if (!buff.isEmpty()) { |
|
294 |
buff = getStringField(buff); |
|
295 |
buffs.add(buff); |
|
296 |
} |
|
297 |
rels.put("resultTopic", buffs); |
|
291 |
} |
|
298 | 292 |
|
299 |
return rels;
|
|
293 |
rels.put("resultTopic", buffs);
|
|
300 | 294 |
|
301 |
}
|
|
295 |
return rels;
|
|
302 | 296 |
|
297 |
} |
|
303 | 298 |
|
304 |
private String buildDatasource(OafEntity data) { |
|
305 | 299 |
|
306 |
String buff = new String();
|
|
300 |
private String buildDatasource(OafEntity data) {
|
|
307 | 301 |
|
308 |
Datasource d = data.getDatasource();
|
|
302 |
String buff = new String();
|
|
309 | 303 |
|
310 |
Metadata metadata = d.getMetadata(); |
|
311 |
/* String full_id = getStringField(data.getId());*/ |
|
304 |
Datasource d = data.getDatasource(); |
|
312 | 305 |
|
313 |
/* buff += full_id; |
|
314 |
buff += full_id; |
|
315 |
buff += full_id; |
|
316 |
buff += full_id; |
|
317 |
*/ |
|
318 |
//`original Id` |
|
319 |
String originalId = new String(); |
|
306 |
Metadata metadata = d.getMetadata(); |
|
307 |
String full_id = getStringField(data.getId()); |
|
308 |
buff += full_id; |
|
309 |
buff += full_id; |
|
310 |
buff += full_id; |
|
311 |
buff += full_id; |
|
320 | 312 |
|
321 |
for (String oid : data.getOriginalIdList()) { |
|
322 |
originalId += oid; |
|
323 |
break; |
|
324 |
} |
|
313 |
//`original Id` |
|
314 |
String originalId = new String(); |
|
325 | 315 |
|
326 |
buff += getStringField(originalId); |
|
316 |
for (String oid : data.getOriginalIdList()) { |
|
317 |
originalId += oid; |
|
318 |
break; |
|
319 |
} |
|
327 | 320 |
|
328 |
//dateOfCollection |
|
329 |
buff += getStringDateField(data.getDateofcollection()); |
|
321 |
buff += getStringField(originalId); |
|
330 | 322 |
|
331 |
// name |
|
332 |
if (metadata.getOfficialname().getValue().equalsIgnoreCase("unknown")) { |
|
333 |
buff += getStringField("Unknown Repository"); |
|
334 |
} else { |
|
335 |
buff += getStringField(metadata.getOfficialname().getValue()); |
|
336 |
} |
|
337 |
// type |
|
323 |
//dateOfCollection |
|
324 |
buff += getStringDateField(data.getDateofcollection()); |
|
338 | 325 |
|
339 |
if (metadata.hasDatasourcetype()) |
|
326 |
// name |
|
327 |
if (metadata.getOfficialname().getValue().equalsIgnoreCase("unknown")) { |
|
328 |
buff += getStringField("Unknown Repository"); |
|
329 |
} else { |
|
330 |
buff += getStringField(metadata.getOfficialname().getValue()); |
|
331 |
} |
|
332 |
// type |
|
340 | 333 |
|
341 |
{ |
|
342 |
buff += getStringField(metadata.getDatasourcetype().getClassname().replaceFirst(".*::", "")); |
|
334 |
if (metadata.hasDatasourcetype()) |
|
343 | 335 |
|
344 |
} else { |
|
345 |
buff += getStringField(null); |
|
346 |
} |
|
336 |
{ |
|
337 |
buff += getStringField(metadata.getDatasourcetype().getClassname().replaceFirst(".*::", "")); |
|
347 | 338 |
|
348 |
// compatibility, |
|
349 |
buff += getStringField(metadata.getOpenairecompatibility().getClassname()); |
|
339 |
} else { |
|
340 |
buff += getStringField(null); |
|
341 |
} |
|
350 | 342 |
|
351 |
// latitude
|
|
352 |
buff += getStringField(metadata.getLatitude().getValue());
|
|
343 |
// compatibility,
|
|
344 |
buff += getStringField(metadata.getOpenairecompatibility().getClassname());
|
|
353 | 345 |
|
354 |
// longtitude
|
|
355 |
buff += getStringField(metadata.getLongitude().getValue());
|
|
346 |
// latitude
|
|
347 |
buff += getStringField(metadata.getLatitude().getValue());
|
|
356 | 348 |
|
357 |
// dateofvalidation,
|
|
358 |
buff += getStringField(metadata.getDateofvalidation().getValue());
|
|
349 |
// longtitude
|
|
350 |
buff += getStringField(metadata.getLongitude().getValue());
|
|
359 | 351 |
|
360 |
// yearofvalidation, |
|
352 |
// dateofvalidation, |
|
353 |
buff += getStringField(metadata.getDateofvalidation().getValue()); |
|
361 | 354 |
|
362 |
// parse year of validation |
|
363 |
buff += getYearInt(metadata.getDateofvalidation().getValue()); |
|
364 |
// Website URL |
|
365 |
buff += getStringField(metadata.getWebsiteurl().getValue()); |
|
366 |
// certificates |
|
367 |
buff += getStringField(metadata.getCertificates().getValue()); |
|
368 |
// /citation guideline |
|
369 |
buff += getStringField(metadata.getCitationguidelineurl().getValue()); |
|
355 |
// yearofvalidation, |
|
370 | 356 |
|
371 |
// contact mail |
|
372 |
buff += getStringField(metadata.getContactemail().getValue()); |
|
357 |
// parse year of validation |
|
358 |
buff += getYearInt(metadata.getDateofvalidation().getValue()); |
|
359 |
// Website URL |
|
360 |
buff += getStringField(metadata.getWebsiteurl().getValue()); |
|
361 |
// certificates |
|
362 |
buff += getStringField(metadata.getCertificates().getValue()); |
|
363 |
// /citation guideline |
|
364 |
buff += getStringField(metadata.getCitationguidelineurl().getValue()); |
|
373 | 365 |
|
374 |
// isDataProvider |
|
375 |
buff += getStringField(String.valueOf(metadata.getDataprovider().getValue())); |
|
376 |
//Description |
|
377 |
buff += getStringField(metadata.getDescription().getValue()); |
|
378 |
//EnglishName |
|
379 |
buff += getStringField(metadata.getEnglishname().getValue()); |
|
380 |
//access restriction |
|
381 |
buff += getStringField(metadata.getDatabaseaccessrestriction().getValue()); |
|
382 |
//logoURL |
|
383 |
buff += getStringField(metadata.getLogourl().getValue()); |
|
384 |
//mission statament |
|
385 |
buff += getStringField(metadata.getMissionstatementurl().getValue()); |
|
386 |
//namespace prefix |
|
387 |
buff += getStringField(metadata.getNamespaceprefix().getValue()); |
|
388 |
//number of items |
|
389 |
buff += getStringField(metadata.getOdnumberofitems().getValue()); |
|
390 |
//OD policies |
|
391 |
buff += getStringField(metadata.getOdpolicies().getValue()); |
|
392 |
//subjects |
|
393 |
// buff += getStringField(metadata.getSubjectsList()); |
|
366 |
// contact mail |
|
367 |
buff += getStringField(metadata.getContactemail().getValue()); |
|
394 | 368 |
|
395 |
// number?? |
|
396 |
buff += getStringField("1"); |
|
397 |
return buff; |
|
398 |
} |
|
369 |
// isDataProvider |
|
370 |
buff += getStringField(String.valueOf(metadata.getDataprovider().getValue())); |
|
371 |
//Description |
|
372 |
buff += getStringField(metadata.getDescription().getValue()); |
|
373 |
//EnglishName |
|
374 |
buff += getStringField(metadata.getEnglishname().getValue()); |
|
375 |
//access restriction |
|
376 |
buff += getStringField(metadata.getDatabaseaccessrestriction().getValue()); |
|
377 |
//logoURL |
|
378 |
buff += getStringField(metadata.getLogourl().getValue()); |
|
379 |
//mission statament |
|
380 |
buff += getStringField(metadata.getMissionstatementurl().getValue()); |
|
381 |
//namespace prefix |
|
382 |
buff += getStringField(metadata.getNamespaceprefix().getValue()); |
|
383 |
//number of items |
|
384 |
buff += getStringField(metadata.getOdnumberofitems().getValue()); |
|
385 |
//OD policies |
|
386 |
buff += getStringField(metadata.getOdpolicies().getValue()); |
|
399 | 387 |
|
400 | 388 |
|
401 |
private String buildOrganization(OafEntity data) { |
|
389 |
// number?? |
|
390 |
buff += getStringField("1"); |
|
391 |
return buff; |
|
392 |
} |
|
402 | 393 |
|
403 |
String buff = new String(); |
|
404 | 394 |
|
405 |
Organization organization = data.getOrganization(); |
|
406 |
eu.dnetlib.data.proto.OrganizationProtos.Organization.Metadata metadata = organization.getMetadata(); |
|
407 |
//'organization_datasources`, |
|
408 |
/* String full_id = getStringField(data.getId()); |
|
409 |
buff += full_id;*/ |
|
410 |
// organization_projects |
|
411 |
/* buff += full_id;*/ |
|
395 |
private String buildOrganization(OafEntity data) { |
|
412 | 396 |
|
397 |
String buff = new String(); |
|
413 | 398 |
|
414 |
//`original Id` |
|
415 |
String originalId = new String(); |
|
399 |
Organization organization = data.getOrganization(); |
|
400 |
eu.dnetlib.data.proto.OrganizationProtos.Organization.Metadata metadata = organization.getMetadata(); |
|
401 |
//'organization_datasources`, |
|
402 |
/* String full_id = getStringField(data.getId()); |
|
403 |
buff += full_id;*/ |
|
404 |
// organization_projects |
|
405 |
/* buff += full_id;*/ |
|
416 | 406 |
|
417 |
for (String oid : data.getOriginalIdList()) { |
|
418 |
originalId += oid; |
|
419 |
break; |
|
420 |
} |
|
421 | 407 |
|
422 |
buff += getStringField(originalId); |
|
408 |
//`original Id` |
|
409 |
String originalId = new String(); |
|
423 | 410 |
|
424 |
//dateOfCollection |
|
425 |
buff += getStringDateField(data.getDateofcollection()); |
|
411 |
for (String oid : data.getOriginalIdList()) { |
|
412 |
originalId += oid; |
|
413 |
break; |
|
414 |
} |
|
426 | 415 |
|
427 |
// `name`, |
|
428 |
buff += getStringField(metadata.getLegalname().getValue()); |
|
429 |
// `country`, |
|
430 |
buff += getStringField(metadata.getCountry().getClassname()); |
|
416 |
buff += getStringField(originalId); |
|
431 | 417 |
|
432 |
//logourl |
|
433 |
buff += getStringField(metadata.getLogourl().getValue()); |
|
418 |
//dateOfCollection |
|
419 |
buff += getStringDateField(data.getDateofcollection()); |
|
420 |
|
|
421 |
// `name`, |
|
422 |
buff += getStringField(metadata.getLegalname().getValue()); |
|
423 |
// `country`, |
|
424 |
buff += getStringField(metadata.getCountry().getClassname()); |
|
425 |
|
|
426 |
//logourl |
|
427 |
buff += getStringField(metadata.getLogourl().getValue()); |
|
434 | 428 |
//ec enterprise |
435 |
buff += getStringField(metadata.getEcenterprise().getValue());
|
|
429 |
buff += getStringField(metadata.getEcenterprise().getValue());
|
|
436 | 430 |
//ec education |
437 |
buff += getStringField(metadata.getEchighereducation().getValue());
|
|
438 |
//legal org
|
|
439 |
buff += getStringField(metadata.getEcinternationalorganization().getValue());
|
|
431 |
buff += getStringField(metadata.getEchighereducation().getValue());
|
|
432 |
//legal org
|
|
433 |
buff += getStringField(metadata.getEcinternationalorganization().getValue());
|
|
440 | 434 |
//non profit org |
441 |
buff += getStringField(metadata.getEcnonprofit().getValue());
|
|
435 |
buff += getStringField(metadata.getEcnonprofit().getValue());
|
|
442 | 436 |
|
443 | 437 |
|
444 | 438 |
//int organization |
445 |
buff += getStringField(metadata.getEcinternationalorganizationeurinterests().getValue());
|
|
439 |
buff += getStringField(metadata.getEcinternationalorganizationeurinterests().getValue());
|
|
446 | 440 |
// legal body |
447 |
buff += getStringField(metadata.getEclegalbody().getValue());
|
|
441 |
buff += getStringField(metadata.getEclegalbody().getValue());
|
|
448 | 442 |
//legal person |
449 | 443 |
|
450 |
buff += getStringField(metadata.getEclegalperson().getValue());
|
|
451 |
//nuts code
|
|
452 |
buff += getStringField(metadata.getEcnutscode().getValue());
|
|
453 |
//research org
|
|
454 |
buff += getStringField(metadata.getEcresearchorganization().getValue());
|
|
455 |
//getEcsmevalidated
|
|
456 |
buff += getStringField(metadata.getEcsmevalidated().getValue());
|
|
444 |
buff += getStringField(metadata.getEclegalperson().getValue());
|
|
445 |
//nuts code
|
|
446 |
buff += getStringField(metadata.getEcnutscode().getValue());
|
|
447 |
//research org
|
|
448 |
buff += getStringField(metadata.getEcresearchorganization().getValue());
|
|
449 |
//getEcsmevalidated
|
|
450 |
buff += getStringField(metadata.getEcsmevalidated().getValue());
|
|
457 | 451 |
|
458 |
//getLegalshortname
|
|
459 |
buff += getStringField(metadata.getLegalshortname().getValue());
|
|
460 |
//website URL
|
|
461 |
buff += getStringField(metadata.getWebsiteurl().getValue());
|
|
462 |
// `number`,
|
|
463 |
buff += getStringField("1");
|
|
464 |
return buff;
|
|
452 |
//getLegalshortname
|
|
453 |
buff += getStringField(metadata.getLegalshortname().getValue());
|
|
454 |
//website URL
|
|
455 |
buff += getStringField(metadata.getWebsiteurl().getValue());
|
|
456 |
// `number`,
|
|
457 |
buff += getStringField("1");
|
|
458 |
return buff;
|
|
465 | 459 |
|
466 |
}
|
|
460 |
}
|
|
467 | 461 |
|
468 |
private String buildResult(OafEntity data) {
|
|
462 |
private String buildResult(OafEntity data) {
|
|
469 | 463 |
|
470 |
String buff = new String();
|
|
464 |
String buff = new String();
|
|
471 | 465 |
|
472 |
Result result = data.getResult();
|
|
473 |
eu.dnetlib.data.proto.ResultProtos.Result.Metadata metadata = result.getMetadata();
|
|
466 |
Result result = data.getResult();
|
|
467 |
eu.dnetlib.data.proto.ResultProtos.Result.Metadata metadata = result.getMetadata();
|
|
474 | 468 |
|
475 |
// result_topics/
|
|
476 |
String full_id = getStringField(data.getId());
|
|
477 |
/* buff += full_id;
|
|
478 |
// result_languages
|
|
479 |
buff += full_id;
|
|
480 |
// `result_projects`,
|
|
481 |
buff += full_id;
|
|
482 |
// `result_datasources`,
|
|
483 |
buff += full_id;
|
|
484 |
// `result_classifications`,
|
|
485 |
buff += full_id;
|
|
486 |
// / `result_infrastructures`,
|
|
487 |
buff += full_id;
|
|
488 |
// `result_claims`,
|
|
489 |
buff += full_id;
|
|
490 |
// `result_results`,
|
|
491 |
buff += full_id;*/
|
|
469 |
// result_topics/
|
|
470 |
String full_id = getStringField(data.getId());
|
|
471 |
buff += full_id;
|
|
472 |
// result_languages
|
|
473 |
buff += full_id;
|
|
474 |
// `result_projects`,
|
|
475 |
buff += full_id;
|
|
476 |
// `result_datasources`,
|
|
477 |
buff += full_id;
|
|
478 |
// `result_classifications`,
|
|
479 |
buff += full_id;
|
|
480 |
// / `result_infrastructures`,
|
|
481 |
buff += full_id;
|
|
482 |
// `result_claims`,
|
|
483 |
buff += full_id;
|
|
484 |
// `result_results`,
|
|
485 |
buff += full_id;
|
|
492 | 486 |
|
487 |
//`original Id` |
|
488 |
String originalId = new String(); |
|
493 | 489 |
|
494 |
//`original Id` |
|
495 |
String originalId = new String(); |
|
490 |
for (String oid : data.getOriginalIdList()) { |
|
491 |
originalId += oid; |
|
492 |
break; |
|
493 |
} |
|
496 | 494 |
|
497 |
for (String oid : data.getOriginalIdList()) { |
|
498 |
originalId += oid; |
|
499 |
break; |
|
500 |
} |
|
495 |
buff += getStringField(originalId); |
|
496 |
//dateOfCollection |
|
497 |
buff += getStringDateField(data.getDateofcollection()); |
|
501 | 498 |
|
502 |
buff += getStringField(originalId); |
|
503 |
//dateOfCollection |
|
504 |
buff += getStringDateField(data.getDateofcollection()); |
|
499 |
String titleString = new String(); |
|
500 |
String alternativeTitles = new String(); |
|
505 | 501 |
|
506 |
String titleString = new String(); |
|
507 |
String alternativeTitles = new String(); |
|
508 | 502 |
|
503 |
for (int i = 0; i < metadata.getTitleList().size(); i++) { |
|
504 |
StructuredProperty title = metadata.getTitleList().get(i); |
|
505 |
if (i == 0) { |
|
506 |
titleString = title.getValue().replaceAll("\\s+", " "); |
|
507 |
titleString = titleString.replaceAll("\n", " "); |
|
508 |
} else { |
|
509 |
alternativeTitles += title.getValue().replaceAll("\\s+", " ") + " ; "; |
|
510 |
alternativeTitles = alternativeTitles.replaceAll("\n", " "); |
|
511 |
} |
|
512 |
break; |
|
513 |
} |
|
514 |
//TODO pubtitle |
|
515 |
buff += getStringField(titleString); //!#Osvaldo Raineri: Gli Atti etiopici del martire egiziano Giorgio il nuovo (β 978)#!# |
|
516 |
//TODO alternative titles |
|
517 |
//buff += getStringField(alternativeTitles); // null#! |
|
509 | 518 |
|
510 |
for (int i = 0; i < metadata.getTitleList().size(); i++) { |
|
511 |
StructuredProperty title = metadata.getTitleList().get(i); |
|
512 |
if (i == 0) { |
|
513 |
titleString = title.getValue().replaceAll("\\s+", " "); |
|
514 |
titleString = titleString.replaceAll("\n", " "); |
|
515 |
} else { |
|
516 |
alternativeTitles += title.getValue().replaceAll("\\s+", " ") + " ; "; |
|
517 |
alternativeTitles = alternativeTitles.replaceAll("\n", " "); |
|
518 |
} |
|
519 |
break; |
|
520 |
} |
|
521 |
//TODO pubtitle |
|
522 |
buff += getStringField(titleString); //!#Osvaldo Raineri: Gli Atti etiopici del martire egiziano Giorgio il nuovo (β 978)#!# |
|
523 |
//TODO alternative titles |
|
524 |
//buff += getStringField(alternativeTitles); // null#! |
|
519 |
// TODO format |
|
520 |
String formatString = new String(); |
|
525 | 521 |
|
526 |
// TODO format |
|
527 |
String formatString = new String(); |
|
528 |
for (StringField format : metadata.getFormatList()) { |
|
529 |
formatString = format.getValue(); |
|
530 |
break; |
|
531 |
} |
|
522 |
buff += getStringField(formatString); |
|
523 |
// publisher |
|
532 | 524 |
|
533 |
buff += getStringField(formatString);
|
|
534 |
// publisher
|
|
525 |
buff += getStringField(metadata.getPublisher().getValue());
|
|
526 |
// journal
|
|
535 | 527 |
|
536 |
buff += getStringField(metadata.getPublisher().getValue()); |
|
537 |
// journal |
|
528 |
buff += getStringField(metadata.getJournal().getName().replaceAll("\n", " ")); //#null#! |
|
538 | 529 |
|
539 |
buff += getStringField(metadata.getJournal().getName().replaceAll("\n", " ")); //#null#! |
|
530 |
// year |
|
531 |
buff += getYearInt(metadata.getDateofacceptance().getValue()); |
|
540 | 532 |
|
541 |
// year
|
|
542 |
buff += getYearInt(metadata.getDateofacceptance().getValue());
|
|
533 |
// date CHANGED THIS TO DATE FORMAT
|
|
534 |
buff += getStringDateField(metadata.getDateofacceptance().getValue());
|
|
543 | 535 |
|
544 |
// date CHANGED THIS TO DATE FORMAT
|
|
545 |
buff += getStringDateField(metadata.getDateofacceptance().getValue());
|
|
536 |
// access_mode,
|
|
537 |
buff += getStringField(getAccessMode(result));
|
|
546 | 538 |
|
547 |
// access_mode, |
|
548 |
buff += getStringField(getAccessMode(result)); |
|
539 |
// bestlicense |
|
549 | 540 |
|
550 |
// bestlicense |
|
541 |
buff += getStringField(getBestLicense(result)); |
|
542 |
// type |
|
543 |
buff += getStringField(metadata.getResulttype().getClassname()); |
|
544 |
// embargo_end_date |
|
545 |
buff += getStringField(metadata.getEmbargoenddate().getValue()); |
|
551 | 546 |
|
552 |
buff += getStringField(getBestLicense(result)); |
|
553 |
// type |
|
554 |
buff += getStringField(metadata.getResulttype().getClassname()); |
|
555 |
// embargo_end_date |
|
556 |
buff += getStringField(metadata.getEmbargoenddate().getValue()); |
|
547 |
// `authors`, |
|
548 |
int authors = 0; |
|
549 |
String delayed = "no"; |
|
557 | 550 |
|
558 |
// `authors`, |
|
559 |
int authors = 0; |
|
560 |
String delayed = "no"; |
|
551 |
for (OafRel rel : data.getCachedRelList()) { |
|
561 | 552 |
|
562 |
for (OafRel rel : data.getCachedRelList()) {
|
|
553 |
if (rel.getRelType().equals(RelType.personResult)) {
|
|
563 | 554 |
|
564 |
if (rel.getRelType().equals(RelType.personResult)) { |
|
555 |
authors++; |
|
556 |
} else if (rel.getRelType().equals(RelType.resultProject)) |
|
557 |
// TODO remember : in result Project, first id is project, second is result. |
|
565 | 558 |
|
566 |
authors++; |
|
567 |
} else if (rel.getRelType().equals(RelType.resultProject)) |
|
568 |
// TODO remember : in result Project, first id is project, second is result. |
|
559 |
{ |
|
560 |
String daysfromend = getYearDifferenceInteger(rel.getResultProject().getOutcome().getRelMetadata().getEnddate(), rel.getResultProject().getOutcome().getRelMetadata().getStartdate()); |
|
561 |
if (Integer.parseInt(daysfromend) > 0) { |
|
562 |
delayed = "yes"; |
|
563 |
} |
|
564 |
} |
|
565 |
} |
|
566 |
// `delayed`, |
|
567 |
buff += getStringField(delayed); |
|
569 | 568 |
|
570 |
{ |
|
571 |
String daysfromend = getYearDifferenceInteger(rel.getResultProject().getOutcome().getRelMetadata().getEnddate(), rel.getResultProject().getOutcome().getRelMetadata().getStartdate()); |
|
572 |
if (Integer.parseInt(daysfromend) > 0) { |
|
573 |
delayed = "yes"; |
|
574 |
} |
|
575 |
} |
|
576 |
} |
|
577 |
// `delayed`, |
|
578 |
buff += getStringField(delayed); |
|
569 |
// log.info("Result " + full_id +"Author count : " + authors ); |
|
570 |
buff += getNumericField(String.valueOf(authors)); |
|
579 | 571 |
|
580 |
// log.info("Result " + full_id +"Author count : " + authors ); |
|
581 |
buff += getNumericField(String.valueOf(authors)); |
|
572 |
// `context `, |
|
582 | 573 |
|
583 |
// `context `,
|
|
574 |
String context = new String();
|
|
584 | 575 |
|
585 |
String context = new String(); |
|
576 |
for (Result.Context s : metadata.getContextList()) { |
|
577 |
context += s.getId() + ";"; |
|
586 | 578 |
|
587 |
for (Result.Context s : metadata.getContextList()) { |
|
588 |
context += s.getId() + ";"; |
|
579 |
} |
|
589 | 580 |
|
590 |
}
|
|
581 |
buff += getStringField(context);
|
|
591 | 582 |
|
592 |
buff += getStringField(context); |
|
593 | 583 |
|
584 |
String country = new String(); |
|
594 | 585 |
|
595 |
String country = new String(); |
|
586 |
for (Qualifier s : metadata.getCountryList()) { |
|
587 |
country += s.getClassname() + ";"; |
|
588 |
} |
|
596 | 589 |
|
597 |
for (Qualifier s : metadata.getCountryList()) { |
|
598 |
country += s.getClassname() + ";"; |
|
599 |
} |
|
590 |
buff += getStringField(country); |
|
600 | 591 |
|
601 |
buff += getStringField(country); |
|
592 |
String desc = new String(); |
|
593 |
for (StringField s : metadata.getDescriptionList()) { |
|
594 |
desc += s.getValue() + ";"; |
|
595 |
} |
|
602 | 596 |
|
603 |
String desc = new String(); |
|
604 |
for (StringField s : metadata.getDescriptionList()) { |
|
605 |
desc += s.getValue() + ";"; |
|
606 |
} |
|
597 |
buff += getStringField(desc); |
|
607 | 598 |
|
608 |
buff += getStringField(desc);
|
|
599 |
// number??
|
|
609 | 600 |
|
610 |
// number??
|
|
601 |
buff += getStringField("1");
|
|
611 | 602 |
|
612 |
buff += getStringField("1"); |
|
603 |
if (isValid(buff, full_id)) { |
|
604 |
return buff; |
|
613 | 605 |
|
614 |
if (isValid(buff, full_id)) {
|
|
615 |
return buff;
|
|
606 |
} else {
|
|
607 |
return null;
|
|
616 | 608 |
|
617 |
} else { |
|
618 |
return null; |
|
609 |
} |
|
619 | 610 |
|
620 |
}
|
|
611 |
}
|
|
621 | 612 |
|
622 |
} |
|
613 |
//TODO here see if check is ok |
|
614 |
private boolean isValid(String buff, String id) { |
|
615 |
if (buff.endsWith(ENCLOSED)) { |
|
616 |
log.error("Empty Result with " + id + " with body: \n" + buff); |
|
617 |
return false; |
|
618 |
} |
|
619 |
return true; |
|
620 |
} |
|
623 | 621 |
|
624 |
//TODO here see if check is ok |
|
625 |
private boolean isValid(String buff, String id) { |
|
626 |
if (buff.endsWith(ENCLOSED)) { |
|
627 |
log.error("Empty Result with " + id + " with body: \n" + buff); |
|
628 |
return false; |
|
629 |
} |
|
630 |
return true; |
|
631 |
} |
|
622 |
private String getBestLicense(Result result) { |
|
623 |
Qualifier bestLicense = null; |
|
624 |
LicenseComparator lc = new LicenseComparator(); |
|
625 |
for (Instance instance : (result.getInstanceList())) { |
|
626 |
if (lc.compare(bestLicense, instance.getLicence()) > 0) { |
|
627 |
bestLicense = instance.getLicence(); |
|
628 |
} |
|
629 |
} |
|
630 |
if (bestLicense != null) { |
|
631 |
return bestLicense.getClassname(); |
|
632 |
} else { |
|
633 |
return null; |
|
634 |
} |
|
635 |
} |
|
632 | 636 |
|
633 |
private String getBestLicense(Result result) { |
|
634 |
Qualifier bestLicense = null; |
|
635 |
LicenseComparator lc = new LicenseComparator(); |
|
636 |
for (Instance instance : (result.getInstanceList())) { |
|
637 |
if (lc.compare(bestLicense, instance.getLicence()) > 0) { |
|
638 |
bestLicense = instance.getLicence(); |
|
639 |
} |
|
640 |
} |
|
641 |
if (bestLicense != null) { |
|
642 |
return bestLicense.getClassname(); |
|
643 |
} else { |
|
644 |
return null; |
|
645 |
} |
|
646 |
} |
|
637 |
// TODO here iterate over all values |
|
638 |
private String getAccessMode(Result result) { |
|
639 |
String accessMode = NULL_STRING; |
|
640 |
for (Instance instance : (result.getInstanceList())) { |
|
641 |
if (instance.getLicence().getClassname() != null && !instance.getLicence().getClassname().isEmpty()) { |
|
642 |
accessMode = instance.getLicence().getClassname(); |
|
643 |
break; |
|
644 |
} |
|
647 | 645 |
|
648 |
// TODO here iterate over all values |
|
649 |
private String getAccessMode(Result result) { |
|
650 |
String accessMode = NULL_STRING; |
|
651 |
for (Instance instance : (result.getInstanceList())) { |
|
652 |
if (instance.getLicence().getClassname() != null && !instance.getLicence().getClassname().isEmpty()) { |
|
653 |
accessMode = instance.getLicence().getClassname(); |
|
654 |
break; |
|
655 |
} |
|
646 |
} |
|
656 | 647 |
|
657 |
} |
|
648 |
return accessMode; |
|
649 |
} |
|
658 | 650 |
|
659 |
return accessMode; |
|
660 |
} |
|
651 |
private String buildProject(OafEntity data) { |
|
661 | 652 |
|
662 |
private String buildProject(OafEntity data) {
|
|
653 |
String buff = new String();
|
|
663 | 654 |
|
664 |
String buff = new String(); |
|
655 |
Project project = data.getProject(); |
|
656 |
eu.dnetlib.data.proto.ProjectProtos.Project.Metadata metadata = project.getMetadata(); |
|
657 |
// project_organizations |
|
665 | 658 |
|
666 |
Project project = data.getProject(); |
|
667 |
eu.dnetlib.data.proto.ProjectProtos.Project.Metadata metadata = project.getMetadata(); |
|
668 |
// project_organizations |
|
659 |
String full_id = getStringField(data.getId()); |
|
660 |
buff += full_id; |
|
669 | 661 |
|
670 |
// String full_id = getStringField(data.getId()); |
|
671 |
// buff += full_id; |
|
662 |
// project_results |
|
663 |
buff += full_id; |
|
664 |
//`original Id` |
|
665 |
String originalId = new String(); |
|
672 | 666 |
|
673 |
// project_results |
|
674 |
// buff += full_id; |
|
675 |
//`original Id` |
|
676 |
String originalId = new String(); |
|
667 |
for (String oid : data.getOriginalIdList()) { |
|
668 |
originalId += (oid); |
|
669 |
break; |
|
670 |
} |
|
671 |
buff += getStringField(originalId); |
|
677 | 672 |
|
678 |
for (String oid : data.getOriginalIdList()) { |
|
679 |
originalId += (oid); |
|
680 |
break; |
|
681 |
} |
|
682 |
buff += getStringField(originalId); |
|
673 |
//dateOfCollection |
|
674 |
buff += getStringDateField(data.getDateofcollection()); |
|
683 | 675 |
|
684 |
//dateOfCollection |
|
685 |
buff += getStringDateField(data.getDateofcollection()); |
|
676 |
// `acronym`, |
|
677 |
String acronym = metadata.getAcronym().getValue(); |
|
678 |
if (acronym.equalsIgnoreCase("UNKNOWN")) { |
|
679 |
acronym = metadata.getTitle().getValue(); |
|
680 |
} |
|
686 | 681 |
|
687 |
// `acronym`, |
|
688 |
String acronym = metadata.getAcronym().getValue(); |
|
689 |
if (acronym.equalsIgnoreCase("UNKNOWN")) { |
Also available in: Unified diff
branches commit