-
- All Known Subinterfaces:
LogicalGraph
,LogicalSubgraph
- All Known Implementing Classes:
OpenComposite
,OpenModelSink
,OpenModelSource
,OpenMultiModelSink
,OpenMultiModelSource
,OpenMultiRecordSink
,OpenMultiRecordSource
,OpenRecordSink
,OpenRecordSource
public interface PropertyValued
Shared interface implemented byLogicalGraph
andOpenComposite
. 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getProperty
Object getProperty(GraphPath path)
Returns a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.- Parameters:
path
- the path to the property.- Returns:
- the value of the property
-
getProperty
Object getProperty(String path)
Returns a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.- Parameters:
path
- the path to the property.- Returns:
- the value of the property
-
setProperty
void setProperty(GraphPath path, Object value)
Sets a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.- Parameters:
path
- the path to the property.value
- the new value of the property
-
setProperty
void setProperty(String path, Object value)
Sets a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.- Parameters:
path
- the path to the property.value
- the new value of the property
-
-