|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.Schema.Parser
public static class Schema.Parser
A parser for JSON-format schemas. Each named schema parsed with a parser is added to the names known to the parser so that subsequently parsed schemas may refer to it by name.
| Constructor Summary | |
|---|---|
Schema.Parser()
|
|
| Method Summary | |
|---|---|
Schema.Parser |
addTypes(Map<String,Schema> types)
Adds the provided types to the set of defined, named types known to this parser. |
Map<String,Schema> |
getTypes()
Returns the set of defined, named types known to this parser. |
boolean |
getValidate()
True iff names are validated. |
Schema |
parse(File file)
Parse a schema from the provided file. |
Schema |
parse(InputStream in)
Parse a schema from the provided stream. |
Schema |
parse(String s)
Parse a schema from the provided string. |
Schema.Parser |
setValidate(boolean validate)
Enable or disable name validation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Schema.Parser()
| Method Detail |
|---|
public Schema.Parser addTypes(Map<String,Schema> types)
public Map<String,Schema> getTypes()
public Schema.Parser setValidate(boolean validate)
public boolean getValidate()
public Schema parse(File file)
throws IOException
IOException
public Schema parse(InputStream in)
throws IOException
IOExceptionpublic Schema parse(String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||