Examples of Transcript


Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

{
  @Before
  public void setUp ()
      throws Exception
  {
    final Transcript transcript = Transcript.create (this);
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    this.exceptions = exceptions;
    BasicThreadingSecurityManager.initialize ();
    this.threadingContext = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
View Full Code Here

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

 
  protected StateMachine (final Class<_State_> stateClass, final Class<_Transition_> transitionClass, final Transcript transcript_, final ExceptionTracer exceptions_)
  {
    super ();
    // FIXME: Refactor code to wrap the exception handler into a transcript exception handler.
    final Transcript transcript = (transcript_ != null) ? transcript_ : Transcript.create (this, true);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, (exceptions_ != null) ? exceptions_ : FallbackExceptionTracer.defaultInstance);
    this.capsule = new Capsule (stateClass, transitionClass, transcript, exceptions);
    this.transcript = this.capsule.transcript;
    this.exceptions = this.capsule.exceptions;
    this.capsule.transcript.traceDebugging ("created machine `%{object}`.", this);
View Full Code Here

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

public class MemcachedDriverTest
{
  @Before
  public void setUp ()
  {
    final Transcript transcript = Transcript.create (this);
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    this.exceptions = exceptions;
    BasicThreadingSecurityManager.initialize ();
    this.threadingContext = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
View Full Code Here

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

public class AmqpDriverTest
{
  @Before
  public void setUp ()
  {
    final Transcript transcript = Transcript.create (this);
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    BasicThreadingSecurityManager.initialize ();
    this.threadingContext = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    this.threadingContext.initialize ();
View Full Code Here

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

      CallbackHandler
{
  protected AbstractDriverComponentCallbacks (final ComponentEnvironment context)
  {
    this.threading = context.threading;
    final Transcript transcript = Transcript.create (this, true);
    this.logger = transcript.adaptAs (Logger.class);
    this.exceptions = TranscriptExceptionTracer.create (transcript, context.exceptions);
  }
View Full Code Here

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

public final class ZeroMqChannelTest
{
  @Test
  public final void test ()
  {
    final Transcript transcript = Transcript.create (this);
    BasicThreadingSecurityManager.initialize ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (ZeroMqChannelTest.defaultPollTimeout));
View Full Code Here

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript

public final class BasicCallbackReactorTest
{
  @Test
  public final void test ()
  {
    final Transcript transcript = Transcript.create (this);
    BasicThreadingSecurityManager.initialize ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (BasicCallbackReactorTest.defaultPollTimeout));
View Full Code Here

Examples of gov.nysenate.openleg.model.Transcript

                        }
                        summary = total + " item(s)";

                    }
                } else if (type.equals("transcript")) {
                    Transcript transcript = (Transcript) resultObj;

                    if (transcript.getTimeStamp() != null)
                        title = new SimpleDateFormat("MMM d, yyyy h:mm aa").format(transcript.getTimeStamp());
                    else
                        title = "Transcript - " + transcript.getLocation();

                    summary = TextFormatter.append(transcript.getType(), ": ", transcript.getLocation());

                    fields.put("location", transcript.getLocation());

                } else if (type.equals("meeting")) {
                    Meeting meeting = (Meeting) resultObj;
                    title = TextFormatter.append(meeting.getCommitteeName(), " (",
                            new SimpleDateFormat("MMM d, yyyy - h:mm a").format(meeting.getMeetingDateTime()), ")");
View Full Code Here

Examples of gov.nysenate.openleg.model.Transcript

    public TranscriptProcessor() {
        this.logger = Logger.getLogger(this.getClass());
    }

    public void process(File file, Storage storage) throws IOException {
        Transcript transcript = new Transcript();
        StringBuffer fullText = new StringBuffer();
        StringBuffer fullTextProcessed = new StringBuffer();

        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "latin1"));
        String lineText;
        TranscriptLine line;
        String date = null;
        String time = null;
        boolean firstPageParsed = false;
        boolean firstLineParsed = false;
        boolean skipFirstThreeLines = false;
        int numSkipped = 0;

        while ((lineText = reader.readLine()) != null) {
            line = new TranscriptLine(lineText);

            if (!firstPageParsed) {

                // Handle transcripts with 3 incorrect lines at start of transcript.
                if (!firstLineParsed) {
                    if (lineText.contains("SESSION")) {
                        skipFirstThreeLines = true;
                        numSkipped = 1;
                        continue;
                    }
                }
                if (skipFirstThreeLines == true && numSkipped <= 3) {
                    numSkipped++;
                    continue;
                }

                if (line.isLocation())
                    transcript.setLocation(line.removeLineNumber().trim());

                if (line.isDate())
                    date = line.getDateString();

                if (line.isTime())
                    time = line.getTimeString();

                if (line.isSession())
                    transcript.setType(line.removeLineNumber().trim());

                if (transcript.getLocation() != null && date != null && time != null && transcript.getType() != null)
                    firstPageParsed = true;
            }

            firstLineParsed = true;

            fullText.append(line.fullText()).append("\n");

            if (line.removeLineNumber().trim().length() > 0) {
                fullTextProcessed.append(line.removeLineNumber().trim()).append("\n");
            }
        }

        reader.close();

        try {
            transcript.setTimeStamp(TRANSCRIPT_DATE_PARSER.parse(date+" "+time));
        } catch (ParseException e) {
            logger.error(file.getName()+": unable to parse transcript datetime " + date+" "+time, e);
        }

        transcript.setTranscriptText(fullText.toString());
        transcript.setTranscriptTextProcessed(fullTextProcessed.toString());
        String oid = transcript.getType().replaceAll(" ""-")+"-"+new SimpleDateFormat("MM-dd-yyyy_HH:mm").format(transcript.getTimeStamp());
        transcript.setId(oid);
        transcript.setModifiedDate(transcript.getTimeStamp());
        transcript.setPublishDate(transcript.getTimeStamp());
        transcript.addDataSource(file.getName());

        // Save the transcript
        String key = transcript.getYear()+"/transcript/"+transcript.getId();
        storage.set(transcript);

        // Make an entry in the change log
        ChangeLogger.setContext(file, transcript.getTimeStamp());
        ChangeLogger.record(key, storage);
    }
View Full Code Here

Examples of gov.nysenate.openleg.model.Transcript

    }

    public Transcript readTranscript(Reader reader) throws JsonProcessingException, IOException
    {
        JsonNode node = objectMapper.readTree(reader);
        Transcript transcript = new Transcript();
        transcript.setId(node.get("id").asText());
        transcript.setTimeStamp(makeDate(node.get("timeStamp")));
        transcript.setLocation(node.get("location").asText());
        transcript.setType(node.get("type").asText());
        transcript.setTranscriptText(node.get("transcriptText").asText());
        transcript.setTranscriptTextProcessed(node.get("transcriptTextProcessed").asText());
        transcript.setRelatedBills((List<Bill>)makeList(Bill.class, node.get("relatedBills")));

        transcript.setActive(node.get("active").asBoolean());
        transcript.setYear(node.get("year").asInt());
        transcript.setSession(node.get("session").asInt());
        transcript.setModifiedDate(makeDate(node.get("modified")));
        transcript.setPublishDate(makeDate(node.get("published")));
        transcript.setDataSources(new HashSet<String>((HashSet<String>)makeSet(String.class, node.get("dataSources"))));
        return transcript;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.