ajresourceread.c

Datatypes: AjPResourcein none AjPTable AjPResourceall none


Datatype: AjPResourcein

Data resource input objects

Sections: Data input constructors data input destructors data input modifiers casts Data data inputs


Section: Data input constructors

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

Functions: ajResourceinNew ajResourceinNewDrcat


Function ajResourceinNew

Creates a new data input object.

Synopsis

Prototype
AjPResourcein ajResourceinNew (
      void
);

TypeNameRead/WriteDescription
AjPResourcein RETURNNew data input object.

Returns
AjPResourcein:New data input object.

Description

Creates a new data input object.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajResourceinNewDrcat

Creates a new data input object with a resolved DRCAT query

Synopsis

Prototype
AjPResourcein ajResourceinNewDrcat (
      const AjPStr dbname
);

TypeNameRead/WriteDescription
const AjPStrdbnameInputDRCAT identifier
AjPResourcein RETURNNew data input object.

Input
dbname:(Input)DRCAT identifier
Returns
AjPResourcein:New data input object.

Description

Creates a new data input object with a resolved DRCAT query

See Also

See other functions in this section

Availability

In release 6.4.0

Section: data input destructors

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

Functions: ajResourceinDel


Function ajResourceinDel

Deletes a data input object.

Synopsis

Prototype
void ajResourceinDel (
      AjPResourcein* pthis
);

TypeNameRead/WriteDescription
AjPResourcein*pthisDeleteData resource input
void RETURN

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

Description

Deletes a data input object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: data input modifiers

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

Functions: ajResourceinClear ajResourceinQryC ajResourceinQryS


Function ajResourceinClear

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

Synopsis

Prototype
void ajResourceinClear (
      AjPResourcein thys
);

TypeNameRead/WriteDescription
AjPResourceinthysOutputData resource input
void RETURN

Output
thys:(Output)Data resource input
Returns
void:No return value

Description

Clears a data 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 ajResourceinQryC

Resets a data input object using a new Universal Query Address

Synopsis

Prototype
void ajResourceinQryC (
      AjPResourcein thys,
      const char* txt
);

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

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

Description

Resets a data input object using a new Universal Query Address

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajResourceinQryS

Resets a data input object using a new Universal Query Address

Synopsis

