Ver a proveniência

add toString method for atom classes

master
Wito Chandra há 8 anos
ascendente
cometimento
5bf37a24da
7 ficheiros alterados com 85 adições e 0 eliminações
  1. +9
    -0
      lib/domain/atom_category.dart
  2. +19
    -0
      lib/domain/atom_feed.dart
  3. +9
    -0
      lib/domain/atom_generator.dart
  4. +18
    -0
      lib/domain/atom_item.dart
  5. +12
    -0
      lib/domain/atom_link.dart
  6. +9
    -0
      lib/domain/atom_person.dart
  7. +9
    -0
      lib/domain/atom_source.dart

+ 9
- 0
lib/domain/atom_category.dart Ver ficheiro

@@ -13,4 +13,13 @@ class AtomCategory {
var label = element.getAttribute("label");
return new AtomCategory(term, scheme, label);
}

@override
String toString() {
return '''
term: $term
scheme: $scheme
label: $label
''';
}
}

+ 19
- 0
lib/domain/atom_feed.dart Ver ficheiro

@@ -78,4 +78,23 @@ class AtomFeed {
rights: rights,
subtitle: subtitle);
}

@override
String toString() {
return '''
id: $id
title: $title
updated: $updated
items: $items
links: $links
authors: $authors
contributors: $contributors
categories: $categories
generator: $generator
icon: $icon
logo: $logo
rights: $rights
subtitle: $subtitle
''';
}
}

+ 9
- 0
lib/domain/atom_generator.dart Ver ficheiro

@@ -13,4 +13,13 @@ class AtomGenerator {
var value = element.text;
return new AtomGenerator(uri, version, value);
}

@override
String toString() {
return '''
uri: $uri
version: $version
value: $value
''';
}
}

+ 18
- 0
lib/domain/atom_item.dart Ver ficheiro

@@ -73,4 +73,22 @@ class AtomItem {
summary: summary,
rights: rights);
}

@override
String toString() {
return '''
id: $id
title: $title
updated: $updated
authors: $authors
links: $links
categories: $categories
contributors: $contributors
source: $source
published: $published
content: $content
summary: $summary
rights: $rights
''';
}
}

+ 12
- 0
lib/domain/atom_link.dart Ver ficheiro

@@ -22,4 +22,16 @@ class AtomLink {
}
return new AtomLink(href, rel, type, hreflang, title, length);
}

@override
String toString() {
return '''
href: $href
rel: $rel
type: $type
hreflang: $hreflang
title: $title
length: $length
''';
}
}

+ 9
- 0
lib/domain/atom_person.dart Ver ficheiro

@@ -14,4 +14,13 @@ class AtomPerson {
var email = xmlGetString(element, "email", strict: false);
return new AtomPerson(name, uri, email);
}

@override
String toString() {
return '''
name: $name
uri: $uri
email: $email
''';
}
}

+ 9
- 0
lib/domain/atom_source.dart Ver ficheiro

@@ -15,4 +15,13 @@ class AtomSource {

return new AtomSource(id, title, updated);
}

@override
String toString() {
return '''
id: $id
title: $title
updated: $updated
''';
}
}

Carregando…
Cancelar
Guardar