Module sdjas
[hide private]
[frames] | no frames]

Module sdjas

source code

Access to the database of ideals as provided by the SymbolicData Project (http://symbolicdata.org).

Adapted from the Symbolicdata and Sage code

Classes [hide private]
  SymbolicData
Access to the database of ideals as provided by the SymbolicData Project (http://symbolicdata.org).
  SPARQL
This is a 'wrapper' class for SPARQL queries.
  SD_Ideal
This class represents a SymbolicData database object.
Functions [hide private]
 
_uri_to_name(uri)
Converts a uri to a name or key by only taking everything after the last / or (if present) #.
source code
 
_pprint(l)
Formats a list l to be displayed in a tabular layout.
source code
 
get_value_for_URI(sd, URI, predicate)
A quick convienience function to retrieve a single value of a given triple (object, predicate, ...)
source code
Function Details [hide private]

_uri_to_name(uri)

source code 

Converts a uri to a name or key by only taking everything after the last / or (if present) #.

Examples:

  • http://example.com/test -> test
  • http://example.com/model#testedBy -> testedBy

_pprint(l)

source code 

Formats a list l to be displayed in a tabular layout. It is possible to pass an integer width to the textwrap function. The width of the terminal window could be obtained via the Python console module. However, since it is not included in Jas, we decided not to use it. The default width that textwrap uses is set to 70. There might be a better way to do this.

get_value_for_URI(sd, URI, predicate)

source code 

A quick convienience function to retrieve a single value of a given triple (object, predicate, ...)

The parameter sd is a SymbolicData object that contains information about the SPARQL endpoint.