T
- the type of graph configuration this factory creates.
public abstract class AbstractGraphConfigFactory<T extends GraphConfig>
extends java.lang.Object
Constructor and Description |
---|
AbstractGraphConfigFactory() |
Modifier and Type | Method and Description |
---|---|
T |
fromFile(java.io.File file)
Parses a graph config given as JSON file.
|
T |
fromFilePath(java.lang.String path)
Parses a graph config given as path to a JSON file.
|
T |
fromInputStream(java.io.InputStream is)
same as
fromInputStream(InputStream, String) , but with null passed as parentPath |
T |
fromInputStream(java.io.InputStream is, java.lang.String parentPath)
Parses a graph config given as input stream.
|
T |
fromJson(java.lang.String json)
Same as
fromJson(String, String) , but with null passed as parentPath. |
T |
fromJson(java.lang.String json, java.lang.String parentPath)
Parses a graph config given as JSON string.
|
T |
fromPath(java.lang.String path)
Parses a graph config given as path.
|
T |
fromProperties(java.io.InputStream is)
same as
fromProperties(Properties) , but instantiates a new Properties object from the given InputStream . |
abstract T |
fromProperties(java.util.Properties props)
Parses a graph config given as
Properties file. |
public final T fromFile(java.io.File file) throws java.io.IOException
file
- the input filejava.io.IOException
- if there was any I/O error during reading given filepublic final T fromFilePath(java.lang.String path) throws java.io.IOException
path
- the path to the JSON filejava.io.IOException
- if there was any I/O error during reading given filepublic final T fromInputStream(java.io.InputStream is) throws java.io.IOException
fromInputStream(InputStream, String)
, but with null
passed as parentPathis
- the input stream to readjava.io.IOException
- if there was any I/O error during reading given input streampublic final T fromInputStream(java.io.InputStream is, java.lang.String parentPath) throws java.io.IOException
is
- the input stream to readparentPath
- if not null
, relative paths found in config will resolved against this parentPathjava.io.IOException
- if there was any I/O error during reading given input streampublic final T fromJson(java.lang.String json) throws java.io.IOException
fromJson(String, String)
, but with null
passed as parentPath.json
- the input JSON stringjava.io.IOException
- if there was any I/O error during reading given JSON stringpublic final T fromJson(java.lang.String json, java.lang.String parentPath) throws java.io.IOException
json
- the input JSON stringparentPath
- if not null
, relative paths found in config will resolved against this parentPathjava.io.IOException
- if there was any I/O error during reading given JSON stringpublic final T fromPath(java.lang.String path) throws java.io.IOException
path
- the path to parse fromjava.io.IOException
- if there was any I/O error during reading given pathpublic final T fromProperties(java.io.InputStream is) throws java.io.IOException
fromProperties(Properties)
, but instantiates a new Properties
object from the given InputStream
.is
- the input stream containing graph configuration in Properties
format.java.io.IOException
- if there was any I/O error during reading given input streampublic abstract T fromProperties(java.util.Properties props)
Properties
file.props
- the input propertiesCopyright © 2017 Oracle Corp. All Rights Reserved.