public interface PropertyValued
LogicalGraph
and OpenComposite
.
Both graphs and OpenComposites support getting and setting of properties
of the operators that are contained within. This is normally used in-conjunction
with JSON parsing, where there is a graph defined via JSON and you needs
to override properties defined in the JSON. For example:
//create a json parser JSON jsonParser= new JSON(); //parse json from a file into a LogicalGraph. //For this example, assume the json contains a ReadDelimitedText //operator named "reader" String json= FileUtil.readFileString(new File(file), charset); LogicalGraph graph= jsonParser.parse(json, LogicalGraph.class); //override the reader's source to use a different file graph.setProperty("reader.source","c:/myinput.txt"); //run the graph graph.run();Clients should generally not need to implement this interface.
Modifier and Type | Method and Description |
---|---|
Object |
getProperty(GraphPath path)
Returns a property of the given path.
|
Object |
getProperty(String path)
Returns a property of the given path.
|
void |
setProperty(GraphPath path,
Object value)
Sets a property of the given path.
|
void |
setProperty(String path,
Object value)
Sets a property of the given path.
|
Object getProperty(GraphPath path)
path
- the path to the property.Object getProperty(String path)
path
- the path to the property.void setProperty(GraphPath path, Object value)
path
- the path to the property.value
- the new value of the propertyvoid setProperty(String path, Object value)
path
- the path to the property.value
- the new value of the propertyCopyright © 2021 Actian Corporation. All rights reserved.