VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkQtXMLProcessor Class Reference

Processes data using XQuery or XSLT. More...

#include <vtkQtXMLProcessor.h>

Inheritance diagram for vtkQtXMLProcessor:
[legend]
Collaboration diagram for vtkQtXMLProcessor:
[legend]

Public Types

enum  { ROW_DOMAIN = 0, DATA_OBJECT_DOMAIN = 1, VALUE_DOMAIN = 2 }
 
enum  { XQUERY = 0, XSLT = 1 }
 
typedef vtkPassInputTypeAlgorithm Superclass
 
- Public Types inherited from vtkPassInputTypeAlgorithm
typedef vtkAlgorithm Superclass
 
- Public Types inherited from vtkAlgorithm
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
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 ()
 
- Public Member Functions inherited from vtkPassInputTypeAlgorithm
vtkPolyDataGetPolyDataOutput ()
 
vtkStructuredPointsGetStructuredPointsOutput ()
 
vtkImageDataGetImageDataOutput ()
 
vtkStructuredGridGetStructuredGridOutput ()
 
vtkUnstructuredGridGetUnstructuredGridOutput ()
 
vtkRectilinearGridGetRectilinearGridOutput ()
 
vtkTableGetTableOutput ()
 
vtkGraphGetGraphOutput ()
 
vtkDataObjectGetInput ()
 
vtkDataObjectGetOutput ()
 
vtkDataObjectGetOutput (int)
 
void SetInput (vtkDataObject *)
 
void SetInput (int, vtkDataObject *)
 
void AddInput (vtkDataObject *)
 
void AddInput (int, vtkDataObject *)
 
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
- Public Member Functions inherited from vtkAlgorithm
int HasExecutive ()
 
vtkExecutiveGetExecutive ()
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual int ModifyRequest (vtkInformation *request, int when)
 
vtkInformationGetInputPortInformation (int port)
 
vtkInformationGetOutputPortInformation (int port)
 
int GetNumberOfInputPorts ()
 
int GetNumberOfOutputPorts ()
 
void UpdateProgress (double amount)
 
vtkInformationGetInputArrayInformation (int idx)
 
void RemoveAllInputs ()
 
vtkDataObjectGetOutputDataObject (int port)
 
virtual void RemoveInputConnection (int port, vtkAlgorithmOutput *input)
 
int GetNumberOfInputConnections (int port)
 
int GetTotalNumberOfInputConnections ()
 
vtkAlgorithmOutputGetInputConnection (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 vtkInformationGetInformation ()
 
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)
 
vtkDataObjectGetInputDataObject (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)
 
vtkAlgorithmOutputGetOutputPort (int index)
 
vtkAlgorithmOutputGetOutputPort ()
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
- Public Member Functions inherited from vtkObject
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)
 
vtkCommandGetCommand (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)
 
- Public Member Functions inherited from vtkObjectBase
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 vtkQtXMLProcessorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkQtXMLProcessorSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPassInputTypeAlgorithm
static vtkPassInputTypeAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPassInputTypeAlgorithmSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkAlgorithm
static vtkAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkAlgorithmSafeDownCast (vtkObject *o)
 
static void SetDefaultExecutivePrototype (vtkExecutive *proto)
 
static vtkInformationIntegerKeyINPUT_IS_OPTIONAL ()
 
static vtkInformationIntegerKeyINPUT_IS_REPEATABLE ()
 
static
vtkInformationInformationVectorKey
INPUT_REQUIRED_FIELDS ()
 
static
vtkInformationStringVectorKey
INPUT_REQUIRED_DATA_TYPE ()
 
static
vtkInformationInformationVectorKey
INPUT_ARRAYS_TO_PROCESS ()
 
static vtkInformationIntegerKeyINPUT_PORT ()
 
static vtkInformationIntegerKeyINPUT_CONNECTION ()
 
static vtkInformationIntegerKeyPRESERVES_DATASET ()
 
static vtkInformationIntegerKeyPRESERVES_GEOMETRY ()
 
static vtkInformationIntegerKeyPRESERVES_BOUNDS ()
 
static vtkInformationIntegerKeyPRESERVES_TOPOLOGY ()
 
static vtkInformationIntegerKeyPRESERVES_ATTRIBUTES ()
 
static vtkInformationIntegerKeyPRESERVES_RANGES ()
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObject *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkQtXMLProcessor ()
 
 ~vtkQtXMLProcessor ()
 
