Internal Data Structures used by the commON Parser

CSV Parser Internal Parsed Records Structure


The structure of the parsed CSV records is saved in the $csvRecords private member. Its content looks like:


			Array
			(
			    [0] => &&recordList
			)
			Array
			(
			    [0] => &id
			    [1] => &type
			    [2] => &prefLabel
			    [3] => &homepage
			    [4] => &authorClaimsPage
			    [5] => &isAuthorOfTitle
			    [6] => &isAuthorOfTitle&prefURL
			)
			Array
			(
			    [0] => info:lib:am:2009-02-18:maria_francisca_abad_garcia
			    [1] => Person
			    [2] => Maria Francisca Abad-Garcia
			    [3] =>
			    [4] => http://authorclaim.org/profile/pab1/
			    [5] => Acceso Abierto y revistas médicas españolas
			    [6] => http://eprints.rclis.org/11490/1/open_acces_Medicina_Cl%C3%ADnica_2006_versi%C3%B3n_aceptada_del_autor.pdf
			)
		 	
		 	...
		 	


The "&&recordList" processor keyword tells the parser that a recordList is introduced.

Then you have the CSV column structure that tels the parser how to recreate the key/value pairs

And then you have a series of records.



Common Parser Internal Parsed Records Structure


The parser commON records are saved in the $commonRecords private member. Its structure looks like:


			Array
			(
			    [0] => Array
			        (
			            [&id] => Array
			                (
			                    [0] => Array
			                        (
			                            [value] => info:lib:am:2009-02-18:maria_francisca_abad_garcia
			                            [reify] =>
			                        )
			
			                )
			
			            [&type] => Array
			                (
			                    [0] => Array
			                        (
			                            [value] => Person
			                            [reify] =>
			                        )
			
			                )
			
			            [&prefLabel] => Array
			                (
			                    [0] => Array
			                        (
			                            [value] => Maria Francisca Abad-Garcia
			                            [reify] =>
			                        )
			
			                )

                        [&homepage] => Array
			                (
			                    [0] => Array                        
			                        (
			                            [value] => Personal Data in a Large Digital Library.
			                            [reify] => Array
			                                (
			                                    [&prefURL] => Array
			                                        (
			                                            [0] => http://dblp.uni-trier.de/db/conf/ercimdl/ecdl2000.html#CruzKK00
			                                        )
			
			                                )
			
			                        )
							)
			                
						...
					)
					
				...
			
			)
			


Where the first array is an array of records. Then for each record item, you have a list of attributes. Each attribute is a list of values. Then each value is an array with two keys: "value" and "reify". "value" is the value of the triple: "record" "attribute" "value". "reify" is an array of meta data (reifications) attribute/value pairs about the triple statement.



Linkage Schema Internal Structure

The Linkage Schema structure is used to map attributes and types used in a commON dataset to external vocabularies/taxonomies/ontologies. This structure is saved in the $commonLinkageSchema private member and looks like:


			Array
			(
			    [description] => Array
			        (
			            [&version] => Array
			                (
			                    [0] => 0.1
			                )
			
			            [&linkageType] => Array
			                (
			                    [0] => application/rdf+xml
			                )
			
			        )
			
			    [properties] => Array
			        (
			            [0] => Array
			                (
			                    [&attributeList] => Array
			                        (
			                            [0] => prefLabel
			                        )
			
			                    [&mapTo] => Array
			                        (
			                            [0] => http://www.w3.org/2000/01/rdf-schema#label
			                        )
			
			                )
			
			            [1] => Array
			                (
			                    [&attributeList] => Array
			                        (
			                            [0] => homepage
			                        )
			
			                    [&mapTo] => Array
			                        (
			                            [0] => http://xmlns.com/foaf/0.1/homepage
			                        )
			
			                )
			
			            [2] => Array
			                (
			                    [&attributeList] => Array
			                        (
			                            [0] => prefURL
			                        )
			
			                    [&mapTo] => Array
			                        (
			                            [0] => http://purl.org/ontology/bibo/uri
			                        )
			
			                )
			
			        )
			
			    [types] => Array
			        (
			            [0] => Array
			                (
			                    [&typeList] => Array
			                        (
			                            [0] => Person
			                        )
			
			                    [&mapTo] => Array
			                        (
			                            [0] => http://xmlns.com/foaf/0.1/Person
			                        )
			
			                )
			
			        )
			
			)
			...
			
Copyright © 2009. Structured Dynamics LLC Structured Dynamics LLC. All rights reserved.