ProcessorXML Class Reference
[Framework for the Web Services]

Manipulate structWSF internal XML resultset data resultsets. More...

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 __destruct ()
 createResultset ()
 Create a resultset root element.
 createSubject ($type, $uri="")
 Create a subject in the resultset.
 createPrefix ($entity, $uri)
 Create a prefix element for the resultset.
 createPredicate ($type)
 Create a predicate for the resultset.
 createObject ($type, $uri, $label="")
 Create an object for the resultset.
 createObjectContent ($content)
 Create an object that has a content (literal).
 createReificationStatement ($type, $value)
 Create a reification statement for the resultset.
 saveXML ($resultset)
 Save the resultset as a XML file.
 loadXML ($xml_doc)
 Load a XML document that is a resultset.
 createResultsetFromElement (&$element)
 Create a resultset from a node reference of the current resultset.
 appendElementToRoot (&$element)
 Append an element to the root element of the current XML document.
 importNode (&$targetElement, $importElement)
 getSubjectsByType ($type)
 Get a list of nodes of a given type.
 transformPrefix ($type)
 getSubjects ()
 Get al subjects of a resultset.
 getPrefixes ()
 Get all prefixes for this document.
 getSubjectContent (&$subject)
 getXPath ($xpath)
 Send a XPath query to the resultset.
 getPredicatesByType (&$subject, $type)
 Get a list of predicate nodes of a given type.
 getPredicates (&$subject)
 Get all predicates for a given subject of the resultset.
 getObjectsByType (&$predicate, $type)
 Get all objects for a given predicate of the resultset for a given type.
 getObjects (&$predicate)
 Get all objects for a given predicate of the resultset.
 getReificationStatementsByType (&$object, $type)
 Get the reification statement of a triple by its reification type.
 getReificationStatements (&$object)
 Get the reification statement of a triple.
 getURI (&$node)
 Get URI of a node of the resulset.
 getEntity (&$node)
 Get the Entity of a prefix element.
 getLabel (&$node)
 Get Label of a node of the resulset.
 getValue (&$node)
 Get value of a node of the resulset.
 getType (&$node, $prefixed=TRUE)
 Get type of a node of the resulset.
 getContent (&$node)
 Get content of a node of the resulset.

Private Attributes

 $dom
 $prefixes = array()


Detailed Description

Manipulate structWSF internal XML resultset data resultsets.


Returns:
returns NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 27 of file ProcessorXML.php.


Constructor & Destructor Documentation

ProcessorXML::__construct (  ) 

Constructor.

Create a new DOM document for the XML document being processed


Returns:
returns NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 44 of file ProcessorXML.php.

ProcessorXML::__destruct (  ) 

Definition at line 49 of file ProcessorXML.php.


Member Function Documentation

ProcessorXML::appendElementToRoot ( &$  element  ) 

Append an element to the root element of the current XML document.


Parameters:
[in] $element Reference to the element to happen to the root element of this XML document.
Returns:
returns NULL
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 386 of file ProcessorXML.php.

ProcessorXML::createObject ( type,
uri,
label = "" 
)

Create an object for the resultset.


Parameters:
[in] $type Type of the object
[in] $uri URI of the object
[in] $label Optional label to refer to the object
Returns:
returns the reference to the predicate's element
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 176 of file ProcessorXML.php.

References $type, and $uri.

ProcessorXML::createObjectContent ( content  ) 

Create an object that has a content (literal).

This kind of object are "literal objects"


Parameters:
[in] $content Content of the literal.
Returns:
returns the reference to the object's element
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 223 of file ProcessorXML.php.

ProcessorXML::createPredicate ( type  ) 

Create a predicate for the resultset.


Parameters:
[in] $type Type of the predicate
Returns:
returns the reference to the predicate's element
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 148 of file ProcessorXML.php.

References $type.

ProcessorXML::createPrefix ( entity,
uri 
)

Create a prefix element for the resultset.


Parameters:
[in] $entity Entity prefix
[in] $uri Uri that goes with the entity prefix
Returns:
returns the reference to the prefix element
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 115 of file ProcessorXML.php.

References $uri.

ProcessorXML::createReificationStatement ( type,
value 
)

Create a reification statement for the resultset.

This is the way to reify a statement in the resultset


Parameters:
[in] $type Type of the reification statement
[in] $value Value of the reification statement
Returns:
returns the reference to the refification statement's element

returns NULL

Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 254 of file ProcessorXML.php.

References $type.

ProcessorXML::createResultset (  ) 

Create a resultset root element.


Returns:
returns the created resulotset element
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 61 of file ProcessorXML.php.

ProcessorXML::createResultsetFromElement ( &$  element  ) 

Create a resultset from a node reference of the current resultset.


Parameters:
[in] $element Reference to the node from which to create the resultset
Returns:
returns the new resultset being created
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 356 of file ProcessorXML.php.

References $dom.

Referenced by getObjects(), getObjectsByType(), getPredicates(), getPredicatesByType(), getReificationStatements(), and getReificationStatementsByType().

ProcessorXML::createSubject ( type,
uri = "" 
)

Create a subject in the resultset.


Parameters:
[in] $type Type of the subject
[in] $uri Optional URI for the subject
Returns:
returns the reference to the subject's element
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 81 of file ProcessorXML.php.

References $type, and $uri.

ProcessorXML::getContent ( &$  node  ) 

Get content of a node of the resulset.


Parameters:
[in] $node the reference node
Returns:
returns the content
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 814 of file ProcessorXML.php.

ProcessorXML::getEntity ( &$  node  ) 

Get the Entity of a prefix element.


