Class ProtobufSchemaParser<U extends com.google.protobuf.Message>
java.lang.Object
io.apicurio.registry.serde.protobuf.ProtobufSchemaParser<U>
- All Implemented Interfaces:
io.apicurio.registry.resolver.SchemaParser<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema,U>
public class ProtobufSchemaParser<U extends com.google.protobuf.Message>
extends Object
implements io.apicurio.registry.resolver.SchemaParser<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema,U>
- Author:
- Fabian Martinez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.apicurio.registry.resolver.ParsedSchema<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema>getSchemaFromData(io.apicurio.registry.resolver.data.Record<U> data) io.apicurio.registry.resolver.ParsedSchema<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema>getSchemaFromData(io.apicurio.registry.resolver.data.Record<U> data, boolean dereference) io.apicurio.registry.utils.protobuf.schema.ProtobufSchemaparseSchema(byte[] rawSchema, Map<String, io.apicurio.registry.resolver.ParsedSchema<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema>> resolvedReferences) com.squareup.wire.schema.internal.parser.ProtoFileElementtoProtoFileElement(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor) This method converts the Descriptor to a ProtoFileElement that allows to get a textual representation .proto fileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.apicurio.registry.resolver.SchemaParser
supportsExtractSchemaFromData
-
Constructor Details
-
ProtobufSchemaParser
public ProtobufSchemaParser()
-
-
Method Details
-
artifactType
- Specified by:
artifactTypein interfaceio.apicurio.registry.resolver.SchemaParser<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema,U extends com.google.protobuf.Message> - See Also:
-
parseSchema
public io.apicurio.registry.utils.protobuf.schema.ProtobufSchema parseSchema(byte[] rawSchema, Map<String, io.apicurio.registry.resolver.ParsedSchema<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema>> resolvedReferences) - Specified by:
parseSchemain interfaceio.apicurio.registry.resolver.SchemaParser<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema,U extends com.google.protobuf.Message> - See Also:
-
getSchemaFromData
public io.apicurio.registry.resolver.ParsedSchema<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema> getSchemaFromData(io.apicurio.registry.resolver.data.Record<U> data) - Specified by:
getSchemaFromDatain interfaceio.apicurio.registry.resolver.SchemaParser<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema,U extends com.google.protobuf.Message> - See Also:
-
SchemaParser.getSchemaFromData(Record)
-
getSchemaFromData
public io.apicurio.registry.resolver.ParsedSchema<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema> getSchemaFromData(io.apicurio.registry.resolver.data.Record<U> data, boolean dereference) - Specified by:
getSchemaFromDatain interfaceio.apicurio.registry.resolver.SchemaParser<io.apicurio.registry.utils.protobuf.schema.ProtobufSchema,U extends com.google.protobuf.Message>
-
toProtoFileElement
public com.squareup.wire.schema.internal.parser.ProtoFileElement toProtoFileElement(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor) This method converts the Descriptor to a ProtoFileElement that allows to get a textual representation .proto file- Parameters:
fileDescriptor-- Returns:
- textual protobuf representation
-