<%@page session="true" %> <%@page import="com.ikatun.reimaginings.artlogic.Conversation" %> <%@page import="com.ikatun.reimaginings.artlogic.ConversationLinks" %> <%@page import="com.ikatun.reimaginings.artlogic.History" %> <%@page import="com.ikatun.reimaginings.artlogic.Html" %> <%@page import="com.ikatun.reimaginings.artlogic.Keyword" %> <%@page import="com.ikatun.reimaginings.artlogic.Line" %> <%@page import="com.ikatun.reimaginings.artlogic.Ranking" %> <%@page import="com.ikatun.reimaginings.artlogic.Speaker" %> <%@page import="java.net.URLEncoder" %> <%@page import="java.text.DateFormat" %> <%@page import="java.text.SimpleDateFormat" %> <%@page import="java.util.Date" %> <%@page import="java.util.Calendar" %> <%@page import="java.util.Iterator" %> <%@page import="java.util.List" %> <% String id = request.getParameter("conversationId"); if (id == null || id.length() < 1) { response.sendError(HttpServletResponse.SC_NOT_FOUND, "Missing parameter `conversationId'."); return; } Conversation conversation = null; try { conversation = Conversation.get(Integer.parseInt(id)); } catch (Exception e) { e.printStackTrace(); } if (conversation == null) { response.sendError(HttpServletResponse.SC_NOT_FOUND, "No conversation wtih ID `" + id + "'."); return; } DateFormat format = DateFormat.getDateInstance(DateFormat.FULL); Speaker speaker1 = conversation.speaker1; Speaker speaker2 = conversation.speaker2; List lines = conversation.lines; List keywords = conversation.keywords; // flash URL query parameters StringBuffer flash = new StringBuffer(); flash.append("conversationId="); flash.append(conversation.getId()); if (conversation.title != null) { flash.append("&title="); flash.append(URLEncoder.encode(conversation.title)); } flash.append("&color="); flash.append(conversation.color); if (conversation.date_of_conversation != null) { flash.append("&date="); flash.append(URLEncoder.encode(new SimpleDateFormat("MM/dd/yyyy").format(conversation.date_of_conversation))); } flash.append("&speaker1="); flash.append(URLEncoder.encode(speaker1.handle)); flash.append("&speaker2="); flash.append(URLEncoder.encode(speaker2.handle)); if (speaker1.location != null) { flash.append("&location1="); flash.append(URLEncoder.encode(speaker1.location)); } if (speaker2.location != null) { flash.append("&location2="); flash.append(URLEncoder.encode(speaker2.location)); } if (keywords != null) { int num = 1; for (Iterator i = keywords.iterator(); i.hasNext(); num++) { Keyword keyword = (Keyword) i.next(); flash.append("&keyword"); flash.append(num); flash.append('='); flash.append(URLEncoder.encode(keyword.keyword)); } } ConversationLinks links = new ConversationLinks(conversation); links.init(); boolean submit = request.getParameter("is_submit") != null; History history = (History) session.getAttribute(History.class.getName()); if (history == null) { history = History.createNew(); session.setAttribute(History.class.getName(), history); } Date today = Calendar.getInstance().getTime(); if (!submit) { //don't update history on the submit history.update(conversation); } else { //submit comments to rankings table int ranking1 = request.getParameter("ranking1") == null ? -1 : Integer.parseInt(request.getParameter("ranking1")); int ranking2 = request.getParameter("ranking2") == null ? -1 : Integer.parseInt(request.getParameter("ranking2")); int ranking3 = request.getParameter("ranking3") == null ? -1 : Integer.parseInt(request.getParameter("ranking3")); String comments = request.getParameter("comments"); String posted_by = request.getRemoteHost(); Ranking ranking = Ranking.createNewRanking( conversation.getId(), posted_by, new java.sql.Date(today.getTime()), ranking1, ranking2, ranking3, comments, Ranking.REENACTMENT_MODEL ); ranking.save(); } List rankings = Ranking.getRankings(conversation.getId(), Ranking.REENACTMENT_MODEL); %> reimaginings
The REENACTMENT MODEL (Rm)provides finer-grained, color-coded insight onto the raw conversational data provided by human subjects. Using the reenactment model, the Reimaginings Prism Engine - RPE 2004 rX - can approximate the original Instant Messaging (IM) conversation in both perceptual complexity and verbal density. Filling out the HUMAN SURVEY DATA COLLECTION below will provide vital human input and oversight of the generative algoritms of the Reimaginings Prism Engine - RPE 2004 rX.

