-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] NeTEx France - Add AccessibilityAssessment on Quays #563
Conversation
src/netex_france/stops.rs
Outdated
@@ -312,6 +321,61 @@ impl<'a> StopExporter<'a> { | |||
Ok(Some(centroid)) | |||
} | |||
|
|||
fn generate_quay_accessibility(&self, equipment_id: Option<&str>) -> Option<Element> { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
src/netex_france/stops.rs
Outdated
}) | ||
} | ||
|
||
fn generate_mobility_impaired_access(&self, equipment: &Equipment) -> Element { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
src/netex_france/stops.rs
Outdated
.build() | ||
} | ||
|
||
fn generate_accessibility_limitations(&self, eq: &Equipment) -> Element { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
) { | ||
(Available, Available, Available) => "true", | ||
(NotAvailable, NotAvailable, NotAvailable) => "false", | ||
(Available, _, _) | (_, Available, _) | (_, _, Available) => "partial", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
@@ -160,7 +161,7 @@ As stated in `NF_Profil NeTEx éléments communs(F) - v2.1.pdf` in chapter 5.10: | |||
- `true` if all `AccessibilityLimitation` are set to `true` | |||
- `false` if all `AccessibilityLimitation` are set to `false` | |||
- `partial` if some `AccessibilityLimitation` are set to `true` | |||
- `unknow` in other cases | |||
- `unknown` in other cases |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
@@ -0,0 +1,3 @@ | |||
equipment_id,wheelchair_boarding | |||
0,1 |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
src/netex_france/stops.rs
Outdated
let writer = ElementWriter::new(element, false); | ||
let mut buffer = Vec::<u8>::new(); | ||
writer.write(&mut buffer).unwrap(); | ||
String::from_utf8(buffer) | ||
.unwrap() | ||
.replace( | ||
r#"<?xml version="1.0" encoding="UTF-8"?><MobilityImpairedAccess>"#, | ||
"", | ||
) | ||
.replace(r#"</MobilityImpairedAccess>"#, "") | ||
.to_owned() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you serialize the Element
here? You can replace this whole function by the following code
element
.nodes()
.next()
.unwrap()
.as_text()
.unwrap()
.to_string()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit updated 23653f7
9f269c6
to
23653f7
Compare
some unit tests to do