Revision 52968
Added by Sandro La Bruzzo over 5 years ago
modules/dnet-dli/trunk/src/test/java/eu/dnetlib/resolver/DLIParserTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.resolver; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
4 |
import java.io.InputStream; |
|
5 |
import java.util.Arrays; |
|
6 |
import java.util.List; |
|
7 |
|
|
8 |
import eu.dnetlib.data.transform.OntologyLoader; |
|
3 |
import com.googlecode.protobuf.format.JsonFormat; |
|
4 |
import eu.dnetlib.data.collector.plugins.datacite.DataciteParser; |
|
5 |
import eu.dnetlib.data.proto.dli.ScholixObjectProtos; |
|
6 |
import eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions; |
|
9 | 7 |
import eu.dnetlib.dli.DLIUtils; |
10 |
import eu.dnetlib.dli.resolver.NCBINParser; |
|
11 |
import eu.dnetlib.dli.resolver.NCBINResolver; |
|
12 |
import eu.dnetlib.dli.resolver.OpenAireParser; |
|
8 |
import eu.dnetlib.dli.resolver.*; |
|
13 | 9 |
import eu.dnetlib.dli.resolver.model.CompletionStatus; |
14 | 10 |
import eu.dnetlib.dli.resolver.model.DLIObjectProvenance; |
15 | 11 |
import eu.dnetlib.dli.resolver.model.DLIResolvedObject; |
16 | 12 |
import eu.dnetlib.dli.resolver.model.ObjectProvisionMode; |
17 | 13 |
import eu.dnetlib.dli.resolver.model.serializer.DLIResolverSerializer; |
18 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator;
|
|
14 |
import eu.dnetlib.pid.resolver.AbstractPIDResolver;
|
|
19 | 15 |
import eu.dnetlib.resolver.parser.DMFResolverParser; |
20 | 16 |
import eu.dnetlib.resolver.parser.PMFResolverParser; |
21 | 17 |
import eu.dnetlib.resolver.parser.ScholixResolverParser; |
22 |
import eu.dnetlib.rmi.enabling.ISLookUpException; |
|
23 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
24 | 18 |
import org.apache.commons.io.IOUtils; |
19 |
import org.apache.commons.lang3.StringUtils; |
|
25 | 20 |
import org.apache.commons.logging.Log; |
26 | 21 |
import org.apache.commons.logging.LogFactory; |
27 | 22 |
import org.junit.Assert; |
28 |
import org.junit.Before; |
|
29 | 23 |
import org.junit.Ignore; |
30 | 24 |
import org.junit.Test; |
31 |
import org.junit.runner.RunWith; |
|
32 |
import org.mockito.Mock; |
|
33 |
import org.mockito.Mockito; |
|
34 | 25 |
import org.springframework.beans.factory.annotation.Autowired; |
35 |
import org.springframework.test.context.ContextConfiguration; |
|
36 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
|
37 | 26 |
|
38 |
import static org.mockito.Mockito.when; |
|
27 |
import java.io.IOException; |
|
28 |
import java.io.InputStream; |
|
29 |
import java.net.URISyntaxException; |
|
30 |
import java.net.URL; |
|
31 |
import java.time.LocalDateTime; |
|
32 |
import java.util.Arrays; |
|
39 | 33 |
|
40 | 34 |
/** |
41 | 35 |
* Created by sandro on 9/12/16. |
... | ... | |
114 | 108 |
} |
115 | 109 |
|
116 | 110 |
@Test |
117 |
public void testScholixParser() throws IOException { |
|
111 |
public void testScholixParser() throws IOException, URISyntaxException {
|
|
118 | 112 |
final InputStream resourceAsStream = getClass().getResourceAsStream("/eu/dnetlib/dli/parser/ieda.xml"); |
119 | 113 |
|
120 | 114 |
String str = IOUtils.toString(resourceAsStream); |
121 | 115 |
ScholixResolverParser parser = new ScholixResolverParser(); |
122 | 116 |
DLIResolvedObject object = parser.parseObject(str); |
123 | 117 |
|
124 |
log.debug("object = " + object);
|
|
118 |
final ScholixObjectProtos.Scholix.Builder scholix = ScholixObjectProtos.Scholix.newBuilder();
|
|
125 | 119 |
|
126 |
Assert.assertNotNull(object); |
|
127 |
log.debug("object.getCompletionStatus() = " + object.getCompletionStatus()); |
|
120 |
scholix.addLinkproviderBuilder() |
|
121 |
.setName(object.getDatasourceProvenance().get(0).getDatasource()) |
|
122 |
.addIdentifiersBuilder() |
|
123 |
.setIdentifier(object.getDatasourceProvenance().get(0).getDatasourceId()) |
|
124 |
.setSchema("dnetIdentifier"); |
|
128 | 125 |
|
129 |
Assert.assertTrue(object.getCompletionStatus().equals(CompletionStatus.incomplete.toString())); |
|
130 | 126 |
|
131 |
Assert.assertNotNull(object.getRelations()); |
|
132 | 127 |
|
133 |
Assert.assertTrue(object.getRelations().size() == 1); |
|
128 |
scholix.setRelationship(ScholixObjectProtos.ScholixRelationship.newBuilder() |
|
129 |
.setName(object.getRelations().get(0).getRelationSemantics()) |
|
130 |
.setInverse(object.getRelations().get(0).getInverseRelation()) |
|
131 |
.setSchema("datacite") |
|
132 |
.build()); |
|
133 |
final CrossRefParserJSON parserJSON = new CrossRefParserJSON(); |
|
134 |
DLIResolvedObject dli_source = parserJSON.parseRecord(IOUtils.toString(new URL("https://api.crossref.org/works/10.1002/2016JG003630").openStream())); |
|
135 |
DLIResolvedObject dli_target = DataciteResolver.parseResponse(AbstractPIDResolver.requestURL("http://search.datacite.org/api?wt=json&q=doi:10.6073/pasta/6038bd9745347610df8a51c92ca0e452")); |
|
136 |
final ScholixObjectProtos.ScholixResource source = generateResource(dli_source); |
|
137 |
final ScholixObjectProtos.ScholixResource target = generateResource(dli_target); |
|
138 |
scholix.setSource(source); |
|
139 |
scholix.setTarget(target); |
|
140 |
scholix.setPublicationDate(LocalDateTime.now().toString()); |
|
141 |
System.out.println(JsonFormat.printToString(scholix.build())); |
|
134 | 142 |
|
135 |
DLIResolvedObject nullObject = parser.parseObject(IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/dli/parser/InputRecordDMF.xml"))); |
|
136 |
Assert.assertNull(nullObject); |
|
137 |
nullObject = parser.parseObject(IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/dli/parser/InputPMFRecord.xml"))); |
|
138 |
Assert.assertNull(nullObject); |
|
143 |
System.out.println(generateIdentifier(dli_source, dli_target)); |
|
139 | 144 |
|
145 |
|
|
140 | 146 |
} |
141 | 147 |
|
148 |
private String generateIdentifier(final DLIResolvedObject source, DLIResolvedObject target) { |
|
149 |
|
|
150 |
return AbstractDNetXsltFunctions.md5(String.format("%s::%s", source.getPid().toLowerCase().trim(), target.getPid().toLowerCase().trim())); |
|
151 |
|
|
152 |
} |
|
153 |
|
|
154 |
private ScholixObjectProtos.ScholixResource generateResource(DLIResolvedObject result) { |
|
155 |
final ScholixObjectProtos.ScholixResource.Builder builder = ScholixObjectProtos.ScholixResource.newBuilder(); |
|
156 |
if (result.getDatasourceProvenance() != null) |
|
157 |
result.getDatasourceProvenance().forEach( |
|
158 |
objectProvenance -> { |
|
159 |
builder.addCollectedFrom(ScholixObjectProtos.ScholixCollectedFrom.newBuilder() |
|
160 |
.setProvisionMode(((DLIObjectProvenance) objectProvenance).getProvisionMode()) |
|
161 |
.setCompletionStatus(((DLIObjectProvenance) objectProvenance).getCompletionStatus()) |
|
162 |
.setProvider(ScholixObjectProtos.ScholixEntityId.newBuilder() |
|
163 |
.setName(objectProvenance.getDatasource()) |
|
164 |
.addIdentifiers(ScholixObjectProtos.ScholixIdentifier.newBuilder().setIdentifier(objectProvenance.getDatasourceId()) |
|
165 |
.setSchema("dnetIdentifier").build()) |
|
166 |
.build())); |
|
167 |
if (StringUtils.isNotEmpty(((DLIObjectProvenance) objectProvenance).getPublisher())) { |
|
168 |
builder.addPublisher(ScholixObjectProtos.ScholixEntityId.newBuilder() |
|
169 |
.setName(((DLIObjectProvenance) objectProvenance).getPublisher()) |
|
170 |
.build()); |
|
171 |
} |
|
172 |
|
|
173 |
}); |
|
174 |
builder.addIdentifier(ScholixObjectProtos.ScholixIdentifier.newBuilder(). |
|
175 |
setIdentifier(result.getPid()) |
|
176 |
.setSchema(result.getPidType()) |
|
177 |
.build()); |
|
178 |
builder.setObjectType(result.getType().toString()); |
|
179 |
if (result.getTitles() != null && result.getTitles().size() > 0) |
|
180 |
builder.setTitle(result.getTitles().get(0)); |
|
181 |
if (result.getAuthors() != null) |
|
182 |
result.getAuthors().forEach(author -> builder.addCreator( |
|
183 |
ScholixObjectProtos.ScholixEntityId.newBuilder() |
|
184 |
.setName(author) |
|
185 |
.build())); |
|
186 |
if (StringUtils.isNotBlank(result.getDate())) { |
|
187 |
builder.setPublicationDate(result.getDate()); |
|
188 |
} |
|
189 |
|
|
190 |
String tp = null; |
|
191 |
|
|
192 |
switch (result.getType()) { |
|
193 |
case dataset: |
|
194 |
tp = "60"; |
|
195 |
break; |
|
196 |
case unknown: |
|
197 |
tp = "70"; |
|
198 |
break; |
|
199 |
case publication: |
|
200 |
tp = "50"; |
|
201 |
break; |
|
202 |
} |
|
203 |
builder.setDnetIdentifier(tp + "|dnet________::" + result.getIdentifier()); |
|
204 |
return builder.build(); |
|
205 |
} |
|
206 |
|
|
142 | 207 |
@Test |
143 | 208 |
public void testScholixCompleteParser() throws IOException { |
144 | 209 |
final InputStream resourceAsStream = getClass().getResourceAsStream("/eu/dnetlib/dli/parser/InputRecordScholix.xml"); |
modules/dnet-dli/trunk/src/test/java/eu/dnetlib/resolver/DLIResolverTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.resolver; |
2 | 2 |
|
3 |
import com.google.gson.Gson;
|
|
4 |
import eu.dnetlib.data.transform.OntologyLoader;
|
|
5 |
import eu.dnetlib.dli.DLIUtils;
|
|
6 |
import eu.dnetlib.dli.resolver.ENAResolver;
|
|
3 |
import eu.dnetlib.dli.resolver.DataciteResolver;
|
|
4 |
import eu.dnetlib.dli.resolver.NCBINParser;
|
|
5 |
import eu.dnetlib.dli.resolver.NCBINResolver;
|
|
6 |
import java.net.URI;
|
|
7 | 7 |
|
8 |
import eu.dnetlib.dli.resolver.model.DLIResolvedObject; |
|
9 |
import eu.dnetlib.dli.resolver.model.serializer.DLIResolverSerializer; |
|
10 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
11 |
import eu.dnetlib.pid.resolver.PIDResolver; |
|
12 |
import eu.dnetlib.pid.resolver.store.ResolverStore; |
|
13 |
import eu.dnetlib.resolver.store.ConfigurationResolverStoreTestConfig; |
|
14 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
15 | 8 |
import org.apache.commons.io.IOUtils; |
16 | 9 |
import org.apache.commons.logging.Log; |
17 | 10 |
import org.apache.commons.logging.LogFactory; |
18 |
|
|
19 |
import org.junit.Assert; |
|
20 |
import org.junit.Before; |
|
21 |
import org.junit.Ignore; |
|
22 | 11 |
import org.junit.Test; |
23 |
import org.junit.runner.RunWith; |
|
24 |
import org.mockito.Mock; |
|
25 |
import org.mockito.Mockito; |
|
26 |
import org.springframework.beans.factory.annotation.Autowired; |
|
27 |
import org.springframework.test.context.ContextConfiguration; |
|
28 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
|
29 | 12 |
|
30 |
import javax.annotation.Resource;
|
|
13 |
import java.io.IOException;
|
|
31 | 14 |
import java.io.InputStream; |
32 |
import java.util.Arrays; |
|
33 |
import java.util.List; |
|
34 |
import java.util.Map; |
|
15 |
import java.net.URISyntaxException; |
|
35 | 16 |
|
36 |
import static org.mockito.Mockito.when; |
|
37 |
|
|
38 | 17 |
/** |
39 | 18 |
* Created by sandro on 9/8/16. |
40 | 19 |
*/ |
41 |
//@RunWith(SpringJUnit4ClassRunner.class) |
|
42 |
//@ContextConfiguration(classes = { ConfigurationTestConfig.class, ConfigurationResolverStoreTestConfig.class }) |
|
43 |
@Ignore |
|
44 |
public class DLIResolverTest { |
|
45 | 20 |
|
21 |
public class DLIResolverTest extends DLIAbstractTest { |
|
22 |
|
|
46 | 23 |
private static final Log log = LogFactory.getLog(DLIResolverTest.class); |
47 | 24 |
|
48 |
@Resource(name = "andsResolver") |
|
49 |
private PIDResolver andsDataciteResolver; |
|
50 | 25 |
|
51 |
@Resource(name = "pubMedResolver") |
|
52 |
private PIDResolver pubMedResolver; |
|
53 |
|
|
54 |
@Resource(name = "openaireResolver") |
|
55 |
private PIDResolver openaireResolver; |
|
56 |
|
|
57 |
@Resource(name = "crossrefResolver") |
|
58 |
private PIDResolver crossrefResolver; |
|
59 |
|
|
60 |
@Resource(name = "rcsbResolver") |
|
61 |
private PIDResolver rcsbResolver; |
|
62 |
|
|
63 |
@Resource(name = "enaResolver") |
|
64 |
private ENAResolver enaResolver; |
|
65 |
|
|
66 |
@Resource(name = "dataciteResolver") |
|
67 |
private PIDResolver dataciteResolver; |
|
68 |
|
|
69 |
@Autowired |
|
70 |
private ResolverStore store; |
|
71 |
|
|
72 |
@Autowired |
|
73 |
private DLIResolverSerializer serializer; |
|
74 |
|
|
75 |
@Mock |
|
76 |
private DLIUtils dliUtilsInstance; |
|
77 |
|
|
78 |
|
|
79 |
@Mock |
|
80 |
private UniqueServiceLocator uniqueServiceLocator; |
|
81 |
|
|
82 |
@Mock |
|
83 |
private ISLookUpService isLookUpServiceMock; |
|
84 |
|
|
85 |
|
|
86 |
@Before |
|
87 |
public void initialize() throws Exception { |
|
88 |
|
|
89 |
store.checkIntegrityCollection(); |
|
90 |
store.getResolverCollection().drop(); |
|
91 |
final String query = "for $x in collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') " |
|
92 |
+ "return concat($x//FIELD[./key='NamespacePrefix']/value/text(),'@--@',$x//FIELD[./key='DataSourceId']/value/text(),'@--@',$x//ENGLISH_NAME )"; |
|
93 |
dliUtilsInstance = Mockito.mock(DLIUtils.class); |
|
94 |
|
|
95 |
uniqueServiceLocator = Mockito.mock(UniqueServiceLocator.class); |
|
96 |
isLookUpServiceMock = Mockito.mock(ISLookUpService.class); |
|
97 |
dliUtilsInstance.setServiceLocator(uniqueServiceLocator); |
|
98 |
|
|
99 |
DLIUtils.setInstance(dliUtilsInstance); |
|
100 |
when(dliUtilsInstance.getServiceLocator()).thenReturn(uniqueServiceLocator); |
|
101 |
final InputStream inputStream = this.getClass().getResourceAsStream("/eu/dnetlib/transformation/data-center.json"); |
|
102 |
|
|
103 |
when(dliUtilsInstance.getDataciteDatasource()).thenReturn(new Gson().fromJson(IOUtils.toString(inputStream), Map.class)); |
|
104 |
|
|
105 |
|
|
106 |
when(uniqueServiceLocator.getService(ISLookUpService.class)).thenReturn(isLookUpServiceMock); |
|
107 |
List<String> resutlDS = Arrays.asList( |
|
108 |
"r3d100010255@--@dli_________::r3d100010255@--@icpsr", |
|
109 |
"datacite____@--@dli_________::datacite____@--@Datasets in Datacite", |
|
110 |
"r3d100010134@--@dli_________::r3d100010134@--@pangaea", |
|
111 |
"r3d100010527@--@dli_________::r3d100010527@--@European Nucleotide Archive" |
|
112 |
|
|
113 |
|
|
114 |
); |
|
115 |
when(isLookUpServiceMock.quickSearchProfile(query)).thenReturn(resutlDS); |
|
116 |
DLIUtils.ontologies = OntologyLoader.loadOntologiesFromCp(); |
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
} |
|
121 |
|
|
122 | 26 |
@Test |
123 |
public void andsResolverTest() throws Exception { |
|
124 |
andsDataciteResolver.retrievePID("https://researchdata.ands.org.au/registry/registry_object/view/2756", "url",false); |
|
125 |
andsDataciteResolver.retrievePID("https://researchdata.ands.org.au/registry/registry_object/view/2756", "url",false); |
|
126 |
andsDataciteResolver.retrievePID("https://researchdata.ands.org.au/registry/registry_object/view/2756", "url",false); |
|
127 |
final DLIResolvedObject doi = (DLIResolvedObject) andsDataciteResolver.retrievePID("https://researchdata.ands.org.au/registry/registry_object/view/2756", "url",false); |
|
128 |
Assert.assertNotNull(doi); |
|
129 |
Assert.assertNotNull(doi.getTitles()); |
|
130 |
Assert.assertNotNull(doi.getDatasourceProvenance()); |
|
131 |
log.info(doi.getDatasourceProvenance()); |
|
27 |
public void TestNCBIResolver() throws IOException, URISyntaxException { |
|
28 |
InputStream s = this.getClass().getResourceAsStream("/eu/dnetlib/dli/parser/ncbi-p.xml"); |
|
132 | 29 |
|
133 |
}
|
|
30 |
URI url = new URI("https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?db=nuccore&val=aeb32453&page_size=5&fmt_mask=0&report=gbx&retmode=text&page=1&page_size=1");
|
|
134 | 31 |
|
135 |
@Test |
|
136 |
public void pubmedResolverTest() throws Exception { |
|
137 |
final DLIResolvedObject pubmedObject = (DLIResolvedObject) pubMedResolver.retrievePID("355643", "pubmedid",false); |
|
138 |
Assert.assertNotNull(pubmedObject); |
|
139 |
Assert.assertNotNull(pubmedObject.getAuthors()); |
|
140 |
Assert.assertNotNull(pubmedObject.getTitles()); |
|
141 |
} |
|
142 | 32 |
|
143 |
@Test |
|
144 |
public void openaireResolverTest() throws Exception { |
|
145 |
final DLIResolvedObject pubmedObject = (DLIResolvedObject) openaireResolver.retrievePID("oai:dnet:od_______908::f602032c963cc56d6c9e80508ece44d3", "openaire",false); |
|
146 |
System.out.println("pubmedObject = " + pubmedObject); |
|
147 |
Assert.assertNotNull(pubmedObject); |
|
148 |
Assert.assertNotNull(pubmedObject.getAuthors()); |
|
149 |
Assert.assertNotNull(pubmedObject.getTitles()); |
|
150 |
} |
|
33 |
NCBINParser parser = new NCBINParser(); |
|
151 | 34 |
|
35 |
System.out.println(IOUtils.toString(url)); |
|
152 | 36 |
|
153 |
@Test |
|
154 |
public void crossRefResolverTest() throws Exception { |
|
155 |
final DLIResolvedObject pubmedObject = (DLIResolvedObject) crossrefResolver.retrievePID("10.1086/424767", "doi",false); |
|
156 |
Assert.assertNotNull(pubmedObject); |
|
157 |
Assert.assertNotNull(pubmedObject.getAuthors()); |
|
158 |
Assert.assertNotNull(pubmedObject.getTitles()); |
|
159 |
} |
|
37 |
System.out.println(parser.parseRecord(IOUtils.toString(url))); |
|
38 |
} |
|
160 | 39 |
|
161 |
@Test |
|
162 |
public void rcsbResolverTest() throws Exception { |
|
163 |
final DLIResolvedObject pubmedObject = (DLIResolvedObject) rcsbResolver.retrievePID("2Y9C", "pdb",false); |
|
164 |
Assert.assertNotNull(pubmedObject); |
|
165 |
Assert.assertNotNull(pubmedObject.getAuthors()); |
|
166 |
Assert.assertNotNull(pubmedObject.getTitles()); |
|
167 |
|
|
168 |
} |
|
169 |
|
|
170 | 40 |
@Test |
171 |
public void enaResolverTest() throws java.lang.Exception { |
|
172 |
final DLIResolvedObject enaObject = (DLIResolvedObject) enaResolver.retrievePID("KP866224", "ena",false); |
|
173 |
Assert.assertNotNull(enaObject); |
|
174 |
Assert.assertNotNull(enaObject.getAuthors()); |
|
175 |
Assert.assertNotNull(enaObject.getTitles()); |
|
41 |
public void testDataciteResolver() { |
|
42 |
DataciteResolver resolver = new DataciteResolver(); |
|
43 |
System.out.println(resolver.resolve("10.5438/0012", "doi")); |
|
176 | 44 |
|
177 | 45 |
|
178 |
System.out.println("enaObject = " + enaObject); |
|
179 | 46 |
|
180 | 47 |
} |
181 | 48 |
|
182 |
@Test |
|
183 |
public void dataciteResolverTest() { |
|
184 |
final String[] dois = {"10.4121/uuid:c1d1fdbb-72df-470d-9315-d6f97e1d7c7c", "10.5517/ccnwwp2", |
|
185 |
"10.6085/AA/TPT006_061MXTI061R00_20020806.50.3", "10013/epic.26895.d001" }; |
|
186 |
int k = 0; |
|
187 |
double average_sum = 0.0f; |
|
188 |
DLIResolvedObject object = (DLIResolvedObject) dataciteResolver.retrievePID(dois[0], "handle",false); |
|
189 |
Assert.assertNotNull(object); |
|
190 |
object = (DLIResolvedObject) dataciteResolver.retrievePID(dois[1], "doi",false); |
|
191 |
Assert.assertNotNull(object); |
|
192 |
log.info(object); |
|
193 |
log.info(object.getSubjects()); |
|
194 |
log.info(serializer.serializeToXML(object)); |
|
195 |
|
|
196 |
} |
|
197 |
|
|
198 | 49 |
} |
199 | 50 |
|
modules/dnet-dli/trunk/src/test/resources/eu/dnetlib/dli/parser/ieda.xml | ||
---|---|---|
4 | 4 |
xmlns:dc="http://purl.org/dc/elements/1.1/"> |
5 | 5 |
<oai:header xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns="" |
6 | 6 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
7 |
<dri:objIdentifier>crossref____::000107d91c208e59dbfdae76842fc070</dri:objIdentifier>
|
|
8 |
<dri:recordIdentifier>10.6084/m9.figshare.c.3685282:10.1186/s13326-017-0114-4</dri:recordIdentifier>
|
|
9 |
<dri:dateOfCollection>2018-07-06T11:14:43.111+02:00</dri:dateOfCollection>
|
|
10 |
<dri:repositoryId>0cf05336-894e-4793-a1f0-58d9705c4e6f_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId>
|
|
11 |
<dri:datasourceprefix>crossref____</dri:datasourceprefix>
|
|
7 |
<dri:objIdentifier>elsevier____::2c7bdd8b75d971efffa3ad0a274db522</dri:objIdentifier>
|
|
8 |
<dri:recordIdentifier>10.1002/2016JG003630:10.6073/pasta/6038bd9745347610df8a51c92ca0e452</dri:recordIdentifier>
|
|
9 |
<dri:dateOfCollection>2018-07-17T14:33:01.422+02:00</dri:dateOfCollection>
|
|
10 |
<dri:repositoryId>2d1245d4-c169-4247-9106-0f69f8d752eb_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId>
|
|
11 |
<dri:datasourceprefix>elsevier____</dri:datasourceprefix>
|
|
12 | 12 |
</oai:header> |
13 |
<oai:metadata xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns="" |
|
14 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
13 |
<metadata xmlns=""> |
|
15 | 14 |
<link> |
16 | 15 |
<linkProvider> |
17 |
|
|
18 |
<name>Crossref</name> |
|
16 |
<name>Elsevier</name> |
|
19 | 17 |
<identifiers> |
20 |
<identifier>dli_________::crossref</identifier> |
|
18 |
<identifier>dli_________::elsevier</identifier> |
|
19 |
<schema>DNet-identifier</schema> |
|
21 | 20 |
</identifiers> |
22 | 21 |
</linkProvider> |
23 |
|
|
24 |
|
|
25 | 22 |
<relashionship> |
26 |
<name>IsSupplementTo</name>
|
|
23 |
<name>IsSupplementedBy</name>
|
|
27 | 24 |
<schema>datacite</schema> |
25 |
<inverseRelashionship>isSupplementTo</inverseRelashionship> |
|
28 | 26 |
</relashionship> |
29 |
|
|
30 | 27 |
<source> |
31 | 28 |
<identifier> |
32 |
<identifier>10.6084/m9.figshare.c.3685282</identifier>
|
|
33 |
<schema>dataset</schema>
|
|
29 |
<identifier>10.1002/2016JG003630</identifier>
|
|
30 |
<schema>doi</schema>
|
|
34 | 31 |
</identifier> |
35 | 32 |
<objectType> |
36 |
<type>dataset</type>
|
|
33 |
<type>unknown</type>
|
|
37 | 34 |
</objectType> |
38 | 35 |
</source> |
39 | 36 |
<target> |
40 |
|
|
41 | 37 |
<identifier> |
42 |
<identifier>10.1186/s13326-017-0114-4</identifier> |
|
43 |
<schema>DOI</schema> |
|
38 |
<identifier>10.6073/pasta/6038bd9745347610df8a51c92ca0e452</identifier> |
|
39 |
<schema> |
|
40 |
doi |
|
41 |
</schema> |
|
44 | 42 |
</identifier> |
45 | 43 |
<objectType> |
46 |
<type>publication</type>
|
|
44 |
<type>unknown</type>
|
|
47 | 45 |
</objectType> |
48 |
|
|
49 | 46 |
</target> |
50 | 47 |
</link> |
51 |
</oai:metadata>
|
|
48 |
</metadata> |
|
52 | 49 |
<oaf:about xmlns=""> |
53 | 50 |
<oaf:datainfo> |
54 |
<oaf:collectedFrom completionStatus="incomplete" id="dli_________::crossref" name="Crossref"/>
|
|
51 |
<oaf:collectedFrom completionStatus="incomplete" id="dli_________::elsevier" name="Elsevier"/>
|
|
55 | 52 |
<oaf:completionStatus>incomplete</oaf:completionStatus> |
56 | 53 |
<oaf:provisionMode>collected</oaf:provisionMode> |
57 | 54 |
</oaf:datainfo> |
modules/dnet-dli/trunk/src/test/resources/eu/dnetlib/dli/parser/ncbi-p.xml | ||
---|---|---|
1 |
<GBSeq> |
|
2 |
|
|
3 |
<GBSeq_locus>AEB32453</GBSeq_locus> |
|
4 |
<GBSeq_length>821</GBSeq_length> |
|
5 |
<GBSeq_moltype>AA</GBSeq_moltype> |
|
6 |
<GBSeq_topology>linear</GBSeq_topology> |
|
7 |
<GBSeq_division>VRT</GBSeq_division> |
|
8 |
<GBSeq_update-date>23-MAY-2011</GBSeq_update-date> |
|
9 |
<GBSeq_create-date>13-APR-2011</GBSeq_create-date> |
|
10 |
<GBSeq_definition>toll-like receptor 2 [Epinephelus coioides]</GBSeq_definition> |
|
11 |
<GBSeq_primary-accession>AEB32453</GBSeq_primary-accession> |
|
12 |
<GBSeq_accession-version>AEB32453.1</GBSeq_accession-version> |
|
13 |
<GBSeq_other-seqids> |
|
14 |
<GBSeqid>gb|AEB32453.1|</GBSeqid> |
|
15 |
<GBSeqid>gi|328679772</GBSeqid> |
|
16 |
</GBSeq_other-seqids> |
|
17 |
<GBSeq_source>Epinephelus coioides (orange-spotted grouper)</GBSeq_source> |
|
18 |
<GBSeq_organism>Epinephelus coioides</GBSeq_organism> |
|
19 |
<GBSeq_taxonomy>Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Neoteleostei; Acanthomorphata; Eupercaria; Perciformes; Serranoidei; Serranidae; Epinephelinae; Epinephelini; Epinephelus</GBSeq_taxonomy> |
|
20 |
<GBSeq_references> |
|
21 |
<GBReference> |
|
22 |
<GBReference_reference>1</GBReference_reference> |
|
23 |
<GBReference_position>1..821</GBReference_position> |
|
24 |
<GBReference_authors> |
|
25 |
<GBAuthor>Wei,Y.C.</GBAuthor> |
|
26 |
<GBAuthor>Pan,T.S.</GBAuthor> |
|
27 |
<GBAuthor>Chang,M.X.</GBAuthor> |
|
28 |
<GBAuthor>Huang,B.</GBAuthor> |
|
29 |
<GBAuthor>Xu,Z.</GBAuthor> |
|
30 |
<GBAuthor>Luo,T.R.</GBAuthor> |
|
31 |
<GBAuthor>Nie,P.</GBAuthor> |
|
32 |
</GBReference_authors> |
|
33 |
<GBReference_title>Cloning and expression of Toll-like receptors 1 and 2 from a teleost fish, the orange-spotted grouper Epinephelus coioides</GBReference_title> |
|
34 |
<GBReference_journal>Vet. Immunol. Immunopathol. 141 (3-4), 173-182 (2011)</GBReference_journal> |
|
35 |
<GBReference_xref> |
|
36 |
<GBXref> |
|
37 |
<GBXref_dbname>doi</GBXref_dbname> |
|
38 |
<GBXref_id>10.1016/j.vetimm.2011.02.016</GBXref_id> |
|
39 |
</GBXref> |
|
40 |
</GBReference_xref> |
|
41 |
<GBReference_pubmed>21440311</GBReference_pubmed> |
|
42 |
</GBReference> |
|
43 |
<GBReference> |
|
44 |
<GBReference_reference>2</GBReference_reference> |
|
45 |
<GBReference_position>1..821</GBReference_position> |
|
46 |
<GBReference_authors> |
|
47 |
<GBAuthor>Wei,Y.C.</GBAuthor> |
|
48 |
<GBAuthor>Nie,P.</GBAuthor> |
|
49 |
</GBReference_authors> |
|
50 |
<GBReference_title>Direct Submission</GBReference_title> |
|
51 |
<GBReference_journal>Submitted (23-MAY-2010) State Key Laboratory of Freshwater Ecology and Biotechnology, Fish Immunology and Parasitology Lab, Institute of Hydrobiology, Chinese Academy of Sciences, South Road 7 of Dong Hu, Wuhan, Hubei 430072, China</GBReference_journal> |
|
52 |
</GBReference> |
|
53 |
</GBSeq_references> |
|
54 |
<GBSeq_comment>Method: conceptual translation supplied by author.</GBSeq_comment> |
|
55 |
<GBSeq_source-db>accession HM357230.1</GBSeq_source-db> |
|
56 |
<GBSeq_feature-table> |
|
57 |
<GBFeature> |
|
58 |
<GBFeature_key>source</GBFeature_key> |
|
59 |
<GBFeature_location>1..821</GBFeature_location> |
|
60 |
<GBFeature_intervals> |
|
61 |
<GBInterval> |
|
62 |
<GBInterval_from>1</GBInterval_from> |
|
63 |
<GBInterval_to>821</GBInterval_to> |
|
64 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
65 |
</GBInterval> |
|
66 |
</GBFeature_intervals> |
|
67 |
<GBFeature_quals> |
|
68 |
<GBQualifier> |
|
69 |
<GBQualifier_name>organism</GBQualifier_name> |
|
70 |
<GBQualifier_value>Epinephelus coioides</GBQualifier_value> |
|
71 |
</GBQualifier> |
|
72 |
<GBQualifier> |
|
73 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
74 |
<GBQualifier_value>taxon:94232</GBQualifier_value> |
|
75 |
</GBQualifier> |
|
76 |
</GBFeature_quals> |
|
77 |
</GBFeature> |
|
78 |
<GBFeature> |
|
79 |
<GBFeature_key>Protein</GBFeature_key> |
|
80 |
<GBFeature_location>1..821</GBFeature_location> |
|
81 |
<GBFeature_intervals> |
|
82 |
<GBInterval> |
|
83 |
<GBInterval_from>1</GBInterval_from> |
|
84 |
<GBInterval_to>821</GBInterval_to> |
|
85 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
86 |
</GBInterval> |
|
87 |
</GBFeature_intervals> |
|
88 |
<GBFeature_quals> |
|
89 |
<GBQualifier> |
|
90 |
<GBQualifier_name>product</GBQualifier_name> |
|
91 |
<GBQualifier_value>toll-like receptor 2</GBQualifier_value> |
|
92 |
</GBQualifier> |
|
93 |
<GBQualifier> |
|
94 |
<GBQualifier_name>calculated_mol_wt</GBQualifier_name> |
|
95 |
<GBQualifier_value>92845</GBQualifier_value> |
|
96 |
</GBQualifier> |
|
97 |
</GBFeature_quals> |
|
98 |
</GBFeature> |
|
99 |
<GBFeature> |
|
100 |
<GBFeature_key>Region</GBFeature_key> |
|
101 |
<GBFeature_location>62..283</GBFeature_location> |
|
102 |
<GBFeature_intervals> |
|
103 |
<GBInterval> |
|
104 |
<GBInterval_from>62</GBInterval_from> |
|
105 |
<GBInterval_to>283</GBInterval_to> |
|
106 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
107 |
</GBInterval> |
|
108 |
</GBFeature_intervals> |
|
109 |
<GBFeature_quals> |
|
110 |
<GBQualifier> |
|
111 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
112 |
<GBQualifier_value>LRR_RI</GBQualifier_value> |
|
113 |
</GBQualifier> |
|
114 |
<GBQualifier> |
|
115 |
<GBQualifier_name>note</GBQualifier_name> |
|
116 |
<GBQualifier_value>Leucine-rich repeats (LRRs), ribonuclease inhibitor (RI)-like subfamily. LRRs are 20-29 residue sequence motifs present in many proteins that participate in protein-protein interactions and have different functions and cellular locations. LRRs correspond...; cd00116</GBQualifier_value> |
|
117 |
</GBQualifier> |
|
118 |
<GBQualifier> |
|
119 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
120 |
<GBQualifier_value>CDD:238064</GBQualifier_value> |
|
121 |
</GBQualifier> |
|
122 |
</GBFeature_quals> |
|
123 |
</GBFeature> |
|
124 |
<GBFeature> |
|
125 |
<GBFeature_key>Region</GBFeature_key> |
|
126 |
<GBFeature_location>62..82</GBFeature_location> |
|
127 |
<GBFeature_intervals> |
|
128 |
<GBInterval> |
|
129 |
<GBInterval_from>62</GBInterval_from> |
|
130 |
<GBInterval_to>82</GBInterval_to> |
|
131 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
132 |
</GBInterval> |
|
133 |
</GBFeature_intervals> |
|
134 |
<GBFeature_quals> |
|
135 |
<GBQualifier> |
|
136 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
137 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
138 |
</GBQualifier> |
|
139 |
<GBQualifier> |
|
140 |
<GBQualifier_name>note</GBQualifier_name> |
|
141 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
142 |
</GBQualifier> |
|
143 |
<GBQualifier> |
|
144 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
145 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
146 |
</GBQualifier> |
|
147 |
</GBFeature_quals> |
|
148 |
</GBFeature> |
|
149 |
<GBFeature> |
|
150 |
<GBFeature_key>Region</GBFeature_key> |
|
151 |
<GBFeature_location>82..140</GBFeature_location> |
|
152 |
<GBFeature_intervals> |
|
153 |
<GBInterval> |
|
154 |
<GBInterval_from>82</GBInterval_from> |
|
155 |
<GBInterval_to>140</GBInterval_to> |
|
156 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
157 |
</GBInterval> |
|
158 |
</GBFeature_intervals> |
|
159 |
<GBFeature_quals> |
|
160 |
<GBQualifier> |
|
161 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
162 |
<GBQualifier_value>LRR_8</GBQualifier_value> |
|
163 |
</GBQualifier> |
|
164 |
<GBQualifier> |
|
165 |
<GBQualifier_name>note</GBQualifier_name> |
|
166 |
<GBQualifier_value>Leucine rich repeat; pfam13855</GBQualifier_value> |
|
167 |
</GBQualifier> |
|
168 |
<GBQualifier> |
|
169 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
170 |
<GBQualifier_value>CDD:290566</GBQualifier_value> |
|
171 |
</GBQualifier> |
|
172 |
</GBFeature_quals> |
|
173 |
</GBFeature> |
|
174 |
<GBFeature> |
|
175 |
<GBFeature_key>Region</GBFeature_key> |
|
176 |
<GBFeature_location>83..106</GBFeature_location> |
|
177 |
<GBFeature_intervals> |
|
178 |
<GBInterval> |
|
179 |
<GBInterval_from>83</GBInterval_from> |
|
180 |
<GBInterval_to>106</GBInterval_to> |
|
181 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
182 |
</GBInterval> |
|
183 |
</GBFeature_intervals> |
|
184 |
<GBFeature_quals> |
|
185 |
<GBQualifier> |
|
186 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
187 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
188 |
</GBQualifier> |
|
189 |
<GBQualifier> |
|
190 |
<GBQualifier_name>note</GBQualifier_name> |
|
191 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
192 |
</GBQualifier> |
|
193 |
<GBQualifier> |
|
194 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
195 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
196 |
</GBQualifier> |
|
197 |
</GBFeature_quals> |
|
198 |
</GBFeature> |
|
199 |
<GBFeature> |
|
200 |
<GBFeature_key>Region</GBFeature_key> |
|
201 |
<GBFeature_location>106..144</GBFeature_location> |
|
202 |
<GBFeature_intervals> |
|
203 |
<GBInterval> |
|
204 |
<GBInterval_from>106</GBInterval_from> |
|
205 |
<GBInterval_to>144</GBInterval_to> |
|
206 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
207 |
</GBInterval> |
|
208 |
</GBFeature_intervals> |
|
209 |
<GBFeature_quals> |
|
210 |
<GBQualifier> |
|
211 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
212 |
<GBQualifier_value>LRR_4</GBQualifier_value> |
|
213 |
</GBQualifier> |
|
214 |
<GBQualifier> |
|
215 |
<GBQualifier_name>note</GBQualifier_name> |
|
216 |
<GBQualifier_value>Leucine Rich repeats (2 copies); pfam12799</GBQualifier_value> |
|
217 |
</GBQualifier> |
|
218 |
<GBQualifier> |
|
219 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
220 |
<GBQualifier_value>CDD:289563</GBQualifier_value> |
|
221 |
</GBQualifier> |
|
222 |
</GBFeature_quals> |
|
223 |
</GBFeature> |
|
224 |
<GBFeature> |
|
225 |
<GBFeature_key>Region</GBFeature_key> |
|
226 |
<GBFeature_location>107..130</GBFeature_location> |
|
227 |
<GBFeature_intervals> |
|
228 |
<GBInterval> |
|
229 |
<GBInterval_from>107</GBInterval_from> |
|
230 |
<GBInterval_to>130</GBInterval_to> |
|
231 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
232 |
</GBInterval> |
|
233 |
</GBFeature_intervals> |
|
234 |
<GBFeature_quals> |
|
235 |
<GBQualifier> |
|
236 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
237 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
238 |
</GBQualifier> |
|
239 |
<GBQualifier> |
|
240 |
<GBQualifier_name>note</GBQualifier_name> |
|
241 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
242 |
</GBQualifier> |
|
243 |
<GBQualifier> |
|
244 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
245 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
246 |
</GBQualifier> |
|
247 |
</GBFeature_quals> |
|
248 |
</GBFeature> |
|
249 |
<GBFeature> |
|
250 |
<GBFeature_key>Region</GBFeature_key> |
|
251 |
<GBFeature_location>131..155</GBFeature_location> |
|
252 |
<GBFeature_intervals> |
|
253 |
<GBInterval> |
|
254 |
<GBInterval_from>131</GBInterval_from> |
|
255 |
<GBInterval_to>155</GBInterval_to> |
|
256 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
257 |
</GBInterval> |
|
258 |
</GBFeature_intervals> |
|
259 |
<GBFeature_quals> |
|
260 |
<GBQualifier> |
|
261 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
262 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
263 |
</GBQualifier> |
|
264 |
<GBQualifier> |
|
265 |
<GBQualifier_name>note</GBQualifier_name> |
|
266 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
267 |
</GBQualifier> |
|
268 |
<GBQualifier> |
|
269 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
270 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
271 |
</GBQualifier> |
|
272 |
</GBFeature_quals> |
|
273 |
</GBFeature> |
|
274 |
<GBFeature> |
|
275 |
<GBFeature_key>Region</GBFeature_key> |
|
276 |
<GBFeature_location>156..179</GBFeature_location> |
|
277 |
<GBFeature_intervals> |
|
278 |
<GBInterval> |
|
279 |
<GBInterval_from>156</GBInterval_from> |
|
280 |
<GBInterval_to>179</GBInterval_to> |
|
281 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
282 |
</GBInterval> |
|
283 |
</GBFeature_intervals> |
|
284 |
<GBFeature_quals> |
|
285 |
<GBQualifier> |
|
286 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
287 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
288 |
</GBQualifier> |
|
289 |
<GBQualifier> |
|
290 |
<GBQualifier_name>note</GBQualifier_name> |
|
291 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
292 |
</GBQualifier> |
|
293 |
<GBQualifier> |
|
294 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
295 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
296 |
</GBQualifier> |
|
297 |
</GBFeature_quals> |
|
298 |
</GBFeature> |
|
299 |
<GBFeature> |
|
300 |
<GBFeature_key>Region</GBFeature_key> |
|
301 |
<GBFeature_location>180..199</GBFeature_location> |
|
302 |
<GBFeature_intervals> |
|
303 |
<GBInterval> |
|
304 |
<GBInterval_from>180</GBInterval_from> |
|
305 |
<GBInterval_to>199</GBInterval_to> |
|
306 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
307 |
</GBInterval> |
|
308 |
</GBFeature_intervals> |
|
309 |
<GBFeature_quals> |
|
310 |
<GBQualifier> |
|
311 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
312 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
313 |
</GBQualifier> |
|
314 |
<GBQualifier> |
|
315 |
<GBQualifier_name>note</GBQualifier_name> |
|
316 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
317 |
</GBQualifier> |
|
318 |
<GBQualifier> |
|
319 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
320 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
321 |
</GBQualifier> |
|
322 |
</GBFeature_quals> |
|
323 |
</GBFeature> |
|
324 |
<GBFeature> |
|
325 |
<GBFeature_key>Region</GBFeature_key> |
|
326 |
<GBFeature_location>355..>518</GBFeature_location> |
|
327 |
<GBFeature_intervals> |
|
328 |
<GBInterval> |
|
329 |
<GBInterval_from>355</GBInterval_from> |
|
330 |
<GBInterval_to>518</GBInterval_to> |
|
331 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
332 |
</GBInterval> |
|
333 |
</GBFeature_intervals> |
|
334 |
<GBFeature_partial3 value="true"/> |
|
335 |
<GBFeature_quals> |
|
336 |
<GBQualifier> |
|
337 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
338 |
<GBQualifier_value>LRR_RI</GBQualifier_value> |
|
339 |
</GBQualifier> |
|
340 |
<GBQualifier> |
|
341 |
<GBQualifier_name>note</GBQualifier_name> |
|
342 |
<GBQualifier_value>Leucine-rich repeats (LRRs), ribonuclease inhibitor (RI)-like subfamily. LRRs are 20-29 residue sequence motifs present in many proteins that participate in protein-protein interactions and have different functions and cellular locations. LRRs correspond...; cd00116</GBQualifier_value> |
|
343 |
</GBQualifier> |
|
344 |
<GBQualifier> |
|
345 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
346 |
<GBQualifier_value>CDD:238064</GBQualifier_value> |
|
347 |
</GBQualifier> |
|
348 |
</GBFeature_quals> |
|
349 |
</GBFeature> |
|
350 |
<GBFeature> |
|
351 |
<GBFeature_key>Region</GBFeature_key> |
|
352 |
<GBFeature_location>366..430</GBFeature_location> |
|
353 |
<GBFeature_intervals> |
|
354 |
<GBInterval> |
|
355 |
<GBInterval_from>366</GBInterval_from> |
|
356 |
<GBInterval_to>430</GBInterval_to> |
|
357 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
358 |
</GBInterval> |
|
359 |
</GBFeature_intervals> |
|
360 |
<GBFeature_quals> |
|
361 |
<GBQualifier> |
|
362 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
363 |
<GBQualifier_value>LRR_8</GBQualifier_value> |
|
364 |
</GBQualifier> |
|
365 |
<GBQualifier> |
|
366 |
<GBQualifier_name>note</GBQualifier_name> |
|
367 |
<GBQualifier_value>Leucine rich repeat; pfam13855</GBQualifier_value> |
|
368 |
</GBQualifier> |
|
369 |
<GBQualifier> |
|
370 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
371 |
<GBQualifier_value>CDD:290566</GBQualifier_value> |
|
372 |
</GBQualifier> |
|
373 |
</GBFeature_quals> |
|
374 |
</GBFeature> |
|
375 |
<GBFeature> |
|
376 |
<GBFeature_key>Region</GBFeature_key> |
|
377 |
<GBFeature_location>367..395</GBFeature_location> |
|
378 |
<GBFeature_intervals> |
|
379 |
<GBInterval> |
|
380 |
<GBInterval_from>367</GBInterval_from> |
|
381 |
<GBInterval_to>395</GBInterval_to> |
|
382 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
383 |
</GBInterval> |
|
384 |
</GBFeature_intervals> |
|
385 |
<GBFeature_quals> |
|
386 |
<GBQualifier> |
|
387 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
388 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
389 |
</GBQualifier> |
|
390 |
<GBQualifier> |
|
391 |
<GBQualifier_name>note</GBQualifier_name> |
|
392 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
393 |
</GBQualifier> |
|
394 |
<GBQualifier> |
|
395 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
396 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
397 |
</GBQualifier> |
|
398 |
</GBFeature_quals> |
|
399 |
</GBFeature> |
|
400 |
<GBFeature> |
|
401 |
<GBFeature_key>Region</GBFeature_key> |
|
402 |
<GBFeature_location>396..421</GBFeature_location> |
|
403 |
<GBFeature_intervals> |
|
404 |
<GBInterval> |
|
405 |
<GBInterval_from>396</GBInterval_from> |
|
406 |
<GBInterval_to>421</GBInterval_to> |
|
407 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
408 |
</GBInterval> |
|
409 |
</GBFeature_intervals> |
|
410 |
<GBFeature_quals> |
|
411 |
<GBQualifier> |
|
412 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
413 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
414 |
</GBQualifier> |
|
415 |
<GBQualifier> |
|
416 |
<GBQualifier_name>note</GBQualifier_name> |
|
417 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
418 |
</GBQualifier> |
|
419 |
<GBQualifier> |
|
420 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
421 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
422 |
</GBQualifier> |
|
423 |
</GBFeature_quals> |
|
424 |
</GBFeature> |
|
425 |
<GBFeature> |
|
426 |
<GBFeature_key>Region</GBFeature_key> |
|
427 |
<GBFeature_location>422..444</GBFeature_location> |
|
428 |
<GBFeature_intervals> |
|
429 |
<GBInterval> |
|
430 |
<GBInterval_from>422</GBInterval_from> |
|
431 |
<GBInterval_to>444</GBInterval_to> |
|
432 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
433 |
</GBInterval> |
|
434 |
</GBFeature_intervals> |
|
435 |
<GBFeature_quals> |
|
436 |
<GBQualifier> |
|
437 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
438 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
439 |
</GBQualifier> |
|
440 |
<GBQualifier> |
|
441 |
<GBQualifier_name>note</GBQualifier_name> |
|
442 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
443 |
</GBQualifier> |
|
444 |
<GBQualifier> |
|
445 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
446 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
447 |
</GBQualifier> |
|
448 |
</GBFeature_quals> |
|
449 |
</GBFeature> |
|
450 |
<GBFeature> |
|
451 |
<GBFeature_key>Region</GBFeature_key> |
|
452 |
<GBFeature_location>445..465</GBFeature_location> |
|
453 |
<GBFeature_intervals> |
|
454 |
<GBInterval> |
|
455 |
<GBInterval_from>445</GBInterval_from> |
|
456 |
<GBInterval_to>465</GBInterval_to> |
|
457 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
458 |
</GBInterval> |
|
459 |
</GBFeature_intervals> |
|
460 |
<GBFeature_quals> |
|
461 |
<GBQualifier> |
|
462 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
463 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
464 |
</GBQualifier> |
|
465 |
<GBQualifier> |
|
466 |
<GBQualifier_name>note</GBQualifier_name> |
|
467 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
468 |
</GBQualifier> |
|
469 |
<GBQualifier> |
|
470 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
471 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
472 |
</GBQualifier> |
|
473 |
</GBFeature_quals> |
|
474 |
</GBFeature> |
|
475 |
<GBFeature> |
|
476 |
<GBFeature_key>Region</GBFeature_key> |
|
477 |
<GBFeature_location>486..507</GBFeature_location> |
|
478 |
<GBFeature_intervals> |
|
479 |
<GBInterval> |
|
480 |
<GBInterval_from>486</GBInterval_from> |
|
481 |
<GBInterval_to>507</GBInterval_to> |
|
482 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
483 |
</GBInterval> |
|
484 |
</GBFeature_intervals> |
|
485 |
<GBFeature_quals> |
|
486 |
<GBQualifier> |
|
487 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
488 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
489 |
</GBQualifier> |
|
490 |
<GBQualifier> |
|
491 |
<GBQualifier_name>note</GBQualifier_name> |
|
492 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
493 |
</GBQualifier> |
|
494 |
<GBQualifier> |
|
495 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
496 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
497 |
</GBQualifier> |
|
498 |
</GBFeature_quals> |
|
499 |
</GBFeature> |
|
500 |
<GBFeature> |
|
501 |
<GBFeature_key>Region</GBFeature_key> |
|
502 |
<GBFeature_location>508..531</GBFeature_location> |
|
503 |
<GBFeature_intervals> |
|
504 |
<GBInterval> |
|
505 |
<GBInterval_from>508</GBInterval_from> |
|
506 |
<GBInterval_to>531</GBInterval_to> |
|
507 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
508 |
</GBInterval> |
|
509 |
</GBFeature_intervals> |
|
510 |
<GBFeature_quals> |
|
511 |
<GBQualifier> |
|
512 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
513 |
<GBQualifier_value>leucine-rich repeat</GBQualifier_value> |
|
514 |
</GBQualifier> |
|
515 |
<GBQualifier> |
|
516 |
<GBQualifier_name>note</GBQualifier_name> |
|
517 |
<GBQualifier_value>leucine-rich repeat [structural motif]</GBQualifier_value> |
|
518 |
</GBQualifier> |
|
519 |
<GBQualifier> |
|
520 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
521 |
<GBQualifier_value>CDD:275380</GBQualifier_value> |
|
522 |
</GBQualifier> |
|
523 |
</GBFeature_quals> |
|
524 |
</GBFeature> |
|
525 |
<GBFeature> |
|
526 |
<GBFeature_key>Region</GBFeature_key> |
|
527 |
<GBFeature_location>658..813</GBFeature_location> |
|
528 |
<GBFeature_intervals> |
|
529 |
<GBInterval> |
|
530 |
<GBInterval_from>658</GBInterval_from> |
|
531 |
<GBInterval_to>813</GBInterval_to> |
|
532 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
533 |
</GBInterval> |
|
534 |
</GBFeature_intervals> |
|
535 |
<GBFeature_quals> |
|
536 |
<GBQualifier> |
|
537 |
<GBQualifier_name>region_name</GBQualifier_name> |
|
538 |
<GBQualifier_value>TIR</GBQualifier_value> |
|
539 |
</GBQualifier> |
|
540 |
<GBQualifier> |
|
541 |
<GBQualifier_name>note</GBQualifier_name> |
|
542 |
<GBQualifier_value>Toll - interleukin 1 - resistance; smart00255</GBQualifier_value> |
|
543 |
</GBQualifier> |
|
544 |
<GBQualifier> |
|
545 |
<GBQualifier_name>db_xref</GBQualifier_name> |
|
546 |
<GBQualifier_value>CDD:214587</GBQualifier_value> |
|
547 |
</GBQualifier> |
|
548 |
</GBFeature_quals> |
|
549 |
</GBFeature> |
|
550 |
<GBFeature> |
|
551 |
<GBFeature_key>CDS</GBFeature_key> |
|
552 |
<GBFeature_location>1..821</GBFeature_location> |
|
553 |
<GBFeature_intervals> |
|
554 |
<GBInterval> |
|
555 |
<GBInterval_from>1</GBInterval_from> |
|
556 |
<GBInterval_to>821</GBInterval_to> |
|
557 |
<GBInterval_accession>AEB32453.1</GBInterval_accession> |
|
558 |
</GBInterval> |
|
559 |
</GBFeature_intervals> |
|
560 |
<GBFeature_quals> |
|
561 |
<GBQualifier> |
|
562 |
<GBQualifier_name>gene</GBQualifier_name> |
|
563 |
<GBQualifier_value>TLR2</GBQualifier_value> |
|
564 |
</GBQualifier> |
|
565 |
<GBQualifier> |
|
566 |
<GBQualifier_name>coded_by</GBQualifier_name> |
|
567 |
<GBQualifier_value>HM357230.1:379..2844</GBQualifier_value> |
|
568 |
</GBQualifier> |
|
569 |
<GBQualifier> |
|
570 |
<GBQualifier_name>transl_table</GBQualifier_name> |
|
571 |
<GBQualifier_value>1</GBQualifier_value> |
|
572 |
</GBQualifier> |
|
573 |
</GBFeature_quals> |
|
574 |
</GBFeature> |
|
575 |
</GBSeq_feature-table> |
|
576 |
<GBSeq_sequence>mrqptnlyfmvlflllslcwgqrsnpdgerpscdrcnrqlscncshggftrvptvtdraltldlsfnnitvvtaddlkghlrlralslhgnriavihpsafdslwsleeldlsnnqltalnhtwfsklgalrelnllnnpysclgsppvfqslvrlrrlrfggpaleelkrgdlsgvtqleeltvhannltryesgtlayvwplgcvtlslhspfltntslvsavlrdvsypetpliledihlignlsvqpfresarrrirkitfhnfrvsdeaivnllevldgvpitalivdnvtltgegrweparrsdlksvdeffvrntvvldvfkfvsflklgfllkyprkvslinsqvfvmpcvasqllvslqyldlsdnlltdmtleeslckgdsslkdlrvlnvsgnslkslsavsqlvtklsklthldisrngyismpagcswpstlrylnisgaklatvtpclpatlevldlsnnnlrsftlalpalrelhlsgskilrlppgrlfpnlqtltiqsnilymfarsdlqsysrlqdlqagqnkfvcscdfvsffqsaingggdmhltdgeesytcdspferhghlvgqvhpsvvechrvlfvsvscgvalfvgtllttvlwrlhafwylkmmwawlrakrssrrrrqrrdeegsegllsydafvsyserdaswvenflvpeleepsendgdsvnprtprpltlclhkrdflpghwivdniisamersrrtifilsenfvqsdwcryeldfshfqlfdenaagdaaililleplskddipkrfcklrklmssttylewpqdeersgefwrslrnalrgddeedd</GBSeq_sequence> |
|
577 |
</GBSeq> |
|
578 |
|
modules/dnet-dli/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/ResolveAndIndexJobNode.java | ||
---|---|---|
37 | 37 |
|
38 | 38 |
private static final String BASE_CFG_URL = "http://%s:9200/%s/scholix/%s/?pretty"; |
39 | 39 |
|
40 |
|
|
41 | 40 |
private String inputEprParam; |
42 | 41 |
|
43 | 42 |
private String indexHost; |
modules/dnet-dli/trunk/src/main/java/eu/dnetlib/dli/resolver/DataciteResolver.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.dli.resolver; |
2 | 2 |
|
3 |
import java.util.Arrays; |
|
4 |
import java.util.Collections; |
|
3 | 5 |
import java.util.List; |
6 |
import java.util.stream.Collectors; |
|
4 | 7 |
|
5 | 8 |
import com.google.common.collect.Lists; |
6 | 9 |
import com.google.gson.JsonArray; |
... | ... | |
8 | 11 |
import com.google.gson.JsonObject; |
9 | 12 |
import com.google.gson.JsonParser; |
10 | 13 |
import eu.dnetlib.dli.resolver.model.*; |
14 |
import eu.dnetlib.enabling.tools.DnetStreamSupport; |
|
11 | 15 |
import eu.dnetlib.pid.resolver.AbstractPIDResolver; |
12 | 16 |
import eu.dnetlib.pid.resolver.model.ObjectType; |
13 | 17 |
import eu.dnetlib.pid.resolver.model.SubjectType; |
... | ... | |
30 | 34 |
/** |
31 | 35 |
* The Constant baseURL. |
32 | 36 |
*/ |
33 |
private final static String baseURL = "http://search.datacite.org/api?wt=json&q=doi:";
|
|
37 |
private final static String baseURL = "https://api.datacite.org/works/";
|
|
34 | 38 |
|
35 |
private DLIResolvedObject parseResponse(final String response) { |
|
39 |
private static String getStringValue(final JsonObject root, final String key, final String defaultValue) { |
|
40 |
|
|
41 |
if (root.has(key) && !root.get(key).isJsonNull()) { |
|
42 |
return root.get(key).getAsString(); |
|
43 |
} |
|
44 |
return defaultValue; |
|
45 |
} |
|
46 |
|
|
47 |
public static DLIResolvedObject parseResponse(final String response) { |
|
36 | 48 |
if (response == null) return null; |
37 | 49 |
JsonElement jElement = new JsonParser().parse(response); |
38 | 50 |
JsonObject jobject = jElement.getAsJsonObject(); |
39 |
if (jobject.has("response")) {
|
|
51 |
if (jobject.has("data")) {
|
|
40 | 52 |
|
41 |
long total = jobject.get("response").getAsJsonObject().get("numFound").getAsLong(); |
|
42 |
|
|
43 |
if (total == 0) return null; |
|
44 | 53 |
DLIResolvedObject responseObj = new DLIResolvedObject(); |
54 |
final JsonObject root = jobject.getAsJsonObject("data").getAsJsonObject("attributes"); |
|
45 | 55 |
|
46 |
JsonElement hits = ((JsonObject) jobject.get("response")).get("docs"); |
|
56 |
final String doi = root.get("doi").getAsString(); |
|
57 |
responseObj.setPid(doi); |
|
58 |
responseObj.setPidType("doi"); |
|
59 |
responseObj.setType(ObjectType.dataset); |
|
47 | 60 |
|
48 |
JsonArray hitsObject = hits.getAsJsonArray();
|
|
61 |
final List<String> authors = Lists.newArrayList();
|
|
49 | 62 |
|
50 |
for (final JsonElement elem : hitsObject) { |
|
51 |
String doi = ((JsonObject) elem).get("doi").getAsString(); |
|
52 |
responseObj.setPid(doi); |
|
53 |
responseObj.setPidType("DOI"); |
|
54 |
responseObj.setType(ObjectType.dataset); |
|
55 |
List<String> authors = Lists.newArrayList(); |
|
56 |
List<String> titles = Lists.newArrayList(); |
|
57 |
List<SubjectType> subjects = Lists.newArrayList(); |
|
63 |
// ADDING TITLES |
|
58 | 64 |
|
65 |
if (root.has("title") && root.get("title").isJsonArray()) { |
|
66 |
responseObj.setTitles(DnetStreamSupport.generateStreamFromIterator(root.get("title").getAsJsonArray().iterator()) |
|
67 |
.map(JsonElement::toString) |
|
68 |
.collect(Collectors.toList())); |
|
69 |
} else if (root.has("title") && !root.get("title").isJsonNull()) { |
|
70 |
responseObj.setTitles(Collections.singletonList(root.get("title").getAsString())); |
|
71 |
} |
|
59 | 72 |
|
60 |
// ADDING SUBJECTS |
|
61 |
final JsonElement subjectElement = ((JsonObject) elem).get("subject"); |
|
62 |
if (subjectElement != null) { |
|
63 |
JsonArray subjectArray = subjectElement.getAsJsonArray(); |
|
64 |
for (int i = 0; i < subjectArray.size(); i++) { |
|
65 |
subjects.add(new SubjectType("unknown", subjectArray.get(i).getAsString())); |
|
66 |
} |
|
67 |
} |
|
68 |
responseObj.setSubjects(subjects); |
|
73 |
//ADDING DESCRIPTION |
|
74 |
if (root.has("description") && !root.get("description").isJsonNull()) |
|
75 |
responseObj.setDescription(root.get("description").getAsString()); |
|
69 | 76 |
|
70 |
// ADDING TITLES |
|
71 |
JsonElement titleElement = ((JsonObject) elem).get("title"); |
|
72 |
if (titleElement != null) { |
|
73 |
JsonArray titleArray = titleElement.getAsJsonArray(); |
|
74 |
for (int i = 0; i < titleArray.size(); i++) { |
|
75 |
titles.add(titleArray.get(i).getAsString()); |
|
76 |
} |
|
77 |
} |
|
78 |
responseObj.setTitles(titles); |
|
77 |
// ADDING AUTHORS |
|
78 |
if (root.has("author") && root.get("author").isJsonArray()) { |
|
79 | 79 |
|
80 |
//ADDING DESCRIPTION |
|
80 |
DnetStreamSupport.generateStreamFromIterator(root.getAsJsonArray("author").iterator()) |
|
81 |
.map(JsonElement::getAsJsonObject) |
|
82 |
.forEach(it -> { |
|
83 |
if (it.has("literal")) { |
|
84 |
authors.add(it.get("literal").getAsString()); |
|
85 |
} else { |
|
86 |
authors.add(getStringValue(it, "given", " ") + " " + getStringValue(it, "family", " ")); |
|
87 |
} |
|
88 |
}); |
|
89 |
} |
|
90 |
responseObj.setAuthors(authors); |
|
81 | 91 |
|
82 |
JsonElement descriptionElement = ((JsonObject) elem).get("description"); |
|
83 |
if (descriptionElement != null) { |
|
84 |
JsonArray descriptionArray = descriptionElement.getAsJsonArray(); |
|
85 |
if (descriptionArray.size() > 0) |
|
86 |
responseObj.setDescription(descriptionArray.get(0).getAsString()); |
|
87 |
} |
|
92 |
final String date = getStringValue(root, "registered", ""); |
|
93 |
responseObj.setDate(date); |
|
88 | 94 |
|
89 |
// ADDING AUTHORS |
|
90 |
JsonElement contributorElement = ((JsonObject) elem).get("contributor"); |
|
91 |
if (contributorElement != null) { |
|
92 |
JsonArray contributorArray = contributorElement.getAsJsonArray(); |
|
93 |
for (int i = 0; i < contributorArray.size(); i++) { |
|
94 |
authors.add(contributorArray.get(i).getAsString()); |
|
95 |
} |
|
96 |
} |
|
97 |
// ADDING AUTHORS |
|
98 |
JsonElement creatorElement = ((JsonObject) elem).get("creator"); |
|
99 |
if (creatorElement != null) { |
|
100 |
JsonArray creatorArray = creatorElement.getAsJsonArray(); |
|
101 |
for (int i = 0; i < creatorArray.size(); i++) { |
|
102 |
authors.add(creatorArray.get(i).getAsString()); |
|
103 |
} |
|
104 |
} |
|
105 |
responseObj.setAuthors(authors); |
|
95 |
final DLIObjectProvenance provenance = new DLIObjectProvenance(); |
|
96 |
DLIPIDResolver.setDatasourceProvenance(provenance, DATACITE_NS_PREFIX); |
|
106 | 97 |
|
107 |
final DLIObjectProvenance provenance = new DLIObjectProvenance(); |
|
108 |
DLIPIDResolver.setDatasourceProvenance(provenance, DATACITE_NS_PREFIX); |
|
109 | 98 |
|
110 |
final String dataCenter_symbol = ((JsonObject) elem).get("datacentre_symbol").getAsString(); |
|
111 |
final String datacenter = ((JsonObject) elem).get("datacentre").getAsString(); |
|
112 |
if (datacenter != null) { |
|
113 |
final String publisher = datacenter.replace(dataCenter_symbol, "").replace("-", "").trim(); |
|
114 |
if (publisher != null && publisher.length() > 0) { |
|
115 |
provenance.setPublisher(publisher); |
|
116 |
} |
|
117 |
} |
|
118 |
responseObj.setDatasourceProvenance(Lists.newArrayList(provenance)); |
|
119 |
responseObj.setCompletionStatus(CompletionStatus.complete.toString()); |
|
120 |
return responseObj; |
|
121 |
} |
|
122 |
return null; |
|
99 |
responseObj.setDatasourceProvenance(Lists.newArrayList(provenance)); |
|
100 |
responseObj.setCompletionStatus(CompletionStatus.complete.toString()); |
|
101 |
return responseObj; |
|
123 | 102 |
} |
124 | 103 |
return null; |
125 | 104 |
|
105 |
|
|
126 | 106 |
} |
127 | 107 |
|
108 |
|
|
128 | 109 |
@Override |
129 | 110 |
protected boolean canResolvePid(final String pidType) { |
130 | 111 |
return (pidType != null) && ("doi".equals(pidType.toLowerCase().trim()) || "handle".equals(pidType.toLowerCase().trim())); |
... | ... | |
132 | 113 |
} |
133 | 114 |
|
134 | 115 |
@Override |
135 |
protected DLIResolvedObject resolve(final String pid, final String pidType) {
|
|
116 |
public DLIResolvedObject resolve(final String pid, final String pidType) {
|
|
136 | 117 |
try { |
137 | 118 |
final String response = requestURL(baseURL + pid.replace(" ", "%20")); |
138 | 119 |
return parseResponse(response); |
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/TransformationRuleDSResources/oai_datacite_transform.xml | ||
---|---|---|
20 | 20 |
<xsl:value-of select="count(//*[local-name()='relatedIdentifier' and normalize-space()])"/> |
21 | 21 |
</xsl:param> |
22 | 22 |
<xsl:choose> |
23 |
|
|
24 | 23 |
<xsl:when test="$check=0 or //*[local-name() = 'resourceType']/@resourceTypeGeneral = 'Paper'"> |
25 | 24 |
<junk/> |
26 | 25 |
</xsl:when> |
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/TransformationRuleDSResources/elsevier_transform.xml | ||
---|---|---|
1 | 1 |
<RESOURCE_PROFILE> |
2 | 2 |
<HEADER> |
3 | 3 |
<RESOURCE_IDENTIFIER |
4 |
value="d6aa3c16-b6e8-4953-a39e-cb2ea99d2ba8_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
|
4 |
value="e6044c3c-ab51-4762-aeac-b12d2c18c3a9_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
|
5 | 5 |
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/> |
6 | 6 |
<RESOURCE_KIND value="TransformationRuleDSResources"/> |
7 | 7 |
<RESOURCE_URI value=""/> |
... | ... | |
11 | 11 |
<CONFIGURATION> |
12 | 12 |
<IMPORTED/> |
13 | 13 |
<SCRIPT> |
14 |
<TITLE>DLI: Elsevier to Scholix transform</TITLE> |
|
14 |
<TITLE>DLI: Elsevier CSV to Scholix transform</TITLE>
|
|
15 | 15 |
<CODE><![CDATA[<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
16 | 16 |
xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" |
17 | 17 |
xmlns:oaf="http://namespace.dnet.eu/oaf" |
... | ... | |
44 | 44 |
</identifiers> |
45 | 45 |
</linkProvider> |
46 | 46 |
<relashionship> |
47 |
<name>unknown</name>
|
|
47 |
<name><xsl:value-of select="//*[local-name()='column' and ./@name='relationship']"/></name>
|
|
48 | 48 |
<schema>datacite</schema> |
49 |
<inverseRelashionship>unknown</inverseRelashionship>
|
|
49 |
<inverseRelashionship><xsl:value-of select="dnet:getInverse(//*[local-name()='column' and ./@name='relationship'])"/></inverseRelashionship>
|
|
50 | 50 |
</relashionship> |
51 | 51 |
<source> |
52 | 52 |
<identifier> |
53 | 53 |
<identifier> |
54 |
<xsl:value-of select="//column[./@name='ArticleID']"/>
|
|
54 |
<xsl:value-of select="lower-case(//column[./@name='pid'])"/>
|
|
55 | 55 |
</identifier> |
56 | 56 |
<schema>doi</schema> |
57 | 57 |
</identifier> |
58 | 58 |
<objectType> |
59 |
<type>publication</type>
|
|
59 |
<type>unknown</type>
|
|
60 | 60 |
</objectType> |
61 | 61 |
</source> |
62 | 62 |
<target> |
63 | 63 |
<identifier> |
64 | 64 |
<identifier> |
65 |
<xsl:value-of select="//column[./@name='datasetID']"/>
|
|
65 |
<xsl:value-of select="lower-case(//column[./@name='relatedIdentifier'])"/>
|
|
66 | 66 |
</identifier> |
67 | 67 |
<schema> |
68 |
<xsl:value-of select="//column[./@name='db']"/>
|
|
68 |
<xsl:value-of select="lower-case(//column[./@name='type'])"/>
|
|
69 | 69 |
</schema> |
70 | 70 |
</identifier> |
71 | 71 |
<objectType> |
72 |
<type>dataset</type>
|
|
72 |
<type>unknown</type>
|
|
73 | 73 |
</objectType> |
74 | 74 |
</target> |
75 | 75 |
</link> |
Also available in: Unified diff
changed Datacite Resolver