document

document

Functions

void gebr_geoxml_init ()
void gebr_geoxml_finalize ()
int gebr_geoxml_document_load ()
int gebr_geoxml_document_load_buffer ()
void gebr_geoxml_document_free ()
GebrGeoXmlDocument * gebr_geoxml_document_clone ()
gchar * gebr_geoxml_document_get_version ()
int gebr_geoxml_document_validate ()
int gebr_geoxml_document_save ()
int gebr_geoxml_document_to_string ()
void gebr_geoxml_document_set_filename ()
void gebr_geoxml_document_set_title ()
void gebr_geoxml_document_set_author ()
void gebr_geoxml_document_set_email ()
void gebr_geoxml_document_set_parent_id ()
GebrGeoXmlParameters * gebr_geoxml_document_get_dict_parameters ()
void gebr_geoxml_document_set_date_created ()
void gebr_geoxml_document_set_date_modified ()
void gebr_geoxml_document_set_description ()
void gebr_geoxml_document_set_help ()
const gchar * gebr_geoxml_document_get_filename ()
gchar * gebr_geoxml_document_get_title ()
gchar * gebr_geoxml_document_get_author ()
gchar * gebr_geoxml_document_get_email ()
gchar * gebr_geoxml_document_get_parent_id ()
gchar * gebr_geoxml_document_get_date_created ()
gchar * gebr_geoxml_document_get_date_modified ()
gchar * gebr_geoxml_document_get_description ()
gchar * gebr_geoxml_document_get_help ()
void gebr_geoxml_document_merge_dicts ()
gboolean gebr_geoxml_document_split_dict ()
GebrGeoXmlParameter * gebr_geoxml_document_set_dict_keyword ()
GebrGeoXmlSequence * gebr_geoxml_document_get_dict_parameter ()
void gebr_geoxml_document_set_dtd_dir ()
gboolean gebr_geoxml_document_canonize_dict_parameters ()
GebrGeoXmlDocument * gebr_geoxml_document_ref ()
void gebr_geoxml_document_unref ()
void gebr_geoxml_initialize_catalog ()
gboolean gebr_geoxml_create_catalog ()
gboolean gebr_geoxml_document_type_contains ()

Object Hierarchy


Description

Functions

gebr_geoxml_init ()

void
gebr_geoxml_init (void);

gebr_geoxml_finalize ()

void
gebr_geoxml_finalize (void);

gebr_geoxml_document_load ()

int
gebr_geoxml_document_load (GebrGeoXmlDocument **document,
                           const gchar *path,
                           gboolean validate,
                           GebrGeoXmlDiscardMenuRefCallback discard_menu_ref);

gebr_geoxml_document_load_buffer ()

int
gebr_geoxml_document_load_buffer (GebrGeoXmlDocument **document,
                                  const gchar *xml);

gebr_geoxml_document_free ()

void
gebr_geoxml_document_free (GebrGeoXmlDocument *document);

gebr_geoxml_document_clone ()

GebrGeoXmlDocument *
gebr_geoxml_document_clone (GebrGeoXmlDocument *source);

gebr_geoxml_document_get_version ()

gchar *
gebr_geoxml_document_get_version (GebrGeoXmlDocument *document);

gebr_geoxml_document_validate ()

int
gebr_geoxml_document_validate (const gchar *filename);

gebr_geoxml_document_save ()

int
gebr_geoxml_document_save (GebrGeoXmlDocument *document,
                           const gchar *path,
                           gboolean compress);

gebr_geoxml_document_to_string ()

int
gebr_geoxml_document_to_string (GebrGeoXmlDocument *document,
                                gchar **xml_string);

gebr_geoxml_document_set_filename ()

void
gebr_geoxml_document_set_filename (GebrGeoXmlDocument *document,
                                   const gchar *filename);

gebr_geoxml_document_set_title ()

void
gebr_geoxml_document_set_title (GebrGeoXmlDocument *document,
                                const gchar *title);

gebr_geoxml_document_set_author ()

void
gebr_geoxml_document_set_author (GebrGeoXmlDocument *document,
                                 const gchar *author);

gebr_geoxml_document_set_email ()

void
gebr_geoxml_document_set_email (GebrGeoXmlDocument *document,
                                const gchar *email);

gebr_geoxml_document_set_parent_id ()

void
gebr_geoxml_document_set_parent_id (GebrGeoXmlDocument *document,
                                    const gchar *parent_id);

gebr_geoxml_document_get_dict_parameters ()

GebrGeoXmlParameters *
gebr_geoxml_document_get_dict_parameters
                               (GebrGeoXmlDocument *document);

Retrieves from document the parameters dictionary for use with program's parameters.

If \p document is NULL returns NULL.

Parameters

document

a GebrGeoXmlDocument

 

gebr_geoxml_document_set_date_created ()

void
gebr_geoxml_document_set_date_created (GebrGeoXmlDocument *document,
                                       const gchar *created);

gebr_geoxml_document_set_date_modified ()

void
gebr_geoxml_document_set_date_modified
                               (GebrGeoXmlDocument *document,
                                const gchar *created);

gebr_geoxml_document_set_description ()

void
gebr_geoxml_document_set_description (GebrGeoXmlDocument *document,
                                      const gchar *description);

gebr_geoxml_document_set_help ()

void
gebr_geoxml_document_set_help (GebrGeoXmlDocument *document,
                               const gchar *help);

gebr_geoxml_document_get_filename ()

const gchar *
gebr_geoxml_document_get_filename (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_title ()

gchar *
gebr_geoxml_document_get_title (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_author ()

gchar *
gebr_geoxml_document_get_author (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_email ()

gchar *
gebr_geoxml_document_get_email (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_parent_id ()

gchar *
gebr_geoxml_document_get_parent_id (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_date_created ()

gchar *
gebr_geoxml_document_get_date_created (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_date_modified ()

gchar *
gebr_geoxml_document_get_date_modified
                               (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_description ()

gchar *
gebr_geoxml_document_get_description (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_help ()

gchar *
gebr_geoxml_document_get_help (GebrGeoXmlDocument *document);

gebr_geoxml_document_merge_dicts ()

void
gebr_geoxml_document_merge_dicts (GebrValidator *validator,
                                  GebrGeoXmlDocument *first,
                                  ...);

Merges all dictionaries into first separating them with a special parameter. After applying this function, no one should use first before calling gebr_geoxml_document_split_dict().

Parameters

validator

Uses validator to omit parameters with error, if NULL is passed all parameters are merged.

 

first

The GebrGeoXmlDocument that will contain all dictionary parameters.

 

...

A NULL-terminated list of GebrGeoXmlDocument that will be merged into first .

 

gebr_geoxml_document_split_dict ()

gboolean
gebr_geoxml_document_split_dict (GebrGeoXmlDocument *first,
                                 ...);

If first has dictionary parameters separated by the function gebr_geoxml_document_merge_dicts(), make sure the list @... have enough documents to hold them. If that is not the case, the function returns FALSE.

Parameters

first

The GebrGeoXmlDocument containing dictionary parameters (or not).

 

...

A NULL-terminated list of GebrGeoXmlDocument that will be filled with first 's dictionary parameters.

 

Returns

TRUE if the document list was large enough to hold first 's dictionary parameters, FALSE otherwise.


gebr_geoxml_document_set_dict_keyword ()

GebrGeoXmlParameter *
gebr_geoxml_document_set_dict_keyword (GebrGeoXmlDocument *doc,
                                       GebrGeoXmlParameterType type,
                                       const gchar *keyword,
                                       const gchar *value);

Creates a new variable in the dictionary variables buffer.

Parameters

doc

A GebrGeoXmlDocument

 

type

The type of the variable

 

keyword

The name of the variable

 

value

The value of the variable

 

Returns

The dictionary variable GebrGeoXmlParameter.


gebr_geoxml_document_get_dict_parameter ()

GebrGeoXmlSequence *
gebr_geoxml_document_get_dict_parameter
                               (GebrGeoXmlDocument *doc);

Returns


gebr_geoxml_document_set_dtd_dir ()

void
gebr_geoxml_document_set_dtd_dir (const gchar *path);

gebr_geoxml_document_canonize_dict_parameters ()

gboolean
gebr_geoxml_document_canonize_dict_parameters
                               (GebrGeoXmlDocument *document,
                                GHashTable **vars_list);

This function canonizes a document dictionary, changing invalid variable names to a valid form.

The list to variable names/values is freed every time you canonize a new project.

This fuction also converts the variable type to the current supported types (e.g. int to float)

Ex: "CDP EM METROS (M)" becomes "cdp_em_metros_m_".

Important: You should not free the pointer list_copy.

Parameters

document

Document (flow/line/project) that will have its parameters canonized.

 

list_copy

A hash table pointer to access the keywords -> canonized list.

 

Returns

TRUE if everything when fine, FALSE otherwise.


gebr_geoxml_document_ref ()

GebrGeoXmlDocument *
gebr_geoxml_document_ref (GebrGeoXmlDocument *self);

gebr_geoxml_document_unref ()

void
gebr_geoxml_document_unref (GebrGeoXmlDocument *self);

gebr_geoxml_initialize_catalog ()

void
gebr_geoxml_initialize_catalog (void);

gebr_geoxml_create_catalog ()

gboolean
gebr_geoxml_create_catalog (const gchar *directory);

gebr_geoxml_document_type_contains ()

gboolean
gebr_geoxml_document_type_contains (GebrGeoXmlDocumentType base,
                                    GebrGeoXmlDocumentType type);

This method simply returns if the base type of document contains the type type of document. For instance, projects contain projects, lines and flows; lines contains lines and flows; flows contains only flows.

Types and Values