Aggregator
getAuthor(metadata)
Get the KG author from the KG metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
dict
|
A dict that contains all KG metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that represent the KG author. |
Source code in kgheartbeat\aggregator.py
getDataPackage(idKG)
Get the JSON file with all matadata about the KG from its id, both from LODC and DataHub. If metadata are available on both the services, then return the ones from DataHub.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idKG |
string
|
A string that represent the ID of KG that we want the metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
A dict that contains all the metadata of the KG. |
Source code in kgheartbeat\aggregator.py
getDescription(metadata)
Get the KG description.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
dict
|
A dict that contains the KG metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that is the description of the data in the KG. |
Source code in kgheartbeat\aggregator.py
getExternalLinks(idKG)
Get all the external links related to the KG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idKG |
string
|
A string that contains the KG id. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
A dict that which the links and the info about the links. |
Source code in kgheartbeat\aggregator.py
getExtrasLanguage(idKg)
Get the languages of the data in the KG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idKG |
str
|
A string that represents the KG id. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
A dict that contains the languages supported by the KG . |
Source code in kgheartbeat\aggregator.py
getKeywords(idKg)
Get the KG keyowords.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idKG |
string
|
A string that represent the KG id. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that is the concatenation of all the KG keywords. |
Source code in kgheartbeat\aggregator.py
getLicense(metadata)
Get the license info from the metadata recovered.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
dict
|
A dict that contains all KG metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that represent the KG license. |
Source code in kgheartbeat\aggregator.py
getNameKG(metadata)
Get the KG name form the kg metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
dict
|
A dict that contains all KG metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that represent the KG name |
Source code in kgheartbeat\aggregator.py
getOtherResources(idKG)
Get all the other resources related with the KG (e.g. examples of SPARQL query).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idKG |
string
|
A string that contains the KG id. |
required |
Returns:
Name | Type | Description |
---|---|---|
list |
A list which contains all the links to other resources. |
Source code in kgheartbeat\aggregator.py
getSPARQLEndpoint(idKG)
Get the SPARQL endpoint from the KG id, try to find on both DataHub and LODCloud. If the link is available on both the service, is selected the one from LODCloud
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idKG |
string
|
A string that contains the KG id. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that is the SPARQL endpoint link. |
Source code in kgheartbeat\aggregator.py
getSource(metadata)
Get the KG source from the KG metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
dict
|
A dict that contains all KG metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
string |
A string that represent the KG author. |
Source code in kgheartbeat\aggregator.py
getTriples(metadata)
Get the number of KG triples from the metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata |
dict
|
A dict that contains all KG metadata. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
A integer that represent the number of triples in the KG. |