diff options
author | Rob Austein <sra@hactrn.net> | 2014-07-15 19:34:32 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-07-15 19:34:32 +0000 |
commit | a35ce7f496890d47b2c116efb15da992b7622d40 (patch) | |
tree | 94bfeac62f94f5769b0bb0ce18611c2b5132271b /schemas | |
parent | 5d343deb9a0f5c437fa05642f59d4a31f67ea798 (diff) | |
parent | b3a6a36b0ba3fbe7dd4d5bc5ddf98a36b6f87a56 (diff) |
Checkpoint. Merge changes from trunk. Add hash-based withdrawal
checks and <list/> command to publication protocol.
svn path=/branches/tk705/; revision=5896
Diffstat (limited to 'schemas')
-rw-r--r-- | schemas/relaxng/publication.rnc | 9 | ||||
-rw-r--r-- | schemas/relaxng/publication.rng | 19 | ||||
-rw-r--r-- | schemas/sql/pubd.sql | 2 |
3 files changed, 27 insertions, 3 deletions
diff --git a/schemas/relaxng/publication.rnc b/schemas/relaxng/publication.rnc index 8c129546..f3d1f94e 100644 --- a/schemas/relaxng/publication.rnc +++ b/schemas/relaxng/publication.rnc @@ -58,8 +58,8 @@ start |= element msg { # PDUs allowed in queries and replies. -query_elt = publish_query | withdraw_query -reply_elt = publish_reply | withdraw_reply | report_error_reply +query_elt = publish_query | withdraw_query | list_query +reply_elt = publish_reply | withdraw_reply | list_reply | report_error_reply # Tag attributes for bulk operations. @@ -91,6 +91,11 @@ publish_reply = element publish { tag?, uri } withdraw_query = element withdraw { tag?, uri, hash } withdraw_reply = element withdraw { tag?, uri } +# <list/> element + +list_query = element list { tag? } +list_reply = element list { tag?, uri, hash } + # <report_error/> element report_error_reply = element report_error { diff --git a/schemas/relaxng/publication.rng b/schemas/relaxng/publication.rng index e88db011..39d78c00 100644 --- a/schemas/relaxng/publication.rng +++ b/schemas/relaxng/publication.rng @@ -74,12 +74,14 @@ <choice> <ref name="publish_query"/> <ref name="withdraw_query"/> + <ref name="list_query"/> </choice> </define> <define name="reply_elt"> <choice> <ref name="publish_reply"/> <ref name="withdraw_reply"/> + <ref name="list_reply"/> <ref name="report_error_reply"/> </choice> </define> @@ -156,6 +158,23 @@ <ref name="uri"/> </element> </define> + <!-- <list/> element --> + <define name="list_query"> + <element name="list"> + <optional> + <ref name="tag"/> + </optional> + </element> + </define> + <define name="list_reply"> + <element name="list"> + <optional> + <ref name="tag"/> + </optional> + <ref name="uri"/> + <ref name="hash"/> + </element> + </define> <!-- <report_error/> element --> <define name="report_error_reply"> <element name="report_error"> diff --git a/schemas/sql/pubd.sql b/schemas/sql/pubd.sql index 34778491..210396d5 100644 --- a/schemas/sql/pubd.sql +++ b/schemas/sql/pubd.sql @@ -62,7 +62,7 @@ CREATE TABLE snapshot ( CREATE TABLE object ( object_id SERIAL NOT NULL, uri VARCHAR(255) NOT NULL, - hash BINARY(32) NOT NULL, + hash CHAR(64) NOT NULL, payload LONGBLOB NOT NULL, published_snapshot_id BIGINT UNSIGNED, withdrawn_snapshot_id BIGINT UNSIGNED, |