예제 #1
0
 public override bool LabelField(long labelField)
 {
     CheckClear();
     HasLabelField           = true;
     this.LabelFieldConflict = labelField;
     return(@delegate.LabelField(labelField));
 }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void node(InputEntityVisitor entity, String sourceDescription, long lineNumber, long position, Object id, Object[] properties, System.Nullable<long> propertyId, String[] labels, System.Nullable<long> labelField) throws java.io.IOException
        private static void Node(InputEntityVisitor entity, string sourceDescription, long lineNumber, long position, object id, object[] properties, long?propertyId, string[] labels, long?labelField)
        {
            ApplyProperties(entity, properties, propertyId);
            entity.Id(id, Group_Fields.Global);
            if (labelField != null)
            {
                entity.LabelField(labelField.Value);
            }
            else
            {
                entity.Labels(labels);
            }
            entity.EndOfEntity();
        }
예제 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void replayOnto(InputEntityVisitor visitor) throws java.io.IOException
        public virtual void ReplayOnto(InputEntityVisitor visitor)
        {
            // properties
            if (HasPropertyId)
            {
                visitor.PropertyId(PropertyIdConflict);
            }
            else if (PropertiesConflict.Count > 0)
            {
                int propertyCount = propertyCount();
                for (int i = 0; i < propertyCount; i++)
                {
                    if (HasIntPropertyKeyIds)
                    {
                        visitor.property(( int? )PropertyKey(i), PropertyValue(i));
                    }
                    else
                    {
                        visitor.Property(( string )PropertyKey(i), PropertyValue(i));
                    }
                }
            }

            // id
            if (HasLongId)
            {
                visitor.Id(LongId);
            }
            else if (ObjectId != null)
            {
                visitor.Id(ObjectId, IdGroup);
            }

            // labels
            if (HasLabelField)
            {
                visitor.LabelField(LabelFieldConflict);
            }
            else if (LabelsConflict.Count > 0)
            {
                visitor.Labels(LabelsConflict.ToArray());
            }

            // start id
            if (HasLongStartId)
            {
                visitor.StartId(LongStartId);
            }
            else if (ObjectStartId != null)
            {
                visitor.StartId(ObjectStartId, StartIdGroup);
            }

            // end id
            if (HasLongEndId)
            {
                visitor.EndId(LongEndId);
            }
            else if (ObjectEndId != null)
            {
                visitor.EndId(ObjectEndId, EndIdGroup);
            }

            // type
            if (HasIntType)
            {
                visitor.Type(IntType);
            }
            else if (!string.ReferenceEquals(StringType, null))
            {
                visitor.Type(StringType);
            }

            // all done
            visitor.EndOfEntity();
        }
예제 #4
0
 protected internal override void VisitRecord(RecordNodeCursor record, InputEntityVisitor visitor)
 {
     visitor.Id(record.EntityReference());
     visitor.LabelField(record.LabelField);
     VisitProperties(record, visitor);
 }