Package dev.enola.thing.proto
Class Thing.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Thing.Builder>
com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
dev.enola.thing.proto.Thing.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ThingOrBuilder,Cloneable
- Enclosing class:
Thing
public static final class Thing.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
implements ThingOrBuilder
Thing is a generic datastructure for Linked Data. It is inspired by the Resource Description Framework (RDF) and its Subject / Predicate / Object "Triples". It's however not "flat", but represents "Blank Nodes" as "Unlabeled Nested" sub-structures, which makes it resemble regular ProtoBuf / JSON / YAML. This is also very close to (essentially really just a Protocol Buffer representation of) the "Expanded Term Definition" of the W3C's JSON-LD format. This obviously also looks a bit similar to Proto's Struct (see google/protobuf/struct.proto), with additional explicit Links. Cap’n Proto's interface types, which are passed by reference instead of value over its RPC protocol, also somewhat resemble the explicit links used here.Protobuf type
dev.enola.thing.Thing-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()clearIri()The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes").booleancontainsProperties(String key) Key string is an IRI (of a "property").static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetIri()The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes").com.google.protobuf.ByteStringThe IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes").Deprecated.Deprecated.intKey string is an IRI (of a "property").Key string is an IRI (of a "property").getPropertiesOrDefault(String key, Value defaultValue) Key string is an IRI (of a "property").Key string is an IRI (of a "property").protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) putAllProperties(Map<String, Value> values) Key string is an IRI (of a "property").putProperties(String key, Value value) Key string is an IRI (of a "property").Key string is an IRI (of a "property").removeProperties(String key) Key string is an IRI (of a "property").The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes").setIriBytes(com.google.protobuf.ByteString value) The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes").Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
-
internalGetMapFieldReflection
- Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
-
getDescriptorForType
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Thing.Builder>
-
mergeFrom
-
isInitialized
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
-
mergeFrom
public Thing.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Thing.Builder>- Throws:
IOException
-
getIri
The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes"). It's not even mandatory required for the "top outer most" one either. (TODO Why do we even need this?! Why not just use an https://schema.org/identifier field/attribute?)
string iri = 1;- Specified by:
getIriin interfaceThingOrBuilder- Returns:
- The iri.
-
getIriBytes
The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes"). It's not even mandatory required for the "top outer most" one either. (TODO Why do we even need this?! Why not just use an https://schema.org/identifier field/attribute?)
string iri = 1;- Specified by:
getIriBytesin interfaceThingOrBuilder- Returns:
- The bytes for iri.
-
setIri
The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes"). It's not even mandatory required for the "top outer most" one either. (TODO Why do we even need this?! Why not just use an https://schema.org/identifier field/attribute?)
string iri = 1;- Parameters:
value- The iri to set.- Returns:
- This builder for chaining.
-
clearIri
The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes"). It's not even mandatory required for the "top outer most" one either. (TODO Why do we even need this?! Why not just use an https://schema.org/identifier field/attribute?)
string iri = 1;- Returns:
- This builder for chaining.
-
setIriBytes
The IRI is often only set on the "top outer most", and may well be unset for things "contained" in other things (RDF calls this "blank nodes"). It's not even mandatory required for the "top outer most" one either. (TODO Why do we even need this?! Why not just use an https://schema.org/identifier field/attribute?)
string iri = 1;- Parameters:
value- The bytes for iri to set.- Returns:
- This builder for chaining.
-
getPropertiesCount
Description copied from interface:ThingOrBuilderKey string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2;- Specified by:
getPropertiesCountin interfaceThingOrBuilder
-
containsProperties
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2;- Specified by:
containsPropertiesin interfaceThingOrBuilder
-
getProperties
Deprecated.UsegetPropertiesMap()instead.- Specified by:
getPropertiesin interfaceThingOrBuilder
-
getPropertiesMap
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2;- Specified by:
getPropertiesMapin interfaceThingOrBuilder
-
getPropertiesOrDefault
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2;- Specified by:
getPropertiesOrDefaultin interfaceThingOrBuilder
-
getPropertiesOrThrow
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2;- Specified by:
getPropertiesOrThrowin interfaceThingOrBuilder
-
clearProperties
-
removeProperties
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2; -
getMutableProperties
Deprecated.Use alternate mutation accessors instead. -
putProperties
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2; -
putAllProperties
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2; -
putPropertiesBuilderIfAbsent
Key string is an IRI (of a "property"). Nota Bene: This is never a “name” (or even a “label”), but really an IRI. In theory such a Property IRI could be unique to only this single Thing; more typically, it is shared among things of the same type. Crucially though, it could also be an IRI of a property that is common among attributes of *different* types! Classic examples are e.g. https://schema.org/name (rdfs:label 🏷️) or rdf:type.
map<string, .dev.enola.thing.Value> properties = 2;
-