org.phenopackets.schema.v1.core.Resource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phenopacket-schema Show documentation
Show all versions of phenopacket-schema Show documentation
A Protobuf schema for capturing clinical phenotypes
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: base.proto
package org.phenopackets.schema.v1.core;
/**
*
* Description of an external resource used for referencing an object. For example the resource may be an ontology such
* as the HPO or SNOMED.
* FHIR mapping: CodeSystem (http://www.hl7.org/fhir/codesystem.html)
*
*
* Protobuf type {@code org.phenopackets.schema.v1.core.Resource}
*/
public final class Resource extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.phenopackets.schema.v1.core.Resource)
ResourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use Resource.newBuilder() to construct.
private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Resource() {
id_ = "";
name_ = "";
url_ = "";
version_ = "";
namespacePrefix_ = "";
iriPrefix_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Resource();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Resource(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
url_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
version_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
namespacePrefix_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
iriPrefix_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_Resource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_Resource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.core.Resource.class, org.phenopackets.schema.v1.core.Resource.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 3;
private volatile java.lang.Object url_;
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 4;
private volatile java.lang.Object version_;
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAMESPACE_PREFIX_FIELD_NUMBER = 5;
private volatile java.lang.Object namespacePrefix_;
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public java.lang.String getNamespacePrefix() {
java.lang.Object ref = namespacePrefix_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespacePrefix_ = s;
return s;
}
}
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public com.google.protobuf.ByteString
getNamespacePrefixBytes() {
java.lang.Object ref = namespacePrefix_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespacePrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IRI_PREFIX_FIELD_NUMBER = 6;
private volatile java.lang.Object iriPrefix_;
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public java.lang.String getIriPrefix() {
java.lang.Object ref = iriPrefix_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
iriPrefix_ = s;
return s;
}
}
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public com.google.protobuf.ByteString
getIriPrefixBytes() {
java.lang.Object ref = iriPrefix_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
iriPrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, url_);
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_);
}
if (!getNamespacePrefixBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, namespacePrefix_);
}
if (!getIriPrefixBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, iriPrefix_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, url_);
}
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_);
}
if (!getNamespacePrefixBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, namespacePrefix_);
}
if (!getIriPrefixBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, iriPrefix_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.phenopackets.schema.v1.core.Resource)) {
return super.equals(obj);
}
org.phenopackets.schema.v1.core.Resource other = (org.phenopackets.schema.v1.core.Resource) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!getVersion()
.equals(other.getVersion())) return false;
if (!getNamespacePrefix()
.equals(other.getNamespacePrefix())) return false;
if (!getIriPrefix()
.equals(other.getIriPrefix())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (37 * hash) + NAMESPACE_PREFIX_FIELD_NUMBER;
hash = (53 * hash) + getNamespacePrefix().hashCode();
hash = (37 * hash) + IRI_PREFIX_FIELD_NUMBER;
hash = (53 * hash) + getIriPrefix().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.phenopackets.schema.v1.core.Resource parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.core.Resource parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.phenopackets.schema.v1.core.Resource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.phenopackets.schema.v1.core.Resource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Description of an external resource used for referencing an object. For example the resource may be an ontology such
* as the HPO or SNOMED.
* FHIR mapping: CodeSystem (http://www.hl7.org/fhir/codesystem.html)
*
*
* Protobuf type {@code org.phenopackets.schema.v1.core.Resource}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:org.phenopackets.schema.v1.core.Resource)
org.phenopackets.schema.v1.core.ResourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_Resource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_Resource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.phenopackets.schema.v1.core.Resource.class, org.phenopackets.schema.v1.core.Resource.Builder.class);
}
// Construct using org.phenopackets.schema.v1.core.Resource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
name_ = "";
url_ = "";
version_ = "";
namespacePrefix_ = "";
iriPrefix_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.phenopackets.schema.v1.core.Base.internal_static_org_phenopackets_schema_v1_core_Resource_descriptor;
}
@java.lang.Override
public org.phenopackets.schema.v1.core.Resource getDefaultInstanceForType() {
return org.phenopackets.schema.v1.core.Resource.getDefaultInstance();
}
@java.lang.Override
public org.phenopackets.schema.v1.core.Resource build() {
org.phenopackets.schema.v1.core.Resource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.phenopackets.schema.v1.core.Resource buildPartial() {
org.phenopackets.schema.v1.core.Resource result = new org.phenopackets.schema.v1.core.Resource(this);
result.id_ = id_;
result.name_ = name_;
result.url_ = url_;
result.version_ = version_;
result.namespacePrefix_ = namespacePrefix_;
result.iriPrefix_ = iriPrefix_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.phenopackets.schema.v1.core.Resource) {
return mergeFrom((org.phenopackets.schema.v1.core.Resource)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.phenopackets.schema.v1.core.Resource other) {
if (other == org.phenopackets.schema.v1.core.Resource.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
if (!other.getNamespacePrefix().isEmpty()) {
namespacePrefix_ = other.namespacePrefix_;
onChanged();
}
if (!other.getIriPrefix().isEmpty()) {
iriPrefix_ = other.iriPrefix_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.phenopackets.schema.v1.core.Resource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.phenopackets.schema.v1.core.Resource) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* for OBO Ontologies, the value of this string MUST always be the official
* OBO ID, which is always equivalent to the ID prefix in lower case.
* Examples: hp, go, mp, mondo
* Consult http://obofoundry.org for a complete list
* For other ontologies (e.g. SNOMED), use the prefix in identifiers.org
*
*
* string id = 1;
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* e.g. The Human Phenotype Ontology
* for OBO Ontologies, the value of this string SHOULD be the same as the title
* field on http://obofoundry.org
* however, this field is purely for information purposes and software
* should not encode any assumptions
*
*
* string name = 2;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
return this;
}
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
onChanged();
return this;
}
/**
*
* For OBO ontologies, this should always be the PURL, e.g.
* http://purl.obolibrary.org/obo/hp.owl, http://purl.obolibrary.org/obo/hp.obo
*
*
* string url = 3;
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
onChanged();
return this;
}
private java.lang.Object version_ = "";
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
*
* for OBO ontologies, this should be the versionIRI
*
*
* string version = 4;
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
private java.lang.Object namespacePrefix_ = "";
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public java.lang.String getNamespacePrefix() {
java.lang.Object ref = namespacePrefix_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespacePrefix_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public com.google.protobuf.ByteString
getNamespacePrefixBytes() {
java.lang.Object ref = namespacePrefix_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespacePrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public Builder setNamespacePrefix(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
namespacePrefix_ = value;
onChanged();
return this;
}
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public Builder clearNamespacePrefix() {
namespacePrefix_ = getDefaultInstance().getNamespacePrefix();
onChanged();
return this;
}
/**
*
* The prefix used in the CURIE of an OntologyClass e.g. HP, MP, ECO
* For example an HPO term will have a CURIE like this - HP:0012828 which should be used in combination with
* the iri_prefix to form a fully-resolvable IRI
*
*
* string namespace_prefix = 5;
*/
public Builder setNamespacePrefixBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
namespacePrefix_ = value;
onChanged();
return this;
}
private java.lang.Object iriPrefix_ = "";
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public java.lang.String getIriPrefix() {
java.lang.Object ref = iriPrefix_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
iriPrefix_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public com.google.protobuf.ByteString
getIriPrefixBytes() {
java.lang.Object ref = iriPrefix_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
iriPrefix_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public Builder setIriPrefix(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
iriPrefix_ = value;
onChanged();
return this;
}
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public Builder clearIriPrefix() {
iriPrefix_ = getDefaultInstance().getIriPrefix();
onChanged();
return this;
}
/**
*
* Full IRI prefix which can be used with the namespace_prefix and the OntologyClass::id to resolve to an IRI for a
* term. Tools such as the curie-util (https://github.com/prefixcommons/curie-util) can utilise this to produce
* fully-resolvable IRIs for an OntologyClass.
* e.g. Using the HPO term encoding the concept of 'Severe'
* OntologyClass:
* id: 'HP:0012828'
* label: 'Severe'
* Resource:
* namespace_prefix: 'HP'
* iri_prefix: 'http://purl.obolibrary.org/obo/HP_'
* the term can be resolved to http://purl.obolibrary.org/obo/HP_0012828
*
*
* string iri_prefix = 6;
*/
public Builder setIriPrefixBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
iriPrefix_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:org.phenopackets.schema.v1.core.Resource)
}
// @@protoc_insertion_point(class_scope:org.phenopackets.schema.v1.core.Resource)
private static final org.phenopackets.schema.v1.core.Resource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.phenopackets.schema.v1.core.Resource();
}
public static org.phenopackets.schema.v1.core.Resource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Resource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Resource(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.phenopackets.schema.v1.core.Resource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}