ajtaxread.c

Datatypes: AjPTaxin none AjPTable AjPTaxall none


Datatype: AjPTaxin

Taxonomy input objects

Sections: Taxonomy input constructors taxonomy input destructors taxonomy input modifiers casts Taxonomy data inputs


Section: Taxonomy input constructors

All constructors return a new taxonomy input object by pointer. It is the responsibility of the user to first destroy any previous taxonomy input object. The target pointer does not need to be initialised to NULL, but it is good programming practice to do so anyway.

Functions: ajTaxinNew


Function ajTaxinNew

Creates a new taxonomy input object.

Synopsis

Prototype
AjPTaxin ajTaxinNew (
      void
);

TypeNameRead/WriteDescription
AjPTaxin RETURNNew taxonomy input object.

Returns
AjPTaxin:New taxonomy input object.

Description

Creates a new taxonomy input object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: taxonomy input destructors

Destruction destroys all internal data structures and frees the memory allocated for the taxonomy input object.

Functions: ajTaxinDel


Function ajTaxinDel

Deletes a taxonomy input object.

Synopsis

Prototype
void ajTaxinDel (
      AjPTaxin* pthis
);

TypeNameRead/WriteDescription
AjPTaxin*pthisDeleteTaxonomy input
void RETURN

Output
pthis:(Delete)Taxonomy input
Returns
void:No return value

Description

Deletes a taxonomy input object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: taxonomy input modifiers

These functions use the contents of a taxonomy input object and update them.

Functions: ajTaxinClear ajTaxinQryC ajTaxinQryS


Function ajTaxinClear

Clears a taxonomy input object back to "as new" condition, except for the query list which must be preserved.

Synopsis

Prototype
void ajTaxinClear (
      AjPTaxin thys
);

TypeNameRead/WriteDescription
AjPTaxinthysOutputTaxonomy input
void RETURN

Output
thys:(Output)Taxonomy input
Returns
void:No return value

Description

Clears a taxonomy input object back to "as new" condition, except for the query list which must be preserved.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxinQryC

Resets a taxonomy input object using a new Universal Query Address

Synopsis

Prototype
void ajTaxinQryC (
      AjPTaxin thys,
      const char* txt
);

TypeNameRead/WriteDescription
AjPTaxinthysModifyTaxonomy input object.
const char*txtInputQuery
void RETURN

Input
txt:(Input)Query
Input & Output
thys:(Modify)Taxonomy input object.
Returns
void:No return value

Description

Resets a taxonomy input object using a new Universal Query Address

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxinQryS

Resets a taxonomy input object using a new Universal Query Address

Synopsis

