use of com.linkedin.data.schema.resolver.FileDataSchemaResolver in project rest.li by linkedin.
the class SchemaTranslator method getResolver.
/**
* Allows caller to specify a file path for schema resolution.
*/
private static DataSchemaResolver getResolver(SchemaParserFactory parserFactory, AvroToDataSchemaTranslationOptions options) {
String resolverPath = options.getFileResolutionPaths();
if (resolverPath != null) {
FileDataSchemaResolver resolver = new FileDataSchemaResolver(parserFactory, resolverPath);
resolver.setExtension(AVRO_FILE_EXTENSION);
return resolver;
} else {
return new DefaultDataSchemaResolver(parserFactory);
}
}
Aggregations