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 Type
    Method
    Description
     
     
     
    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").
     
    boolean
    Key string is an IRI (of a "property").
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    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.ByteString
    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").
    Deprecated.
    Deprecated.
    int
    Key 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.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    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").
    Key string is an IRI (of a "property").
    setIri(String 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").
    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
    • clear

      public Thing.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Thing.Builder>
    • getDefaultInstanceForType

      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Thing build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Thing buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Thing.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Thing.Builder>
    • mergeFrom

      public Thing.Builder mergeFrom(Thing other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Thing.Builder>
      Throws:
      IOException
    • getIri

      public String 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:
      getIri in interface ThingOrBuilder
      Returns:
      The iri.
    • getIriBytes

      public com.google.protobuf.ByteString 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:
      getIriBytes in interface ThingOrBuilder
      Returns:
      The bytes for iri.
    • setIri

      public Thing.Builder setIri(String 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"). 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

      public Thing.Builder 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"). 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

      public int getPropertiesCount()
      Description copied from interface: ThingOrBuilder
       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:
      getPropertiesCount in interface ThingOrBuilder
    • containsProperties

      public boolean containsProperties(String key)
       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:
      containsProperties in interface ThingOrBuilder
    • getProperties

      Deprecated.
      Use getPropertiesMap() instead.
      Specified by:
      getProperties in interface ThingOrBuilder
    • 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:
      getPropertiesMap in interface ThingOrBuilder
    • getPropertiesOrDefault

      public Value getPropertiesOrDefault(String key, Value defaultValue)
       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:
      getPropertiesOrDefault in interface ThingOrBuilder
    • 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:
      getPropertiesOrThrow in interface ThingOrBuilder
    • 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

      public Thing.Builder putProperties(String key, Value value)
       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;