Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
Resultset Class Reference

Internal Resultset representation of OSF results. More...

Public Member Functions

 __construct ($wsf_base_path="/usr/share/osf/")
 Constructor. More...
 
 __destruct ()
 
 addSubject ($subject, $dataset="")
 Add a Subject object to the resultset. More...
 
 getSubjects ()
 Get all the subjects defined in this resultset. More...
 
 getSubjectByUri ($uri)
 Get a subject by its URI. More...
 
 getResultset ()
 Get the array internal description of the resultset. More...
 
 setResultset ($resultset)
 Import an array that describes the resultset to use with this Resultset object. More...
 
 importStructXMLResultset ($structXMLResultset)
 Import a structXML resultset. More...
 
 getResultsetXML ()
 Convert an internal OSF resultset array structure in structXML. More...
 
 getResultsetJSON ()
 Convert an internal OSF resultset array structure in structJSON. More...
 
 getResultsetIronJSON ()
 Convert an internal OSF resultset array structure in irON JSON. More...
 
 getResultsetIronCOMMON ()
 Convert an internal OSF resultset array structure in irON commON. More...
 
 getResultsetRDFXML ()
 Convert an internal OSF resultset array structure in RDF+XML. More...
 
 getResultsetRDFN3 ()
 Convert an internal OSF resultset array structure in RDF+N3. More...
 

Detailed Description

Internal Resultset representation of OSF results.

Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 33 of file Resultset.php.

Constructor & Destructor Documentation

__construct (   $wsf_base_path = "/usr/share/osf/")

Constructor.

Parameters
mixed$wsf_base_pathPath where the OSF instance is installed on the server
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 126 of file Resultset.php.

__destruct ( )

Definition at line 133 of file Resultset.php.

Member Function Documentation

addSubject (   $subject,
  $dataset = "" 
)

Add a Subject object to the resultset.

Parameters
mixed$subjectSubject object to add to the resultset
string$datasetDataset URI where to add the subject
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 143 of file Resultset.php.

getResultset ( )

Get the array internal description of the resultset.

Returns
Array
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 230 of file Resultset.php.

getResultsetIronCOMMON ( )

Convert an internal OSF resultset array structure in irON commON.

Returns
a OSF document in irON commON
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 1002 of file Resultset.php.

getResultsetIronJSON ( )

Convert an internal OSF resultset array structure in irON JSON.

Returns
a OSF document in irON JSON
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 970 of file Resultset.php.

getResultsetJSON ( )

Convert an internal OSF resultset array structure in structJSON.

Returns
a OSF document in JSON
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 688 of file Resultset.php.

getResultsetRDFN3 ( )

Convert an internal OSF resultset array structure in RDF+N3.

Returns
a RDF+N3 document
See also
http://wiki.opensemanticframework.org/index.php/Internal_Resultset_Array
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 1215 of file Resultset.php.

getResultsetRDFXML ( )

Convert an internal OSF resultset array structure in RDF+XML.

Returns
a RDF+XML document
See also
http://wiki.opensemanticframework.org/index.php/Internal_Resultset_Array
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 1036 of file Resultset.php.

getResultsetXML ( )

Convert an internal OSF resultset array structure in structXML.

Returns
a OSF document
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 526 of file Resultset.php.

getSubjectByUri (   $uri)

Get a subject by its URI.

Parameters
string$uriURI of the subject to get from the resultset.
Returns
Subject Subject instance that match the input URI. Returns FALSE if no subject match the input URI.

Definition at line 204 of file Resultset.php.

getSubjects ( )

Get all the subjects defined in this resultset.

Returns
Array An array of Subject objects
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 178 of file Resultset.php.

importStructXMLResultset (   $structXMLResultset)

Import a structXML resultset.

Parameters
string$structXMLResultsetstructXML resultset to import
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 299 of file Resultset.php.

setResultset (   $resultset)

Import an array that describes the resultset to use with this Resultset object.

The input resultset array has to be of format:

Array("record-uri" => Array( "type" => Array(URIs...), "prefLabel" => "preferred label", "altLabel" => Array(alternative label literals...), "prefURL" => "http://preferred-url.com", "description" => "some description of the record",

"other-data-attribute-uri" => Array( Array( "value" => "some value", "lang" => "language string of the value", "type" => "type of the value" "reify" => Array( "reification-attribute-uri" => Array("value of the reification statement"), "more-reification-attribute-uri" => ... ) ), Array( ... ) ), "more-data-attribute-uri": ...,

"other-object-attribute-uri" => Array( Array( "uri" => "some uri", "type" => "optional type of the referenced URI", "reify" => Array( "reification-attribute-uri" => Array("value of the reification statement"), "more-reification-attribute-uri" => ... ) ), Array( ... ) ) "more-object-attribute-uri": ... ),

"more-record-uri": ... )

Parameters
Array$resultsetResultset array to use in this Resultset object
Author
Frederick Giasson, Structured Dynamics LLC.

Definition at line 287 of file Resultset.php.