code: private List<DataSchema> parseSchema(final File schemaSourceFile, CourierParseResult result)
        throws IOException
    {
      SchemaParser parser = _schemaParserFactory.create(_schemaResolver);
      final FileInputStream schemaStream = new SchemaFileInputStream(schemaSourceFile);
      try
      {
        parser.setLocation(new FileDataSchemaLocation(schemaSourceFile));
        parser.parse(schemaStream);
        if (parser.hasError())
        {
          return Collections.emptyList();
        }
        return parser.topLevelDataSchemas();
      }
      finally
      {
        schemaStream.close();
        if (parser.hasError())
        {
          result.addMessage(schemaSourceFile.getPath() + ",");
          result.addMessage(parser.errorMessage());
        }
      }
    }
docs: Parse a source file to obtain the data schemas contained within.
  
  @param schemaSourceFile provides the source file.
  
  @param result {@link ParseResult} to update.
  
  @return the data schemas within the source file.
  
  @throws IOException if there is a file access error.