public class AbstractParaViewProxy extends java.lang.Object implements IParaViewProxy
IParaViewProxy
and
handles updating the ParaView web client when the proxy's information
changes.Constructor and Description |
---|
AbstractParaViewProxy(java.net.URI uri)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
IVizConnection<IParaViewWebClient> |
getConnection()
Gets the current connection associated with this proxy.
|
java.util.Set<java.lang.String> |
getFeatureCategories()
Gets the categories of "features" in the file that can be rendered.
|
java.util.Set<java.lang.String> |
getFeatures(java.lang.String category)
Gets the file's "features" that can be rendered for the specified
category.
|
int |
getFileId()
Gets the ID of the underlying "file" object.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Gets the current properties for the proxy.
|
java.lang.String |
getProperty(java.lang.String name)
Gets the current value for the proxy's specified property.
|
java.util.Set<java.lang.String> |
getPropertyAllowedValues(java.lang.String name)
Gets the set of allowed values for the specified property.
|
int |
getRepresentationId()
Gets the ID of the underlying "representation" object.
|
java.util.List<java.lang.Double> |
getTimesteps()
Gets a list of timesteps for the loaded proxy.
|
java.net.URI |
getURI()
Gets the current URI associated with the proxy.
|
int |
getViewId()
Gets the ID of the underlying "view" object.
|
java.util.concurrent.Future<java.lang.Boolean> |
open(IVizConnection<IParaViewWebClient> connection)
Opens the designated URI, if possible, using the specified ParaView
connection.
|
java.util.concurrent.Future<java.lang.Boolean> |
setFeature(java.lang.String category,
java.lang.String feature)
Sets the current feature that is rendered via ParaView.
|
java.util.concurrent.Future<java.lang.Integer> |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Updates the proxy's current properties to include all properties listed
in the specified map.
|
java.util.concurrent.Future<java.lang.Boolean> |
setProperty(java.lang.String name,
java.lang.String value)
Sets the specified property to the new value.
|
java.util.concurrent.Future<java.lang.Boolean> |
setTimestep(int step)
Sets the timestep for the loaded proxy.
|
public AbstractParaViewProxy(java.net.URI uri) throws java.lang.NullPointerException
uri
- The URI for the ParaView-supported file.java.lang.NullPointerException
- If the specified URI is null.public IVizConnection<IParaViewWebClient> getConnection()
null
if it has not
been set.public java.util.Set<java.lang.String> getFeatureCategories()
IParaViewProxy
getFeatureCategories
in interface IParaViewProxy
public java.util.Set<java.lang.String> getFeatures(java.lang.String category)
IParaViewProxy
getFeatures
in interface IParaViewProxy
category
- The category whose features will be returned. This should be a
value retrieved from IParaViewProxy.getFeatureCategories()
.null
if the category name
is invalid.public int getFileId()
IParaViewProxy
getFileId
in interface IParaViewProxy
-1
if the proxy was not
opened.public java.util.Map<java.lang.String,java.lang.String> getProperties()
IParaViewProxy
getProperties
in interface IParaViewProxy
public java.lang.String getProperty(java.lang.String name)
IParaViewProxy
getProperty
in interface IParaViewProxy
name
- The name of the property to retrieve.null
if the
property name is invalid.public java.util.Set<java.lang.String> getPropertyAllowedValues(java.lang.String name)
IParaViewProxy
getPropertyAllowedValues
in interface IParaViewProxy
name
- The property whose allowed values will be returned.null
if the property name is invalid.public int getRepresentationId()
IParaViewProxy
getRepresentationId
in interface IParaViewProxy
-1
if the
proxy was not opened.public java.util.List<java.lang.Double> getTimesteps()
IParaViewProxy
getTimesteps
in interface IParaViewProxy
null
.public java.net.URI getURI()
IParaViewProxy
getURI
in interface IParaViewProxy
public int getViewId()
IParaViewProxy
getViewId
in interface IParaViewProxy
-1
if the proxy was not
opened.public java.util.concurrent.Future<java.lang.Boolean> open(IVizConnection<IParaViewWebClient> connection)
IParaViewProxy
open
in interface IParaViewProxy
connection
- The connection to use when opening the URI. Should not be
null
.public java.util.concurrent.Future<java.lang.Boolean> setFeature(java.lang.String category, java.lang.String feature)
IParaViewProxy
setFeature
in interface IParaViewProxy
category
- The category for the feature. This should be one of the keys
in the map returned by #getFeatures()
.feature
- The feature or "type" to be rendered. This should be in the
set (from the feature map) associated with the category key.public java.util.concurrent.Future<java.lang.Integer> setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
IParaViewProxy
If a given property or value in the provided map is invalid, then the property is skipped.
setProperties
in interface IParaViewProxy
properties
- The new properties to set.public java.util.concurrent.Future<java.lang.Boolean> setProperty(java.lang.String name, java.lang.String value)
IParaViewProxy
setProperty
in interface IParaViewProxy
name
- The property to updated. Allowed values can be retrieved via
IParaViewProxy.getProperties()
.value
- The new value of the property. Allowed values can be retrieved
via IParaViewProxy.getPropertyAllowedValues(String)
.public java.util.concurrent.Future<java.lang.Boolean> setTimestep(int step)
IParaViewProxy
setTimestep
in interface IParaViewProxy
step
- The new timestep index.