示例#1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TRelation");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Neo4jID != null && __isset.Neo4jID)
         {
             field.Name = "Neo4jID";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Neo4jID);
             oprot.WriteFieldEnd();
         }
         if (AoKID != null && __isset.AoKID)
         {
             field.Name = "AoKID";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(AoKID);
             oprot.WriteFieldEnd();
         }
         if (Labels != null && __isset.Labels)
         {
             field.Name = "Labels";
             field.Type = TType.Set;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteSetBegin(new TSet(TType.String, Labels.Count));
                 foreach (string _iter40 in Labels)
                 {
                     oprot.WriteString(_iter40);
                 }
                 oprot.WriteSetEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (RelationType != null && __isset.RelationType)
         {
             field.Name = "RelationType";
             field.Type = TType.String;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(RelationType);
             oprot.WriteFieldEnd();
         }
         if (SourceNode != null && __isset.SourceNode)
         {
             field.Name = "SourceNode";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             SourceNode.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (TargetNode != null && __isset.TargetNode)
         {
             field.Name = "TargetNode";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             TargetNode.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Properties != null && __isset.Properties)
         {
             field.Name = "Properties";
             field.Type = TType.Map;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteMapBegin(new TMap(TType.String, TType.Struct, Properties.Count));
                 foreach (string _iter41 in Properties.Keys)
                 {
                     oprot.WriteString(_iter41);
                     Properties[_iter41].Write(oprot);
                 }
                 oprot.WriteMapEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (__isset.AttentionLevel)
         {
             field.Name = "AttentionLevel";
             field.Type = TType.Double;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             oprot.WriteDouble(AttentionLevel);
             oprot.WriteFieldEnd();
         }
         if (TruthValue != null && __isset.TruthValue)
         {
             field.Name = "TruthValue";
             field.Type = TType.Map;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteMapBegin(new TMap(TType.String, TType.Double, TruthValue.Count));
                 foreach (string _iter42 in TruthValue.Keys)
                 {
                     oprot.WriteString(_iter42);
                     oprot.WriteDouble(TruthValue[_iter42]);
                 }
                 oprot.WriteMapEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }