phpDocumentor lodel
[ class tree: lodel ] [ index: lodel ] [ all elements ]

Class: XMLImportParser

Source Location: /lodel/scripts/xmlimport.php

Class XMLImportParser

Class Overview

Classe XMLImport

Import XMLLodelBasic file in the database

Located in /lodel/scripts/xmlimport.php [line 58]



		
				Author(s):
		
  • Jean Lamy
  • Ghislain Picard
Information Tags:
Copyright:  2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
Copyright:  2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
Since:  Classe ajoutée depuis la version 0.8

Properties

Methods

[ Top ]
Property Summary
array   $commonstyles   Styles principaux
array   $contextstyles   Styles contextuels
array   $cstyles   Styles courant
string   $mainclass   Classe du document

[ Top ]
Method Summary
XMLImportParser   XMLImportParser()   Constructeur
void   init()   Initialisation du parser
void   parse()   Analyse du contenu XHTML de l'entité
void   _init_class()   Initialise la classe en cherchant à savoir ce qu'il faut faire avec les styles détectés. (suivant les champs définies dans le ME).
void   _objectize()   Remplace un style par un objet quand c'est possible
void   _parseOneStep()   Première étape du parser
void   _prepare_style()   Prépare un style pour stocakge en détectant les synonymes et les langues d'un style Prepare the style for storage detecting synonyms and same language style

[ Top ]
Properties
array   $commonstyles [line 64]

Styles principaux


[ Top ]
array   $contextstyles [line 70]

Styles contextuels


[ Top ]
array   $cstyles [line 76]

Styles courant


[ Top ]
string   $mainclass [line 82]

Classe du document


[ Top ]
Methods
Constructor XMLImportParser  [line 87]

  XMLImportParser XMLImportParser( )

Constructeur



[ Top ]
init  [line 99]

  void init( string $class  )

Initialisation du parser

Initialize the parser, getting all the styles defined in the ME : internal styles and characterstyles (synonym styles and different language styles are detected).

Parameters:
string   $class:  the name of the class of the object (entity) imported


[ Top ]
parse  [line 140]

  void parse( string $string, object &$handler  )

Analyse du contenu XHTML de l'entité

Parse the XHTML contents of the entity and send the data to the $handler object This function is a hard piece of work. I choose not to go to DOM too avoid using lot of memory and processing to build the tree but I'm not sure to perform much better here.

Parameters:
string   $string:  the string to parse
object   &$handler:  the handler of the parser


[ Top ]
_init_class  [line 397]

  void _init_class( string $class, [string $criteria = '']  )

Initialise la classe en cherchant à savoir ce qu'il faut faire avec les styles détectés. (suivant les champs définies dans le ME).

Gather information from tablefield to know what to do with the various styles. class is the context and criteria is the where to select the tablefields

Parameters:
string   $class:  the name of the class to init
string   $criteria:  the possible SQL criterions (by default empty)


[ Top ]
_objectize  [line 462]

  void _objectize( array &$arr, boolean $blockstyle  )

Remplace un style par un objet quand c'est possible

Replace style by object whenever it is possible

Parameters:
array   &$arr:  an array containing all the elements of a doc
boolean   $blockstyle:  true if the style is a block style and false if not


[ Top ]
_parseOneStep  [line 289]

  void _parseOneStep( array &$arr, integer $i, array &$datastack, array &$classstack, string $level  )

Première étape du parser

do one step of the parser. 1/ call the handler corresponding to the current style/tag/object 2/ change the context if required 3/ feed the datastack

Parameters:
array   &$arr:  ??
integer   $i:  ??
array   &$datastack:  pile des données
array   &$classstack:  pile des classes utilisées
string   $level:  can be inline or ?

API Tags:
Access:  private


[ Top ]
_prepare_style  [line 440]

  void _prepare_style( string &$style, &$obj, object &$object  )

Prépare un style pour stocakge en détectant les synonymes et les langues d'un style Prepare the style for storage detecting synonyms and same language style

Parameters:
string   &$style:  the name of the style
object   &$object:  the VO corresponding to the style
   &$obj: 


[ Top ]

Documentation generated on Wed, 29 Aug 2007 14:30:06 +0200 by phpDocumentor 1.4.0a2