Esempio n. 1
0
 def _of(thing_proto: concept_proto.Thing):
     return Relation(concept_proto_reader.iid(thing_proto.iid))
Esempio n. 2
0
 def _of(thing_proto: concept_proto.Thing):
     return BooleanAttribute(concept_proto_reader.iid(thing_proto.iid),
                             thing_proto.value.boolean)
Esempio n. 3
0
 def _of(thing_proto: concept_proto.Thing):
     return StringAttribute(concept_proto_reader.iid(thing_proto.iid),
                            thing_proto.value.string)
Esempio 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))
Esempio n. 5
0
 def _of(thing_proto: concept_proto.Thing):
     return DoubleAttribute(concept_proto_reader.iid(thing_proto.iid),
                            thing_proto.value.double)