Get the schema as a collection of fields.
We guarantee the ordering by field id.

@return the sorted collection of fields
514019
public ArrayList<SchemaField> getSchema()
    {
        final ArrayList<SchemaField> items = new ArrayList<SchemaField>(schemaFields.values());

        Collections.sort(items, new Comparator<SchemaField>()
        {
            @Override
            public int compare(final SchemaField left, final SchemaField right)
            {
                return left.getId() - right.getId();
            }
        });

        return items;
    }
824505
protected Field getField()
    {
        // make sure class was initialized
        if (!isInitialized)
        {
            /*
            first we build a graph of fields for nested fields support,
            but for best performance on non-nested fields we also keep
            the latest field separate and set a 'is nested' flag.
            */
            fieldsList = getFieldGraph(makeAccessible());
            field = (Field) fieldsList.get(fieldsList.size() - 1);
            nonNested = fieldsList.size() == 1;
            isInitialized = true;
        }
        return field;
    }
208455
public function getSchema()
    {
        if ($this->_schema === null) {
            $this->_schema = $this->_initializeSchema(
                $this->getConnection()
                    ->getSchemaCollection()
                    ->describe($this->getTable())
            );
        }

        return $this->_schema;
    }
1004589
public JField []getFields()
  {
    ArrayList<JField> fieldList = new ArrayList<JField>();

    getFields(fieldList);

    JField []fields = new JField[fieldList.size()];
    fieldList.toArray(fields);

    return fields;
  }
864412
def get_field_list(fields, schema):
  
  # If the fields weren't supplied get them from the schema.
  if schema:
    all_fields = [f['name'] for f in schema._bq_schema if f['type'] != 'RECORD']

  if isinstance(fields, list):
    if schema:
      # validate fields exist
      for f in fields:
        if f not in all_fields:
          raise Exception('Cannot find field %s in given schema' % f)
    return fields
  if isinstance(fields, basestring) and fields != '*':
    if schema:
      # validate fields exist
      for f in fields.split(','):
        if f not in all_fields:
          raise Exception('Cannot find field %s in given schema' % f)
      return fields.split(',')
  if not schema:
    return []
  return all_fields
525666
public Schema schema(TableSchema schema) {
		tableSchema.clear();
		lastField = null;
		for (int i = 0; i < schema.getFieldCount(); i++) {
			field(schema.getFieldName(i).get(), schema.getFieldType(i).get());
		}
		return this;
	}
239563
@Override
	public SchemaDefinition readSchema() {

		SchemaRepresentation representation = template
				.execute(solrClient -> new SchemaRequest().process(solrClient, collection).getSchemaRepresentation());

		SchemaDefinition sd = new SchemaDefinition(collection);

		for (Map<String, Object> fieldValueMap : representation.getFields()) {
			sd.addFieldDefinition(FieldDefinition.fromMap(fieldValueMap));
		}
		for (Map<String, Object> fieldValueMap : representation.getCopyFields()) {

			CopyFieldDefinition cf = CopyFieldDefinition.fromMap(fieldValueMap);
			sd.addCopyField(cf);

			if (sd.getFieldDefinition(cf.getSource()) != null) {
				sd.getFieldDefinition(cf.getSource()).setCopyFields(cf.getDestination());
			}
		}

		return sd;
	}
496314
public Set<String> getFieldNamesCollection() {
        final Set<String> set = new HashSet<>(_size);
        for (HttpField f : this) {
            if (f != null)
                set.add(f.getName());
        }
        return set;
    }
1230724
public function Fields()
    {
        foreach ($this->getExtraFields() as $field) {
            if (!$this->fields->fieldByName($field->getName())) {
                $this->fields->push($field);
            }
        }

        return $this->fields;
    }
349404
public java.util.List<InventoryItemSchema> getSchemas() {
        if (schemas == null) {
            schemas = new com.amazonaws.internal.SdkInternalList<InventoryItemSchema>();
        }
        return schemas;
    }
849302
@SuppressWarnings("unchecked")
	@Override
	public Collection<String> getCopyFields() {

		Indexed indexedAnnotation = getIndexAnnotation();
		if (indexedAnnotation != null && indexedAnnotation.copyTo().length > 0) {
			return CollectionUtils.arrayToList(indexedAnnotation.copyTo());
		}
		return Collections.emptyList();
	}
315427
def _clean_schema_fields(self, fields):
        """"""
        fields_sorted = sorted(fields, key=lambda field: field["name"])
        # Ignore mode and description when comparing schemas.
        return [
            {"name": field["name"], "type": field["type"]}
            for field in fields_sorted
        ]
1167493
public List<DOField> getFields() {
	List<DOField> ret = new ArrayList<DOField>();
		DOType typ = this;
		while(typ != null) {
			ret.addAll(typ.getDeclaredFields());
			typ = typ.getSuperType();
		}
		return ret;
	}
1013260
public SchemaList getAllOf() {
        if(!getJson().has("allOf")) return null;
        return new SchemaList(getEmptySchema("allOf")).wrap(getJson().optJsonArray("allOf"));
    }
953219
public Sort sort() {
        SortField[] partitionKeySort = tokenMapper.sortFields();
        SortField[] clusteringKeySort = clusteringKeyMapper.sortFields();
        return new Sort(ArrayUtils.addAll(partitionKeySort, clusteringKeySort));
    }
682537
def get_ordering_fields_lookups(self):
        
        ordering_field = []
        for field_name in self.get_ordering_fields():
            ordering_field.append(self._get_ordering_field_lookup(field_name))
        return ordering_field
480015
public java.util.List<Field> getFields() {
        if (fields == null) {
            fields = new com.amazonaws.internal.SdkInternalList<Field>();
        }
        return fields;
    }