2007-11-22T13:02:00Z
virtual-observatories
\metaString{site.description}
if not base.getConfig("db", "dumpsystemtables"):
return
from gavo import utils
from gavo.rsc import dumping
with utils.safeReplaced(
os.path.join(
base.getConfig("stateDir"),
"systemtables.dump")) as f:
dumping.createDump([
"//services",
"//users",
"//rds",
"//dc_tables",
],f)
The table of published "resources" (i.e., services, tables,
data collections) within this data center. There are separate
tables of the interfaces these resources have, their authors,
subjects, and the sets they belong to.
Manipulate through gavo pub; to remove entries from this table, remove
the publication element of the service or table in question
and re-run gavo pub on the resource descriptor.
A table that has "interfaces", i.e., actual URLs under which
services are accessible. This is in a separate table, as services
can have multiple interfaces (e.g., SCS and form).
Manipulate through gavo pub; to remove entries from this table, remove
the publication element of the service or table in question
and re-run gavo pub on the resource descriptor.
A table that contains set membership of published resources.
For DaCHS, the sets ivo_managed ("publish to the VO") and local
("show on a generated root page" if using one of the shipped
root pages) have a special role.
Manipulate through gavo pub; to remove entries from this table, remove
the publication element of the service or table in question
and re-run gavo pub on the resource descriptor.
A table that contains the subject metadata for published services. It is
used by the shipped templates of the root pages ("...by subject").
Manipulate through gavo pub; to remove entries from this table, remove
the publication element of the service or table in question
and re-run gavo pub on the resource descriptor.
A table that contains the (slightly processed) creator.name
metadata from published services. It is used by the shipped
templates of the root pages.
Manipulate through gavo pub; to remove entries from this table, remove
the publication element of the service or table in question
and re-run gavo pub on the resource descriptor.
An RD-level map of dependencies, meaning
that before generating resource records from rd, prereq should
be imported (think: TAP needs the metadata of all dependent tables).
This is managed by gavo pub and used in the OAI-PMH interface.
gavo imp --system this to create the service
tables. servicelist has special grammars to feed these.
import the RD-dependencies from an RD.
rd = self.sourceToken
for rdId, reqId in rd.rdDependencies:
yield {
'rd': rdId,
'prereq': reqId,
'sourceRD': rd.sourceId,
}
A join of resources, interfaces, and sets used internally.
CREATE OR REPLACE VIEW dc.resources_join AS (
SELECT \colNames
FROM
dc.resources
NATURAL JOIN dc.sets
NATURAL LEFT OUTER JOIN dc.interfaces)
A join of resources, subjects, and sets used internally.
CREATE OR REPLACE VIEW dc.subjects_join AS (
SELECT \colNames
FROM
dc.interfaces
NATURAL JOIN dc.resources
NATURAL JOIN dc.subjects
NATURAL JOIN dc.sets
ORDER BY subject)
_cs_srv
Published Services
A list of all services published on the
\getConfig{web}{sitename}, with links to information pages
about them
http://rofr.ivoa.net/regvalidate/HarvestValidater?endpoint=\getConfig{web}{serverURL}/oai.xml
/logs/logs/stats/form
//root.html
\getConfig{web}{sitename}
rd = service.rd
if not hasattr(rd, "chunkedServiceList"):
from gavo.registry import servicelist
rd.chunkedServiceList = servicelist.getChunkedServiceList('local')
return rd.chunkedServiceList
rd = service.rd
if not hasattr(rd, "rankedServiceList"):
from gavo.registry import servicelist
rd.rankedServiceList = servicelist.getRankedServiceList('local')
return rd.rankedServiceList
rd = service.rd
if not hasattr(rd, "portal__titleList"):
with base.getTableConn() as conn:
rd.portal__titleList = list(conn.queryToDicts("SELECT"
" title, dateUpdated, accessURL, referenceURL, browseable, owner,"
" sourceRD, resId, rank"
" FROM dc.resources_join"
" WHERE setName='local' AND NOT deleted"
" ORDER BY rank, title"))
return rd.portal__titleList
rd = service.rd
if not hasattr(rd, "subjectServiceList"):
from gavo.registry import servicelist
rd.subjectServiceList = servicelist.querySubjectsList()
return rd.subjectServiceList
if data["owner"]:
return ctx.tag
else:
return ""
if not hasattr(service.rd, "portal__tapispublic"):
with base.getTableConn() as conn:
res = [r[0] for r in conn.query("SELECT resid FROM dc.resources"
" WHERE sourcerd='__system__/tap'"
" AND NOT deleted")]
service.rd.portal__tapispublic = "run" in res
if service.rd.portal__tapispublic:
return ctx.tag
else:
return ""
Cache Clearer
rdId = inputTable.args["rdId"]
if rdId.startswith("//"):
rdId = "__system__"+rdId[1:]
base.caches.clearForName(rdId)
return rsc.TableForDef(self.outputTable,
rows=[{"result": "Ok"}])