Class DataTopic
java.lang.Object
org.radarbase.config.AvroTopicConfig
org.radarbase.schema.specification.DataTopic
- Direct Known Subclasses:
AppDataTopic,QuestionnaireDataTopic,StreamDataTopic
public class DataTopic
extends org.radarbase.config.AvroTopicConfig
DataTopic topic from a data producer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDoc()Get all topic names that are provided by the data.Stream<org.radarbase.topic.AvroTopic<?,?>> getTopics(SchemaCatalogue schemaCatalogue) Get all Avro topics that are provided by the data.getType()org.radarcns.catalogue.UnitgetUnit()protected voidpropertiesMap(Map<String, Object> map, boolean reduced) Turns this topic into an descriptive properties map.voidsetKeySchema(String schema) voidsetValueSchema(String schema) toString()toString(boolean prettyString) Convert the topic to String, either as dense string or as verbose YAML string.Methods inherited from class org.radarbase.config.AvroTopicConfig
getKeySchema, getTags, getTopic, getValueSchema, parseAvroTopic, setTags, setTopic
-
Constructor Details
-
DataTopic
public DataTopic()DataTopic using ObservationKey as the default key.
-
-
Method Details
-
getTopicNames
Get all topic names that are provided by the data. -
getTopics
public Stream<org.radarbase.topic.AvroTopic<?,?>> getTopics(SchemaCatalogue schemaCatalogue) throws IOException Get all Avro topics that are provided by the data.- Throws:
IOException
-
getType
-
getDoc
-
getSampleRate
-
getUnit
public org.radarcns.catalogue.Unit getUnit() -
getFields
-
setKeySchema
- Overrides:
setKeySchemain classorg.radarbase.config.AvroTopicConfig
-
setValueSchema
- Overrides:
setValueSchemain classorg.radarbase.config.AvroTopicConfig
-
toString
-
toString
Convert the topic to String, either as dense string or as verbose YAML string.- Parameters:
prettyString- Whether the result should be a verbose pretty-printed string.- Returns:
- topic as a string.
-
propertiesMap
Turns this topic into an descriptive properties map.- Parameters:
map- properties to add to.reduced- whether to set a reduced set of properties, to decrease verbosity.
-