Parameters:
[in] $node the reference node
Returns:
returns the Entity
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 705 of file ProcessorXML.php.

ProcessorXML::getLabel ( &$  node  ) 

Get Label of a node of the resulset.


Parameters:
[in] $node the reference node
Returns:
returns the Label
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 730 of file ProcessorXML.php.

ProcessorXML::getObjects ( &$  predicate  ) 

Get all objects for a given predicate of the resultset.


Parameters:
[in] $predicate Target predicate
Returns:
returns a DOMNodeList with a reference to all objects of the resultset, for that predicate
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 603 of file ProcessorXML.php.

References $query, and createResultsetFromElement().

Here is the call graph for this function:

ProcessorXML::getObjectsByType ( &$  predicate,
type 
)

Get all objects for a given predicate of the resultset for a given type.


Parameters:
[in] $predicate Target predicate
[in] $type Target type
Returns:
returns a DOMNodeList with a reference to all objects of the resultset, for that predicate, for that type
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 576 of file ProcessorXML.php.

References $query, $type, createResultsetFromElement(), and transformPrefix().

Here is the call graph for this function:

ProcessorXML::getPredicates ( &$  subject  ) 

Get all predicates for a given subject of the resultset.


Parameters:
[in] $subject Target subject
Returns:
returns a DOMNodeList with a reference to all predicates of the resultset, for that subject
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 550 of file ProcessorXML.php.

References $query, and createResultsetFromElement().

Here is the call graph for this function:

ProcessorXML::getPredicatesByType ( &$  subject,
type 
)

Get a list of predicate nodes of a given type.


Parameters:
[in] $subject Target subject to get its predicates from
[in] $type Type of the nodes you want
Returns:
returns a DOMNodeList with a reference to all properties nodes of that type
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 523 of file ProcessorXML.php.

References $query, $type, createResultsetFromElement(), and transformPrefix().

Here is the call graph for this function:

ProcessorXML::getPrefixes (  ) 

Get all prefixes for this document.


Returns:
returns a DOMNodeList with a reference to all prefixes
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 472 of file ProcessorXML.php.

References $prefixes, and $query.

ProcessorXML::getReificationStatements ( &$  object  ) 

Get the reification statement of a triple.


Parameters:
[in] $object the reference object node
Returns:
returns reification node
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 656 of file ProcessorXML.php.

References $query, and createResultsetFromElement().

Here is the call graph for this function:

ProcessorXML::getReificationStatementsByType ( &$  object,
type 
)

Get the reification statement of a triple by its reification type.


Parameters:
[in] $object the reference object node
[in] $type URI of the type of the reification statement
Returns:
returns reification node
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 629 of file ProcessorXML.php.

References $query, $type, createResultsetFromElement(), and transformPrefix().

Here is the call graph for this function:

ProcessorXML::getSubjectContent ( &$  subject  ) 

Definition at line 483 of file ProcessorXML.php.

ProcessorXML::getSubjects (  ) 

Get al subjects of a resultset.


Returns:
returns a DOMNodeList with a reference to all subjects of the resultset
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 451 of file ProcessorXML.php.

References $query.

ProcessorXML::getSubjectsByType ( type  ) 

Get a list of nodes of a given type.


Parameters:
[in] $type Type of the nodes you want
Returns:
returns a DOMNodeList with a reference to all nodes of that type
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 411 of file ProcessorXML.php.

References $query, $type, and transformPrefix().

Here is the call graph for this function:

ProcessorXML::getType ( &$  node,
prefixed = TRUE 
)

Get type of a node of the resulset.


Parameters:
[in] $node the reference node
[in] $prefixed Convert to prefixed form if a prefix exists for this type.
Returns:
returns the type
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 779 of file ProcessorXML.php.

References $uri.

ProcessorXML::getURI ( &$  node  ) 

Get URI of a node of the resulset.


Parameters:
[in] $node the reference node
Returns:
returns the URI
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 681 of file ProcessorXML.php.

ProcessorXML::getValue ( &$  node  ) 

Get value of a node of the resulset.


Parameters:
[in] $node the reference node
Returns:
returns the value
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 754 of file ProcessorXML.php.

ProcessorXML::getXPath ( xpath  ) 

Send a XPath query to the resultset.


Parameters:
[in] $xpath The xpath query to send
Returns:
returns a DOMNodeList with a reference to all ndoes that are in that path
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 498 of file ProcessorXML.php.

References transformPrefix().

Here is the call graph for this function:

ProcessorXML::importNode ( &$  targetElement,
importElement 
)

Definition at line 392 of file ProcessorXML.php.

ProcessorXML::loadXML ( xml_doc  ) 

Load a XML document that is a resultset.


Parameters:
[in] $xml_doc XML document being loaded
Returns:
returns a reference to the DOM structure of the loaded XML document
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 308 of file ProcessorXML.php.

References $uri.

ProcessorXML::saveXML ( resultset  ) 

Save the resultset as a XML file.


Parameters:
[in] $resultset Resultset to be save as a xml document.
Returns:
returns the XML document of the resultset
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 287 of file ProcessorXML.php.

ProcessorXML::transformPrefix ( type  ) 


Member Data Documentation

ProcessorXML::$dom [private]

Definition at line 29 of file ProcessorXML.php.

Referenced by createResultsetFromElement().

ProcessorXML::$prefixes = array() [private]

Definition at line 31 of file ProcessorXML.php.

Referenced by getPrefixes().


The documentation for this class was generated from the following file:
Copyright © 2009. Structured Dynamics LLC Structured Dynamics LLC. All rights reserved.