Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix transcript date parsing.

All transcripts have a first line with a right-aligned number on the
first page. If this number starts with a 4 the transcript parser
would incorrectly guess the format of the transcript.
  • Loading branch information...
commit 20f70ef6a4eaa881dc47ed36493ac46be9e80df2 1 parent 333b190
@GraylinKim GraylinKim authored
View
4 src/main/java/gov/nysenate/openleg/processors/TranscriptProcessor.java
@@ -31,6 +31,7 @@ public void process(File file, Storage storage) {
EasyReader reader = new EasyReader(file).open();
String line = null;
+ logger.debug("Skipping: "+reader.readLine());
while ((line = reader.readLine()) != null) {
pLine = line.trim();
@@ -73,7 +74,7 @@ else if (transcript.getTimeStamp() == null && pLine.startsWith((locationLineIdx+
Date tTime = TRANSCRIPT_DATE_PARSER.parse(pLine);
transcript.setTimeStamp(tTime);
} catch (ParseException e) {
- logger.error("unable to parse transcript datetime" + pLine,e);
+ logger.error(file.getName()+": unable to parse transcript datetime " + pLine,e);
}
}
else if (transcript.getType() == null && pLine.startsWith((locationLineIdx+5)+" ")) {
@@ -99,6 +100,7 @@ else if (transcript.getType() == null && pLine.startsWith((locationLineIdx+5)+"
transcript.setTranscriptTextProcessed(fullTextProcessed.toString());
transcript.setId(transcript.luceneOid());
transcript.setModified(transcript.getTimeStamp().getTime());
+ transcript.addSobiReference(file.getName());
storage.set(transcript.getYear()+"/transcript/"+transcript.luceneOid(), transcript);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.