Utils
Namespaces
¶
Class representing the namespaces available to an RDF graph.
Source code in ckanext/nhm/dcat/utils.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
__getattr__(prefix)
¶
Returns the namespace associated with the given prefix and ensures it is bound to the graph if it hasn't been already.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prefix
|
the namespace prefix as defined in the known_namespaces dict attribute |
required |
Returns:
| Type | Description |
|---|---|
|
the namespace object |
Source code in ckanext/nhm/dcat/utils.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
__init__(graph)
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph
|
the graph object to bind the used namespaces to |
required |
Source code in ckanext/nhm/dcat/utils.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
as_dwc_list(objects)
¶
Returns the given objects as a list using the DwC standard | style separator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objects
|
the objects |
required |
Returns:
| Type | Description |
|---|---|
|
a | separated string |
Source code in ckanext/nhm/dcat/utils.py
28 29 30 31 32 33 34 35 | |
object_uri(uuid, version=None)
¶
Returns an URI for an object.
Source code in ckanext/nhm/dcat/utils.py
13 14 15 16 17 | |
rdf_resources()
¶
Return list of resource IDs with RDF records.
Source code in ckanext/nhm/dcat/utils.py
20 21 22 23 24 25 | |