int FillOutputPortInformation (int port, vtkInformation *info)
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
- Protected Member Functions inherited from vtkPassInputTypeAlgorithm
 vtkPassInputTypeAlgorithm ()
 
 ~vtkPassInputTypeAlgorithm ()
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
vtkDataObjectGetInput (int port)
 
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
- Protected Member Functions inherited from vtkAlgorithm
 vtkAlgorithm ()
 
 ~vtkAlgorithm ()
 
virtual void SetNumberOfInputPorts (int n)
 
virtual void SetNumberOfOutputPorts (int n)
 
int InputPortIndexInRange (int index, const char *action)
 
int OutputPortIndexInRange (int index, const char *action)
 
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
 
virtual vtkExecutiveCreateDefaultExecutive ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void SetNumberOfInputConnections (int port, int n)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformationGetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
virtual void SetErrorCode (unsigned long)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &os)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Public Attributes inherited from vtkAlgorithm
int AbortExecute
 
- Static Protected Member Functions inherited from vtkAlgorithm
static vtkInformationIntegerKeyPORT_REQUIREMENTS_FILLED ()
 
- Protected Attributes inherited from vtkAlgorithm
vtkInformationInformation
 
double Progress
 
char * ProgressText
 
unsigned long ErrorCode
 
- Static Protected Attributes inherited from vtkAlgorithm
static vtkExecutiveDefaultExecutivePrototype
 
- Friends inherited from vtkObject

Detailed Description

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.

Thanks:
Developed by Timothy M. Shead (tshea.nosp@m.d@sa.nosp@m.ndia..nosp@m.gov) at Sandia National Laboratories.
Tests:
vtkQtXMLProcessor (Tests)

Definition at line 117 of file vtkQtXMLProcessor.h.

Member Typedef Documentation

Definition at line 122 of file vtkQtXMLProcessor.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
ROW_DOMAIN 
DATA_OBJECT_DOMAIN 
VALUE_DOMAIN 

Definition at line 126 of file vtkQtXMLProcessor.h.

anonymous enum
Enumerator:
XQUERY 
XSLT 

Definition at line 133 of file vtkQtXMLProcessor.h.

Constructor & Destructor Documentation

vtkQtXMLProcessor::vtkQtXMLProcessor ( )
protected
vtkQtXMLProcessor::~vtkQtXMLProcessor ( )
protected

Member Function Documentation

static vtkQtXMLProcessor* vtkQtXMLProcessor::New ( )
static
virtual const char* vtkQtXMLProcessor::GetClassName ( )
virtual

Reimplemented from vtkPassInputTypeAlgorithm.

static int vtkQtXMLProcessor::IsTypeOf ( const char *  type)
static
virtual int vtkQtXMLProcessor::IsA ( const char *  name)
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 vtkQtXMLProcessor* vtkQtXMLProcessor::SafeDownCast ( vtkObject o)
static
void vtkQtXMLProcessor::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
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 int vtkQtXMLProcessor::GetFieldType ( )
virtual

Specifies the field data to process when InputDomain is set to "ROW_DOMAIN" or "DATA_OBJECT_DOMAIN".

virtual void vtkQtXMLProcessor::SetFieldType ( int  )
virtual

Specifies the field data to process when InputDomain is set to "ROW_DOMAIN" or "DATA_OBJECT_DOMAIN".

virtual int vtkQtXMLProcessor::GetInputDomain ( )
virtual

Specifies how input data should be mapped to XML for processing.

virtual void vtkQtXMLProcessor::SetInputDomain ( int  )
virtual

Specifies how input data should be mapped to XML for processing.

virtual int vtkQtXMLProcessor::GetQueryType ( )
virtual

Specifies Whether the query uses XQuery or XSLT syntax.

virtual void vtkQtXMLProcessor::SetQueryType ( int  )
virtual

Specifies Whether the query uses XQuery or XSLT syntax.

virtual void vtkQtXMLProcessor::SetQuery ( const char *  )
virtual

Specifies the XQuery or XSLT query to apply to input data.

virtual char* vtkQtXMLProcessor::GetQuery ( )
virtual

Specifies the XQuery or XSLT query to apply to input data.

virtual void vtkQtXMLProcessor::SetOutputArray ( const char *  )
virtual

Specifies the name of the array where output results will be stored.

virtual char* vtkQtXMLProcessor::GetOutputArray ( )
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.

int vtkQtXMLProcessor::FillOutputPortInformation ( int  port,
vtkInformation info 
)
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.

int vtkQtXMLProcessor::RequestData ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
)
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.


The documentation for this class was generated from the following file: