votElement.c File Reference

(Internal) Methods to manage XML elements. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "votParseP.h"
#include "votParse.h"

Defines

#define VOTABLE_REQ   ""
#define VOTABLE_OPT   "ID|VERSION"
#define RESOURCE_REQ   ""
#define RESOURCE_OPT   "ID|NAME|TYPE|UTYPE"
#define TABLE_REQ   ""
#define TABLE_OPT   "ID|NAME|UCD|UTYPE|REF|NROWS|NCOLS"
#define INFO_REQ   "NAME|VALUE"
#define INFO_OPT   "ID|UNIT|UCD|UTYPE|REF"
#define STREAM_REQ   ""
#define STREAM_OPT   "TYPE|HREF|ACTUATE|ENCODING|EXPIRES|RIGHTS"
#define FITS_REQ   ""
#define FITS_OPT   "EXTNUM"
#define TD_REQ   ""
#define TD_OPT   "ENCODING"
#define TR_REQ   ""
#define TR_OPT   ""
#define COOSYS_REQ   ""
#define COOSYS_OPT   "ID|EQUINOX|EPOCH|SYSTEM|"
#define DESCRIPTION_REQ   ""
#define DESCRIPTION_OPT   ""
#define DEFINITIONS_REQ   ""
#define DEFINITIONS_OPT   ""
#define DATA_REQ   ""
#define DATA_OPT   ""
#define TABLEDATA_REQ   ""
#define TABLEDATA_OPT   ""
#define GROUP_REQ   ""
#define GROUP_OPT   "ID|NAME|UCD|UTYPE|REF"
#define PARAM_REQ   "DATATYPE|NAME|VALUE"
#define PARAM_OPT   "ID|UNIT|UCD|UTYPE|REF|PRECISION|WIDTH|ARRAYSIZE"
#define FIELD_REQ   "DATATYPE|NAME|TYPE"
#define FIELD_OPT   "ID|UNIT|UCD|UTYPE|REF|PRECISION|WIDTH|ARRAYSIZE"
#define FIELDREF_REQ   "REF|"
#define FIELDREF_OPT   ""
#define PARAMREF_REQ   "REF|"
#define PARAMREF_OPT   ""
#define MIN_REQ   "VALUE|"
#define MIN_OPT   "INCLUSIVE|"
#define MAX_REQ   "VALUE|"
#define MAX_OPT   "INCLUSIVE|"
#define OPTION_REQ   "VALUE|"
#define OPTION_OPT   "NAME|"
#define VALUES_REQ   ""
#define VALUES_OPT   "ID|TYPE|NULL|REF"
#define LINK_REQ   "ACTION|"
#define LINK_OPT   "ID|CONTENT-ROLE|CONTENT-TYPE|TITLE|VALUE|HREF"

Functions

int vot_elemType (Element *e)
 Get the integer value (ID) of the Element (internal method).
char * vot_elemName (Element *e)
 Get the name of the Element (internal method).
int vot_eType (char *name)
 Get the integer value (ID) of the name (internal method).
char * vot_elemXMLEnd (Element *e)
 Build a string of the ending XML Tag (internal method).
char * vot_elemXML (Element *e)
 Builds a string of the opening XML Tag (internal method).
Element * vot_newElem (unsigned int type)
 Allocate a new structure of the given type (internal method).


Detailed Description

(Internal) Methods to manage XML elements.

VOTELEMENT.C -- (Internal) Method to manage XML elements.

Author:
Mike Fitzpatrick and Eric Timmermann
Date:
8/03/09

Define Documentation

#define VOTABLE_REQ   ""

Definition of Required and Optional attributes of VOTable elements.


Function Documentation

char * vot_elemName ( Element *  e  ) 

Get the name of the Element (internal method).

vot_elemName -- Get the name of the Element (internal method).

Parameters:
*e A pointer to the Element that you want the name of
Returns:
A string pointer to the name of the element

int vot_elemType ( Element *  e  ) 

Get the integer value (ID) of the Element (internal method).

vot_elemType -- Get the integer value (ID) of the Element (internal method)

Parameters:
e A pointer to the Element that you want the type of
Returns:
An integer corresponding to the type of the element

char * vot_elemXML ( Element *  e  ) 

Builds a string of the opening XML Tag (internal method).

vot_elemXML -- Builds a string of the opening XML Tag (internal method)

Parameters:
*e A pointer to an Element
Returns:
A string that contains the opening XML tag for e

char * vot_elemXMLEnd ( Element *  e  ) 

Build a string of the ending XML Tag (internal method).

vot_elemXMLEnd -- Build a string of the ending XML Tag (internal method)

Parameters:
*e A pointer to an Element
Returns:
A string that contains the ending XML tag for e

int vot_eType ( char *  name  ) 

Get the integer value (ID) of the name (internal method).

vot_eType -- Get the integer value (ID) of the name (internal method).

Parameters:
name Name of the desired type
Returns:
An integer corresponding to the type of the element

Element * vot_newElem ( unsigned int  type  ) 

Allocate a new structure of the given type (internal method).

vot_newElem -- Allocate a new structure of the given type (internal method)

Parameters:
type An integer that defines the type of Element
Returns:
An new Element structure


Generated on Wed May 5 16:32:13 2010 for libVOTable by  doxygen 1.5.9