VTK
|
Processes data using XQuery or XSLT. More...
#include <vtkQtXMLProcessor.h>
Public Types | |
enum | { ROW_DOMAIN = 0, DATA_OBJECT_DOMAIN = 1, VALUE_DOMAIN = 2 } |
enum | { XQUERY = 0, XSLT = 1 } |
typedef vtkPassInputTypeAlgorithm | Superclass |
![]() | |
typedef vtkAlgorithm | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | GetFieldType () |
virtual void | SetFieldType (int) |
virtual int | GetInputDomain () |
virtual void | SetInputDomain (int) |
virtual int | GetQueryType () |
virtual void | SetQueryType (int) |
virtual void | SetQuery (const char *) |
virtual char * | GetQuery () |
virtual void | SetOutputArray (const char *) |
virtual char * | GetOutputArray () |
void | MapArrayName (const vtkStdString &from, const vtkStdString &to) |
void | ClearArrayNameMap () |
![]() | |
vtkPolyData * | GetPolyDataOutput () |
vtkStructuredPoints * | GetStructuredPointsOutput () |
vtkImageData * | GetImageDataOutput () |
vtkStructuredGrid * | GetStructuredGridOutput () |
vtkUnstructuredGrid * | GetUnstructuredGridOutput () |
vtkRectilinearGrid * | GetRectilinearGridOutput () |
vtkTable * | GetTableOutput () |
vtkGraph * | GetGraphOutput () |
vtkDataObject * | GetInput () |
vtkDataObject * | GetOutput () |
vtkDataObject * | GetOutput (int) |
void | SetInput (vtkDataObject *) |
void | SetInput (int, vtkDataObject *) |
void | AddInput (vtkDataObject *) |
void | AddInput (int, vtkDataObject *) |
virtual int | ProcessRequest (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
![]() | |
int | HasExecutive () |
vtkExecutive * | GetExecutive () |
virtual void | SetExecutive (vtkExecutive *executive) |
virtual int | ModifyRequest (vtkInformation *request, int when) |
vtkInformation * | GetInputPortInformation (int port) |
vtkInformation * | GetOutputPortInformation (int port) |
int | GetNumberOfInputPorts () |
int | GetNumberOfOutputPorts () |
void | UpdateProgress (double amount) |
vtkInformation * | GetInputArrayInformation (int idx) |
void | RemoveAllInputs () |
vtkDataObject * | GetOutputDataObject (int port) |
virtual void | RemoveInputConnection (int port, vtkAlgorithmOutput *input) |
int | GetNumberOfInputConnections (int port) |
int | GetTotalNumberOfInputConnections () |
vtkAlgorithmOutput * | GetInputConnection (int port, int index) |
virtual void | Update () |
virtual void | UpdateInformation () |
virtual void | UpdateWholeExtent () |
void | ConvertTotalInputToPortConnection (int ind, int &port, int &conn) |
virtual double | ComputePriority () |
int | ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo) |
virtual int | ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, unsigned long *mtime) |
virtual vtkInformation * | GetInformation () |
virtual void | SetInformation (vtkInformation *) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
virtual void | SetAbortExecute (int) |
virtual int | GetAbortExecute () |
virtual void | AbortExecuteOn () |
virtual void | AbortExecuteOff () |
virtual void | SetProgress (double) |
virtual double | GetProgress () |
void | SetProgressText (const char *ptext) |
virtual char * | GetProgressText () |
virtual unsigned long | GetErrorCode () |
virtual void | SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name) |
virtual void | SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) |
virtual void | SetInputArrayToProcess (int idx, vtkInformation *info) |
virtual void | SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName) |
vtkDataObject * | GetInputDataObject (int port, int connection) |
virtual void | SetInputConnection (int port, vtkAlgorithmOutput *input) |
virtual void | SetInputConnection (vtkAlgorithmOutput *input) |
virtual void | AddInputConnection (int port, vtkAlgorithmOutput *input) |
virtual void | AddInputConnection (vtkAlgorithmOutput *input) |
vtkAlgorithmOutput * | GetOutputPort (int index) |
vtkAlgorithmOutput * | GetOutputPort () |
virtual void | SetReleaseDataFlag (int) |
virtual int | GetReleaseDataFlag () |
void | ReleaseDataFlagOn () |
void | ReleaseDataFlagOff () |
int | UpdateExtentIsEmpty (vtkDataObject *output) |
int | UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType) |
![]() | |
virtual void | DebugOn () |
virtual void | DebugOff () |
unsigned char | GetDebug () |
void | SetDebug (unsigned char debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &os) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static vtkQtXMLProcessor * | New () |
static int | IsTypeOf (const char *type) |
static vtkQtXMLProcessor * | SafeDownCast (vtkObject *o) |
Additional Inherited Members | |
![]() | |
int | AbortExecute |
![]() | |
static vtkInformationIntegerKey * | PORT_REQUIREMENTS_FILLED () |
![]() | |
vtkInformation * | Information |
double | Progress |
char * | ProgressText |
unsigned long | ErrorCode |
![]() | |
static vtkExecutive * | DefaultExecutivePrototype |
![]() |
Processes data using XQuery or XSLT.
which is then processed using either XQuery or XSLT. vtkQtXMLProcessor provides multiple "domains" which control how data is mapped to XML:
"ROW_DOMAIN" treats an input vtkFieldData object as a "table" made-up of columns, rows, and cells/fields. This table is mapped (using shallow-copy semantics) into XML, and each "row" in the "table" is passed to an XQuery or XSLT expression, producing one output result for each "row".
"DATA_OBJECT_DOMAIN" maps vtkFieldData to a "table" in the same way, but passes the entire table to an XQuery or XSLT expression, producing a single output result for the entire data obect.
Following is an example of how a field data containing two arrays named "foo" and "bar" are mapped into XML:
<row> <foo>value of foo at index 0</foo> <bar>value of bar at index 0</bar> </row> <row> <foo>value of foo at index 1</foo> <bar>value of bar at index 1</bar> </row> ... </rows>
Note how the array names are mapped to elements in the resulting XML. Because there are strict rules on the naming of XML elements, array names will be automatically "mangled" to produce conforming element names. Users may optionally supply their own mappings from array names to element names.
"VALUE_DOMAIN" is used when when a data object already contains XML data that can be passed to an XQuery or XSLT expression directly, producing one output result for each value in an attribute array. Use SetInputArrayToProcess(0, ...) to specify the attribute array that contains XML for processing.
Parameters: FieldType: Controls which field data should be extracted from the input for processing.
InputDomain: Controls whether XML processing will be applied to individual rows (the default), the entire input field data, or an attribute array containing XML.
QueryType: Controls whether to use XQuery or XSLT for processing.
Query: The XQuery or XSLT template to be used for processing.
OutputArray: The name of the output array that will store the processed results.
Inputs: Input port 0: A vtkDataObject containing arbitrary field data.
Outputs: Output port 0: A shallow-copy of the input vtkDataObject. If InputDomain is set to "ROW_DOMAIN" (the default), or "VALUE_DOMAIN", the data object's field data will contain an additional string array containing the results of running XQuery / XSLT on each individual row / value in the input.
If InputDomain is set to "DATA_OBJECT_DOMAIN", the data object will be identical to the input.
Output port 1: A vtkTable. If InputDomain is set to "ROW_DOMAIN" (the default) or "VALUE_DOMAIN", the table will be completely empty. If InputDomain is set to "DATA_OBJECT_DOMAIN", the table will contain a single string array with a single value containing the results of running XQuery / XSLT on the entire contents of the input field data.
Definition at line 117 of file vtkQtXMLProcessor.h.
Definition at line 122 of file vtkQtXMLProcessor.h.
anonymous enum |
Definition at line 126 of file vtkQtXMLProcessor.h.
anonymous enum |
Definition at line 133 of file vtkQtXMLProcessor.h.
|
protected |
|
protected |
|
static |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkPassInputTypeAlgorithm.
|
virtual |
Reimplemented from vtkPassInputTypeAlgorithm.
|
static |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkPassInputTypeAlgorithm.
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkPassInputTypeAlgorithm.
|
static |
Reimplemented from vtkPassInputTypeAlgorithm.
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkPassInputTypeAlgorithm.
|
virtual |
Specifies the field data to process when InputDomain is set to "ROW_DOMAIN" or "DATA_OBJECT_DOMAIN".
|
virtual |
Specifies the field data to process when InputDomain is set to "ROW_DOMAIN" or "DATA_OBJECT_DOMAIN".
|
virtual |
Specifies how input data should be mapped to XML for processing.
|
virtual |
Specifies how input data should be mapped to XML for processing.
|
virtual |
Specifies Whether the query uses XQuery or XSLT syntax.
|
virtual |
Specifies Whether the query uses XQuery or XSLT syntax.
|
virtual |
Specifies the XQuery or XSLT query to apply to input data.
|
virtual |
Specifies the XQuery or XSLT query to apply to input data.
|
virtual |
Specifies the name of the array where output results will be stored.
|
virtual |
Specifies the name of the array where output results will be stored.
void vtkQtXMLProcessor::MapArrayName | ( | const vtkStdString & | from, |
const vtkStdString & | to | ||
) |
Used to provide explicit mappings from VTK array names to XML element names.
void vtkQtXMLProcessor::ClearArrayNameMap | ( | ) |
Used to provide explicit mappings from VTK array names to XML element names.
|
protectedvirtual |
Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.
Reimplemented from vtkPassInputTypeAlgorithm.
|
protectedvirtual |
This is called within ProcessRequest when a request asks the algorithm to do its work. This is the method you should override to do whatever the algorithm is designed to do. This happens during the fourth pass in the pipeline execution process.
Reimplemented from vtkPassInputTypeAlgorithm.