Returns "schema.json" files and sorts them based on their source set priorities.

@return - schema files sorted by priority based on source set priority
423854
private List<File> getSchemaFilesFrom(Set<File> files) {
    return FluentIterable.from(files).filter(new Predicate<File>() {
      @Override public boolean apply(@Nullable File file) {
        return file != null && file.getName().equals(GraphQLSourceDirectorySet.SCHEMA_FILE_NAME);
      }
    }).toSortedList(new Comparator<File>() {
      @Override public int compare(File o1, File o2) {
        String sourceSet1 = getSourceSetNameFromFile(o1);
        String sourceSet2 = getSourceSetNameFromFile(o2);
        // negative because the sourceSets list is in reverse order
        return -(sourceSets.indexOf(sourceSet1) - sourceSets.indexOf(sourceSet2));
      }
    });
  }
439306
protected SortedSources getSources() {
        SortedSources sources = new SortedSources(getUserSources());
        if (addDefaultSourcesFlag()) {
            sources.addAll(DefaultSources.getDefaultSources(getClassLoader()));
        }
        if (addDiscoveredSourcesFlag()) {
            sources.addAll(DefaultSources.getDiscoveredSources(getClassLoader()));
        }
        sources = sources.unmodifiable();
        return sources;
    }
283487
function copySchemaFiles() {
    const resolvedSrcSchemaPaths = path.resolve(rootDir, srcSchemaPaths);

    glob(resolvedSrcSchemaPaths, void(0), function(error, files) {
        files.forEach((filePath) => {
        const destSchemaPath = filePath.replace(/(\bsrc\b)(?!.*\1)/, destDir);
            fs.copyFileSync(filePath, destSchemaPath);
        });
    });
}
56439
protected static function getSchemaFields()
    {
        $attribute = 'schema-fields';

        if (!static::hasClassAttribute($attribute)) {
            $allFields = static::getAllFields();
            $excludeFields = static::getExcludeFields();
            $schemaFields = array_diff($allFields, $excludeFields);

            static::setClassAttribute($attribute, $schemaFields);
        }

        return static::getClassAttribute($attribute);
    }
581762
public function getJsonSearchSchemas()
	{
		$list = [];

		foreach( $this->getControllers() as $name => $controller ) {
			$list[$name] = $controller->getSearchSchema();
		}

		if( ( $json = json_encode( $list ) ) === null ) {
			throw new \RuntimeException( 'Unable to encode schemas to JSON' );
		}

		return $json;
	}
94836
def schema_from_json(self, file_or_path):
        
        if isinstance(file_or_path, io.IOBase):
            return self._schema_from_json_file_object(file_or_path)

        with open(file_or_path) as file_obj:
            return self._schema_from_json_file_object(file_obj)
744156
public Collection<String> getDataSourceNames(final String shardingSchemaName) {
        return schemaGroup.containsKey(shardingSchemaName) ? schemaGroup.get(shardingSchemaName) : Collections.<String>emptyList();
    }
268851
public Priority[] filePriorities() {
        int_vector v = th.get_file_priorities2();
        int size = (int) v.size();
        Priority[] arr = new Priority[size];
        for (int i = 0; i < size; i++) {
            arr[i] = Priority.fromSwig(v.get(i));
        }
        return arr;
    }
1135605
@GET
    @Path("{guid}/schema")
    @Consumes(Servlets.JSON_MEDIA_TYPE)
    @Produces(Servlets.JSON_MEDIA_TYPE)
    public Response schema(@PathParam("guid") String guid) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("==> LineageResource.schema({})", guid);
        }

        AtlasPerfTracer perf = null;
        try {
            if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
                perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "LineageResource.schema(" + guid + ")");
            }

            final String jsonResult = lineageService.getSchemaForEntity(guid);

            JSONObject response = new JSONObject();
            response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
            response.put(AtlasClient.RESULTS, new JSONObject(jsonResult));

            return Response.ok(response).build();
        } catch (SchemaNotFoundException e) {
            LOG.error("schema not found for {}", guid);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
        } catch (EntityNotFoundException e) {
            LOG.error("table entity not found for {}", guid);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND));
        } catch (DiscoveryException | IllegalArgumentException e) {
            LOG.error("Unable to get schema for entity guid={}", guid, e);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
        } catch (WebApplicationException e) {
            LOG.error("Unable to get schema for entity guid={}", guid, e);
            throw e;
        } catch (Throwable e) {
            LOG.error("Unable to get schema for entity={}", guid, e);
            throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
        } finally {
            AtlasPerfTracer.log(perf);

            if (LOG.isDebugEnabled()) {
                LOG.debug("<== LineageResource.schema({})", guid);
            }
        }
    }
