Revision 48991
Added by Claudio Atzori over 6 years ago
DbmfToHbaseXsltFunctions.java | ||
---|---|---|
16 | 16 |
import eu.dnetlib.data.proto.OafProtos.OafRel; |
17 | 17 |
import eu.dnetlib.data.proto.OrganizationProtos.Organization; |
18 | 18 |
import eu.dnetlib.data.proto.PersonProtos.Person; |
19 |
import eu.dnetlib.data.proto.PersonResultProtos.PersonResult; |
|
20 |
import eu.dnetlib.data.proto.PersonResultProtos.PersonResult.Authorship; |
|
21 | 19 |
import eu.dnetlib.data.proto.ProjectOrganizationProtos.ProjectOrganization; |
22 | 20 |
import eu.dnetlib.data.proto.ProjectOrganizationProtos.ProjectOrganization.Participation; |
23 |
import eu.dnetlib.data.proto.ProjectPersonProtos.ProjectPerson; |
|
24 |
import eu.dnetlib.data.proto.ProjectPersonProtos.ProjectPerson.ContactPerson; |
|
25 | 21 |
import eu.dnetlib.data.proto.ProjectProtos.Project; |
26 | 22 |
import eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata; |
27 | 23 |
import eu.dnetlib.data.proto.RelTypeProtos.RelType; |
... | ... | |
105 | 101 |
DatasourceOrganization.Builder dorg = DatasourceOrganization.newBuilder().setProvision(provision); |
106 | 102 |
|
107 | 103 |
return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.provision, relClass, collectedFromId, collectedFromName, false, dorg, provision); |
108 |
case personResult: |
|
109 |
Authorship.Builder auth = Authorship.newBuilder().setRelMetadata( |
|
110 |
RelMetadata.newBuilder().setSemantics(getSimpleQualifier(Authorship.RelName.valueOf(relClass).toString(), relScheme))); |
|
111 |
PersonResult.Builder personResult = PersonResult.newBuilder().setAuthorship(auth); |
|
112 |
|
|
113 |
return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.authorship, relClass, collectedFromId, collectedFromName, false, personResult, auth); |
|
114 |
case projectPerson: |
|
115 |
ContactPerson.Builder contact = ContactPerson.newBuilder().setRelMetadata( |
|
116 |
RelMetadata.newBuilder().setSemantics(getSimpleQualifier(ContactPerson.RelName.valueOf(relClass).toString(), relScheme))); |
|
117 |
ProjectPerson.Builder projectPerson = ProjectPerson.newBuilder().setContactPerson(contact); |
|
118 |
|
|
119 |
return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.contactPerson, relClass, collectedFromId, collectedFromName, false, projectPerson, contact); |
|
120 | 104 |
case projectOrganization: |
121 | 105 |
Participation.Builder participant = Participation.newBuilder().setRelMetadata( |
122 | 106 |
RelMetadata.newBuilder().setSemantics(getSimpleQualifier(Participation.RelName.valueOf(relClass).toString(), relScheme))); |
Also available in: Unified diff
depending on protobuf specific version, getting rid of person entities, updated solrj version