mirror of
https://github.com/stonega/tsacdop
synced 2025-01-25 13:18:42 +01:00
25 lines
472 B
Dart
25 lines
472 B
Dart
|
import 'package:xml/xml.dart';
|
||
|
|
||
|
class Restriction {
|
||
|
final String relationship;
|
||
|
final String type;
|
||
|
final String value;
|
||
|
|
||
|
Restriction({
|
||
|
this.relationship,
|
||
|
this.type,
|
||
|
this.value,
|
||
|
});
|
||
|
|
||
|
factory Restriction.parse(XmlElement element) {
|
||
|
if (element == null) {
|
||
|
return null;
|
||
|
}
|
||
|
return new Restriction(
|
||
|
relationship: element.getAttribute("relationship"),
|
||
|
type: element.getAttribute("type"),
|
||
|
value: element.text,
|
||
|
);
|
||
|
}
|
||
|
}
|