1
0
Fork 0

implementation of the decisional tree, addition of the dnet-openaire-data-protos module, definition of the person proto, blockprocessor and paceconfig modified with addition of support for the tree processing

This commit is contained in:
Michele De Bonis 2018-12-12 16:30:03 +01:00
parent 3d4372ced9
commit 39613dbbd6
60 changed files with 58893 additions and 46 deletions

View File

@ -0,0 +1,2 @@
{"type_source": "SVN", "goal": "package -U source:jar",
"url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-openaire-data-protos/trunk/", "deploy_repository": "dnet45-snapshots", "version": "4", "mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it", "deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-snapshots", "name": "dnet-openaire-data-protos"}

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet45-parent</artifactId>
<version>1.0.0</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-openaire-data-protos</artifactId>
<packaging>jar</packaging>
<version>3.9.4-CUSTOM</version>
<properties>
<!-- defined also in dnet-parent, here in case we need to override -->
<google.protobuf.version>2.4.1</google.protobuf.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>dnet4-bootstrap-release</id>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet4-bootstrap-release/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>eu.dnetlib</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<protocVersion>${google.protobuf.version}</protocVersion>
<inputDirectories>
<include>src/main/resources</include>
</inputDirectories>
<outputDirectory>src/gen/java</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${google.protobuf.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,564 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Dedup.proto
package eu.dnetlib.data.proto;
public final class DedupProtos {
private DedupProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface DedupOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
boolean hasRelMetadata();
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata();
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder();
}
public static final class Dedup extends
com.google.protobuf.GeneratedMessage
implements DedupOrBuilder {
// Use Dedup.newBuilder() to construct.
private Dedup(Builder builder) {
super(builder);
}
private Dedup(boolean noInit) {}
private static final Dedup defaultInstance;
public static Dedup getDefaultInstance() {
return defaultInstance;
}
public Dedup getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable;
}
public enum RelName
implements com.google.protobuf.ProtocolMessageEnum {
isMergedIn(0, 1),
merges(1, 2),
;
public static final int isMergedIn_VALUE = 1;
public static final int merges_VALUE = 2;
public final int getNumber() { return value; }
public static RelName valueOf(int value) {
switch (value) {
case 1: return isMergedIn;
case 2: return merges;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<RelName>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<RelName>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<RelName>() {
public RelName findValueByNumber(int number) {
return RelName.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.DedupProtos.Dedup.getDescriptor().getEnumTypes().get(0);
}
private static final RelName[] VALUES = {
isMergedIn, merges,
};
public static RelName valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private RelName(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.Dedup.RelName)
}
private int bitField0_;
// required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
public static final int RELMETADATA_FIELD_NUMBER = 1;
private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata relMetadata_;
public boolean hasRelMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata() {
return relMetadata_;
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder() {
return relMetadata_;
}
private void initFields() {
relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (!hasRelMetadata()) {
memoizedIsInitialized = 0;
return false;
}
if (!getRelMetadata().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, relMetadata_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, relMetadata_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(eu.dnetlib.data.proto.DedupProtos.Dedup prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder>
implements eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable;
}
// Construct using eu.dnetlib.data.proto.DedupProtos.Dedup.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getRelMetadataFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (relMetadataBuilder_ == null) {
relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
} else {
relMetadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return eu.dnetlib.data.proto.DedupProtos.Dedup.getDescriptor();
}
public eu.dnetlib.data.proto.DedupProtos.Dedup getDefaultInstanceForType() {
return eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance();
}
public eu.dnetlib.data.proto.DedupProtos.Dedup build() {
eu.dnetlib.data.proto.DedupProtos.Dedup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private eu.dnetlib.data.proto.DedupProtos.Dedup buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
eu.dnetlib.data.proto.DedupProtos.Dedup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return result;
}
public eu.dnetlib.data.proto.DedupProtos.Dedup buildPartial() {
eu.dnetlib.data.proto.DedupProtos.Dedup result = new eu.dnetlib.data.proto.DedupProtos.Dedup(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (relMetadataBuilder_ == null) {
result.relMetadata_ = relMetadata_;
} else {
result.relMetadata_ = relMetadataBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof eu.dnetlib.data.proto.DedupProtos.Dedup) {
return mergeFrom((eu.dnetlib.data.proto.DedupProtos.Dedup)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(eu.dnetlib.data.proto.DedupProtos.Dedup other) {
if (other == eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance()) return this;
if (other.hasRelMetadata()) {
mergeRelMetadata(other.getRelMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasRelMetadata()) {
return false;
}
if (!getRelMetadata().isInitialized()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(
this.getUnknownFields());
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
}
break;
}
case 10: {
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder subBuilder = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder();
if (hasRelMetadata()) {
subBuilder.mergeFrom(getRelMetadata());
}
input.readMessage(subBuilder, extensionRegistry);
setRelMetadata(subBuilder.buildPartial());
break;
}
}
}
}
private int bitField0_;
// required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder> relMetadataBuilder_;
public boolean hasRelMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata() {
if (relMetadataBuilder_ == null) {
return relMetadata_;
} else {
return relMetadataBuilder_.getMessage();
}
}
public Builder setRelMetadata(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata value) {
if (relMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
relMetadata_ = value;
onChanged();
} else {
relMetadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder setRelMetadata(
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder builderForValue) {
if (relMetadataBuilder_ == null) {
relMetadata_ = builderForValue.build();
onChanged();
} else {
relMetadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
public Builder mergeRelMetadata(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata value) {
if (relMetadataBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
relMetadata_ != eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance()) {
relMetadata_ =
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder(relMetadata_).mergeFrom(value).buildPartial();
} else {
relMetadata_ = value;
}
onChanged();
} else {
relMetadataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder clearRelMetadata() {
if (relMetadataBuilder_ == null) {
relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
onChanged();
} else {
relMetadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder getRelMetadataBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getRelMetadataFieldBuilder().getBuilder();
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder() {
if (relMetadataBuilder_ != null) {
return relMetadataBuilder_.getMessageOrBuilder();
} else {
return relMetadata_;
}
}
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder>
getRelMetadataFieldBuilder() {
if (relMetadataBuilder_ == null) {
relMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder>(
relMetadata_,
getParentForChildren(),
isClean());
relMetadata_ = null;
}
return relMetadataBuilder_;
}
// @@protoc_insertion_point(builder_scope:eu.dnetlib.data.proto.Dedup)
}
static {
defaultInstance = new Dedup(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.Dedup)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_eu_dnetlib_data_proto_Dedup_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\013Dedup.proto\022\025eu.dnetlib.data.proto\032\021Re" +
"lMetadata.proto\"g\n\005Dedup\0227\n\013relMetadata\030" +
"\001 \002(\0132\".eu.dnetlib.data.proto.RelMetadat" +
"a\"%\n\007RelName\022\016\n\nisMergedIn\020\001\022\n\n\006merges\020\002" +
"B$\n\025eu.dnetlib.data.protoB\013DedupProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
internal_static_eu_dnetlib_data_proto_Dedup_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_eu_dnetlib_data_proto_Dedup_descriptor,
new java.lang.String[] { "RelMetadata", },
eu.dnetlib.data.proto.DedupProtos.Dedup.class,
eu.dnetlib.data.proto.DedupProtos.Dedup.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
eu.dnetlib.data.proto.RelMetadataProtos.getDescriptor(),
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,562 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: DedupSimilarity.proto
package eu.dnetlib.data.proto;
public final class DedupSimilarityProtos {
private DedupSimilarityProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface DedupSimilarityOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
boolean hasRelMetadata();
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata();
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder();
}
public static final class DedupSimilarity extends
com.google.protobuf.GeneratedMessage
implements DedupSimilarityOrBuilder {
// Use DedupSimilarity.newBuilder() to construct.
private DedupSimilarity(Builder builder) {
super(builder);
}
private DedupSimilarity(boolean noInit) {}
private static final DedupSimilarity defaultInstance;
public static DedupSimilarity getDefaultInstance() {
return defaultInstance;
}
public DedupSimilarity getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.internal_static_eu_dnetlib_data_proto_DedupSimilarity_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.internal_static_eu_dnetlib_data_proto_DedupSimilarity_fieldAccessorTable;
}
public enum RelName
implements com.google.protobuf.ProtocolMessageEnum {
isSimilarTo(0, 1),
;
public static final int isSimilarTo_VALUE = 1;
public final int getNumber() { return value; }
public static RelName valueOf(int value) {
switch (value) {
case 1: return isSimilarTo;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<RelName>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<RelName>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<RelName>() {
public RelName findValueByNumber(int number) {
return RelName.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDescriptor().getEnumTypes().get(0);
}
private static final RelName[] VALUES = {
isSimilarTo,
};
public static RelName valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private RelName(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.DedupSimilarity.RelName)
}
private int bitField0_;
// required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
public static final int RELMETADATA_FIELD_NUMBER = 1;
private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata relMetadata_;
public boolean hasRelMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata() {
return relMetadata_;
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder() {
return relMetadata_;
}
private void initFields() {
relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (!hasRelMetadata()) {
memoizedIsInitialized = 0;
return false;
}
if (!getRelMetadata().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, relMetadata_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, relMetadata_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder>
implements eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.internal_static_eu_dnetlib_data_proto_DedupSimilarity_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.internal_static_eu_dnetlib_data_proto_DedupSimilarity_fieldAccessorTable;
}
// Construct using eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getRelMetadataFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (relMetadataBuilder_ == null) {
relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
} else {
relMetadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDescriptor();
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity getDefaultInstanceForType() {
return eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance();
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity build() {
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return result;
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity buildPartial() {
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity result = new eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (relMetadataBuilder_ == null) {
result.relMetadata_ = relMetadata_;
} else {
result.relMetadata_ = relMetadataBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity) {
return mergeFrom((eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity other) {
if (other == eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance()) return this;
if (other.hasRelMetadata()) {
mergeRelMetadata(other.getRelMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasRelMetadata()) {
return false;
}
if (!getRelMetadata().isInitialized()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(
this.getUnknownFields());
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
}
break;
}
case 10: {
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder subBuilder = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder();
if (hasRelMetadata()) {
subBuilder.mergeFrom(getRelMetadata());
}
input.readMessage(subBuilder, extensionRegistry);
setRelMetadata(subBuilder.buildPartial());
break;
}
}
}
}
private int bitField0_;
// required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder> relMetadataBuilder_;
public boolean hasRelMetadata() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata() {
if (relMetadataBuilder_ == null) {
return relMetadata_;
} else {
return relMetadataBuilder_.getMessage();
}
}
public Builder setRelMetadata(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata value) {
if (relMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
relMetadata_ = value;
onChanged();
} else {
relMetadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder setRelMetadata(
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder builderForValue) {
if (relMetadataBuilder_ == null) {
relMetadata_ = builderForValue.build();
onChanged();
} else {
relMetadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
public Builder mergeRelMetadata(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata value) {
if (relMetadataBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
relMetadata_ != eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance()) {
relMetadata_ =
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder(relMetadata_).mergeFrom(value).buildPartial();
} else {
relMetadata_ = value;
}
onChanged();
} else {
relMetadataBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder clearRelMetadata() {
if (relMetadataBuilder_ == null) {
relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
onChanged();
} else {
relMetadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder getRelMetadataBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getRelMetadataFieldBuilder().getBuilder();
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder() {
if (relMetadataBuilder_ != null) {
return relMetadataBuilder_.getMessageOrBuilder();
} else {
return relMetadata_;
}
}
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder>
getRelMetadataFieldBuilder() {
if (relMetadataBuilder_ == null) {
relMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder>(
relMetadata_,
getParentForChildren(),
isClean());
relMetadata_ = null;
}
return relMetadataBuilder_;
}
// @@protoc_insertion_point(builder_scope:eu.dnetlib.data.proto.DedupSimilarity)
}
static {
defaultInstance = new DedupSimilarity(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.DedupSimilarity)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_eu_dnetlib_data_proto_DedupSimilarity_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_eu_dnetlib_data_proto_DedupSimilarity_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\025DedupSimilarity.proto\022\025eu.dnetlib.data" +
".proto\032\021RelMetadata.proto\"f\n\017DedupSimila" +
"rity\0227\n\013relMetadata\030\001 \002(\0132\".eu.dnetlib.d" +
"ata.proto.RelMetadata\"\032\n\007RelName\022\017\n\013isSi" +
"milarTo\020\001B.\n\025eu.dnetlib.data.protoB\025Dedu" +
"pSimilarityProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
internal_static_eu_dnetlib_data_proto_DedupSimilarity_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_eu_dnetlib_data_proto_DedupSimilarity_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_eu_dnetlib_data_proto_DedupSimilarity_descriptor,
new java.lang.String[] { "RelMetadata", },
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.class,
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
eu.dnetlib.data.proto.RelMetadataProtos.getDescriptor(),
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,108 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Kind.proto
package eu.dnetlib.data.proto;
public final class KindProtos {
private KindProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public enum Kind
implements com.google.protobuf.ProtocolMessageEnum {
entity(0, 1),
relation(1, 2),
;
public static final int entity_VALUE = 1;
public static final int relation_VALUE = 2;
public final int getNumber() { return value; }
public static Kind valueOf(int value) {
switch (value) {
case 1: return entity;
case 2: return relation;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<Kind>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<Kind>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<Kind>() {
public Kind findValueByNumber(int number) {
return Kind.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.KindProtos.getDescriptor().getEnumTypes().get(0);
}
private static final Kind[] VALUES = {
entity, relation,
};
public static Kind valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Kind(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.Kind)
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\nKind.proto\022\025eu.dnetlib.data.proto* \n\004K" +
"ind\022\n\n\006entity\020\001\022\014\n\010relation\020\002B#\n\025eu.dnet" +
"lib.data.protoB\nKindProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,651 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Organization_Organization.proto
package eu.dnetlib.data.proto;
public final class OrganizationOrganizationProtos {
private OrganizationOrganizationProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface OrganizationOrganizationOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .eu.dnetlib.data.proto.Dedup dedup = 1;
boolean hasDedup();
eu.dnetlib.data.proto.DedupProtos.Dedup getDedup();
eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder getDedupOrBuilder();
// optional .eu.dnetlib.data.proto.DedupSimilarity dedupSimilarity = 2;
boolean hasDedupSimilarity();
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity getDedupSimilarity();
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder getDedupSimilarityOrBuilder();
}
public static final class OrganizationOrganization extends
com.google.protobuf.GeneratedMessage
implements OrganizationOrganizationOrBuilder {
// Use OrganizationOrganization.newBuilder() to construct.
private OrganizationOrganization(Builder builder) {
super(builder);
}
private OrganizationOrganization(boolean noInit) {}
private static final OrganizationOrganization defaultInstance;
public static OrganizationOrganization getDefaultInstance() {
return defaultInstance;
}
public OrganizationOrganization getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.OrganizationOrganizationProtos.internal_static_eu_dnetlib_data_proto_OrganizationOrganization_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.OrganizationOrganizationProtos.internal_static_eu_dnetlib_data_proto_OrganizationOrganization_fieldAccessorTable;
}
private int bitField0_;
// optional .eu.dnetlib.data.proto.Dedup dedup = 1;
public static final int DEDUP_FIELD_NUMBER = 1;
private eu.dnetlib.data.proto.DedupProtos.Dedup dedup_;
public boolean hasDedup() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.DedupProtos.Dedup getDedup() {
return dedup_;
}
public eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder getDedupOrBuilder() {
return dedup_;
}
// optional .eu.dnetlib.data.proto.DedupSimilarity dedupSimilarity = 2;
public static final int DEDUPSIMILARITY_FIELD_NUMBER = 2;
private eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity dedupSimilarity_;
public boolean hasDedupSimilarity() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity getDedupSimilarity() {
return dedupSimilarity_;
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder getDedupSimilarityOrBuilder() {
return dedupSimilarity_;
}
private void initFields() {
dedup_ = eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance();
dedupSimilarity_ = eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (hasDedup()) {
if (!getDedup().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasDedupSimilarity()) {
if (!getDedupSimilarity().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, dedup_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, dedupSimilarity_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, dedup_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, dedupSimilarity_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder>
implements eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganizationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.OrganizationOrganizationProtos.internal_static_eu_dnetlib_data_proto_OrganizationOrganization_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.OrganizationOrganizationProtos.internal_static_eu_dnetlib_data_proto_OrganizationOrganization_fieldAccessorTable;
}
// Construct using eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getDedupFieldBuilder();
getDedupSimilarityFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (dedupBuilder_ == null) {
dedup_ = eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance();
} else {
dedupBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (dedupSimilarityBuilder_ == null) {
dedupSimilarity_ = eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance();
} else {
dedupSimilarityBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization.getDescriptor();
}
public eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization getDefaultInstanceForType() {
return eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization.getDefaultInstance();
}
public eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization build() {
eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return result;
}
public eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization buildPartial() {
eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization result = new eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (dedupBuilder_ == null) {
result.dedup_ = dedup_;
} else {
result.dedup_ = dedupBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (dedupSimilarityBuilder_ == null) {
result.dedupSimilarity_ = dedupSimilarity_;
} else {
result.dedupSimilarity_ = dedupSimilarityBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization) {
return mergeFrom((eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization other) {
if (other == eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization.getDefaultInstance()) return this;
if (other.hasDedup()) {
mergeDedup(other.getDedup());
}
if (other.hasDedupSimilarity()) {
mergeDedupSimilarity(other.getDedupSimilarity());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (hasDedup()) {
if (!getDedup().isInitialized()) {
return false;
}
}
if (hasDedupSimilarity()) {
if (!getDedupSimilarity().isInitialized()) {
return false;
}
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(
this.getUnknownFields());
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
}
break;
}
case 10: {
eu.dnetlib.data.proto.DedupProtos.Dedup.Builder subBuilder = eu.dnetlib.data.proto.DedupProtos.Dedup.newBuilder();
if (hasDedup()) {
subBuilder.mergeFrom(getDedup());
}
input.readMessage(subBuilder, extensionRegistry);
setDedup(subBuilder.buildPartial());
break;
}
case 18: {
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder subBuilder = eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.newBuilder();
if (hasDedupSimilarity()) {
subBuilder.mergeFrom(getDedupSimilarity());
}
input.readMessage(subBuilder, extensionRegistry);
setDedupSimilarity(subBuilder.buildPartial());
break;
}
}
}
}
private int bitField0_;
// optional .eu.dnetlib.data.proto.Dedup dedup = 1;
private eu.dnetlib.data.proto.DedupProtos.Dedup dedup_ = eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.DedupProtos.Dedup, eu.dnetlib.data.proto.DedupProtos.Dedup.Builder, eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder> dedupBuilder_;
public boolean hasDedup() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.DedupProtos.Dedup getDedup() {
if (dedupBuilder_ == null) {
return dedup_;
} else {
return dedupBuilder_.getMessage();
}
}
public Builder setDedup(eu.dnetlib.data.proto.DedupProtos.Dedup value) {
if (dedupBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dedup_ = value;
onChanged();
} else {
dedupBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder setDedup(
eu.dnetlib.data.proto.DedupProtos.Dedup.Builder builderForValue) {
if (dedupBuilder_ == null) {
dedup_ = builderForValue.build();
onChanged();
} else {
dedupBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
public Builder mergeDedup(eu.dnetlib.data.proto.DedupProtos.Dedup value) {
if (dedupBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
dedup_ != eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance()) {
dedup_ =
eu.dnetlib.data.proto.DedupProtos.Dedup.newBuilder(dedup_).mergeFrom(value).buildPartial();
} else {
dedup_ = value;
}
onChanged();
} else {
dedupBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder clearDedup() {
if (dedupBuilder_ == null) {
dedup_ = eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance();
onChanged();
} else {
dedupBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public eu.dnetlib.data.proto.DedupProtos.Dedup.Builder getDedupBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getDedupFieldBuilder().getBuilder();
}
public eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder getDedupOrBuilder() {
if (dedupBuilder_ != null) {
return dedupBuilder_.getMessageOrBuilder();
} else {
return dedup_;
}
}
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.DedupProtos.Dedup, eu.dnetlib.data.proto.DedupProtos.Dedup.Builder, eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder>
getDedupFieldBuilder() {
if (dedupBuilder_ == null) {
dedupBuilder_ = new com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.DedupProtos.Dedup, eu.dnetlib.data.proto.DedupProtos.Dedup.Builder, eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder>(
dedup_,
getParentForChildren(),
isClean());
dedup_ = null;
}
return dedupBuilder_;
}
// optional .eu.dnetlib.data.proto.DedupSimilarity dedupSimilarity = 2;
private eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity dedupSimilarity_ = eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity, eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder, eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder> dedupSimilarityBuilder_;
public boolean hasDedupSimilarity() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity getDedupSimilarity() {
if (dedupSimilarityBuilder_ == null) {
return dedupSimilarity_;
} else {
return dedupSimilarityBuilder_.getMessage();
}
}
public Builder setDedupSimilarity(eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity value) {
if (dedupSimilarityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dedupSimilarity_ = value;
onChanged();
} else {
dedupSimilarityBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
public Builder setDedupSimilarity(
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder builderForValue) {
if (dedupSimilarityBuilder_ == null) {
dedupSimilarity_ = builderForValue.build();
onChanged();
} else {
dedupSimilarityBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
public Builder mergeDedupSimilarity(eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity value) {
if (dedupSimilarityBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
dedupSimilarity_ != eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance()) {
dedupSimilarity_ =
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.newBuilder(dedupSimilarity_).mergeFrom(value).buildPartial();
} else {
dedupSimilarity_ = value;
}
onChanged();
} else {
dedupSimilarityBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
public Builder clearDedupSimilarity() {
if (dedupSimilarityBuilder_ == null) {
dedupSimilarity_ = eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.getDefaultInstance();
onChanged();
} else {
dedupSimilarityBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder getDedupSimilarityBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getDedupSimilarityFieldBuilder().getBuilder();
}
public eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder getDedupSimilarityOrBuilder() {
if (dedupSimilarityBuilder_ != null) {
return dedupSimilarityBuilder_.getMessageOrBuilder();
} else {
return dedupSimilarity_;
}
}
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity, eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder, eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder>
getDedupSimilarityFieldBuilder() {
if (dedupSimilarityBuilder_ == null) {
dedupSimilarityBuilder_ = new com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity, eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarity.Builder, eu.dnetlib.data.proto.DedupSimilarityProtos.DedupSimilarityOrBuilder>(
dedupSimilarity_,
getParentForChildren(),
isClean());
dedupSimilarity_ = null;
}
return dedupSimilarityBuilder_;
}
// @@protoc_insertion_point(builder_scope:eu.dnetlib.data.proto.OrganizationOrganization)
}
static {
defaultInstance = new OrganizationOrganization(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.OrganizationOrganization)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_eu_dnetlib_data_proto_OrganizationOrganization_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_eu_dnetlib_data_proto_OrganizationOrganization_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\037Organization_Organization.proto\022\025eu.dn" +
"etlib.data.proto\032\021RelMetadata.proto\032\013Ded" +
"up.proto\032\025DedupSimilarity.proto\"\210\001\n\030Orga" +
"nizationOrganization\022+\n\005dedup\030\001 \001(\0132\034.eu" +
".dnetlib.data.proto.Dedup\022?\n\017dedupSimila" +
"rity\030\002 \001(\0132&.eu.dnetlib.data.proto.Dedup" +
"SimilarityB7\n\025eu.dnetlib.data.protoB\036Org" +
"anizationOrganizationProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
internal_static_eu_dnetlib_data_proto_OrganizationOrganization_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_eu_dnetlib_data_proto_OrganizationOrganization_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_eu_dnetlib_data_proto_OrganizationOrganization_descriptor,
new java.lang.String[] { "Dedup", "DedupSimilarity", },
eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization.class,
eu.dnetlib.data.proto.OrganizationOrganizationProtos.OrganizationOrganization.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
eu.dnetlib.data.proto.RelMetadataProtos.getDescriptor(),
eu.dnetlib.data.proto.DedupProtos.getDescriptor(),
eu.dnetlib.data.proto.DedupSimilarityProtos.getDescriptor(),
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,680 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: RelMetadata.proto
package eu.dnetlib.data.proto;
public final class RelMetadataProtos {
private RelMetadataProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface RelMetadataOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .eu.dnetlib.data.proto.Qualifier semantics = 1;
boolean hasSemantics();
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier getSemantics();
eu.dnetlib.data.proto.FieldTypeProtos.QualifierOrBuilder getSemanticsOrBuilder();
// optional string startdate = 3;
boolean hasStartdate();
String getStartdate();
// optional string enddate = 4;
boolean hasEnddate();
String getEnddate();
}
public static final class RelMetadata extends
com.google.protobuf.GeneratedMessage
implements RelMetadataOrBuilder {
// Use RelMetadata.newBuilder() to construct.
private RelMetadata(Builder builder) {
super(builder);
}
private RelMetadata(boolean noInit) {}
private static final RelMetadata defaultInstance;
public static RelMetadata getDefaultInstance() {
return defaultInstance;
}
public RelMetadata getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.RelMetadataProtos.internal_static_eu_dnetlib_data_proto_RelMetadata_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.RelMetadataProtos.internal_static_eu_dnetlib_data_proto_RelMetadata_fieldAccessorTable;
}
private int bitField0_;
// optional .eu.dnetlib.data.proto.Qualifier semantics = 1;
public static final int SEMANTICS_FIELD_NUMBER = 1;
private eu.dnetlib.data.proto.FieldTypeProtos.Qualifier semantics_;
public boolean hasSemantics() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.FieldTypeProtos.Qualifier getSemantics() {
return semantics_;
}
public eu.dnetlib.data.proto.FieldTypeProtos.QualifierOrBuilder getSemanticsOrBuilder() {
return semantics_;
}
// optional string startdate = 3;
public static final int STARTDATE_FIELD_NUMBER = 3;
private java.lang.Object startdate_;
public boolean hasStartdate() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
public String getStartdate() {
java.lang.Object ref = startdate_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
startdate_ = s;
}
return s;
}
}
private com.google.protobuf.ByteString getStartdateBytes() {
java.lang.Object ref = startdate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
startdate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional string enddate = 4;
public static final int ENDDATE_FIELD_NUMBER = 4;
private java.lang.Object enddate_;
public boolean hasEnddate() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
public String getEnddate() {
java.lang.Object ref = enddate_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
enddate_ = s;
}
return s;
}
}
private com.google.protobuf.ByteString getEnddateBytes() {
java.lang.Object ref = enddate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
enddate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private void initFields() {
semantics_ = eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.getDefaultInstance();
startdate_ = "";
enddate_ = "";
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (hasSemantics()) {
if (!getSemantics().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, semantics_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(3, getStartdateBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(4, getEnddateBytes());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, semantics_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getStartdateBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, getEnddateBytes());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder>
implements eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return eu.dnetlib.data.proto.RelMetadataProtos.internal_static_eu_dnetlib_data_proto_RelMetadata_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return eu.dnetlib.data.proto.RelMetadataProtos.internal_static_eu_dnetlib_data_proto_RelMetadata_fieldAccessorTable;
}
// Construct using eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getSemanticsFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (semanticsBuilder_ == null) {
semantics_ = eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.getDefaultInstance();
} else {
semanticsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
startdate_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
enddate_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDescriptor();
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getDefaultInstanceForType() {
return eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata build() {
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return result;
}
public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata buildPartial() {
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata result = new eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (semanticsBuilder_ == null) {
result.semantics_ = semantics_;
} else {
result.semantics_ = semanticsBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.startdate_ = startdate_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.enddate_ = enddate_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata) {
return mergeFrom((eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata other) {
if (other == eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance()) return this;
if (other.hasSemantics()) {
mergeSemantics(other.getSemantics());
}
if (other.hasStartdate()) {
setStartdate(other.getStartdate());
}
if (other.hasEnddate()) {
setEnddate(other.getEnddate());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (hasSemantics()) {
if (!getSemantics().isInitialized()) {
return false;
}
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(
this.getUnknownFields());
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.setUnknownFields(unknownFields.build());
onChanged();
return this;
}
break;
}
case 10: {
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.Builder subBuilder = eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.newBuilder();
if (hasSemantics()) {
subBuilder.mergeFrom(getSemantics());
}
input.readMessage(subBuilder, extensionRegistry);
setSemantics(subBuilder.buildPartial());
break;
}
case 26: {
bitField0_ |= 0x00000002;
startdate_ = input.readBytes();
break;
}
case 34: {
bitField0_ |= 0x00000004;
enddate_ = input.readBytes();
break;
}
}
}
}
private int bitField0_;
// optional .eu.dnetlib.data.proto.Qualifier semantics = 1;
private eu.dnetlib.data.proto.FieldTypeProtos.Qualifier semantics_ = eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier, eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.Builder, eu.dnetlib.data.proto.FieldTypeProtos.QualifierOrBuilder> semanticsBuilder_;
public boolean hasSemantics() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
public eu.dnetlib.data.proto.FieldTypeProtos.Qualifier getSemantics() {
if (semanticsBuilder_ == null) {
return semantics_;
} else {
return semanticsBuilder_.getMessage();
}
}
public Builder setSemantics(eu.dnetlib.data.proto.FieldTypeProtos.Qualifier value) {
if (semanticsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
semantics_ = value;
onChanged();
} else {
semanticsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder setSemantics(
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.Builder builderForValue) {
if (semanticsBuilder_ == null) {
semantics_ = builderForValue.build();
onChanged();
} else {
semanticsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
public Builder mergeSemantics(eu.dnetlib.data.proto.FieldTypeProtos.Qualifier value) {
if (semanticsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
semantics_ != eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.getDefaultInstance()) {
semantics_ =
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.newBuilder(semantics_).mergeFrom(value).buildPartial();
} else {
semantics_ = value;
}
onChanged();
} else {
semanticsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
public Builder clearSemantics() {
if (semanticsBuilder_ == null) {
semantics_ = eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.getDefaultInstance();
onChanged();
} else {
semanticsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.Builder getSemanticsBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getSemanticsFieldBuilder().getBuilder();
}
public eu.dnetlib.data.proto.FieldTypeProtos.QualifierOrBuilder getSemanticsOrBuilder() {
if (semanticsBuilder_ != null) {
return semanticsBuilder_.getMessageOrBuilder();
} else {
return semantics_;
}
}
private com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier, eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.Builder, eu.dnetlib.data.proto.FieldTypeProtos.QualifierOrBuilder>
getSemanticsFieldBuilder() {
if (semanticsBuilder_ == null) {
semanticsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
eu.dnetlib.data.proto.FieldTypeProtos.Qualifier, eu.dnetlib.data.proto.FieldTypeProtos.Qualifier.Builder, eu.dnetlib.data.proto.FieldTypeProtos.QualifierOrBuilder>(
semantics_,
getParentForChildren(),
isClean());
semantics_ = null;
}
return semanticsBuilder_;
}
// optional string startdate = 3;
private java.lang.Object startdate_ = "";
public boolean hasStartdate() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
public String getStartdate() {
java.lang.Object ref = startdate_;
if (!(ref instanceof String)) {
String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
startdate_ = s;
return s;
} else {
return (String) ref;
}
}
public Builder setStartdate(String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
startdate_ = value;
onChanged();
return this;
}
public Builder clearStartdate() {
bitField0_ = (bitField0_ & ~0x00000002);
startdate_ = getDefaultInstance().getStartdate();
onChanged();
return this;
}
void setStartdate(com.google.protobuf.ByteString value) {
bitField0_ |= 0x00000002;
startdate_ = value;
onChanged();
}
// optional string enddate = 4;
private java.lang.Object enddate_ = "";
public boolean hasEnddate() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
public String getEnddate() {
java.lang.Object ref = enddate_;
if (!(ref instanceof String)) {
String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
enddate_ = s;
return s;
} else {
return (String) ref;
}
}
public Builder setEnddate(String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
enddate_ = value;
onChanged();
return this;
}
public Builder clearEnddate() {
bitField0_ = (bitField0_ & ~0x00000004);
enddate_ = getDefaultInstance().getEnddate();
onChanged();
return this;
}
void setEnddate(com.google.protobuf.ByteString value) {
bitField0_ |= 0x00000004;
enddate_ = value;
onChanged();
}
// @@protoc_insertion_point(builder_scope:eu.dnetlib.data.proto.RelMetadata)
}
static {
defaultInstance = new RelMetadata(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.RelMetadata)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_eu_dnetlib_data_proto_RelMetadata_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_eu_dnetlib_data_proto_RelMetadata_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\021RelMetadata.proto\022\025eu.dnetlib.data.pro" +
"to\032\017FieldType.proto\"f\n\013RelMetadata\0223\n\tse" +
"mantics\030\001 \001(\0132 .eu.dnetlib.data.proto.Qu" +
"alifier\022\021\n\tstartdate\030\003 \001(\t\022\017\n\007enddate\030\004 " +
"\001(\tB*\n\025eu.dnetlib.data.protoB\021RelMetadat" +
"aProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
internal_static_eu_dnetlib_data_proto_RelMetadata_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_eu_dnetlib_data_proto_RelMetadata_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_eu_dnetlib_data_proto_RelMetadata_descriptor,
new java.lang.String[] { "Semantics", "Startdate", "Enddate", },
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.class,
eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
eu.dnetlib.data.proto.FieldTypeProtos.getDescriptor(),
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,228 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: RelType.proto
package eu.dnetlib.data.proto;
public final class RelTypeProtos {
private RelTypeProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public enum RelType
implements com.google.protobuf.ProtocolMessageEnum {
datasourceOrganization(0, 1),
projectOrganization(1, 4),
resultOrganization(2, 5),
resultProject(3, 6),
resultResult(4, 9),
organizationOrganization(5, 11),
;
public static final int datasourceOrganization_VALUE = 1;
public static final int projectOrganization_VALUE = 4;
public static final int resultOrganization_VALUE = 5;
public static final int resultProject_VALUE = 6;
public static final int resultResult_VALUE = 9;
public static final int organizationOrganization_VALUE = 11;
public final int getNumber() { return value; }
public static RelType valueOf(int value) {
switch (value) {
case 1: return datasourceOrganization;
case 4: return projectOrganization;
case 5: return resultOrganization;
case 6: return resultProject;
case 9: return resultResult;
case 11: return organizationOrganization;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<RelType>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<RelType>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<RelType>() {
public RelType findValueByNumber(int number) {
return RelType.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.RelTypeProtos.getDescriptor().getEnumTypes().get(0);
}
private static final RelType[] VALUES = {
datasourceOrganization, projectOrganization, resultOrganization, resultProject, resultResult, organizationOrganization,
};
public static RelType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private RelType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.RelType)
}
public enum SubRelType
implements com.google.protobuf.ProtocolMessageEnum {
provision(0, 1),
participation(1, 4),
outcome(2, 6),
similarity(3, 8),
publicationDataset(4, 9),
affiliation(5, 12),
dedup(6, 10),
dedupSimilarity(7, 11),
supplement(8, 13),
part(9, 15),
version(10, 16),
relationship(11, 17),
;
public static final int provision_VALUE = 1;
public static final int participation_VALUE = 4;
public static final int outcome_VALUE = 6;
public static final int similarity_VALUE = 8;
public static final int publicationDataset_VALUE = 9;
public static final int affiliation_VALUE = 12;
public static final int dedup_VALUE = 10;
public static final int dedupSimilarity_VALUE = 11;
public static final int supplement_VALUE = 13;
public static final int part_VALUE = 15;
public static final int version_VALUE = 16;
public static final int relationship_VALUE = 17;
public final int getNumber() { return value; }
public static SubRelType valueOf(int value) {
switch (value) {
case 1: return provision;
case 4: return participation;
case 6: return outcome;
case 8: return similarity;
case 9: return publicationDataset;
case 12: return affiliation;
case 10: return dedup;
case 11: return dedupSimilarity;
case 13: return supplement;
case 15: return part;
case 16: return version;
case 17: return relationship;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<SubRelType>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<SubRelType>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<SubRelType>() {
public SubRelType findValueByNumber(int number) {
return SubRelType.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.RelTypeProtos.getDescriptor().getEnumTypes().get(1);
}
private static final SubRelType[] VALUES = {
provision, participation, outcome, similarity, publicationDataset, affiliation, dedup, dedupSimilarity, supplement, part, version, relationship,
};
public static SubRelType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private SubRelType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.SubRelType)
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\rRelType.proto\022\025eu.dnetlib.data.proto*\231" +
"\001\n\007RelType\022\032\n\026datasourceOrganization\020\001\022\027" +
"\n\023projectOrganization\020\004\022\026\n\022resultOrganiz" +
"ation\020\005\022\021\n\rresultProject\020\006\022\020\n\014resultResu" +
"lt\020\t\022\034\n\030organizationOrganization\020\013*\315\001\n\nS" +
"ubRelType\022\r\n\tprovision\020\001\022\021\n\rparticipatio" +
"n\020\004\022\013\n\007outcome\020\006\022\016\n\nsimilarity\020\010\022\026\n\022publ" +
"icationDataset\020\t\022\017\n\013affiliation\020\014\022\t\n\005ded" +
"up\020\n\022\023\n\017dedupSimilarity\020\013\022\016\n\nsupplement\020" +
"\r\022\010\n\004part\020\017\022\013\n\007version\020\020\022\020\n\014relationship",
"\020\021B&\n\025eu.dnetlib.data.protoB\rRelTypeProt" +
"os"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,109 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SpecialTrust.proto
package eu.dnetlib.data.proto;
public final class SpecialTrustProtos {
private SpecialTrustProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public enum SpecialTrust
implements com.google.protobuf.ProtocolMessageEnum {
INFINITE(0, 1),
NEUTRAL(1, 2),
;
public static final int INFINITE_VALUE = 1;
public static final int NEUTRAL_VALUE = 2;
public final int getNumber() { return value; }
public static SpecialTrust valueOf(int value) {
switch (value) {
case 1: return INFINITE;
case 2: return NEUTRAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<SpecialTrust>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<SpecialTrust>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<SpecialTrust>() {
public SpecialTrust findValueByNumber(int number) {
return SpecialTrust.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.SpecialTrustProtos.getDescriptor().getEnumTypes().get(0);
}
private static final SpecialTrust[] VALUES = {
INFINITE, NEUTRAL,
};
public static SpecialTrust valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private SpecialTrust(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.SpecialTrust)
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\022SpecialTrust.proto\022\025eu.dnetlib.data.pr" +
"oto*)\n\014SpecialTrust\022\014\n\010INFINITE\020\001\022\013\n\007NEU" +
"TRAL\020\002B+\n\025eu.dnetlib.data.protoB\022Special" +
"TrustProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,118 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Type.proto
package eu.dnetlib.data.proto;
public final class TypeProtos {
private TypeProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
datasource(0, 10),
organization(1, 20),
person(2, 30),
project(3, 40),
result(4, 50),
;
public static final int datasource_VALUE = 10;
public static final int organization_VALUE = 20;
public static final int person_VALUE = 30;
public static final int project_VALUE = 40;
public static final int result_VALUE = 50;
public final int getNumber() { return value; }
public static Type valueOf(int value) {
switch (value) {
case 10: return datasource;
case 20: return organization;
case 30: return person;
case 40: return project;
case 50: return result;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<Type>
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap<Type>
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<Type>() {
public Type findValueByNumber(int number) {
return Type.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return eu.dnetlib.data.proto.TypeProtos.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = {
datasource, organization, person, project, result,
};
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Type(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.Type)
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\nType.proto\022\025eu.dnetlib.data.proto*M\n\004T" +
"ype\022\016\n\ndatasource\020\n\022\020\n\014organization\020\024\022\n\n" +
"\006person\020\036\022\013\n\007project\020(\022\n\n\006result\0202B#\n\025eu" +
".dnetlib.data.protoB\nTypeProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,61 @@
package eu.dnetlib.data.proto;
import "FieldType.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "DatasourceProtos";
message Datasource {
optional Metadata metadata = 2;
message Metadata {
// common fields
optional Qualifier datasourcetype = 15;
optional Qualifier openairecompatibility = 17;
optional StringField officialname = 1;
optional StringField englishname = 2;
optional StringField websiteurl = 3;
optional StringField logourl = 4;
optional StringField contactemail = 5;
optional StringField namespaceprefix = 7;
optional StringField latitude = 18;
optional StringField longitude = 19;
optional StringField dateofvalidation = 20;
optional StringField description = 21;
repeated StructuredProperty subjects = 45;
// opendoar specific fields (od*)
optional StringField odnumberofitems = 9;
optional StringField odnumberofitemsdate = 10;
optional StringField odpolicies = 12;
repeated StringField odlanguages = 13;
repeated StringField odcontenttypes = 14;
repeated StringField accessinfopackage = 6;
// re3data fields
optional StringField releasestartdate = 31;
optional StringField releaseenddate = 32;
optional StringField missionstatementurl = 33;
optional BoolField dataprovider = 34;
optional BoolField serviceprovider = 35;
optional StringField databaseaccesstype = 36; // {open, restricted or closed}
optional StringField datauploadtype = 37; // {open, restricted or closed}
optional StringField databaseaccessrestriction = 38; // {feeRequired, registration, other}
optional StringField datauploadrestriction = 39; // {feeRequired, registration, other}
optional BoolField versioning = 40;
optional StringField citationguidelineurl = 41;
optional StringField qualitymanagementkind = 42; // {yes, no, uknown}
optional StringField pidsystems = 43;
optional StringField certificates = 44;
repeated KeyValue policies = 46;
}
}

View File

@ -0,0 +1,23 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "DatasourceOrganizationProtos";
message DatasourceOrganization {
optional Provision provision = 1;
message Provision {
enum RelName {
isProvidedBy = 1;
provides = 2;
}
required RelMetadata relMetadata = 1;
}
}

View File

@ -0,0 +1,16 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "DedupProtos";
message Dedup {
enum RelName {
isMergedIn = 1;
merges = 2;
}
required RelMetadata relMetadata = 1;
}

View File

@ -0,0 +1,16 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "DedupSimilarityProtos";
message DedupSimilarity {
enum RelName {
isSimilarTo = 1;
}
required RelMetadata relMetadata = 1;
}

View File

@ -0,0 +1,104 @@
package eu.dnetlib.data.proto;
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "FieldTypeProtos";
message StringField {
required string value = 1;
optional DataInfo dataInfo = 2;
}
message BoolField {
required bool value = 1;
optional DataInfo dataInfo = 2;
}
message IntField {
required int32 value = 1;
optional DataInfo dataInfo = 2;
}
message StructuredProperty {
required string value = 1;
optional Qualifier qualifier = 2;
optional DataInfo dataInfo = 3;
}
// Generic container for identified values, e.g:
// <oaf:hostedBy name="Publications at Bielefeld University" id="opendoar::2294"/>
// <oaf:collectedFrom name="Publications at Bielefeld University" id="opendoar::2294"/>
message KeyValue {
required string key = 1;
optional string value = 2;
optional DataInfo dataInfo = 3;
}
message Qualifier {
optional string classid = 1;
optional string classname = 2;
optional string schemeid = 3;
optional string schemename = 4;
optional DataInfo dataInfo = 5;
}
message DataInfo {
optional bool invisible = 6 [default = false];
optional bool inferred = 1;
optional bool deletedbyinference = 2;
optional string trust = 3;
optional string inferenceprovenance = 4;
required Qualifier provenanceaction = 5;
}
message OAIProvenance {
optional OriginDescription originDescription = 1;
message OriginDescription {
optional string harvestDate = 1;
optional bool altered = 2 [default = true];
optional string baseURL = 3;
optional string identifier = 4;
optional string datestamp = 5;
optional string metadataNamespace = 6;
optional OriginDescription originDescription = 7;
}
}
message ExtraInfo {
required string name = 1;
required string typology = 2;
required string provenance = 3;
optional string trust = 4;
// json containing a Citation or Statistics
optional string value = 5;
}
message Author {
required string fullname = 1;
optional string name = 2;
optional string surname = 3;
required int32 rank = 4;
repeated KeyValue pid = 5;
repeated StringField affiliation = 6;
}

View File

@ -0,0 +1,9 @@
package eu.dnetlib.data.proto;
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "KindProtos";
enum Kind {
entity = 1;
relation = 2;
}

View File

@ -0,0 +1,97 @@
package eu.dnetlib.data.proto;
import "Kind.proto";
import "FieldType.proto";
// for Oafentity
import "Type.proto";
import "Datasource.proto";
import "Organization.proto";
import "Project.proto";
import "Result.proto";
import "Person.proto";
// for OafRel
import "RelType.proto";
import "Datasource_Organization.proto";
import "Project_Organization.proto";
import "Result_Organization.proto";
import "Result_Project.proto";
import "Result_Result.proto";
import "Organization_Organization.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "OafProtos";
message Oaf {
required Kind kind = 1;
optional OafEntity entity = 2;
optional OafRel rel = 3;
optional DataInfo dataInfo = 4;
// used to mark the last update time of this object
optional sfixed64 lastupdatetimestamp = 5;
}
message OafEntity {
required Type type = 1;
required string id = 12;
repeated string originalId = 8;
repeated KeyValue collectedfrom = 9;
repeated StructuredProperty pid = 10;
optional string dateofcollection = 11;
optional string dateoftransformation = 13;
/* Any relation that we want to bundle together with this entity.
It's intended to be used only in temporary values in map/red jobs (sequence files, ...)
and never persisted values stored in HBase. */
repeated OafRel cachedRel = 2;
repeated Oaf cachedOafRel = 18;
optional Datasource datasource = 3;
optional Organization organization = 4;
optional Project project = 6;
optional Result result = 7;
optional Person person = 5;
repeated OafEntity children = 16;
repeated ExtraInfo extraInfo = 15;
optional OAIProvenance oaiprovenance = 17;
}
message OafRel {
required RelType relType = 1;
required SubRelType subRelType = 19;
required string relClass = 20; // one among the SubRel names, e.g. Provision.RelName.isProvidedBy
required string source = 2;
required string target = 3;
/* if true then is a "child" */
required bool child = 4;
optional OafEntity cachedTarget = 5;
// needed to have more information that is not included in cachedTarget.
optional Oaf cachedOafTarget = 8;
// Datamodel rels
optional DatasourceOrganization datasourceOrganization = 6;
optional ProjectOrganization projectOrganization = 9;
optional ResultOrganization resultOrganization = 10;
optional ResultProject resultProject = 11;
optional ResultResult resultResult = 16;
optional OrganizationOrganization organizationOrganization = 17;
repeated KeyValue collectedfrom = 21;
}

View File

@ -0,0 +1,33 @@
package eu.dnetlib.data.proto;
import "FieldType.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "OrganizationProtos";
message Organization {
optional Metadata metadata = 2;
message Metadata {
optional StringField legalshortname = 1;
optional StringField legalname = 2;
repeated StringField alternativeNames = 17;
optional StringField websiteurl = 3;
optional StringField logourl = 4;
optional StringField eclegalbody = 5;
optional StringField eclegalperson = 6;
optional StringField ecnonprofit = 7;
optional StringField ecresearchorganization = 8;
optional StringField echighereducation = 9;
optional StringField ecinternationalorganizationeurinterests = 10;
optional StringField ecinternationalorganization = 11;
optional StringField ecenterprise = 12;
optional StringField ecsmevalidated = 13;
optional StringField ecnutscode = 14;
optional Qualifier country = 16;
}
}

View File

@ -0,0 +1,15 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
import "Dedup.proto";
import "DedupSimilarity.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "OrganizationOrganizationProtos";
message OrganizationOrganization {
optional Dedup dedup = 1;
optional DedupSimilarity dedupSimilarity = 2;
}

View File

@ -0,0 +1,25 @@
package eu.dnetlib.data.proto;
import "FieldType.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "PersonProtos";
message Person {
optional Metadata metadata = 2;
message Metadata {
required string fullname = 1;
optional string firstname = 2;
optional string lastname = 3;
required string pubID = 4;
optional string pubDOI = 5;
optional string orcid = 6;
required int32 rank = 7;
repeated string coauthors = 8;
repeated double topics = 9;
required string area = 10;
}
}

View File

@ -0,0 +1,42 @@
package eu.dnetlib.data.proto;
import "FieldType.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "ProjectProtos";
message Project {
optional Metadata metadata = 2;
message Metadata {
optional StringField websiteurl = 1;
optional StringField code = 2;
optional StringField acronym = 3;
optional StringField title = 4;
optional StringField startdate = 5;
optional StringField enddate = 6;
optional StringField callidentifier = 7;
optional StringField keywords = 8;
optional StringField duration = 9;
optional StringField ecsc39 = 10;
optional StringField oamandatepublications = 11;
optional StringField ecarticle29_3 = 12;
repeated StructuredProperty subjects = 14;
repeated StringField fundingtree = 15;
optional Qualifier contracttype = 13;
optional StringField optional1 = 16;
optional StringField optional2 = 17;
optional StringField jsonextrainfo = 18;
optional StringField contactfullname = 19;
optional StringField contactfax = 20;
optional StringField contactphone = 21;
optional StringField contactemail = 22;
}
}

View File

@ -0,0 +1,23 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "ProjectOrganizationProtos";
message ProjectOrganization {
optional Participation participation = 1;
message Participation {
enum RelName {
isParticipant = 1;
hasParticipant = 2;
}
required RelMetadata relMetadata = 1;
optional string participantnumber = 2;
}
}

View File

@ -0,0 +1,15 @@
package eu.dnetlib.data.proto;
import "FieldType.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "RelMetadataProtos";
message RelMetadata {
optional Qualifier semantics = 1;
optional string startdate = 3;
optional string enddate = 4;
}

View File

@ -0,0 +1,36 @@
package eu.dnetlib.data.proto;
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "RelTypeProtos";
enum RelType {
// Datamodel rels
datasourceOrganization = 1;
projectOrganization = 4;
resultOrganization = 5;
resultProject = 6;
resultResult = 9;
organizationOrganization = 11;
}
enum SubRelType {
provision = 1; // datasourceOrganization
participation = 4; // projectOrganization
outcome = 6; // resultProject
similarity = 8; // resultResult
publicationDataset = 9; // resultResult
affiliation = 12; // resultOrganizaiton
dedup = 10; // resultResult | organizationOrganization
dedupSimilarity = 11; // resultResult | organizationOrganization
supplement = 13; // resultResult
part = 15; // resultResult
version = 16; // resultResult
relationship = 17; // catch all
}

View File

@ -0,0 +1,128 @@
package eu.dnetlib.data.proto;
import "FieldType.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "ResultProtos";
message Result {
optional Metadata metadata = 2;
repeated Instance instance = 6;
repeated ExternalReference externalReference = 7;
message Metadata {
repeated Author author = 40;
// resulttype allows subclassing results into publications | datasets | software
optional Qualifier resulttype = 8;
// common fields
optional Qualifier language = 12;
repeated Qualifier country = 33;
repeated StructuredProperty subject = 1;
repeated StructuredProperty title = 2;
repeated StructuredProperty relevantdate = 3;
repeated StringField description = 25;
optional StringField dateofacceptance = 4;
optional StringField publisher = 5;
optional StringField embargoenddate = 6;
repeated StringField source = 27;
repeated StringField fulltext = 29; // remove candidate
repeated StringField format = 21;
repeated StringField contributor = 30;
optional Qualifier resourcetype = 19;
repeated StringField coverage = 43;
repeated Context context = 28;
// publication specific
optional Journal journal = 18;
// dataset specific
optional StringField storagedate = 9;
optional StringField device = 26;
optional StringField size = 20;
optional StringField version = 22;
optional StringField lastmetadataupdate = 23;
optional StringField metadataversionnumber = 24;
repeated GeoLocation geolocation = 44;
// software specific
repeated StringField documentationUrl = 35;
repeated StructuredProperty license = 36;
optional StringField codeRepositoryUrl = 38;
optional Qualifier programmingLanguage = 39;
// other research products specifics
repeated StringField contactperson = 45;
repeated StringField contactgroup = 41;
repeated StringField tool = 42;
}
message Journal {
optional string name = 1;
optional string issnPrinted = 2;
optional string issnOnline = 3;
optional string issnLinking = 4;
optional string ep = 6;
optional string iss = 7;
optional string sp = 8;
optional string vol = 9;
optional string edition = 10;
optional string conferenceplace = 11;
optional string conferencedate = 12;
optional DataInfo dataInfo = 5;
}
// <concept id="egi::vo::alice" />
message Context {
required string id = 1;
repeated DataInfo dataInfo = 2;
}
message Instance {
optional StringField license = 6;
optional Qualifier accessright = 3;
optional Qualifier instancetype = 4;
optional KeyValue hostedby = 5;
repeated string url = 9;
// other research products specific
optional string distributionlocation = 12;
optional KeyValue collectedfrom = 10;
optional StringField dateofacceptance = 11;
}
message ExternalReference {
optional string sitename = 1; // source
optional string label = 2; // title
optional string url = 3; // text()
optional string description = 4; // ?? not mapped yet ??
optional Qualifier qualifier = 5; // type
optional string refidentifier = 6; // site internal identifier
optional string query = 7; // maps the oaf:reference/@query attribute
optional DataInfo dataInfo = 8; // ExternalReferences might be also inferred
}
message GeoLocation {
optional string point = 1;
optional string box = 2;
optional string place = 3;
}
}

View File

@ -0,0 +1,23 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "ResultOrganizationProtos";
message ResultOrganization {
optional Affiliation affiliation = 1;
message Affiliation {
enum RelName {
isAuthorInstitutionOf = 1; // Organization --> Result
hasAuthorInstitution = 2; // Result --> Organization
}
required RelMetadata relMetadata = 1;
}
}

View File

@ -0,0 +1,23 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "ResultProjectProtos";
message ResultProject {
optional Outcome outcome = 1;
message Outcome {
enum RelName {
isProducedBy = 1;
produces = 2;
}
required RelMetadata relMetadata = 1;
}
}

View File

@ -0,0 +1,94 @@
package eu.dnetlib.data.proto;
import "RelMetadata.proto";
import "Dedup.proto";
import "DedupSimilarity.proto";
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "ResultResultProtos";
message ResultResult {
//choice of the possible subtypes
optional Similarity similarity = 2;
optional PublicationDataset publicationDataset = 3;
optional Dedup dedup = 4;
optional DedupSimilarity dedupSimilarity = 5;
optional Supplement supplement = 6;
optional Part part = 7;
optional Relationship relationship = 8;
optional SoftwareSoftware softwareSoftware = 9;
message Similarity {
enum RelName {
isAmongTopNSimilarDocuments = 1;
hasAmongTopNSimilarDocuments = 2;
}
required RelMetadata relMetadata = 1;
// level of similarity: coefficient from [0, 1] range,
// the greater the number, the more similar the documents
optional float similarity = 2;
enum Type {
STANDARD = 1;
WEBUSAGE = 2;
}
// similarity type
optional Type type = 3 [default = STANDARD];
}
message PublicationDataset {
enum RelName {
isRelatedTo = 1;
}
required RelMetadata relMetadata = 1;
}
message Supplement {
enum RelName {
isSupplementTo = 1;
isSupplementedBy = 2;
}
required RelMetadata relMetadata = 1;
}
message Part {
enum RelName {
isPartOf = 1;
hasPart = 2;
}
required RelMetadata relMetadata = 1;
}
message SoftwareSoftware {
enum RelName {
isVersionOf = 1;
}
required RelMetadata relMetadata = 1;
}
message Relationship {
enum RelName {
isRelatedTo = 1;
}
required RelMetadata relMetadata = 1;
}
}

View File

@ -0,0 +1,9 @@
package eu.dnetlib.data.proto;
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "SpecialTrustProtos";
enum SpecialTrust {
INFINITE = 1;
NEUTRAL = 2;
}

View File

@ -0,0 +1,13 @@
package eu.dnetlib.data.proto;
option java_package = "eu.dnetlib.data.proto";
option java_outer_classname = "TypeProtos";
// entity tags are used as rowkey prefixes on hbase
enum Type {
datasource = 10;
organization = 20;
person = 30;
project = 40;
result = 50;
}

View File

@ -1,25 +1,17 @@
package eu.dnetlib.pace.clustering;
import java.io.Serializable;
import com.google.common.collect.Sets;
import eu.dnetlib.pace.common.AbstractPaceFunctions;
import eu.dnetlib.pace.model.Field;
import eu.dnetlib.pace.model.Person;
import org.apache.commons.lang.StringUtils;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import eu.dnetlib.pace.model.FieldList;
import eu.dnetlib.pace.model.FieldValue;
import org.apache.commons.lang.StringUtils;
import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import eu.dnetlib.pace.common.AbstractPaceFunctions;
import eu.dnetlib.pace.model.Field;
import eu.dnetlib.pace.model.gt.Author;
import eu.dnetlib.pace.model.gt.GTAuthor;
@ClusteringClass("personclustering")
@ClusteringClass("personClustering")
public class PersonClustering extends AbstractPaceFunctions implements ClusteringFunction {
private Map<String, Integer> params;
@ -36,14 +28,13 @@ public class PersonClustering extends AbstractPaceFunctions implements Clusterin
for (final Field f : fields) {
final GTAuthor gta = GTAuthor.fromOafJson(f.stringValue());
final Person person = new Person(f.stringValue(), false);
final Author a = gta.getAuthor();
if (a.isWellFormed()) {
hashes.add(firstLC(a.getFirstname()) + a.getSecondnames().toLowerCase());
if (StringUtils.isNotBlank(person.getNormalisedFirstName()) && StringUtils.isNotBlank(person.getNormalisedSurname())) {
hashes.add(firstLC(person.getNormalisedFirstName()) + person.getNormalisedSurname().toLowerCase());
} else {
for (final String token1 : tokens(a.getFullname())) {
for (final String token2 : tokens(a.getFullname())) {
for (final String token1 : tokens(f.stringValue(), MAX_TOKENS)) {
for (final String token2 : tokens(f.stringValue(), MAX_TOKENS)) {
if (!token1.equals(token2)) {
hashes.add(firstLC(token1) + token2);
}
@ -55,13 +46,31 @@ public class PersonClustering extends AbstractPaceFunctions implements Clusterin
return hashes;
}
private String firstLC(final String s) {
return StringUtils.substring(s, 0, 1).toLowerCase();
}
private Iterable<String> tokens(final String s) {
return Iterables.limit(Splitter.on(" ").omitEmptyStrings().trimResults().split(s), MAX_TOKENS);
}
// @Override
// public Collection<String> apply(final List<Field> fields) {
// final Set<String> hashes = Sets.newHashSet();
//
// for (final Field f : fields) {
//
// final GTAuthor gta = GTAuthor.fromOafJson(f.stringValue());
//
// final Author a = gta.getAuthor();
//
// if (StringUtils.isNotBlank(a.getFirstname()) && StringUtils.isNotBlank(a.getSecondnames())) {
// hashes.add(firstLC(a.getFirstname()) + a.getSecondnames().toLowerCase());
// } else {
// for (final String token1 : tokens(f.stringValue(), MAX_TOKENS)) {
// for (final String token2 : tokens(f.stringValue(), MAX_TOKENS)) {
// if (!token1.equals(token2)) {
// hashes.add(firstLC(token1) + token2);
// }
// }
// }
// }
// }
//
// return hashes;
// }
@Override
public Map<String, Integer> getParams() {

View File

@ -1,6 +1,7 @@
package eu.dnetlib.pace.common;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
@ -12,7 +13,6 @@ import eu.dnetlib.pace.model.FieldListImpl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
import java.text.Normalizer;
import java.util.*;
@ -258,4 +258,13 @@ public abstract class AbstractPaceFunctions {
return codes;
}
protected String firstLC(final String s) {
return StringUtils.substring(s, 0, 1).toLowerCase();
}
protected Iterable<String> tokens(final String s, final int maxTokens) {
return Iterables.limit(Splitter.on(" ").omitEmptyStrings().trimResults().split(s), maxTokens);
}
}

View File

@ -1,20 +1,21 @@
package eu.dnetlib.pace.config;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import eu.dnetlib.pace.condition.ConditionAlgo;
import eu.dnetlib.pace.model.ClusteringDef;
import eu.dnetlib.pace.model.CondDef;
import eu.dnetlib.pace.model.FieldDef;
import eu.dnetlib.pace.model.TreeNodeDef;
import eu.dnetlib.pace.util.PaceResolver;
import org.apache.commons.collections.CollectionUtils;
import org.codehaus.jackson.annotate.JsonIgnore;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class PaceConfig implements Serializable {
private List<FieldDef> model;
@ -23,6 +24,8 @@ public class PaceConfig implements Serializable {
private List<ClusteringDef> clustering;
private Map<String, List<String>> blacklists;
private Map<String, TreeNodeDef> decisionTree;
private Map<String, FieldDef> modelMap;
public static PaceResolver paceResolver;
@ -58,6 +61,14 @@ public class PaceConfig implements Serializable {
return conditions;
}
public Map<String, TreeNodeDef> getDecisionTree() {
return decisionTree;
}
public void setDecisionTree(Map<String, TreeNodeDef> decisionTree) {
this.decisionTree = decisionTree;
}
@JsonIgnore
public List<ConditionAlgo> getConditionAlgos() {
return asConditionAlgos(getConditions());

View File

@ -14,4 +14,11 @@ public interface FieldList extends List<Field>, Field {
*/
public List<String> stringList();
/**
* Double[] Array
*
* @return the double[] array
*/
public double[] doubleArray();
}

View File

@ -1,21 +1,18 @@
package eu.dnetlib.pace.model;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import eu.dnetlib.pace.config.Type;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
/**
* The Class FieldListImpl.
*/
@ -319,6 +316,21 @@ public class FieldListImpl extends AbstractField implements FieldList {
};
}
@Override
public double[] doubleArray() {
return Lists.newArrayList(Iterables.transform(fields, getDouble())).stream().mapToDouble(d-> d).toArray();
}
private Function<Field,Double> getDouble() {
return new Function<Field, Double>() {
@Override
public Double apply(final Field f) {
return Double.parseDouble(f.stringValue());
}
};
}
@Override
public String toString() {
return stringList().toString();

View File

@ -0,0 +1,100 @@
package eu.dnetlib.pace.model;
import eu.dnetlib.pace.config.PaceConfig;
import eu.dnetlib.pace.tree.TreeNode;
import eu.dnetlib.pace.util.PaceException;
import org.codehaus.jackson.map.ObjectMapper;
import java.io.IOException;
import java.io.Serializable;
import java.util.Map;
public class TreeNodeDef implements Serializable {
private String name;
private String field;
private String positive;
private String negative;
private String undefined;
private Map<String, Number> params;
public TreeNodeDef() {
}
public TreeNodeDef(String name, String field, String positive, String negative, String undefined, Map<String, Number> params) {
this.name = name;
this.field = field;
this.positive = positive;
this.negative = negative;
this.undefined = undefined;
this.params = params;
}
public TreeNode treeNode() {
try {
return PaceConfig.paceResolver.getTreeNode(getName(), params);
} catch (PaceException e) {
e.printStackTrace();
return null;
}
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getField() {
return field;
}
public void setField(String field) {
this.field = field;
}
public String getPositive() {
return positive;
}
public void setPositive(String positive) {
this.positive = positive;
}
public String getNegative() {
return negative;
}
public void setNegative(String negative) {
this.negative = negative;
}
public String getUndefined() {
return undefined;
}
public void setUndefined(String undefined) {
this.undefined = undefined;
}
public Map<String, Number> getParams() {
return params;
}
public void setParams(Map<String, Number> params) {
this.params = params;
}
@Override
public String toString() {
try {
return new ObjectMapper().writeValueAsString(this);
} catch (IOException e) {
return e.getStackTrace().toString();
}
}
}

View File

@ -0,0 +1,33 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
import org.apache.commons.lang.StringUtils;
import java.util.Map;
public class AbstractTreeNode implements TreeNode {
Map<String, Number> params;
public AbstractTreeNode(Map<String, Number> params){
this.params = params;
}
@Override
public int compare(Field a, Field b) {
return 0;
}
public static double stringSimilarity(String s1, String s2) {
String longer = s1, shorter = s2;
if (s1.length() < s2.length()) { // longer should always have greater length
longer = s2; shorter = s1;
}
int longerLength = longer.length();
if (longerLength == 0) //if strings have 0 length return 0 (no similarity)
return 0.0;
return (longerLength - StringUtils.getLevenshteinDistance(longer, shorter)) / (double) longerLength;
}
}

View File

@ -0,0 +1,46 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
import eu.dnetlib.pace.model.FieldList;
import java.util.List;
import java.util.Map;
@TreeNodeClass("coauthorsMatch")
public class CoauthorsMatch extends AbstractTreeNode {
public CoauthorsMatch(Map<String, Number> params) {
super(params);
}
@Override
public int compare(Field a, Field b) {
final List<String> c1 = ((FieldList) a).stringList();
final List<String> c2 = ((FieldList) b).stringList();
int size1 = c1.size();
int size2 = c2.size();
//few coauthors or too many coauthors
if (size1 < params.getOrDefault("minCoauthors", 5).intValue() || size2 < params.getOrDefault("minCoauthors", 5).intValue() || (size1+size2 > params.getOrDefault("maxCoauthors", 200).intValue()))
return 0;
int coauthorship = 0;
for (String ca1: c1){
for (String ca2: c2){
if (stringSimilarity(ca1.replaceAll("\\.","").replaceAll(" ",""), ca2.replaceAll("\\.","").replaceAll(" ",""))>= params.getOrDefault("simTh", 0.7).doubleValue())
coauthorship++;
}
}
if (coauthorship>=params.getOrDefault("th", 5).intValue())
return 1;
else if (coauthorship == 0)
return -1;
else
return 0;
}
}

View File

@ -0,0 +1,25 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
import java.util.Map;
@TreeNodeClass("exactMatch")
public class ExactMatch extends AbstractTreeNode {
public ExactMatch(Map<String, Number> params) {
super(params);
}
@Override
public int compare(Field a, Field b) {
if (a.stringValue().isEmpty() || b.stringValue().isEmpty())
return 0;
else if (a.stringValue().equals(b.stringValue()))
return 1;
else
return -1;
}
}

View File

@ -0,0 +1,36 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
import java.util.Map;
@TreeNodeClass("similar")
public class SimilarMatch extends AbstractTreeNode {
public SimilarMatch(Map<String, Number> params) {
super(params);
}
@Override
public int compare(Field a, Field b) {
if (a.stringValue().isEmpty() || b.stringValue().isEmpty())
return 0; //undefined if one name is missing
//take only the first name
String firstname1 = a.stringValue().split(" ")[0];
String firstname2 = b.stringValue().split(" ")[0];
if (firstname1.toLowerCase().trim().replaceAll("\\.","").replaceAll("\\s","").length()<=2 || firstname2.toLowerCase().replaceAll("\\.", "").replaceAll("\\s","").length()<=2) //too short names (considered similar)
return 1;
if (stringSimilarity(firstname1,firstname2)>params.getOrDefault("th", 0.7).doubleValue()){
return 1; //similar names, go on with the analysis
}
else {
return -1; //names too different, no need to compare
}
}
}

View File

@ -0,0 +1,36 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
import eu.dnetlib.pace.model.FieldListImpl;
import java.util.Map;
@TreeNodeClass("topicsMatch")
public class TopicsMatch extends AbstractTreeNode {
public TopicsMatch(Map<String, Number> params) {
super(params);
}
@Override
public int compare(Field a, Field b) {
double[] t1 = ((FieldListImpl) a).doubleArray();
double[] t2 = ((FieldListImpl) b).doubleArray();
if (t1 == null || t2 == null)
return 0; //0 similarity if no topics in one of the authors or in both
double area = 0.0;
double min_value[] = new double[t1.length];
for(int i=0; i<t1.length; i++){
min_value[i] = (t1[i]<t2[i])?t1[i]:t2[i];
area += min_value[i];
}
return area>params.getOrDefault("th", 0.7).doubleValue()?+1:-1;
}
}

View File

@ -0,0 +1,10 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
public interface TreeNode {
//compare two fields and returns: +1 if match, 0 if undefined, -1 if do not match
public int compare(Field a, Field b);
}

View File

@ -0,0 +1,14 @@
package eu.dnetlib.pace.tree;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface TreeNodeClass {
public String value();
}

View File

@ -0,0 +1,25 @@
package eu.dnetlib.pace.tree;
import eu.dnetlib.pace.model.Field;
import eu.dnetlib.pace.model.FieldList;
import java.util.List;
import java.util.Map;
@TreeNodeClass("undefined")
public class UndefinedNode implements TreeNode {
Map<String, Number> params;
@Override
public int compare(Field a, Field b) {
final List<String> sa = ((FieldList) a).stringList();
final List<String> sb = ((FieldList) b).stringList();
System.out.println("sa = " + sa.size());
System.out.println("sb = " + sb.size());
return 0;
}
}

View File

@ -0,0 +1,21 @@
package eu.dnetlib.pace.tree.support;
import eu.dnetlib.pace.util.PaceException;
public enum MatchType {
ORCID_MATCH,
COAUTHORS_MATCH,
TOPICS_MATCH,
NO_MATCH;
public static MatchType getEnum(String value) {
try {
return MatchType.valueOf(value);
}
catch (IllegalArgumentException e) {
throw new PaceException("The match type is not valid");
}
}
}

View File

@ -9,6 +9,8 @@ import eu.dnetlib.pace.distance.eval.ScoreResult;
import eu.dnetlib.pace.model.Field;
import eu.dnetlib.pace.model.MapDocument;
import eu.dnetlib.pace.model.MapDocumentComparator;
import eu.dnetlib.pace.model.TreeNodeDef;
import eu.dnetlib.pace.tree.support.MatchType;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -43,12 +45,63 @@ public class BlockProcessor {
if (q.size() > 1) {
// log.info("reducing key: '" + key + "' records: " + q.size());
//process(q, context);
process(simplifyQueue(q, key, context), context);
//process the decision tree if it is specified, otherwise go with conditions and distance algos
if (!dedupConf.getPace().getDecisionTree().isEmpty()){
processPersons(q, context);
}
else {
process(simplifyQueue(q, key, context), context);
}
} else {
context.incrementCounter(dedupConf.getWf().getEntityType(), "records per hash key = 1", 1);
}
}
private void processPersons(final Queue<MapDocument> queue, final Reporter context) {
while (!queue.isEmpty()) {
final MapDocument pivot = queue.remove(); //take first element of the queue
final String idPivot = pivot.getIdentifier();
//compare the first element with all the others
for (final MapDocument curr : queue) {
final String idCurr = curr.getIdentifier();
//check if pivot and current element are similar by processing the tree
if (navigateTree(pivot, curr))
writeSimilarity(context, idPivot, idCurr);
}
}
}
private boolean navigateTree(final MapDocument doc1, final MapDocument doc2){
final Map<String, TreeNodeDef> decisionTree = dedupConf.getPace().getDecisionTree();
String current = "start";
while (!current.equals(MatchType.NO_MATCH.toString()) && !current.equals(MatchType.ORCID_MATCH.toString()) && !current.equals(MatchType.TOPICS_MATCH.toString()) && !current.equals(MatchType.COAUTHORS_MATCH.toString())) {
TreeNodeDef currentNode = decisionTree.get(current);
//throw an exception if the node doesn't exist
if (currentNode == null)
throw new PaceException("The Tree Node doesn't exist: " + current);
int compare = currentNode.treeNode().compare(doc1.getFieldMap().get(currentNode.getField()), doc2.getFieldMap().get(currentNode.getField()));
current = (compare==0)?currentNode.getUndefined():(compare==-1)?currentNode.getNegative():currentNode.getPositive();
}
if (!current.equals(MatchType.NO_MATCH.toString()))
return true;
else
return false;
}
private Queue<MapDocument> prepare(final Iterable<MapDocument> documents) {
final Queue<MapDocument> queue = new PriorityQueue<>(100, new MapDocumentComparator(dedupConf.getWf().getOrderField()));

View File

@ -6,4 +6,8 @@ public class PaceException extends RuntimeException {
super(s, e);
}
public PaceException(String s){
super(s);
}
}

View File

@ -7,6 +7,8 @@ import eu.dnetlib.pace.condition.ConditionClass;
import eu.dnetlib.pace.distance.DistanceAlgo;
import eu.dnetlib.pace.distance.DistanceClass;
import eu.dnetlib.pace.model.FieldDef;
import eu.dnetlib.pace.tree.TreeNode;
import eu.dnetlib.pace.tree.TreeNodeClass;
import org.reflections.Reflections;
import java.io.Serializable;
@ -20,6 +22,7 @@ public class PaceResolver implements Serializable {
private final Map<String, Class<ClusteringFunction>> clusteringFunctions;
private final Map<String, Class<ConditionAlgo>> conditionAlgos;
private final Map<String, Class<DistanceAlgo>> distanceAlgos;
private final Map<String, Class<TreeNode>> treeNodes;
public PaceResolver() {
@ -34,13 +37,17 @@ public class PaceResolver implements Serializable {
this.distanceAlgos = new Reflections("eu.dnetlib").getTypesAnnotatedWith(DistanceClass.class).stream()
.filter(DistanceAlgo.class::isAssignableFrom)
.collect(Collectors.toMap(cl -> cl.getAnnotation(DistanceClass.class).value(), cl -> (Class<DistanceAlgo>)cl));
this.treeNodes = new Reflections("eu.dnetlib").getTypesAnnotatedWith(TreeNodeClass.class).stream()
.filter(TreeNode.class::isAssignableFrom)
.collect(Collectors.toMap(cl -> cl.getAnnotation(TreeNodeClass.class).value(), cl -> (Class<TreeNode>) cl));
}
public ClusteringFunction getClusteringFunction(String name, Map<String, Integer> params) throws PaceException {
try {
return clusteringFunctions.get(name).getDeclaredConstructor(Map.class).newInstance(params);
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
throw new PaceException(name + "not found", e);
throw new PaceException(name + " not found ", e);
}
}
@ -48,7 +55,7 @@ public class PaceResolver implements Serializable {
try {
return distanceAlgos.get(name).getDeclaredConstructor(Map.class).newInstance(params);
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
throw new PaceException(name + "not found", e);
throw new PaceException(name + " not found ", e);
}
}
@ -56,7 +63,15 @@ public class PaceResolver implements Serializable {
try {
return conditionAlgos.get(name).getDeclaredConstructor(String.class, List.class).newInstance(name, fields);
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
throw new PaceException(name + "not found", e);
throw new PaceException(name + " not found ", e);
}
}
public TreeNode getTreeNode(String name, Map<String, Number> params) throws PaceException {
try {
return treeNodes.get(name).getDeclaredConstructor(Map.class).newInstance(params);
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | NullPointerException e) {
throw new PaceException(name + " not found ", e);
}
}