To hear the conversation performed please turn your speakers on and your volume up before clicking the REENACT button.


*REENACTMENT MODEL*

*NODAL MODEL*



REENACTMENT MODEL: Rm-<%= conversation.getId() %>*

<% Line firstLine = null; if (lines != null && !lines.isEmpty()) firstLine = (Line) lines.get(0); %>
Voices:   <% if (links.speaker1Id != -1) { %> <%= Html.escape(speaker1.handle) %> <% } else { %> <%= Html.escape(speaker1.handle) %> <% } %> and <% if (links.speaker2Id != -1) { %> <%= Html.escape(speaker2.handle) %> <% } else { %> <%= Html.escape(speaker2.handle) %> <% } %>
Title:   <% if (conversation.title != null) { %> <%= Html.escape(conversation.title) %> <% } else { %>   <% } %>
Color:   <% if (links.colorId != -1) { %> <%= Html.escape(conversation.color) %> <% } else { %> <%= Html.escape(conversation.color) %> <% } %>
First line:   <% if (firstLine != null ) { %> <%= Html.escape(firstLine.text) %> <% } else { %>   <% } %>
Date:   <% if (conversation.date_of_conversation != null) { %> <% if (links.dateId != -1) { %> <%= format.format(conversation.date_of_conversation) %> <% } else { %> <%= format.format(conversation.date_of_conversation) %> <% } %> <% } else { %>   <% } %>
Date Collected:   <% if (conversation.date_uploaded != null) { %> <% if (links.uploadDateId != -1) { %> <%= format.format(conversation.date_uploaded) %> <% } else { %> <%= format.format(conversation.date_uploaded) %> <% } %> <%} else { %>   <% } %>
Locations:   <% if (speaker1.location != null) { %> <% if (links.location1Id != -1) { %> <%= Html.escape(speaker1.location) %> <% } else { %> <%= Html.escape(speaker1.location) %> <% } %> <% if (speaker2.location != null) { %> and <% } %> <% } %> <% if (speaker2.location != null) { %> <% if (links.location2Id != -1) { %> <%= Html.escape(speaker2.location) %> <% } else { %> <%= Html.escape(speaker2.location) %> <% } %> <% } %>  
Keywords:   <% if (!keywords.isEmpty()) { %> <% for (Iterator i = keywords.iterator(); i.hasNext(); ) { Keyword kw = (Keyword) i.next(); int keywordId = links.getKeywordId(kw); %> <% if (keywordId != -1) { %> <%= Html.escape(kw.keyword) %><% } else { %> <%= Html.escape(kw.keyword) %><% } if (i.hasNext()) { %>,<% } %> <% } %> <% } else { %>   <% } %>
     

* rModels*

Nodal Model:   Nom-<%= conversation.getId() %>
Chronological Model:   Cm-<%= history.getId() %>
Newtonian Model:   Nem- <% if (links.colorId != -1) { %> <%= Html.escape(conversation.color) %> <% } else { %> <%= Html.escape(conversation.color) %> <% } %>

<% if (!submit ) { %>

*HUMAN SURVEY DATA COLLECTION*

Please contribute to the evolution of the Reimaginings Prism Engine (tm) by filling out this brief survey.

Correlation of Rm-<%= conversation.getId() %> spectrum to rSpectrum 2.0(Ideal):
1 2 3 4 5 6 7
(1 - Strong, 7 - Weak)
Perfection Index:
(rXNCRel - Newtonian Correspondance Relevancy)
Perfect Not perfect
How do you feel about Rm-<%= conversation.getId() %> spectrum above?
(rXPsychIDX - Inner emotional state):
Good Bad
Qualitative comments:
<%}%>

*HUMAN SURVEY DATA COLLECTION RESULTS*

<% for (int i= rankings.size() - 1; i >= 0; i-- ) { Ranking ranking = (Ranking)rankings.get(i); %>

HDCSR-<%= ranking.getId()%>

Date Collected: <%= ranking.date_posted%>

Human Subject ID: <%= ranking.posted_by%>

Correlation Index: <%= ranking.ranking1%>

Perfection Index (rXNCRel): <%= ranking.ranking2%> <%= ranking.ranking2 == 0 ? "(Not perfect)" : ranking.ranking2 == 1 ? "(Perfect)" : "(unanswered)"%>

Psychological Index (rXPsychIDX): <%= ranking.ranking3%> <%= ranking.ranking3 == 0 ? "(Bad)" : ranking.ranking3 == 1 ? "(Good)" : "(unanswered)"%>

Input: <%= ranking.comments%>


<% } %>