Package dev.enola.thing.proto
Class Thing
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
dev.enola.thing.proto.Thing
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ThingOrBuilder,Serializable
@Generated
public final class Thing
extends com.google.protobuf.GeneratedMessage
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThing is a generic datastructure for Linked Data.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsProperties(String key) Key string is an IRI (of a "property").booleanstatic Thingstatic final com.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").com.google.protobuf.Parser<Thing> 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").intinthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic Thing.Builderstatic Thing.BuildernewBuilder(Thing prototype) protected Thing.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ThingparseDelimitedFrom(InputStream input) static ThingparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ThingparseFrom(byte[] data) static ThingparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ThingparseFrom(com.google.protobuf.ByteString data) static ThingparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ThingparseFrom(com.google.protobuf.CodedInputStream input) static ThingparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ThingparseFrom(InputStream input) static ThingparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ThingparseFrom(ByteBuffer data) static ThingparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Thing> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
IRI_FIELD_NUMBER
- See Also:
-
PROPERTIES_FIELD_NUMBER
- See Also:
-
-
Method Details
-
getDescriptor
-
internalGetMapFieldReflection
- Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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.
-
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
-
isInitialized
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Thing parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Thing parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Thing parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Thing parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Thing parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Thing parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Thing parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Thing parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Thing parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-