Prototype
void ajTaxinQryS (
      AjPTaxin thys,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPTaxinthysModifyTaxonomy input object.
const AjPStrstrInputQuery
void RETURN

Input
str:(Input)Query
Input & Output
thys:(Modify)Taxonomy input object.
Returns
void:No return value

Description

Resets a taxonomy input object using a new Universal Query Address

See Also

See other functions in this section

Availability

In release 6.4.0

Section: casts

Return values

Functions: ajTaxinTrace


Function ajTaxinTrace

Debug calls to trace the data in a taxonomy input object.

Synopsis

Prototype
void ajTaxinTrace (
      const AjPTaxin thys
);

TypeNameRead/WriteDescription
const AjPTaxinthysInputTaxonomy input object.
void RETURN

Input
thys:(Input)Taxonomy input object.
Returns
void:No return value

Description

Debug calls to trace the data in a taxonomy input object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: Taxonomy data inputs

These functions read the wxyxdesc data provided by the first argument

Functions: ajTaxinRead


Function ajTaxinRead

If the file is not yet open, calls taxinQryProcess to convert the query into an open file stream.

Uses taxinRead for the actual file reading.

Returns the results in the AjPTax object.

Synopsis

Prototype
AjBool ajTaxinRead (
      AjPTaxin taxin,
      AjPTax tax
);

TypeNameRead/WriteDescription
AjPTaxintaxinModifyTaxonomy data input definitions
AjPTaxtaxOutputTaxonomy data returned.
AjBool RETURNajTrue on success.

Output
tax:(Output)Taxonomy data returned.
Input & Output
taxin:(Modify)Taxonomy data input definitions
Returns
AjBool:ajTrue on success.

Description

If the file is not yet open, calls taxinQryProcess to convert the query into an open file stream.

Uses taxinRead for the actual file reading.

Returns the results in the AjPTax object.

See Also

See other functions in this section

Availability

In release 6.4.0

Datatype: none

Miscellaneous

Sections: Print Miscellaneous Internals


Section: Print

Printing to a file

Functions: ajTaxinprintBook ajTaxinprintHtml ajTaxinprintText ajTaxinprintWiki


Function ajTaxinprintBook

Reports the internal data structures as a Docbook table

Synopsis

Prototype
void ajTaxinprintBook (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

Input & Output
outf:(Modify)Output file
Returns
void:No return value

Description

Reports the internal data structures as a Docbook table

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxinprintHtml

Reports the internal data structures as an HTML table

Synopsis

Prototype
void ajTaxinprintHtml (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

Input & Output
outf:(Modify)Output file
Returns
void:No return value

Description

Reports the internal data structures as an HTML table

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxinprintText

Reports the internal data structures

Synopsis

Prototype
void ajTaxinprintText (
      AjPFile outf,
      AjBool full
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
AjBoolfullInputFull report (usually ajFalse)
void RETURN

Input
full:(Input)Full report (usually ajFalse)
Input & Output
outf:(Modify)Output file
Returns
void:No return value

Description

Reports the internal data structures

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxinprintWiki

Reports the internal data structures as a wiki table

Synopsis

Prototype
void ajTaxinprintWiki (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

Input & Output
outf:(Modify)Output file
Returns
void:No return value

Description

Reports the internal data structures as a wiki table

See Also

See other functions in this section

Availability

In release 6.4.0

Section: Miscellaneous

Functions to initialise and clean up internals

Functions: ajTaxinExit


Function ajTaxinExit

Cleans up taxonomy input internal memory

Synopsis

Prototype
void ajTaxinExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Cleans up taxonomy input internal memory

See Also

See other functions in this section

Availability

In release 6.4.0

Section: Internals

Functions to return internal values

Functions: ajTaxinTypeGetFields ajTaxinTypeGetQlinks


Function ajTaxinTypeGetFields

Returns the list of known field names for ajTaxinRead

Synopsis

Prototype
const char* ajTaxinTypeGetFields (
      void
);

TypeNameRead/WriteDescription
const char* RETURNList of field names

Returns
const char*:List of field names

Description

Returns the list of known field names for ajTaxinRead

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxinTypeGetQlinks

Returns the listof known query link operators for ajTaxinRead

Synopsis

Prototype
const char* ajTaxinTypeGetQlinks (
      void
);

TypeNameRead/WriteDescription
const char* RETURNList of field names

Returns
const char*:List of field names

Description

Returns the listof known query link operators for ajTaxinRead

See Also

See other functions in this section

Availability

In release 6.4.0

Datatype: AjPTable

Internal call register table

Sections: Cast


Section: Cast

Return a reference to the call table

Functions: ajTaxaccessGetDb ajTaxaccessMethodGetQlinks ajTaxaccessMethodGetScope ajTaxaccessMethodTest


Function ajTaxaccessGetDb

Returns the table in which taxonomy database access details are registered

Synopsis

Prototype
AjPTable ajTaxaccessGetDb (
      void
);

TypeNameRead/WriteDescription
AjPTable RETURNAccess functions hash table

Returns
AjPTable:Access functions hash table

Description

Returns the table in which taxonomy database access details are registered

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxaccessMethodGetQlinks

Tests for a named method for taxonomy data reading returns the known query link operators

Synopsis

Prototype
const char* ajTaxaccessMethodGetQlinks (
      const AjPStr method
);

TypeNameRead/WriteDescription
const AjPStrmethodInputMethod required.
const char* RETURNKnown link operators

Input
method:(Input)Method required.
Returns
const char*:Known link operators

Description

Tests for a named method for taxonomy data reading returns the known query link operators

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxaccessMethodGetScope

Tests for a named method for taxonomy data reading and returns the scope (entry, query or all).

Synopsis

Prototype
ajuint ajTaxaccessMethodGetScope (
      const AjPStr method
);

TypeNameRead/WriteDescription
const AjPStrmethodInputMethod required.
ajuint RETURNScope flags

Input
method:(Input)Method required.
Returns
ajuint:Scope flags

Description

Tests for a named method for taxonomy data reading and returns the scope (entry, query or all).

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTaxaccessMethodTest

Tests for a named method for taxonomy data reading.

Synopsis

Prototype
AjBool ajTaxaccessMethodTest (
      const AjPStr method
);

TypeNameRead/WriteDescription
const AjPStrmethodInputMethod required.
AjBool RETURNajTrue on success.

Input
method:(Input)Method required.
Returns
AjBool:ajTrue on success.

Description

Tests for a named method for taxonomy data reading.

See Also

See other functions in this section

Availability

In release 6.4.0

Datatype: AjPTaxall

Taxon Input Stream

Sections: Taxon Input Constructors Taxon Input Stream Destructors taxon input stream modifiers taxon input stream casts taxon input


Section: Taxon Input Constructors

All constructors return a new taxon input stream object by pointer. It is the responsibility of the user to first destroy any previous taxon input object. The target pointer does not need to be initialised to NULL, but it is good programming practice to do so anyway.

Functions: ajTaxallNew


Function ajTaxallNew

Creates a new taxon input stream object.

Synopsis

Prototype
AjPTaxall ajTaxallNew (
      void
);

TypeNameRead/WriteDescription
AjPTaxall RETURNNew taxon input stream object.

Returns
AjPTaxall:New taxon input stream object.

Description

Creates a new taxon input stream object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: Taxon Input Stream Destructors

Destruction destroys all internal data structures and frees the memory allocated for the taxon input stream object.

Functions: ajTaxallDel


Function ajTaxallDel

Deletes a taxon input stream object.

Synopsis

Prototype
void ajTaxallDel (
      AjPTaxall* pthis
);

TypeNameRead/WriteDescription
AjPTaxall*pthisDeletetaxon input stream
void RETURN

Output
pthis:(Delete)taxon input stream
Returns
void:No return value

Description

Deletes a taxon input stream object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: taxon input stream modifiers

These functions use the contents of a taxon input stream object and update them.

Functions: ajTaxallClear


Function ajTaxallClear

Clears a taxon input stream object back to "as new" condition, except for the query list which must be preserved.

Synopsis

Prototype
void ajTaxallClear (
      AjPTaxall thys
);

TypeNameRead/WriteDescription
AjPTaxallthysOutputTaxon input stream
void RETURN

Output
thys:(Output)Taxon input stream
Returns
void:No return value

Description

Clears a taxon input stream object back to "as new" condition, except for the query list which must be preserved.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: taxon input stream casts

These functions return the contents of a taxon input stream object

Functions: ajTaxallGettaxId


Function ajTaxallGettaxId

Returns the identifier of the current taxon in an input stream

Synopsis

Prototype
const AjPStr ajTaxallGettaxId (
      const AjPTaxall thys
);

TypeNameRead/WriteDescription
const AjPTaxallthysInputTaxon input stream
const AjPStr RETURNIdentifier

Input
thys:(Input)Taxon input stream
Returns
const AjPStr:Identifier

Description

Returns the identifier of the current taxon in an input stream

See Also

See other functions in this section

Availability

In release 6.4.0

Section: taxon input

These functions use a taxon input stream object to read data

Functions: ajTaxallNext


Function ajTaxallNext

Parse a taxon query into format, access, file and entry

Split at delimiters. Check for the first part as a valid format Check for the remaining first part as a database name or as a file that can be opened. Anything left is an entryname spec.

Return the results in the AjPTax object but leave the file open for future calls.

Synopsis

Prototype
AjBool ajTaxallNext (
      AjPTaxall thys,
      AjPTax* Ptax
);

TypeNameRead/WriteDescription
AjPTaxallthysOutputTaxon input stream
AjPTax*PtaxModifyTaxon returned
AjBool RETURNajTrue on success.

Output
thys:(Output)Taxon input stream
Input & Output
Ptax:(Modify)Taxon returned
Returns
AjBool:ajTrue on success.

Description

Parse a taxon query into format, access, file and entry

Split at delimiters. Check for the first part as a valid format Check for the remaining first part as a database name or as a file that can be opened. Anything left is an entryname spec.

Return the results in the AjPTax object but leave the file open for future calls.

See Also

See other functions in this section

Availability

In release 6.4.0

Datatype: none

Input formats

Sections: cast


Section: cast

Values for input formats

Functions: ajTaxinformatTest


Function ajTaxinformatTest

Tests whether a named taxonomy data input format is known

Synopsis

Prototype
AjBool ajTaxinformatTest (
      const AjPStr format
);

TypeNameRead/WriteDescription
const AjPStrformatInputFormat
AjBool RETURNajTrue if formats was accepted

Input
format:(Input)Format
Returns
AjBool:ajTrue if formats was accepted

Description

Tests whether a named taxonomy data input format is known

See Also

See other functions in this section

Availability

In release 6.4.0