pub enum RefIssueKind {
Dangling,
ExternallyDefined,
ConceptMismatch {
found: String,
candidates: Vec<String>,
},
VersionMismatch {
found: String,
candidates: Vec<String>,
},
ObjectVersionMismatch {
referenced: Option<String>,
found: Option<String>,
candidates: Vec<String>,
},
TitleMismatch {
referenced: Option<String>,
found: String,
},
UnknownType,
}Expand description
The four ways a reference is worth reporting.
Variants§
Dangling
No object with that uuid in the package.
Not always an error: an EPC may legitimately reference an object held elsewhere. It is always worth knowing, and it is what breaks a viewer that assumes a package is self-contained.
ExternallyDefined
The target is absent, and absence is not evidence of anything: the concept it names is defined in a catalogue Energistics publishes, not in a dataspace.
PropertyKind is the case, and it is not marginal. The dictionary
shipped with the standard defines several hundred of them and nothing
asks a package to embed the ones it uses - a package of 120 wellbores
produced 1 086 of these and not one genuine dangling reference, which
is precisely how a real one gets buried.
Whether the uuid is in the dictionary is a different question, and it
belongs to the layer that owns the dictionary
(energyml_domain::property_kind::Resolver, which energyml check
already runs). This variant only says: not being here proves nothing.
ConceptMismatch
The target exists but is a different concept - the reference says
WellboreInterpretation, the part is a HorizonInterpretation.
Always a real error: whatever reads this will follow the reference and find something it cannot use.
Fields
candidates: Vec<String>The full uri of every object that carries the uuid - none of them is what the reference names. The message built from them reads ’uuid found but type or version should be one of the following: ’ followed by the uris of the objects that carry the right uuid but not the right type or version number. Sorted.
VersionMismatch
Same concept, different version - resqml20.obj_Activity naming a
resqml22.Activity.
A warning, not an error. A package may mix versions (EPC §3.2), and a reader that matches on uuid finds the right object; but a reader that trusts the declared type to pick a parser does not.
Fields
ObjectVersionMismatch
The right object, at another revision: the reference’s
ObjectVersion and the object’s objectVersion disagree.
An error when the reference names a revision - one the object is not at, or one where the object carries none: whatever follows it is promised a revision the package does not hold. A warning when the reference names none and the object does: the Identifier Specification has a reader assume the latest, which is what the package holds, so nothing breaks - but a package that stamps every object with a version and writes its references without one says two things, and the Webstudio flags it. It was exactly what our own translation produced, and this checker said nothing.
Fields
TitleMismatch
The right object, under another name: the reference’s cached Title
and the object’s citation title disagree.
A warning, never an error: a reader resolves by uuid and finds the
right object, so nothing breaks. What it does break is every list built
from references rather than from the objects - a graph, a tree, a
picker - which then shows a name the package no longer uses, or no name
at all. The Webstudio reports it, and this checker did not (seen on a
package our own translation wrote: the two references of a
LocalEngineeringCompoundCrs carried an empty title).
Fields
UnknownType
The reference names a type no schema this build carries defines -
well formed (resqml22.NoSuchThing matches the QualifiedType
pattern) and pointing at nothing a reader could ever open.
A warning: the pattern accepts any two-digit version, so a package
written against a release this build does not carry says the same thing.
It is the one reference finding no store can make - it needs the
registry of types, which is why it is check_declared_types and not
part of check_references.
Trait Implementations§
Source§impl Clone for RefIssueKind
impl Clone for RefIssueKind
Source§impl Debug for RefIssueKind
impl Debug for RefIssueKind
impl Eq for RefIssueKind
Source§impl PartialEq for RefIssueKind
impl PartialEq for RefIssueKind
impl StructuralPartialEq for RefIssueKind
Auto Trait Implementations§
impl Freeze for RefIssueKind
impl RefUnwindSafe for RefIssueKind
impl Send for RefIssueKind
impl Sync for RefIssueKind
impl Unpin for RefIssueKind
impl UnsafeUnpin for RefIssueKind
impl UnwindSafe for RefIssueKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.