1096901
public function getSchemaDataDefaults()
    {
        $schema = array_merge(
            parent::getSchemaDataDefaults(),
            [
                'name' => $this->getName() . '[]',
                'lazyLoad' => $this->getShouldLazyLoad(),
                'creatable' => $this->getCanCreate(),
                'multi' => $this->getIsMultiple(),
                'value' => $this->formatOptions($this->Value()),
                'disabled' => $this->isDisabled() || $this->isReadonly(),
            ]
        );

        if (!$this->getShouldLazyLoad()) {
            $schema['options'] = $this->getOptions()->toNestedArray();
        } else {
            $schema['optionUrl'] = $this->getSuggestURL();
        }

        return $schema;
    }
664636
public function getSchemas()
    {
        if (count($this->schemas) === 0) {
            $this->schemas['metadata'] = $this->em->getMetadataFactory()->getAllMetadata();
            $this->schemas['fromSchema'] = $this->em->getConnection()->getSchemaManager()->createSchema();
            $this->schemas['toSchema'] = $this->schemaTool->getSchemaFromMetadata($this->schemas['metadata']);
        }

        // cloning schemas is much more ligther than re-generating them for each platform
        return array(
            'fromSchema' => clone $this->schemas['fromSchema'],
            'toSchema' => clone $this->schemas['toSchema'],
            'metadata' => $this->schemas['metadata'],
        );
    }
349404
public java.util.List<InventoryItemSchema> getSchemas() {
        if (schemas == null) {
            schemas = new com.amazonaws.internal.SdkInternalList<InventoryItemSchema>();
        }
        return schemas;
    }
501790
public Json jsonSchema(String jsonSchema) {
		Preconditions.checkNotNull(jsonSchema);
		this.jsonSchema = jsonSchema;
		this.schema = null;
		this.deriveSchema = null;
		return this;
	}
1297679
private function queryTableSchemas()
    {
        $tableSchemas = [];
        if (count($this->cachingSchemas) === 0) {
            $tableSchemas = $this->findTableSchemas();
        } else {
            //Find tables from given schemas
            foreach ($this->cachingSchemas as $shemaName) {
                $tableSchemas = array_merge($tableSchemas, $this->findTableSchemas($shemaName));
            }
        }

        return $tableSchemas;
    }
761262
function JsonSchema (schema) {
  if (!schema) {
    throw ono({ status: 500 }, "Missing JSON schema");
  }
  if (schema.type !== undefined && dataTypes.indexOf(schema.type) === -1) {
    throw ono({ status: 500 }, "Invalid JSON schema type: %s", schema.type);
  }

  this.schema = schema;
}
700097
public function getAllMetadata()
    {
        $schema   = $this->schemaGenerator->parse($this->jsonConfig->getFile($this->config));
        $filePath = Installer::getDirectory(Installer::TMP) . 'schema.json';

        file_put_contents($filePath, $schema->toString());

        $collection = new MetaDataCollection();

        if ($this->isFirstLevelIsDto($schema) === true) {
            $metadata = $this->createMetadata('master');
            $metadata = $this->hydrateProperties($schema->getProperties(), $metadata, $collection);
            $collection->append($metadata);
        } else {
            // each proporties is considered as metadata
            foreach ($schema->getProperties() as $propName => $prop) {
                if (count($prop->getProperties()) === 0) { // No column, the relation replace column
                    foreach ($prop->getItems() as $itemValue) {
                        /* @var $itemValue \JSONSchema\Structure\Item */
                        $metadata = $this->createMetadata($propName);
                        $metadata = $this->hydrateProperties($itemValue->getProperties(), $metadata, $collection);
                        $collection->append($metadata);
                    }
                } else { // have column, hydrate them
                    $metadata = $this->createMetadata($propName);
                    $metadata = $this->hydrateProperties($prop->getProperties(), $metadata, $collection);
                    $metadata = $this->hydrateItems($propName, $prop->getItems(), $metadata, $collection);
                    $collection->append($metadata);
                }
            }
        }

        return $collection;
    }
283074
def _get_schema_file(extension, path):
        
        for file in os.listdir(path):
            if file.endswith(extension):
                return os.path.join(path, file)