You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// This function is used as part of the custom deserialization process in `GraphVector`
369
371
/// to distinguish between `DataEntity` and `ContextualEntity`. It validates whether the
370
372
/// provided string (`s`) is a well-formed URL or a path that corresponds to an existing file.
371
-
fnis_valid_url_or_path(s:&str) -> bool{
372
-
Url::parse(s).is_ok() || Path::new(s).exists()
373
+
///
374
+
/// NOTE: The documentation states that:
375
+
/// ```
376
+
/// An entity which has File or Dataset as one of its @type values:
377
+
///
378
+
/// Is considered to be a Data Entity if its @id is an absolute URI or a relative URI.
379
+
/// MAY have an @id which is a local identifier beginning with a #, in which case it is not considered to be a Data Entity.
380
+
/// ```
381
+
/// So the file path does not need to exist, and even if it exists, this library does not
382
+
/// necessarily know the root of the crate. Also ContextualEntities can contain valid URIs as
383
+
/// the documentation says [here](https://www.researchobject.org/ro-crate/specification/1.2/contextual-entities.html#identifiers-for-contextual-entities)
0 commit comments