Exemplo n.º 1
0
 def _of(thing_proto: concept_proto.Thing):
     return Relation(concept_proto_reader.iid(thing_proto.iid))
Exemplo n.º 2
0
 def _of(thing_proto: concept_proto.Thing):
     return BooleanAttribute(concept_proto_reader.iid(thing_proto.iid),
                             thing_proto.value.boolean)
Exemplo n.º 3
0
 def _of(thing_proto: concept_proto.Thing):
     return StringAttribute(concept_proto_reader.iid(thing_proto.iid),
                            thing_proto.value.string)
Exemplo n.º 4
0
 def _of(thing_proto: concept_proto.Thing):
     return DateTimeAttribute(
         concept_proto_reader.iid(thing_proto.iid),
         datetime.fromtimestamp(
             float(thing_proto.value.date_time) / 1000.0))
Exemplo n.º 5
0
 def _of(thing_proto: concept_proto.Thing):
     return DoubleAttribute(concept_proto_reader.iid(thing_proto.iid),
                            thing_proto.value.double)