Skip to content

Commit d62c72e

Browse files
committed
refactor(dataverse)!: change RdfFormat to RdfDatasetFormat
1 parent f54a8f9 commit d62c72e

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

contracts/axone-dataverse/src/contract.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ pub mod query {
138138
#[cfg(test)]
139139
mod tests {
140140
use super::*;
141-
use crate::msg::{DataverseResponse, RdfFormat, TripleStoreConfig, TripleStoreLimitsInput};
141+
use crate::msg::{
142+
DataverseResponse, RdfDatasetFormat, TripleStoreConfig, TripleStoreLimitsInput,
143+
};
142144
use crate::testutil::testutil::read_test_data;
143145
use axone_cognitarium::msg::{
144146
DataFormat, Head, Node, Results, SelectItem, SelectQuery, SelectResponse,
@@ -271,7 +273,7 @@ mod tests {
271273

272274
let msg = ExecuteMsg::SubmitClaims {
273275
metadata: Binary::from("data".as_bytes()),
274-
format: Some(RdfFormat::NQuads),
276+
format: Some(RdfDatasetFormat::NQuads),
275277
};
276278

277279
let result = execute(deps.as_mut(), env, info, msg);
@@ -338,7 +340,7 @@ mod tests {
338340
mock_info("axone1072nc6egexqr2v6vpp7yxwm68plvqnkf5uemr0", &[]),
339341
ExecuteMsg::SubmitClaims {
340342
metadata: Binary(read_test_data("vc-eddsa-2020-ok.nq")),
341-
format: Some(RdfFormat::NQuads),
343+
format: Some(RdfDatasetFormat::NQuads),
342344
},
343345
);
344346

@@ -400,7 +402,7 @@ _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://example.org/exam
400402
mock_info("axone1072nc6egexqr2v6vpp7yxwm68plvqnkf5uemr0", &[]),
401403
ExecuteMsg::SubmitClaims {
402404
metadata: Binary("notrdf".as_bytes().to_vec()),
403-
format: Some(RdfFormat::NQuads),
405+
format: Some(RdfDatasetFormat::NQuads),
404406
},
405407
);
406408

@@ -416,7 +418,7 @@ _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://example.org/exam
416418
mock_info("axone1072nc6egexqr2v6vpp7yxwm68plvqnkf5uemr0", &[]),
417419
ExecuteMsg::SubmitClaims {
418420
metadata: Binary(vec![]),
419-
format: Some(RdfFormat::NQuads),
421+
format: Some(RdfDatasetFormat::NQuads),
420422
},
421423
);
422424

@@ -435,7 +437,7 @@ _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://example.org/exam
435437
mock_info("axone1072nc6egexqr2v6vpp7yxwm68plvqnkf5uemr0", &[]),
436438
ExecuteMsg::SubmitClaims {
437439
metadata: Binary(read_test_data("vc-eddsa-2020-ok-unsecured.nq")),
438-
format: Some(RdfFormat::NQuads),
440+
format: Some(RdfDatasetFormat::NQuads),
439441
},
440442
);
441443

@@ -454,7 +456,7 @@ _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://example.org/exam
454456
mock_info("axone1072nc6egexqr2v6vpp7yxwm68plvqnkf5uemr0", &[]),
455457
ExecuteMsg::SubmitClaims {
456458
metadata: Binary(read_test_data("vc-unsupported-1.nq")),
457-
format: Some(RdfFormat::NQuads),
459+
format: Some(RdfDatasetFormat::NQuads),
458460
},
459461
);
460462

@@ -502,7 +504,7 @@ _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://example.org/exam
502504
mock_info("axone1072nc6egexqr2v6vpp7yxwm68plvqnkf5uemr0", &[]),
503505
ExecuteMsg::SubmitClaims {
504506
metadata: Binary(read_test_data("vc-eddsa-2020-ok.nq")),
505-
format: Some(RdfFormat::NQuads),
507+
format: Some(RdfDatasetFormat::NQuads),
506508
},
507509
);
508510

contracts/axone-dataverse/src/msg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub enum ExecuteMsg {
6161
metadata: Binary,
6262
/// RDF format in which the metadata is represented.
6363
/// If not provided, the default format is [N-Quads](https://www.w3.org/TR/n-quads/) format.
64-
format: Option<RdfFormat>,
64+
format: Option<RdfDatasetFormat>,
6565
},
6666

6767
/// # RevokeClaims
@@ -154,7 +154,7 @@ impl From<TripleStoreLimitsInput> for axone_cognitarium::msg::StoreLimitsInput {
154154
/// `RdfFormat` represents the various serialization formats for RDF (Resource Description Framework) data.
155155
#[cw_serde]
156156
#[derive(Default)]
157-
pub enum RdfFormat {
157+
pub enum RdfDatasetFormat {
158158
/// # NQuads
159159
/// N-Quads Format
160160
///

0 commit comments

Comments
 (0)