Prototype
void ajResourceinQryS (
      AjPResourcein thys,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPResourceinthysModifyData resource input object.
const AjPStrstrInputQuery
void RETURN

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

Description

Resets a data 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: ajResourceinTrace


Function ajResourceinTrace

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

Synopsis

Prototype
void ajResourceinTrace (
      const AjPResourcein thys
);

TypeNameRead/WriteDescription
const AjPResourceinthysInputData resource input object.
void RETURN

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

Description

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

See Also

See other functions in this section

Availability

In release 6.4.0

Section: Data data inputs

These functions read the wxyxdesc data provided by the first argument

Functions: ajResourceinRead


Function ajResourceinRead

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

Uses resourceinRead for the actual file reading.

Returns the results in the AjPResource object.

Synopsis

Prototype
AjBool ajResourceinRead (
      AjPResourcein resourcein,
      AjPResource resource
);

TypeNameRead/WriteDescription
AjPResourceinresourceinModifyData resource data input definitions
AjPResourceresourceOutputData resource data returned.
AjBool RETURNajTrue on success.

Output
resource:(Output)Data resource data returned.
Input & Output
resourcein:(Modify)Data resource data input definitions
Returns
AjBool:ajTrue on success.

Description

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

Uses resourceinRead for the actual file reading.

Returns the results in the AjPResource 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: ajResourceinprintBook ajResourceinprintHtml ajResourceinprintText ajResourceinprintWiki


Function ajResourceinprintBook

Reports the internal data structures as a Docbook table

Synopsis

Prototype
void ajResourceinprintBook (
      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 ajResourceinprintHtml

Reports the internal data structures as an HTML table

Synopsis

Prototype
void ajResourceinprintHtml (
      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 ajResourceinprintText

Reports the internal data structures

Synopsis

Prototype
void ajResourceinprintText (
      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 ajResourceinprintWiki

Reports the internal data structures as a wiki table

Synopsis

Prototype
void ajResourceinprintWiki (
      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: ajResourceinExit


Function ajResourceinExit

Cleans up data input internal memory

Synopsis

Prototype
void ajResourceinExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Cleans up data 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: ajResourceinTypeGetFields ajResourceinTypeGetQlinks


Function ajResourceinTypeGetFields

Returns the listof known field names for ajResourceinRead

Synopsis

Prototype
const char* ajResourceinTypeGetFields (
      void
);

TypeNameRead/WriteDescription
const char* RETURNList of field names

Returns
const char*:List of field names

Description

Returns the listof known field names for ajResourceinRead

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajResourceinTypeGetQlinks

Returns the listof known query link operators for ajResourceinRead

Synopsis

Prototype
const char* ajResourceinTypeGetQlinks (
      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 ajResourceinRead

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: ajResourceaccessGetDb ajResourceaccessMethodGetQlinks ajResourceaccessMethodGetScope ajResourceaccessMethodTest


Function ajResourceaccessGetDb

Returns the table in which data database access details are registered

Synopsis

Prototype
AjPTable ajResourceaccessGetDb (
      void
);

TypeNameRead/WriteDescription
AjPTable RETURNAccess functions hash table

Returns
AjPTable:Access functions hash table

Description

Returns the table in which data database access details are registered

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajResourceaccessMethodGetQlinks

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

Synopsis

Prototype
const char* ajResourceaccessMethodGetQlinks (
      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 data data reading and returns the known query link operators

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajResourceaccessMethodGetScope

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

Synopsis

Prototype
ajuint ajResourceaccessMethodGetScope (
      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 data 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 ajResourceaccessMethodTest

Tests for a named method for data data reading.

Synopsis

Prototype
AjBool ajResourceaccessMethodTest (
      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 data data reading.

See Also

See other functions in this section

Availability

In release 6.4.0

Datatype: AjPResourceall

Data Resource Input Stream

Sections: Data Resource Input Constructors Data Resource Input Stream Destructors data resource input stream modifiers Data resource input stream casts resource input


Section: Data Resource Input Constructors

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

Functions: ajResourceallNew


Function ajResourceallNew

Creates a new data resource input stream object.

Synopsis

Prototype
AjPResourceall ajResourceallNew (
      void
);

TypeNameRead/WriteDescription
AjPResourceall RETURNNew data resource input stream object.

Returns
AjPResourceall:New data resource input stream object.

Description

Creates a new data resource input stream object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: Data Resource Input Stream Destructors

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

Functions: ajResourceallDel


Function ajResourceallDel

Deletes a data resource input stream object.

Synopsis

Prototype
void ajResourceallDel (
      AjPResourceall* pthis
);

TypeNameRead/WriteDescription
AjPResourceall*pthisDeleteData resource input stream
void RETURN

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

Description

Deletes a data resource input stream object.

See Also

See other functions in this section

Availability

In release 6.4.0

Section: data resource input stream modifiers

These functions use the contents of an data resource input stream object and update them.

Functions: ajResourceallClear


Function ajResourceallClear

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

Synopsis

Prototype
void ajResourceallClear (
      AjPResourceall thys
);

TypeNameRead/WriteDescription
AjPResourceallthysOutputData resource input stream
void RETURN

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

Description

Clears a data resource term 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: Data resource input stream casts

These functions return the contents of a data resource input stream object

Functions: ajResourceallGetresourceId


Function ajResourceallGetresourceId

Returns the identifier of the current data resource in an input stream

Synopsis

Prototype
const AjPStr ajResourceallGetresourceId (
      const AjPResourceall thys
);

TypeNameRead/WriteDescription
const AjPResourceallthysInputData resource term input stream
const AjPStr RETURNIdentifier

Input
thys:(Input)Data resource term input stream
Returns
const AjPStr:Identifier

Description

Returns the identifier of the current data resource in an input stream

See Also

See other functions in this section

Availability

In release 6.4.0

Section: resource input

These functions use a data resource input stream object to read data

Functions: ajResourceallNext


Function ajResourceallNext

Parse a data resource 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 AjPResource object but leave the file open for future calls.

Synopsis

Prototype
AjBool ajResourceallNext (
      AjPResourceall thys,
      AjPResource* Presource
);

TypeNameRead/WriteDescription
AjPResourceallthysOutputData resource input stream
AjPResource*PresourceModifyData resource returned
AjBool RETURNajTrue on success.

Output
thys:(Output)Data resource input stream
Input & Output
Presource:(Modify)Data resource returned
Returns
AjBool:ajTrue on success.

Description

Parse a data resource 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 AjPResource 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: ajResourceinformatTerm ajResourceinformatTest


Function ajResourceinformatTerm

Tests whether a data resource data input format term is known

Synopsis

Prototype
AjBool ajResourceinformatTerm (
      const AjPStr term
);

TypeNameRead/WriteDescription
const AjPStrtermInputFormat term EDAM ID
AjBool RETURNajTrue if term was accepted

Input
term:(Input)Format term EDAM ID
Returns
AjBool:ajTrue if term was accepted

Description

Tests whether a data resource data input format term is known

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajResourceinformatTest

Tests whether a named data data input format is known

Synopsis

Prototype
AjBool ajResourceinformatTest (
      const AjPStr format
);

TypeNameRead/WriteDescription
const AjPStrformatInputFormat term EDAM ID
AjBool RETURNajTrue if format was accepted

Input
format:(Input)Format term EDAM ID
Returns
AjBool:ajTrue if format was accepted

Description

Tests whether a named data data input format is known

See Also

See other functions in this section

Availability

In release 6.4.0