Permalink
Browse files

4 variations on data import

  • Loading branch information...
1 parent 034364a commit d01f13ab99203cab180a9f83ecc38d699b453c21 @akollegger committed Sep 25, 2012
Showing with 2,699 additions and 514 deletions.
  1. +110 −106 CODE/fecGraph/src/importer/AbkImporter.java
  2. +83 −0 CODE/fecGraph/src/importer/CommitteeRecord.java
  3. +414 −0 CODE/fecGraph/src/importer/DFauthImporter.java
  4. +49 −0 CODE/fecGraph/src/importer/DataRecord.java
  5. +2 −292 CODE/fecGraph/src/importer/FecBatchImporter.java
  6. +19 −0 CODE/fecGraph/src/importer/FieldSpec.java
  7. +69 −0 CODE/fecGraph/src/importer/FieldType.java
  8. +64 −0 CODE/fecGraph/src/importer/IndividualRecord.java
  9. +39 −0 CODE/fecGraph/src/importer/StdOutReport.java
  10. +98 −0 CODE/fecGraph/src/importer/SuperPacDonationRecord.java
  11. +120 −0 CODE/fecGraph/src/importer/SuperPacExpenditureRecord.java
  12. +68 −0 CODE/fecGraph/src/importer/SuperPacRecord.java
  13. +34 −112 CODE/fecGraph/src/importer/Tool.java
  14. +338 −0 CODE/fecGraph/src/importer/fec/ConnectedFecImporter.java
  15. +113 −0 CODE/fecGraph/src/importer/fec/FecCandidateContributionRecord.java
  16. +91 −0 CODE/fecGraph/src/importer/fec/FecCandidateRecord.java
  17. +67 −0 CODE/fecGraph/src/importer/fec/FecCandidateToCommitteeRecord.java
  18. +91 −0 CODE/fecGraph/src/importer/fec/FecCommitteeRecord.java
  19. +110 −0 CODE/fecGraph/src/importer/fec/FecIndividualContributionRecord.java
  20. +110 −0 CODE/fecGraph/src/importer/fec/FecInterCommitteeContribRecord.java
  21. +268 −0 CODE/fecGraph/src/importer/fec/RawFecImporter.java
  22. +295 −0 CODE/fecGraph/src/importer/fec/RelatedFecImporter.java
  23. +1 −0 FEC-DATA/.gitignore
  24. BIN FEC-DATA/ccl12.zip
  25. BIN FEC-DATA/cm12.zip
  26. BIN FEC-DATA/cn12.zip
  27. BIN FEC-DATA/indiv12.zip
  28. BIN FEC-DATA/oth12.zip
  29. BIN FEC-DATA/pas212.zip
  30. +19 −4 build.xml
  31. +9 −0 cql/connected.cql
  32. +9 −0 cql/raw.cql
  33. +9 −0 cql/related.cql

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,83 @@
+package org.followthedata.importer;
+
+import java.util.*;
+
+/**
+ *
+ * Raw data header looks like:
+ * <pre>
+ * commID|commNAME|name|commTREAS|commADDR1|commADDR2|commCITY|commSTATE|commZIP|commDSG|commTYPE|commPARTYAFFIL|commFILING
+ * </pre>
+ */
+public class CommitteeRecord extends DataRecord {
+
+ public static enum Fields { commID, commNAME, name, commTREAS, commADDR1, commADDR2, commCITY, commSTATE, commZIP, commDSG, commTYPE, commPARTYAFFIL, commFILING }
+
+ static FieldSpec[] fieldSpecs = new FieldSpec[] {
+ new FieldSpec(Fields.commID.name(), FieldType.STRING),
+ new FieldSpec(Fields.commNAME.name(), FieldType.STRING),
+ new FieldSpec(Fields.name.name(), FieldType.STRING),
+ new FieldSpec(Fields.commTREAS.name(), FieldType.STRING),
+ new FieldSpec(Fields.commADDR1.name(), FieldType.STRING),
+ new FieldSpec(Fields.commADDR2.name(), FieldType.STRING),
+ new FieldSpec(Fields.commCITY.name(), FieldType.STRING),
+ new FieldSpec(Fields.commSTATE.name(), FieldType.STRING),
+ new FieldSpec(Fields.commZIP.name(), FieldType.STRING),
+ new FieldSpec(Fields.commDSG.name(), FieldType.STRING),
+ new FieldSpec(Fields.commTYPE.name(), FieldType.STRING),
+ new FieldSpec(Fields.commPARTYAFFIL.name(), FieldType.STRING),
+ new FieldSpec(Fields.commFILING.name(), FieldType.STRING),
+ };
+
+ public CommitteeRecord(String rowData) {
+ super(rowData);
+ }
+
+ @Override
+ public FieldSpec[] getFieldSpecs() {
+ return fieldSpecs;
+ }
+
+ public String commID() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commID.name()));
+ }
+ public String commNAME() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commNAME.name()));
+ }
+ public String name() {
+ return String.valueOf(getField(CommitteeRecord.Fields.name.name()));
+ }
+ public String commTREAS() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commTREAS.name()));
+ }
+ public String commADDR1() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commADDR1.name()));
+ }
+ public String commADDR2() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commADDR2.name()));
+ }
+ public String commCITY() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commCITY.name()));
+ }
+ public String commSTATE() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commSTATE.name()));
+ }
+ public String commZIP() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commZIP.name()));
+ }
+ public String commDSG() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commDSG.name()));
+ }
+ public String commTYPE() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commTYPE.name()));
+ }
+ public String commPARTYAFFIL() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commPARTYAFFIL.name()));
+ }
+ public String commFILING() {
+ return String.valueOf(getField(CommitteeRecord.Fields.commFILING.name()));
+ }
+
+
+}
+
Oops, something went wrong.

0 comments on commit d01f13a

Please sign in to comment.