irJSONParser Class Reference

JSON parsing class. More...

List of all members.

Public Member Functions

 __construct ($content)
 Constructor. It takes the irJSON file content as input.
 __destruct ()

Public Attributes

 $instanceRecords = array()
 Array of instance record objects of the parsed irJSON file.
 $linkageSchemas = array()
 Array of Linkage Schema objects of the parsed irJSON file.
 $structureSchemas = array()
 Array of Structure Schema objects of the parsed irJSON file.
 $dataset
 Dataset object of the parsed irJSON file.
 $jsonErrors = array()
 JSON Parsing errors.
 $irjsonErrors = array()
 irJSON Parsing errors
 $irjsonNotices = array()
 irJSON Parsing notices

Private Member Functions

 parse ()
 Parser function that parse the JSON file to populate the irJSON objects.
 validateAttributeType (&$instanceRecord, $attribute)
 Validate an attribute type based on the structure schema linked to the dataset.
 listTypes ($types)
 List all types of a types list and seperate each item with a comma.

Private Attributes

 $jsonContent = ""
 irJSON content file to be parsed
 $irvStructureSchema
 Default Structure Schema used by the irJSON Parser.


Detailed Description

JSON parsing class.


Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 27 of file irJSONParser.php.


Constructor & Destructor Documentation

irJSONParser::__construct ( content  ) 

Constructor. It takes the irJSON file content as input.


Parameters:
[in] $content irJSON file content
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 196 of file irJSONParser.php.

References parse().

Here is the call graph for this function:

irJSONParser::__destruct (  ) 

Definition at line 239 of file irJSONParser.php.


Member Function Documentation

irJSONParser::listTypes ( types  )  [private]

List all types of a types list and seperate each item with a comma.


Parameters:
[in] $types An array of type names
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 917 of file irJSONParser.php.

References $types.

irJSONParser::parse (  )  [private]

Parser function that parse the JSON file to populate the irJSON objects.


Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 249 of file irJSONParser.php.

Referenced by __construct().

irJSONParser::validateAttributeType ( &$  instanceRecord,
attribute 
) [private]

Validate an attribute type based on the structure schema linked to the dataset.


Parameters:
[in] $instanceRecord Instance record to validate
[in] $attribute Attribute name to validate
Author:
Frederick Giasson, Structured Dynamics LLC.



Definition at line 841 of file irJSONParser.php.


Member Data Documentation

irJSONParser::$dataset

Dataset object of the parsed irJSON file.

Definition at line 39 of file irJSONParser.php.

irJSONParser::$instanceRecords = array()

Array of instance record objects of the parsed irJSON file.

Definition at line 30 of file irJSONParser.php.

irJSONParser::$irjsonErrors = array()

irJSON Parsing errors

Definition at line 45 of file irJSONParser.php.

irJSONParser::$irjsonNotices = array()

irJSON Parsing notices

Definition at line 48 of file irJSONParser.php.

irJSONParser::$irvStructureSchema [private]

Default Structure Schema used by the irJSON Parser.

Definition at line 54 of file irJSONParser.php.

irJSONParser::$jsonContent = "" [private]

irJSON content file to be parsed

Definition at line 51 of file irJSONParser.php.

irJSONParser::$jsonErrors = array()

JSON Parsing errors.

Definition at line 42 of file irJSONParser.php.

irJSONParser::$linkageSchemas = array()

Array of Linkage Schema objects of the parsed irJSON file.

Definition at line 33 of file irJSONParser.php.

irJSONParser::$structureSchemas = array()

Array of Structure Schema objects of the parsed irJSON file.

Definition at line 36 of file irJSONParser.php.


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