[tor-commits] [onionoo/master] Remove unused attributes from Document classes.

karsten at torproject.org karsten at torproject.org
Mon Apr 14 13:29:24 UTC 2014


commit 25556d9ad1fa77af89770c1506bd5a1516e9c432
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Sat Apr 12 17:22:33 2014 +0200

    Remove unused attributes from Document classes.
---
 src/org/torproject/onionoo/BandwidthDocument.java |   22 -------
 src/org/torproject/onionoo/DetailsDocument.java   |   63 ---------------------
 src/org/torproject/onionoo/SummaryDocument.java   |   19 -------
 src/org/torproject/onionoo/WeightsDocument.java   |   25 --------
 4 files changed, 129 deletions(-)

diff --git a/src/org/torproject/onionoo/BandwidthDocument.java b/src/org/torproject/onionoo/BandwidthDocument.java
index 01b87de..3f1a07f 100644
--- a/src/org/torproject/onionoo/BandwidthDocument.java
+++ b/src/org/torproject/onionoo/BandwidthDocument.java
@@ -2,29 +2,7 @@
  * See LICENSE for licensing information */
 package org.torproject.onionoo;
 
-import java.util.List;
-import java.util.Map;
-
 class BandwidthDocument extends Document {
 
-  class BandwidthHistory {
-    String first;
-    String last;
-    Integer interval;
-    Double factor;
-    Integer count;
-    List<Integer> values;
-  }
-
-  class NodeBandwidth {
-    String fingerprint;
-    Map<String, BandwidthHistory> write_history;
-    Map<String, BandwidthHistory> read_history;
-  }
-
-  String relays_published;
-  List<NodeBandwidth> relays;
-  String bridges_published;
-  List<NodeBandwidth> bridges;
 }
 
diff --git a/src/org/torproject/onionoo/DetailsDocument.java b/src/org/torproject/onionoo/DetailsDocument.java
index 9b81bbd..b51b6cd 100644
--- a/src/org/torproject/onionoo/DetailsDocument.java
+++ b/src/org/torproject/onionoo/DetailsDocument.java
@@ -2,70 +2,7 @@
  * See LICENSE for licensing information */
 package org.torproject.onionoo;
 
-import java.util.List;
-
 class DetailsDocument extends Document {
 
-  class ExitPolicySummary {
-    List<String> reject;
-    List<String> accept;
-  }
-
-  class RelayDetails {
-    String nickname;
-    String fingerprint;
-    List<String> or_addresses;
-    List<String> exit_addresses;
-    String dir_address;
-    String last_seen;
-    String last_changed_address_or_port;
-    String first_seen;
-    Boolean running;
-    List<String> flags;
-    String country;
-    String country_name;
-    String region_name;
-    String city_name;
-    Double latitude;
-    Double longitude;
-    String as_number;
-    String as_name;
-    Double consensus_weight;
-    String host_name;
-    String last_restarted;
-    Integer bandwidth_rate;
-    Integer bandwidth_burst;
-    Integer observed_bandwidth;
-    Integer advertised_bandwidth;
-    List<String> exit_policy;
-    ExitPolicySummary exit_policy_summary;
-    String contact;
-    String platform;
-    List<String> family;
-    Double advertised_bandwidth_fraction;
-    Double consensus_weight_fraction;
-    Double guard_probability;
-    Double middle_probability;
-    Double exit_probability;
-  }
-
-  class BridgeDetails {
-    String nickname;
-    String hashed_fingerprint;
-    List<String> or_addresses;
-    String last_seen;
-    String first_seen;
-    Boolean running;
-    List<String> flags;
-    String last_restarted;
-    Integer advertised_bandwidth;
-    String platform;
-    String pool_assignment;
-  }
-
-  String relays_published;
-  List<RelayDetails> relays;
-  String bridges_published;
-  List<BridgeDetails> bridges;
 }
 
diff --git a/src/org/torproject/onionoo/SummaryDocument.java b/src/org/torproject/onionoo/SummaryDocument.java
index e0aadb5..63862a2 100644
--- a/src/org/torproject/onionoo/SummaryDocument.java
+++ b/src/org/torproject/onionoo/SummaryDocument.java
@@ -2,26 +2,7 @@
  * See LICENSE for licensing information */
 package org.torproject.onionoo;
 
-import java.util.List;
-
 class SummaryDocument extends Document {
 
-  class RelaySummary {
-    String n;
-    String f;
-    String[] a;
-    Boolean r;
-  }
-
-  class BridgeSummary {
-    String n;
-    String h;
-    Boolean r;
-  }
-
-  String relays_published;
-  List<RelaySummary> relays;
-  String bridges_published;
-  List<BridgeSummary> bridges;
 }
 
diff --git a/src/org/torproject/onionoo/WeightsDocument.java b/src/org/torproject/onionoo/WeightsDocument.java
index 6739333..af920f0 100644
--- a/src/org/torproject/onionoo/WeightsDocument.java
+++ b/src/org/torproject/onionoo/WeightsDocument.java
@@ -1,31 +1,6 @@
 package org.torproject.onionoo;
 
-import java.util.List;
-import java.util.Map;
-
 class WeightsDocument extends Document {
 
-  class WeightsHistory {
-    String first;
-    String last;
-    Integer interval;
-    Double factor;
-    Integer count;
-    List<Integer> values;
-  }
-
-  class NodeWeights {
-    String fingerprint;
-    Map<String, WeightsHistory> advertised_bandwidth_fraction;
-    Map<String, WeightsHistory> consensus_weight_fraction;
-    Map<String, WeightsHistory> guard_probability;
-    Map<String, WeightsHistory> middle_probability;
-   Map<String, WeightsHistory> exit_probability;
-  }
-
-  String relays_published;
-  List<NodeWeights> relays;
-  String bridges_published;
-  List<NodeWeights> bridges;
 }
 





More information about the tor-commits mailing list