Revision 55561
Added by Alessia Bardi almost 5 years ago
JRRPublisher.java | ||
---|---|---|
10 | 10 |
import eu.dnetlib.parthenos.catalogue.CatalogueRegistrator; |
11 | 11 |
import eu.dnetlib.parthenos.publisher.ParthenosPublisherException; |
12 | 12 |
import eu.dnetlib.parthenos.rdf.RecordParserHelper; |
13 |
import eu.dnetlib.parthenos.registry.GCubeResourceRegistrator; |
|
14 | 13 |
import org.apache.commons.io.IOUtils; |
15 | 14 |
import org.apache.commons.lang3.StringUtils; |
16 | 15 |
import org.apache.commons.logging.Log; |
... | ... | |
19 | 18 |
import org.apache.jena.ontology.OntModelSpec; |
20 | 19 |
import org.apache.jena.rdf.model.*; |
21 | 20 |
import org.apache.jena.vocabulary.RDF; |
22 |
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; |
|
23 | 21 |
import org.springframework.beans.factory.annotation.Autowired; |
24 | 22 |
import org.springframework.stereotype.Component; |
25 | 23 |
|
... | ... | |
40 | 38 |
|
41 | 39 |
@Autowired |
42 | 40 |
private CatalogueRegistrator catalogueRegistrator; |
41 |
//@Autowired |
|
42 |
//private GCubeResourceRegistrator gCubeResourceRegistrator; |
|
43 | 43 |
@Autowired |
44 |
private GCubeResourceRegistrator gCubeResourceRegistrator; |
|
45 |
@Autowired |
|
46 | 44 |
private RecordParserHelper recordParserHelper; |
47 | 45 |
|
48 | 46 |
@PostConstruct |
... | ... | |
54 | 52 |
} |
55 | 53 |
|
56 | 54 |
public void register(final String record) |
57 |
throws ParthenosPublisherException, IOException, ResourceRegistryException, URISyntaxException, InterruptedException {
|
|
55 |
throws ParthenosPublisherException, IOException, URISyntaxException, InterruptedException { |
|
58 | 56 |
String id = recordParserHelper.getObjIdentifier(record); |
59 | 57 |
String datasourceName = recordParserHelper.getDatasourceName(record); |
60 | 58 |
//objIdentifier contains the subject URI used to get the RDF: that is the only resource we have to register when processing this rdf file! |
... | ... | |
134 | 132 |
return catalogueRegistrator.register(rdfResource, type, datasourceName); |
135 | 133 |
} |
136 | 134 |
|
135 |
/* |
|
137 | 136 |
protected void registerOnRegistry(final Resource rdfResource, final String uuid, final Resource type) |
138 | 137 |
throws ParthenosPublisherException, ResourceRegistryException, IOException { |
139 | 138 |
gCubeResourceRegistrator.register(rdfResource, uuid, type); |
140 | 139 |
} |
140 |
*/ |
|
141 | 141 |
|
142 | 142 |
protected InfModel loadBaseModel() { |
143 | 143 |
return ModelFactory.createRDFSModel(baseModel); |
Also available in: Unified diff
Removed dep to gcube registry and ignore integration tests