code: private void addForeignKey(String schema, String table, String column, int stepDepth, String alias, String[] foreignKeyParts) {
          Column c = add(schema, table, column, stepDepth, alias);
          c.isForeignKey = true;
          if (foreignKeyParts.length == 3) {
              Map<String, PropertyType> properties = this.filteredAllTables.get(foreignKeyParts[0] + "." + Topology.VERTEX_PREFIX + foreignKeyParts[1]);
              if (foreignKeyParts[2].endsWith(Topology.IN_VERTEX_COLUMN_END)) {
                  c.propertyType = properties.get(foreignKeyParts[2].substring(0, foreignKeyParts[2].length() - Topology.IN_VERTEX_COLUMN_END.length()));
                  c.foreignKeyDirection = Direction.IN;
                  c.foreignSchemaTable = SchemaTable.of(foreignKeyParts[0], foreignKeyParts[1]);
                  c.foreignKeyProperty = foreignKeyParts[2];
              } else {
                  c.propertyType = properties.get(foreignKeyParts[2].substring(0, foreignKeyParts[2].length() - Topology.OUT_VERTEX_COLUMN_END.length()));
                  c.foreignKeyDirection = Direction.OUT;
                  c.foreignSchemaTable = SchemaTable.of(foreignKeyParts[0], foreignKeyParts[1]);
                  c.foreignKeyProperty = foreignKeyParts[2];
              }
          } else {
              c.propertyType = PropertyType.LONG;
              c.foreignKeyDirection = (column.endsWith(Topology.IN_VERTEX_COLUMN_END) ? Direction.IN : Direction.OUT);
              c.foreignSchemaTable = SchemaTable.of(foreignKeyParts[0], foreignKeyParts[1].substring(0, foreignKeyParts[1].length() - Topology.IN_VERTEX_COLUMN_END.length()));
              c.foreignKeyProperty = null;
          }
      }
docs: add a new column
  
  @param schema          The column's schema
  @param table           The column's table
  @param column          The column
  @param stepDepth       The column's step depth.
  @param alias           The column's alias.
  @param foreignKeyParts The foreign key column broken up into its parts. schema, table and for user supplied identifiers the property name.