Skip to content

Commit d3c9d52

Browse files
committed
extend known formats
1 parent d60cbac commit d3c9d52

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/combine/manifest.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ pub enum KnownFormats {
184184
SEDML,
185185
/// Systems Biology Graphical Notation (SBGN)
186186
SBGN,
187+
/// Tab-separated values (TSV)
188+
TSV,
189+
/// Comma-separated values (CSV)
190+
CSV,
187191
}
188192

189193
impl FromStr for KnownFormats {
@@ -208,6 +212,10 @@ impl FromStr for KnownFormats {
208212
Ok(KnownFormats::SEDML)
209213
}
210214
"http://identifiers.org/combine.specifications/sbgn" | "sbgn" => Ok(KnownFormats::SBGN),
215+
"https://purl.org/NET/mediatypes/text/tab-separated-values" | "tsv" => {
216+
Ok(KnownFormats::TSV)
217+
}
218+
"https://purl.org/NET/mediatypes/text/csv" | "csv" => Ok(KnownFormats::CSV),
211219
_ => Err(format!("Unknown format: {}", s)),
212220
}
213221
}
@@ -229,6 +237,11 @@ impl Display for KnownFormats {
229237
write!(f, "http://identifiers.org/combine.specifications/sed")
230238
}
231239
KnownFormats::SBGN => write!(f, "http://identifiers.org/combine.specifications/sbgn"),
240+
KnownFormats::TSV => write!(
241+
f,
242+
"https://purl.org/NET/mediatypes/text/tab-separated-values"
243+
),
244+
KnownFormats::CSV => write!(f, "https://purl.org/NET/mediatypes/text/csv"),
232245
}
233246
}
234247
}

0 commit comments

Comments
 (0)