You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
(26) |
Aug
(85) |
Sep
(141) |
Oct
(85) |
Nov
(60) |
Dec
(29) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(38) |
Feb
(78) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <tre...@us...> - 2008-01-23 03:18:42
|
Revision: 689
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=689&view=rev
Author: trevorolio
Date: 2008-01-22 19:18:47 -0800 (Tue, 22 Jan 2008)
Log Message:
-----------
Added a /r command to reply to the last person to private tell you something.
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java 2008-01-22 23:40:33 UTC (rev 688)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java 2008-01-23 03:18:47 UTC (rev 689)
@@ -27,6 +27,8 @@
import java.awt.event.KeyListener;
import com.ogoglio.util.ArgumentUtils;
+import com.ogoglio.util.WebConstants;
+import com.ogoglio.viewer.j3d.J3DUserRenderable;
public class ChatPanel extends Panel {
@@ -66,6 +68,9 @@
if (historyPanel.getText().length() != 0) {
historyPanel.append("\r\n");
}
+ if(username.startsWith(WebConstants.GUEST_COOKIE_PREFIX)){
+ username = J3DUserRenderable.convertGuestCookieToDisplayName(username);
+ }
historyPanel.append(username + " tells you: " + message);
}
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-22 23:40:33 UTC (rev 688)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-23 03:18:47 UTC (rev 689)
@@ -261,6 +261,21 @@
imUser(message.substring(4));
} else if ("/debugChatter".equals(message)) {
new ChatterBoxThread().start();
+ } else if(message.startsWith("/r ")){
+ if(message.length() < 4){
+ return;
+ }
+ if(spaceClientListener.lastTellUser == null){
+ chatPanel.displayMessage(null, "I don't know to whom to reply.");
+ return;
+ }
+ String clippedMessage = message.substring(3);
+ spaceClient.userSentPrivateMessage(spaceClientListener.lastTellUser, clippedMessage);
+ String username = spaceClientListener.lastTellUser.getUsername();
+ if(username.startsWith(WebConstants.GUEST_COOKIE_PREFIX)){
+ username = J3DUserRenderable.convertGuestCookieToDisplayName(username);
+ }
+ chatPanel.displayMessage(null, "you told " + username + ": " + clippedMessage);
} else if (message.startsWith("/t ")){
if(message.length() < 6 || message.substring(3).indexOf(" ") == -1){
return;
@@ -458,6 +473,8 @@
private class SpaceClientListener implements SpaceClient.Listener {
+ User lastTellUser = null;
+
public void disconnected() {
chatPanel.displayMessage(null, "Disconnected.");
}
@@ -479,9 +496,12 @@
if(!showChat){
return;
}
- if (username.startsWith(WebConstants.GUEST_COOKIE_PREFIX)) {
- username = J3DUserRenderable.convertGuestCookieToDisplayName(username);
+ User user = spaceClient.getSpace().getUser(username);
+ if(user == null){
+ System.err.println("Received tell from unknown user: " + username);
+ return;
}
+ lastTellUser = user;
chatPanel.displayPrivateMessage(username, message);
if (playIncomingChatAudio && incomingChatAudioClip != null) {
incomingChatAudioClip.play();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-20 21:35:55
|
Revision: 687
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=687&view=rev
Author: trevorolio
Date: 2008-01-20 13:35:57 -0800 (Sun, 20 Jan 2008)
Log Message:
-----------
Added the time frame, which is a handy test of thing movement.
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.blend
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.jpg
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.js
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.mtl
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.obj
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.psd
maven/trunk/ogoglio-server/src/main/resources/populate/template-88/license.txt
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.blend
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.blend
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.jpg
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.js (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.js 2008-01-20 21:35:57 UTC (rev 687)
@@ -0,0 +1,52 @@
+var thingID = -1;
+
+var blackQuat = new Quaternion(1, 0, 0, 0);
+
+var whiteQuat = new Quaternion(1, 0, 0, 0);
+whiteQuat.setEulerOrientation(0, math.PI, 0);
+
+var savedTime = -1;
+
+function construct(id){
+ thingID = id;
+ tick();
+}
+
+function tick(){
+ var startTime = space.time;
+ //zero out the least 10 digits, since we're only sampling roughly once a second
+ //otherwise the least 10 slats appear to be random noise
+ startTime = startTime >> 10;
+ startTime = startTime << 10;
+ var time = startTime;
+ var lastTime = savedTime;
+
+ for(var i = 0; i < 32; i++){
+ if((time & 1) == 1){
+ if(lastTime == -1 || (lastTime & 1) != 1){
+ space.stopShapeMotion(thingID, getName(i), getPoint(i), blackQuat);
+ }
+ } else {
+ if(lastTime == -1 || (lastTime & 1) == 1){
+ space.stopShapeMotion(thingID, getName(i), getPoint(i), whiteQuat);
+ }
+ }
+ lastTime = lastTime >> 1;
+ time = time >> 1;
+ }
+
+ savedTime = startTime;
+ space.scheduleCallback(thingID, 1000, tick);
+}
+
+function getPoint(bitIndex){
+ return new Point(-1.7 + (0.109 * bitIndex), 0, 0);
+}
+
+function getName(bitIndex){
+ var numPart = "0" + bitIndex + "_" + bitIndex;
+ if(bitIndex < 10){
+ numPart = "0" + numPart;
+ }
+ return "Slat." + numPart;
+}
\ No newline at end of file
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.mtl
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.mtl (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.mtl 2008-01-20 21:35:57 UTC (rev 687)
@@ -0,0 +1,12 @@
+# Blender3D MTL File: TimeFrame.blend
+# Material Count: 1
+newmtl None_TimeFrame.jpg
+Ns 0
+Ka 0.000000 0.000000 0.000000
+Kd 0.8 0.8 0.8
+Ks 0.8 0.8 0.8
+d 1
+illum 2
+map_Kd TimeFrame.jpg
+
+
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.obj
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.obj (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.obj 2008-01-20 21:35:57 UTC (rev 687)
@@ -0,0 +1,1351 @@
+# Blender3D v243 OBJ File: TimeFrame.blend
+# www.blender3d.org
+mtllib TimeFrame.mtl
+o Slat.031_31
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 1/1 2/2 3/3 4/4
+f 5/5 8/6 7/7 6/8
+f 1/9 5/10 6/11 2/12
+f 2/13 6/14 7/15 3/16
+f 3/17 7/18 8/19 4/20
+f 5/21 1/22 4/23 8/24
+o Slat.030_30
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 9/25 10/26 11/27 12/28
+f 13/29 16/30 15/31 14/32
+f 9/33 13/34 14/35 10/36
+f 10/37 14/38 15/39 11/40
+f 11/41 15/42 16/43 12/44
+f 13/45 9/46 12/47 16/48
+o Slat.029_29
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 17/49 18/50 19/51 20/52
+f 21/53 24/54 23/55 22/56
+f 17/57 21/58 22/59 18/60
+f 18/61 22/62 23/63 19/64
+f 19/65 23/66 24/67 20/68
+f 21/69 17/70 20/71 24/72
+o Slat.028_28
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 25/73 26/74 27/75 28/76
+f 29/77 32/78 31/79 30/80
+f 25/81 29/82 30/83 26/84
+f 26/85 30/86 31/87 27/88
+f 27/89 31/90 32/91 28/92
+f 29/93 25/94 28/95 32/96
+o Slat.027_27
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 33/97 34/98 35/99 36/100
+f 37/101 40/102 39/103 38/104
+f 33/105 37/106 38/107 34/108
+f 34/109 38/110 39/111 35/112
+f 35/113 39/114 40/115 36/116
+f 37/117 33/118 36/119 40/120
+o Slat.026_26
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 41/121 42/122 43/123 44/124
+f 45/125 48/126 47/127 46/128
+f 41/129 45/130 46/131 42/132
+f 42/133 46/134 47/135 43/136
+f 43/137 47/138 48/139 44/140
+f 45/141 41/142 44/143 48/144
+o Slat.025_25
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 49/145 50/146 51/147 52/148
+f 53/149 56/150 55/151 54/152
+f 49/153 53/154 54/155 50/156
+f 50/157 54/158 55/159 51/160
+f 51/161 55/162 56/163 52/164
+f 53/165 49/166 52/167 56/168
+o Slat.024_24
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 57/169 58/170 59/171 60/172
+f 61/173 64/174 63/175 62/176
+f 57/177 61/178 62/179 58/180
+f 58/181 62/182 63/183 59/184
+f 59/185 63/186 64/187 60/188
+f 61/189 57/190 60/191 64/192
+o Slat.023_23
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 65/193 66/194 67/195 68/196
+f 69/197 72/198 71/199 70/200
+f 65/201 69/202 70/203 66/204
+f 66/205 70/206 71/207 67/208
+f 67/209 71/210 72/211 68/212
+f 69/213 65/214 68/215 72/216
+o Slat.022_22
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 73/217 74/218 75/219 76/220
+f 77/221 80/222 79/223 78/224
+f 73/225 77/226 78/227 74/228
+f 74/229 78/230 79/231 75/232
+f 75/233 79/234 80/235 76/236
+f 77/237 73/238 76/239 80/240
+o Slat.021_21
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 81/241 82/242 83/243 84/244
+f 85/245 88/246 87/247 86/248
+f 81/249 85/250 86/251 82/252
+f 82/253 86/254 87/255 83/256
+f 83/257 87/258 88/259 84/260
+f 85/261 81/262 84/263 88/264
+o Slat.020_20
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 89/265 90/266 91/267 92/268
+f 93/269 96/270 95/271 94/272
+f 89/273 93/274 94/275 90/276
+f 90/277 94/278 95/279 91/280
+f 91/281 95/282 96/283 92/284
+f 93/285 89/286 92/287 96/288
+o Slat.019_19
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 97/289 98/290 99/291 100/292
+f 101/293 104/294 103/295 102/296
+f 97/297 101/298 102/299 98/300
+f 98/301 102/302 103/303 99/304
+f 99/305 103/306 104/307 100/308
+f 101/309 97/310 100/311 104/312
+o Slat.018_18
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 105/313 106/314 107/315 108/316
+f 109/317 112/318 111/319 110/320
+f 105/321 109/322 110/323 106/324
+f 106/325 110/326 111/327 107/328
+f 107/329 111/330 112/331 108/332
+f 109/333 105/334 108/335 112/336
+o Slat.017_17
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 113/337 114/338 115/339 116/340
+f 117/341 120/342 119/343 118/344
+f 113/345 117/346 118/347 114/348
+f 114/349 118/350 119/351 115/352
+f 115/353 119/354 120/355 116/356
+f 117/357 113/358 116/359 120/360
+o Slat.016_16
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 121/361 122/362 123/363 124/364
+f 125/365 128/366 127/367 126/368
+f 121/369 125/370 126/371 122/372
+f 122/373 126/374 127/375 123/376
+f 123/377 127/378 128/379 124/380
+f 125/381 121/382 124/383 128/384
+o Slat.015_15
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 129/385 130/386 131/387 132/388
+f 133/389 136/390 135/391 134/392
+f 129/393 133/394 134/395 130/396
+f 130/397 134/398 135/399 131/400
+f 131/401 135/402 136/403 132/404
+f 133/405 129/406 132/407 136/408
+o Slat.014_14
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 137/409 138/410 139/411 140/412
+f 141/413 144/414 143/415 142/416
+f 137/417 141/418 142/419 138/420
+f 138/421 142/422 143/423 139/424
+f 139/425 143/426 144/427 140/428
+f 141/429 137/430 140/431 144/432
+o Slat.013_13
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 145/433 146/434 147/435 148/436
+f 149/437 152/438 151/439 150/440
+f 145/441 149/442 150/443 146/444
+f 146/445 150/446 151/447 147/448
+f 147/449 151/450 152/451 148/452
+f 149/453 145/454 148/455 152/456
+o Slat.012_12
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 153/457 154/458 155/459 156/460
+f 157/461 160/462 159/463 158/464
+f 153/465 157/466 158/467 154/468
+f 154/469 158/470 159/471 155/472
+f 155/473 159/474 160/475 156/476
+f 157/477 153/478 156/479 160/480
+o Slat.011_11
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 161/481 162/482 163/483 164/484
+f 165/485 168/486 167/487 166/488
+f 161/489 165/490 166/491 162/492
+f 162/493 166/494 167/495 163/496
+f 163/497 167/498 168/499 164/500
+f 165/501 161/502 164/503 168/504
+o Slat.010_10
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 169/505 170/506 171/507 172/508
+f 173/509 176/510 175/511 174/512
+f 169/513 173/514 174/515 170/516
+f 170/517 174/518 175/519 171/520
+f 171/521 175/522 176/523 172/524
+f 173/525 169/526 172/527 176/528
+o Slat.009_9
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 177/529 178/530 179/531 180/532
+f 181/533 184/534 183/535 182/536
+f 177/537 181/538 182/539 178/540
+f 178/541 182/542 183/543 179/544
+f 179/545 183/546 184/547 180/548
+f 181/549 177/550 180/551 184/552
+o Slat.008_8
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 185/553 186/554 187/555 188/556
+f 189/557 192/558 191/559 190/560
+f 185/561 189/562 190/563 186/564
+f 186/565 190/566 191/567 187/568
+f 187/569 191/570 192/571 188/572
+f 189/573 185/574 188/575 192/576
+o Slat.007_7
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 193/577 194/578 195/579 196/580
+f 197/581 200/582 199/583 198/584
+f 193/585 197/586 198/587 194/588
+f 194/589 198/590 199/591 195/592
+f 195/593 199/594 200/595 196/596
+f 197/597 193/598 196/599 200/600
+o Slat.006_6
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 201/601 202/602 203/603 204/604
+f 205/605 208/606 207/607 206/608
+f 201/609 205/610 206/611 202/612
+f 202/613 206/614 207/615 203/616
+f 203/617 207/618 208/619 204/620
+f 205/621 201/622 204/623 208/624
+o Slat.005_5
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 209/625 210/626 211/627 212/628
+f 213/629 216/630 215/631 214/632
+f 209/633 213/634 214/635 210/636
+f 210/637 214/638 215/639 211/640
+f 211/641 215/642 216/643 212/644
+f 213/645 209/646 212/647 216/648
+o Slat.004_4
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 217/649 218/650 219/651 220/652
+f 221/653 224/654 223/655 222/656
+f 217/657 221/658 222/659 218/660
+f 218/661 222/662 223/663 219/664
+f 219/665 223/666 224/667 220/668
+f 221/669 217/670 220/671 224/672
+o Slat.003_3
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 225/673 226/674 227/675 228/676
+f 229/677 232/678 231/679 230/680
+f 225/681 229/682 230/683 226/684
+f 226/685 230/686 231/687 227/688
+f 227/689 231/690 232/691 228/692
+f 229/693 225/694 228/695 232/696
+o Slat.002_2
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 233/697 234/698 235/699 236/700
+f 237/701 240/702 239/703 238/704
+f 233/705 237/706 238/707 234/708
+f 234/709 238/710 239/711 235/712
+f 235/713 239/714 240/715 236/716
+f 237/717 233/718 236/719 240/720
+o Slat.001_1
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 241/721 242/722 243/723 244/724
+f 245/725 248/726 247/727 246/728
+f 241/729 245/730 246/731 242/732
+f 242/733 246/734 247/735 243/736
+f 243/737 247/738 248/739 244/740
+f 245/741 241/742 244/743 248/744
+o Slat.000_0
+v 0.029541 0.860000 -0.050000
+v 0.029541 -0.860000 -0.050000
+v -0.029541 -0.860000 -0.050000
+v -0.029541 0.860000 -0.050000
+v 0.029541 0.860000 0.050000
+v 0.029541 -0.860001 0.050000
+v -0.029541 -0.860000 0.050000
+v -0.029541 0.860000 0.050000
+vt 0.940282 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.059712 0.115361 0.0
+vt 0.942036 0.115361 0.0
+vt 0.931950 0.346033 0.0
+vt 0.933604 0.461975 0.0
+vt 0.051280 0.461975 0.0
+vt 0.049625 0.346033 0.0
+vt 0.940282 0.231277 0.0
+vt 0.931950 0.346033 0.0
+vt 0.049625 0.346033 0.0
+vt 0.057958 0.231277 0.0
+vt 0.057958 0.231277 0.0
+vt 0.000000 0.230400 0.0
+vt 0.001754 0.114484 0.0
+vt 0.059712 0.115361 0.0
+vt 0.059712 0.115361 0.0
+vt 0.053640 0.000000 0.0
+vt 0.935964 0.000000 0.0
+vt 0.942036 0.115361 0.0
+vt 0.998240 0.232154 0.0
+vt 0.940282 0.231277 0.0
+vt 0.942036 0.115361 0.0
+vt 0.999994 0.116238 0.0
+usemtl None_TimeFrame.jpg
+s 1
+f 249/745 250/746 251/747 252/748
+f 253/749 256/750 255/751 254/752
+f 249/753 253/754 254/755 250/756
+f 250/757 254/758 255/759 251/760
+f 251/761 255/762 256/763 252/764
+f 253/765 249/766 252/767 256/768
+o Frame_Mesh
+v 2.000000 0.969830 -0.100475
+v 2.000001 0.969829 0.100475
+v 1.999999 -0.969830 0.100475
+v 2.000000 -0.969830 -0.100475
+v -2.000001 -0.969829 0.100475
+v -2.000000 -0.969829 -0.100475
+v -2.000000 0.969830 0.100475
+v -1.999999 0.969830 -0.100475
+v 1.799999 -0.872847 0.100475
+v 1.800001 0.872846 0.100475
+v 1.800000 0.872847 -0.100475
+v 1.800000 -0.872847 -0.100475
+v -1.800001 -0.872846 0.100475
+v -1.800000 -0.872846 -0.100475
+v -1.800000 0.872847 0.100475
+v -1.799999 0.872847 -0.100475
+usemtl (null)
+usemtl (null)
+s 1
+f 257 258 259 260
+f 260 259 261 262
+f 262 261 263 264
+f 258 257 264 263
+f 265 266 267 268
+f 269 265 268 270
+f 271 269 270 272
+f 272 267 266 271
+f 264 257 267 272
+f 267 257 260 268
+f 261 259 265 269
+f 258 266 265 259
+f 263 271 266 258
+f 270 262 264 272
+f 260 262 270 268
+f 263 261 269 271
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.psd
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/TimeFrame.psd
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: maven/trunk/ogoglio-server/src/main/resources/populate/template-88/license.txt
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-88/license.txt (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-88/license.txt 2008-01-20 21:35:57 UTC (rev 687)
@@ -0,0 +1 @@
+The TimeFrame art and code are licensed under the Apache 2 licence, copyright Transmutable 2008.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-19 16:02:29
|
Revision: 686
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=686&view=rev
Author: trevorolio
Date: 2008-01-19 08:02:30 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Fixed a bug which prevented the move menu item from appearing for editors or owners.
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-13 23:11:36 UTC (rev 685)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-19 16:02:30 UTC (rev 686)
@@ -598,7 +598,7 @@
}
User user = spaceClient.getSpace().getUser(spaceClient.getUsername());
- if (user != null && user.getRole() != null && (spaceClient.getSpace().getOwnerUsername().equals(user.getUsername()) || SpaceMemberDocument.BUILDER.equals(user.getRole()) || SpaceMemberDocument.EDITOR.equals(user.getRole()))) {
+ if (user != null && (spaceClient.getSpace().getOwnerUsername().equals(user.getUsername()) || SpaceMemberDocument.BUILDER.equals(user.getRole()) || SpaceMemberDocument.EDITOR.equals(user.getRole()))) {
moveItem = new MenuItem("Move");
add(moveItem);
moveItem.addActionListener(new ActionListener() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-13 23:11:34
|
Revision: 685
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=685&view=rev
Author: trevorolio
Date: 2008-01-13 15:11:36 -0800 (Sun, 13 Jan 2008)
Log Message:
-----------
Fixed a bug in body configuration delete when using admin access.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java 2008-01-13 23:11:30 UTC (rev 684)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java 2008-01-13 23:11:36 UTC (rev 685)
@@ -21,6 +21,7 @@
import com.ogoglio.appdev.persist.PersistException;
import com.ogoglio.util.Log;
import com.ogoglio.xml.AccountDocument;
+import com.ogoglio.xml.BodyDataDocument;
public class AccountPersistTasks {
@@ -165,10 +166,17 @@
Query bodyDataQuery = hibernateSession.getNamedQuery(BodyPersistTasks.BODY_DATA);
BodyDataRecord[] bodyDataRecords = (BodyDataRecord[]) bodyDataQuery.list().toArray(new BodyDataRecord[0]);
- if (bodyDataRecords.length == 0) {
- throw new IllegalStateException("No body data records!");
+ BodyDataRecord guestBodyDataRecord = null;
+ for (int i = 0; i < bodyDataRecords.length; i++) {
+ if(bodyDataRecords[i].getDisplayName().equals(BodyDataDocument.GUEST_BODY_NAME)){
+ guestBodyDataRecord = bodyDataRecords[i];
+ break;
+ }
}
- BodyConfigurationRecord bodyConfRecord = new BodyConfigurationRecord(username, "Body", bodyDataRecords[0].getBodyDataID(), null);
+ if (guestBodyDataRecord == null) {
+ throw new IllegalStateException("No guest body data record with name: " + BodyDataDocument.GUEST_BODY_NAME);
+ }
+ BodyConfigurationRecord bodyConfRecord = new BodyConfigurationRecord(username, "Body", guestBodyDataRecord.getBodyDataID(), null);
hibernateSession.save(bodyConfRecord);
record = new AccountRecord(username, accountlevel, email, false, bodyConfRecord.getBodyConfigurationID(), null, null);
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java 2008-01-13 23:11:30 UTC (rev 684)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/BodyPersistTasks.java 2008-01-13 23:11:36 UTC (rev 685)
@@ -98,6 +98,7 @@
session.delete(settings[i]);
}
session.delete(record);
+
return Boolean.TRUE;
}
};
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-13 23:11:30 UTC (rev 684)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-13 23:11:36 UTC (rev 685)
@@ -175,7 +175,7 @@
return true;
}
if ("POST".equals(request.getMethod()) || "DELETE".equals(request.getMethod())) {
- return authedAccount != null && username.equals(authedAccount.getUsername());
+ return authedAccount != null && (username.equals(authedAccount.getUsername()) || authedAccount.getAccountlevel().equals(AccountDocument.ACCOUNT_LEVEL_ADMIN));
}
return false;
}
@@ -183,7 +183,7 @@
private boolean requestOkForBodyList(HttpServletRequest request, String[] pathElements, AccountRecord authedAccount) {
String username = pathElements[pathElements.length - 2];
if ("GET".equals(request.getMethod()) || "HEAD".equals(request.getMethod()) || "POST".equals(request.getMethod()) || "DELETE".equals(request.getMethod())) {
- return authedAccount != null && username.equals(authedAccount.getUsername());
+ return authedAccount != null && (username.equals(authedAccount.getUsername()) || authedAccount.getAccountlevel().equals(AccountDocument.ACCOUNT_LEVEL_ADMIN));
}
return false;
}
@@ -345,7 +345,12 @@
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
return;
}
- BodyConfigurationRecord record = BodyPersistTasks.findBodyConfigurationByID(authedAccount.getDefaultBodyConfigurationID(), getSessionFactory());
+ AccountRecord requestedAccountRecord = AccountPersistTasks.findAccountByUsername(username, getSessionFactory());
+ if(requestedAccountRecord == null){
+ response.setStatus(HttpServletResponse.SC_FORBIDDEN);
+ return;
+ }
+ BodyConfigurationRecord record = BodyPersistTasks.findBodyConfigurationByID(requestedAccountRecord.getDefaultBodyConfigurationID(), getSessionFactory());
if (record == null) {
throw new IllegalStateException("Account has a bogus body configuration record.. " + authedAccount.getDefaultBodyConfigurationID());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-13 23:11:25
|
Revision: 684
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=684&view=rev
Author: trevorolio
Date: 2008-01-13 15:11:30 -0800 (Sun, 13 Jan 2008)
Log Message:
-----------
Fixed a bug in body configuration delete when using admin access.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyDataDocument.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java 2008-01-13 21:27:58 UTC (rev 683)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClient.java 2008-01-13 23:11:30 UTC (rev 684)
@@ -26,7 +26,6 @@
import nanoxml.XMLElement;
import com.ogoglio.util.ArgumentUtils;
-import com.ogoglio.util.Log;
import com.ogoglio.util.StreamUtils;
import com.ogoglio.util.UIConstants;
import com.ogoglio.xml.AccountDocument;
@@ -518,6 +517,16 @@
return new ZipInputStream(stream);
}
+ public BodyConfigurationDocument[] getBodyConfigurations(String username) throws IOException {
+ XMLElement result = wire.fetchAuthenticatedXML(descriptor.getBodyConfigurationsURI(username), authenticator.getAuthCookie());
+ Vector docs = new Vector();
+ Vector children = result.getChildren();
+ for (int i = 0; i < children.size(); i++) {
+ docs.add(new BodyConfigurationDocument((XMLElement) children.get(i)));
+ }
+ return (BodyConfigurationDocument[]) docs.toArray(new BodyConfigurationDocument[0]);
+ }
+
public BodyConfigurationDocument createBodyConfiguration(String username, String displayName, long bodyDataID) throws IOException {
BodyConfigurationDocument configDoc = new BodyConfigurationDocument(-1, username, displayName, bodyDataID, null);
return new BodyConfigurationDocument(wire.postAuthenticatedXML(descriptor.getBodyConfigurationsURI(username), configDoc.toString(), authenticator.getAuthCookie()));
@@ -526,6 +535,14 @@
public BodyConfigurationDocument getBodyConfiguration(String username, long bodyConfigurationID) throws IOException {
return new BodyConfigurationDocument(wire.fetchAuthenticatedXML(descriptor.getBodyConfigurationURI(username, bodyConfigurationID), authenticator.getAuthCookie()));
}
+
+ public boolean deleteBodyConfiguration(String username, long bodyConfigurationID) {
+ try {
+ return wire.sendDelete(descriptor.getBodyConfigurationURI(username, bodyConfigurationID), authenticator.getAuthCookie());
+ } catch (IOException e) {
+ return false;
+ }
+ }
public BodyConfigurationDocument updateBodyConfiguration(BodyConfigurationDocument configDoc) throws IOException {
return new BodyConfigurationDocument(wire.postAuthenticatedXML(descriptor.getBodyConfigurationURI(configDoc.getOwnerUsername(), configDoc.getBodyConfigurationID()), configDoc.toString(), authenticator.getAuthCookie()));
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java 2008-01-13 21:27:58 UTC (rev 683)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyConfigurationDocument.java 2008-01-13 23:11:30 UTC (rev 684)
@@ -78,6 +78,10 @@
return data.getLongAttribute(BODY_DATA_ID);
}
+ public void setBodyDataID(long bodyDataID) {
+ data.setAttribute(BODY_DATA_ID, bodyDataID);
+ }
+
public String getBaseTextureName(){
return data.getStringAttribute(BASE_TEXTURE_NAME);
}
@@ -120,4 +124,5 @@
public String toString(){
return data.toString();
}
+
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyDataDocument.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyDataDocument.java 2008-01-13 21:27:58 UTC (rev 683)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/BodyDataDocument.java 2008-01-13 23:11:30 UTC (rev 684)
@@ -19,6 +19,8 @@
public class BodyDataDocument {
+ public static final String GUEST_BODY_NAME = "Guest";
+
public static final String NAME = "bodydata";
private static final String BODY_DATA_ID = "bodydataid";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-13 21:27:53
|
Revision: 683
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=683&view=rev
Author: trevorolio
Date: 2008-01-13 13:27:58 -0800 (Sun, 13 Jan 2008)
Log Message:
-----------
Changed the "Unfortunately, I could not connect to server" error message (which was often unrelated to server connections) to "Unfortunately, I experienced a fatal error: <exception message>" so that people can give us a bit more information when things go awry.
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-13 00:29:30 UTC (rev 682)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-13 21:27:58 UTC (rev 683)
@@ -176,7 +176,7 @@
e.printStackTrace();
removeAll();
validate();
- add(new ErrorPanel("Unfortunately, I couldn't connect to the server."), BorderLayout.CENTER);
+ add(new ErrorPanel("Unfortunately, I experienced a fatal error: " + e), BorderLayout.CENTER);
}
validate();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-13 00:29:30
|
Revision: 682
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=682&view=rev
Author: trevorolio
Date: 2008-01-12 16:29:30 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
Tried a new way of capturing profile images, which will hopefully work on XP and Linux in addition to OS X.
Modified Paths:
--------------
maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java
Modified: maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java
===================================================================
--- maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java 2008-01-13 00:28:53 UTC (rev 681)
+++ maven/trunk/ogoglio-body-editor-applet/src/main/java/com/ogoglio/bodyeditor/BodyEditorApplet.java 2008-01-13 00:29:30 UTC (rev 682)
@@ -17,14 +17,13 @@
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
-import java.awt.GraphicsConfiguration;
import java.awt.Panel;
+import java.awt.Rectangle;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -36,19 +35,16 @@
import javax.media.j3d.Background;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.BranchGroup;
-import javax.media.j3d.Canvas3D;
import javax.media.j3d.DirectionalLight;
-import javax.media.j3d.GraphicsContext3D;
import javax.media.j3d.ImageComponent;
import javax.media.j3d.ImageComponent2D;
-import javax.media.j3d.Raster;
+import javax.media.j3d.Screen3D;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import javax.media.j3d.View;
import javax.swing.JLabel;
import javax.vecmath.Color3f;
import javax.vecmath.Point3d;
-import javax.vecmath.Point3f;
import javax.vecmath.Vector3f;
import com.ogoglio.client.WebAPIAuthenticator;
@@ -74,9 +70,6 @@
import com.ogoglio.xml.AccountDocument;
import com.ogoglio.xml.BodyConfigurationDocument;
import com.ogoglio.xml.BodyDataDocument;
-import com.sun.image.codec.jpeg.JPEGCodec;
-import com.sun.image.codec.jpeg.JPEGEncodeParam;
-import com.sun.image.codec.jpeg.JPEGImageEncoder;
/*
* NOTE: String arrays don't function in LiveConnect in IE, so we use the getXXXCount and getXXX(index) pattern
@@ -212,8 +205,47 @@
if (user == null || bodyPanel == null || bodyPanel.renderable == null) {
return;
}
- bodyPanel.canvas.writeJPEG = true;
- bodyPanel.canvas.repaint();
+ new Thread(){
+ public void run(){
+ try {
+
+ // Obtain the size of the displayed canvas
+ Rectangle rect = bodyPanel.canvas.getBounds();
+
+ // Create a buffer for the Off Screen Canvas large enough to contain the displayed image
+ BufferedImage img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_RGB);
+ ImageComponent2D buf = new ImageComponent2D(ImageComponent.FORMAT_RGB, img);
+
+ // provide the buffer to the off-screen canvas
+ bodyPanel.offscreenCanvas.setOffScreenBuffer(buf);
+
+ // get the Screen3d associated with this canvas, and set the physical dimensions
+ Screen3D screen = bodyPanel.offscreenCanvas.getScreen3D();
+ Screen3D screenDisplay = bodyPanel.canvas.getScreen3D();
+
+ screen.setSize(screenDisplay.getSize());
+ screen.setPhysicalScreenWidth(screenDisplay.getPhysicalScreenWidth());
+ screen.setPhysicalScreenHeight(screenDisplay.getPhysicalScreenHeight());
+
+ // Request that the Off-Screen canvas is rendered
+ bodyPanel.offscreenCanvas.renderOffScreenBuffer();
+
+ // wait for the rendering to complete
+ bodyPanel.offscreenCanvas.waitForOffScreenRendering();
+
+ // obtain the image from the Off-Screen canvas
+ ImageComponent2D image = bodyPanel.offscreenCanvas.getOffScreenBuffer();
+ BufferedImage img2 = image.getImage();
+
+ ByteArrayOutputStream jpegBuffer = new ByteArrayOutputStream();
+ ImageIO.write(img2, "jpeg", jpegBuffer);
+ webClient.setAccountPhoto(webClient.getAuthenticator().getUsername(), new ByteArrayInputStream(jpegBuffer.toByteArray()), "image/jpeg");
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+
+ }
+ }.start();
}
public String getBodyConfigurationDocument() {
@@ -327,8 +359,10 @@
J3DCamera camera = null;
- CapturingCanvas3D canvas = null;
+ J3DCanvas canvas = null;
+ J3DCanvas offscreenCanvas = null;
+
BranchGroup sceneRoot = new BranchGroup();
BranchGroup worldBranch = new BranchGroup();
@@ -348,12 +382,15 @@
setLayout(new BorderLayout());
universe = new J3DUniverse();
- canvas = new CapturingCanvas3D(J3DRenderer.getGraphicsConfiguration(), false);
+ canvas = new J3DCanvas(J3DRenderer.getGraphicsConfiguration(), false);
canvas.addMouseWheelListener(this);
camera = new J3DCamera();
camera.setCanvas(canvas);
+ add(canvas, BorderLayout.CENTER);
- add(canvas, BorderLayout.CENTER);
+ offscreenCanvas = new J3DCanvas(J3DRenderer.getGraphicsConfiguration(), true);
+ camera.getView().addCanvas3D(offscreenCanvas);
+
setupUniverse();
}
@@ -483,35 +520,6 @@
//renderer.stopRenderer();
}
- private class CapturingCanvas3D extends J3DCanvas {
- boolean writeJPEG = false;
-
- public CapturingCanvas3D(GraphicsConfiguration graphicsConfiguration, boolean offscreen) {
- super(graphicsConfiguration, offscreen);
- }
-
- public void postSwap() {
- if (!writeJPEG) {
- super.postSwap();
- return;
- }
- try {
- GraphicsContext3D ctx = getGraphicsContext3D();
- Raster ras = new Raster(new Point3f(-1.0f, -1.0f, -1.0f), Raster.RASTER_COLOR, 0, 0, getWidth(), getHeight(), new ImageComponent2D(ImageComponent.FORMAT_RGB, new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB)), null);
- ctx.readRaster(ras);
- BufferedImage img = ras.getImage().getImage();
-
- ByteArrayOutputStream jpegBuffer = new ByteArrayOutputStream();
- ImageIO.write(img, "jpeg", jpegBuffer);
- webClient.setAccountPhoto(webClient.getAuthenticator().getUsername(), new ByteArrayInputStream(jpegBuffer.toByteArray()), "image/jpeg");
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- writeJPEG = false;
- }
- }
- }
-
private class TemplateProvider implements TemplateDataProvider {
public InputStream getTemplateGeometry(String username, long templateID, int lod) {
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-13 00:28:49
|
Revision: 681
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=681&view=rev
Author: trevorolio
Date: 2008-01-12 16:28:53 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
Made page clicks transfer to thing clicks, until we do something with links.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2008-01-13 00:28:23 UTC (rev 680)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2008-01-13 00:28:53 UTC (rev 681)
@@ -268,7 +268,8 @@
}
public void mouseClickedPage(Page page, Point3d intersection) {
- Log.info("User clicked the page. Ignoring");
+ SpaceEvent event = createSpaceEventForThing(page.getThing(), null, SpaceEvent.THING_CLICKED_EVENT);
+ attemptToSendSpaceEventToServer(event);
}
public void viewpointMotionChanged(SplinePath newPath) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-13 00:28:28
|
Revision: 680
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=680&view=rev
Author: trevorolio
Date: 2008-01-12 16:28:23 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
Tweaked the bg color of the infopanels.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2008-01-11 21:21:21 UTC (rev 679)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2008-01-13 00:28:23 UTC (rev 680)
@@ -154,7 +154,7 @@
var infoPanelElement = document.createElement("div");
infoPanelElement.setAttribute("id", panelID);
infoPanelElement.setAttribute("class", "infoPanel");
- infoPanelElement.style["background-color"] = "#EEE";
+ infoPanelElement.style["background-color"] = "#FFF";
var infoActionDiv = document.createElement("div");
infoActionDiv.style.width = "100%";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-11 21:21:16
|
Revision: 679
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=679&view=rev
Author: trevorolio
Date: 2008-01-11 13:21:21 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Added private tells among space cohabitants.
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java 2008-01-11 21:21:10 UTC (rev 678)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ChatPanel.java 2008-01-11 21:21:21 UTC (rev 679)
@@ -62,6 +62,13 @@
historyPanel.append(heading + message);
}
+ public void displayPrivateMessage(String username, String message) {
+ if (historyPanel.getText().length() != 0) {
+ historyPanel.append("\r\n");
+ }
+ historyPanel.append(username + " tells you: " + message);
+ }
+
public void focusOnCommandField(String preloadedText) {
commandPanel.commandField.requestFocus();
if (preloadedText != null) {
@@ -125,6 +132,7 @@
public void keyTyped(KeyEvent event) {
}
}
+
}
/*
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-11 21:21:10 UTC (rev 678)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2008-01-11 21:21:21 UTC (rev 679)
@@ -261,6 +261,23 @@
imUser(message.substring(4));
} else if ("/debugChatter".equals(message)) {
new ChatterBoxThread().start();
+ } else if (message.startsWith("/t ")){
+ if(message.length() < 6){
+ return;
+ }
+ int secondSpace = message.substring(3).indexOf(" ");
+ if(secondSpace == -1){
+ return;
+ }
+ String targetUsername = message.substring(3, 3 + secondSpace);
+ User user = spaceClient.getSpace().getUser(targetUsername);
+ if(user == null){
+ chatPanel.displayMessage(null, "No such user: " + targetUsername);
+ return;
+ }
+ String messageText = message.substring(4 + secondSpace);
+ spaceClient.userSentPrivateMessage(user, messageText);
+ chatPanel.displayMessage(null, "you told " + targetUsername + ": " + messageText);
} else {
spaceClient.userIssuedCommand(message);
}
@@ -448,6 +465,19 @@
incomingChatAudioClip.play();
}
}
+
+ public void receivedTellMessage(String username, String message) {
+ if(!showChat){
+ return;
+ }
+ if (username.startsWith(WebConstants.GUEST_COOKIE_PREFIX)) {
+ username = J3DUserRenderable.convertGuestCookieToDisplayName(username);
+ }
+ chatPanel.displayPrivateMessage(username, message);
+ if (playIncomingChatAudio && incomingChatAudioClip != null) {
+ incomingChatAudioClip.play();
+ }
+ }
public void receivedSpaceTransfer(URI link) {
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-11 21:21:05
|
Revision: 678
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=678&view=rev
Author: trevorolio
Date: 2008-01-11 13:21:10 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Added private tells among space cohabitants.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2008-01-11 21:20:46 UTC (rev 677)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java 2008-01-11 21:21:10 UTC (rev 678)
@@ -417,6 +417,28 @@
listener.generatedSpaceEvent(markedUpEvent, SpaceSimulator.this);
+ } else if (SpaceEvent.TEXT_TELL_EVENT.equals(event.getName())) {
+ String username = event.getStringProperty(SpaceEvent.USERNAME);
+ User user = space.getUser(username);
+ if (user == null) {
+ log("Got tell message from non-existent person: " + username);
+ continue;
+ }
+ String recipientName = event.getStringProperty(SpaceEvent.TTE_RECIPIENT);
+ User recipient = space.getUser(recipientName);
+ if(recipient == null){
+ log("Got tell message for non-existent person: " + recipientName);
+ continue;
+ }
+ String chatMessage = markdownChatMessage(event.getStringProperty(SpaceEvent.TTE_MESSAGE));
+
+ SpaceEvent markedUpEvent = new SpaceEvent(SpaceEvent.TEXT_TELL_EVENT);
+ markedUpEvent.setProperty(SpaceEvent.USERNAME, username);
+ markedUpEvent.setProperty(SpaceEvent.TTE_RECIPIENT, recipientName);
+ markedUpEvent.setProperty(SpaceEvent.TTE_MESSAGE, chatMessage);
+
+ listener.generatedSpaceEventForUser(recipientName, event, SpaceSimulator.this);
+
} else if (((SpaceEvent.THING_CLICKED_EVENT.equals(event.getName()))) || ((SpaceEvent.THING_CONTEXT_CLICKED_EVENT.equals(event.getName()))) || ((SpaceEvent.THING_CONTEXT_SELECTION_MADE_EVENT.equals(event.getName())))) {
String username = event.getStringProperty(SpaceEvent.USERNAME);
User user = space.getUser(username);
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2008-01-11 21:20:46 UTC (rev 677)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2008-01-11 21:21:10 UTC (rev 678)
@@ -16,6 +16,7 @@
viewerHelpMessage += "Chat: Click in the text field below, type a chat message, then press \"return\".<br/>";
viewerHelpMessage += "Camera: Drag your mouse to pan the camera left, right, up and down. ESC to reset.<br/>"
viewerHelpMessage += "Zoom: Use your scroll wheel to zoom the camera in and out.<br/>";
+viewerHelpMessage += "Private Message: /t username message<br/>";
viewerHelpMessage += "<br/>Type \"/help\" to see this message again.";
function handleSpaceDoc(xml){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-11 21:20:42
|
Revision: 677
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=677&view=rev
Author: trevorolio
Date: 2008-01-11 13:20:46 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Added private tells among space cohabitants.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/main/java/com/ogoglio/amazon/test/CometTest.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/src/main/java/com/ogoglio/amazon/test/CometTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/main/java/com/ogoglio/amazon/test/CometTest.java 2008-01-11 21:20:38 UTC (rev 676)
+++ maven/trunk/ogoglio-integration-test/src/main/java/com/ogoglio/amazon/test/CometTest.java 2008-01-11 21:20:46 UTC (rev 677)
@@ -107,4 +107,9 @@
}
+ public void receivedTellMessage(String username, String message) {
+ // TODO Auto-generated method stub
+
+ }
+
}
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2008-01-11 21:20:38 UTC (rev 676)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2008-01-11 21:20:46 UTC (rev 677)
@@ -1157,6 +1157,11 @@
}
+ public void receivedTellMessage(String username, String message) {
+ // TODO Auto-generated method stub
+
+ }
+
}
private class TestListener implements Space.Listener {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-11 21:20:35
|
Revision: 676
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=676&view=rev
Author: trevorolio
Date: 2008-01-11 13:20:38 -0800 (Fri, 11 Jan 2008)
Log Message:
-----------
Added private tells among space cohabitants.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/Bvh.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/BvhParser.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/SpaceEvent.java
maven/trunk/ogoglio-common/src/test/java/com/ogoglio/loadtest/Bot.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2008-01-10 19:03:50 UTC (rev 675)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2008-01-11 21:20:38 UTC (rev 676)
@@ -321,6 +321,14 @@
sendSpaceEvent(event);
}
+ public void userSentPrivateMessage(User user, String messageText) {
+ SpaceEvent event = new SpaceEvent(SpaceEvent.TEXT_TELL_EVENT);
+ event.setProperty(SpaceEvent.USERNAME, accountDoc.getUsername());
+ event.setProperty(SpaceEvent.TTE_RECIPIENT, user.getUsername());
+ event.setProperty(SpaceEvent.TTE_MESSAGE, messageText);
+ sendSpaceEvent(event);
+ }
+
public void userRequestedSeat(Thing seatThing) {
User user = space.getUser(accountDoc.getUsername());
if (user == null || user.getSeat() == seatThing) {
@@ -587,6 +595,14 @@
listener.receivedChatMessage(user.getUsername(), event.getStringProperty(SpaceEvent.TSE_MESSAGE));
+ } else if(SpaceEvent.TEXT_TELL_EVENT.equals(event.getName())){
+ User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
+ if(user == null){
+ Log.error("Got a text tell event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
+ return;
+ }
+ listener.receivedTellMessage(user.getUsername(), event.getStringProperty(SpaceEvent.TTE_MESSAGE));
+
} else if (SpaceEvent.PLAY_ANIMATION_EVENT.equals(event.getName())) {
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
@@ -744,6 +760,8 @@
public interface Listener {
public void receivedChatMessage(String username, String message);
+ public void receivedTellMessage(String username, String message);
+
public void receivedUserContextMenuRequest(User user, int x, int y);
public void receivedInfoPanel(long sourceThingID, String nonce);
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/Bvh.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/Bvh.java 2008-01-10 19:03:50 UTC (rev 675)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/Bvh.java 2008-01-11 21:20:38 UTC (rev 676)
@@ -297,4 +297,8 @@
return result;
}
+ public void printInfo(){
+ System.out.println("BVH: " + name + ": " + frames.size() + " frames, " + frameTime + " frame time");
+ printJoint(rootJoint);
+ }
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/BvhParser.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/BvhParser.java 2008-01-10 19:03:50 UTC (rev 675)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/BvhParser.java 2008-01-11 21:20:38 UTC (rev 676)
@@ -14,6 +14,8 @@
package com.ogoglio.viewer.j3d.bvh;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -205,4 +207,30 @@
}
return buffer.toString().trim();
}
+
+ public static void main(String[] args){
+ if(args.length < 2){
+ printUsage();
+ return;
+ }
+ try {
+ String name = args[0];
+ FileInputStream input = new FileInputStream(args[1]);
+ BvhParser parser = new BvhParser(name, input);
+ Bvh bvh = parser.parse();
+ bvh.printInfo();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (BvhParseException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private static void printUsage(){
+ System.out.println("Usage: java ... BvhParser <animationName> <path to bvh>");
+ }
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/SpaceEvent.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/SpaceEvent.java 2008-01-10 19:03:50 UTC (rev 675)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/xml/SpaceEvent.java 2008-01-11 21:20:38 UTC (rev 676)
@@ -120,6 +120,12 @@
public static final String TSE_MESSAGE = "message";
+ public static final String TEXT_TELL_EVENT = "textTell";
+
+ public static final String TTE_MESSAGE = "message";
+
+ public static final String TTE_RECIPIENT = "recipient";
+
public static final String ADD_THING_EVENT = "addThing";
public static final String REMOVE_THING_EVENT = "removeThing";
Modified: maven/trunk/ogoglio-common/src/test/java/com/ogoglio/loadtest/Bot.java
===================================================================
--- maven/trunk/ogoglio-common/src/test/java/com/ogoglio/loadtest/Bot.java 2008-01-10 19:03:50 UTC (rev 675)
+++ maven/trunk/ogoglio-common/src/test/java/com/ogoglio/loadtest/Bot.java 2008-01-11 21:20:38 UTC (rev 676)
@@ -131,4 +131,9 @@
}
+ public void receivedTellMessage(String username, String message) {
+ // TODO Auto-generated method stub
+
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-10 19:03:45
|
Revision: 675
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=675&view=rev
Author: trevorolio
Date: 2008-01-10 11:03:50 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
removed a debug statement
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2008-01-10 18:25:39 UTC (rev 674)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2008-01-10 19:03:50 UTC (rev 675)
@@ -92,7 +92,6 @@
} else {
configuration.addProperties(ps.getAllProps(PropStorage.TEST_CONFIG_PROPS));
}
- Log.info("Trying read in hibernate config ["+getResourcePath() + "/migration-" + num + ".xml"+"]");
configuration.addInputStream(UIConstants.getResource(getResourcePath() + "/migration-" + num + ".xml"));
return configuration.configure();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2008-01-10 18:25:34
|
Revision: 674
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=674&view=rev
Author: iansmith
Date: 2008-01-10 10:25:39 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Argh, forgot to actually add the log4j.properties file.
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/resources/log4j/
maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
Added: maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties 2008-01-10 18:25:39 UTC (rev 674)
@@ -0,0 +1,22 @@
+# if you want to have any hope of debugging things, you need this file
+log4j.rootLogger=DEBUG, R
+
+log4j.logger.org.apache=ERROR, R
+log4j.logger.org.hibernate=ERROR, R
+
+log4j.logger.com.ogoglio=DEBUG, R
+log4j.logger.com.ogoglio.space=ERROR, R
+
+#
+# do not want extra copies
+#
+log4j.additivity.com.ogoglio=false
+log4j.additivity.com.ogoglio.space=false
+log4j.additivity.org.apache=false
+
+#R appender, only should be used for stuff not configured here
+log4j.appender.R=org.apache.log4j.ConsoleAppender
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%d [%p] %c - %m%n
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2008-01-10 18:22:20
|
Revision: 673
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=673&view=rev
Author: iansmith
Date: 2008-01-10 10:22:23 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Improved error logging when we fail to migrate.
Added log4j config for ogoglio-server so you can debug it.
Added support for concurrent database access via hibernate configuration files.
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
maven/trunk/ogoglio-server/pom.xml
maven/trunk/ogoglio-server/src/main/resources/hibernate/hibernate.cfg.xml
maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-0.xml
maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2008-01-09 18:39:59 UTC (rev 672)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2008-01-10 18:22:23 UTC (rev 673)
@@ -92,6 +92,7 @@
} else {
configuration.addProperties(ps.getAllProps(PropStorage.TEST_CONFIG_PROPS));
}
+ Log.info("Trying read in hibernate config ["+getResourcePath() + "/migration-" + num + ".xml"+"]");
configuration.addInputStream(UIConstants.getResource(getResourcePath() + "/migration-" + num + ".xml"));
return configuration.configure();
}
@@ -182,28 +183,30 @@
}
public boolean destroyAllData() {
+ Log.info("Destroying all data in the database and media serve... hope this is a dev machine.");
PropStorage ps = new PropStorage();
if (ps.loadPropertySet(PropStorage.TEST_CONFIG_PROPS) == false) {
+ Log.error("destroyAllData: unable to load the property set!");
return false;
}
-
if (initVersionOnly(false, ps) == false) {
+ Log.error("destroyAllData: unable to init the version number!");
return false;
}
if (tryUpgrade(null, null, 0, getVersionNumber(), DDL_MODE_CREATE, false, ps) == false) {
- Log.error("Aborted destroying data after failure to upgrade");
+ Log.error("destroyAllData: Aborted destroying data after failure to upgrade");
return false;
}
ps.loadPropertySet(PropStorage.BASIC_PROPS);
String dir = ps.getKeyFromSet(PropStorage.BASIC_PROPS, "ogoglio.mediaDirectory");
if (dir == null) {
- Log.error("Can't find a property ogoglio.mediaDirectory to cleanse media store");
+ Log.error("destroyAllData:Can't find a property ogoglio.mediaDirectory to cleanse media store");
return false;
}
if(!destroyFiles(new File(dir))){
- Log.error("Media directory doesn't exist or can't be changed:" + dir);
+ Log.error("destroyAllData: Media directory doesn't exist or can't be changed:" + dir);
return false;
}
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2008-01-09 18:39:59 UTC (rev 672)
+++ maven/trunk/ogoglio-server/pom.xml 2008-01-10 18:22:23 UTC (rev 673)
@@ -34,6 +34,12 @@
</includes>
</resource>
<resource>
+ <directory>src/main/resources/log4j</directory>
+ <includes>
+ <include>log4j.properties</include>
+ </includes>
+ </resource>
+ <resource>
<targetPath>com/ogoglio/migrate</targetPath>
<directory>src/main/resources/hibernate</directory>
<includes>
Modified: maven/trunk/ogoglio-server/src/main/resources/hibernate/hibernate.cfg.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/hibernate/hibernate.cfg.xml 2008-01-09 18:39:59 UTC (rev 672)
+++ maven/trunk/ogoglio-server/src/main/resources/hibernate/hibernate.cfg.xml 2008-01-10 18:22:23 UTC (rev 673)
@@ -13,6 +13,5 @@
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
-->
-
</session-factory>
</hibernate-configuration>
Modified: maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-0.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-0.xml 2008-01-09 18:39:59 UTC (rev 672)
+++ maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-0.xml 2008-01-10 18:22:23 UTC (rev 673)
@@ -6,7 +6,7 @@
<!-- version 0... from a clean DB -->
<class name="com.ogoglio.appdev.migrate.DBVersionRecord" table="DBVersionRecords">
<id name="versionId">
- <generator class="increment"/>
+ <generator class="identity"/>
</id>
<property name="version" not-null="true"/>
</class>
Modified: maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml 2008-01-09 18:39:59 UTC (rev 672)
+++ maven/trunk/ogoglio-server/src/main/resources/hibernate/migration-1.xml 2008-01-10 18:22:23 UTC (rev 673)
@@ -12,7 +12,7 @@
<class name="com.ogoglio.persist.ServiceStateRecord"
table="ServiceStateRecords">
<id name="serviceStateID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="registrationState" not-null="true" />
</class>
@@ -30,7 +30,7 @@
<class name="com.ogoglio.persist.PossessionRecord"
table="PossessionRecords">
<id name="possessionID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="ownerUsername" not-null="true" />
@@ -42,7 +42,7 @@
<class name="com.ogoglio.persist.SpaceRecord"
table="SpaceRecords">
<id name="spaceID" access="field">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="displayName" not-null="true" />
@@ -61,7 +61,7 @@
<class name="com.ogoglio.persist.SpaceMemberRecord"
table="SpaceMemberRecords">
<id name="spaceMemberID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="spaceID" update="false" />
@@ -72,7 +72,7 @@
<class name="com.ogoglio.persist.SimRecord" table="SimRecords">
<id name="simID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="displayName" />
@@ -83,7 +83,9 @@
<class name="com.ogoglio.persist.AccountRecord"
table="AccountRecords">
- <id name="username"></id>
+ <id name="username">
+ <generator class="assigned" />
+ </id>
<property name="email" not-null="true" unique="true" />
<property name="emailValid" />
<property name="accountlevel" not-null="true" />
@@ -102,7 +104,7 @@
<class name="com.ogoglio.persist.TemplateRecord"
table="TemplateRecords">
<id name="templateID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="ownerUsername" not-null="true" />
@@ -127,9 +129,9 @@
</class>
<class name="com.ogoglio.appdev.migrate.DBVersionRecord"
- table="DBVersionRecords">
+ table="DBVersion">
<id name="versionId">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="version" not-null="true" />
</class>
@@ -137,7 +139,7 @@
<class name="com.ogoglio.persist.TemplateSupportFileRecord"
table="TemplateSupportFileRecords">
<id name="templateSupportFileID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="supportFile" />
<property name="script" not-null="true" />
@@ -148,7 +150,7 @@
<class name="com.ogoglio.persist.BodyDataRecord"
table="BodyDataRecords">
<id name="bodyDataID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="displayName" not-null="true" />
<property name="fileName" not-null="true" unique="true" />
@@ -157,7 +159,7 @@
<class name="com.ogoglio.persist.BodyConfigurationRecord"
table="BodyConfigurationRecords">
<id name="bodyConfigurationID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="ownerUsername" not-null="true" />
<property name="displayName" not-null="true" />
@@ -168,7 +170,7 @@
<class name="com.ogoglio.persist.BodySettingRecord"
table="BodySettingRecords">
<id name="bodySettingID">
- <generator class="increment" />
+ <generator class="identity" />
</id>
<property name="settingName" not-null="true" />
<property name="setting" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-09 18:40:11
|
Revision: 672
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=672&view=rev
Author: trevorolio
Date: 2008-01-09 10:39:59 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Removed a debug message.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-07 18:09:53 UTC (rev 671)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-09 18:39:59 UTC (rev 672)
@@ -305,7 +305,6 @@
}
BodyConfigurationDocument proposedDoc = new BodyConfigurationDocument(parseXML(request.getInputStream()));
- Log.debug("Proposed body config doc:"+proposedDoc);
BodyConfigurationDocument bodyConfigDoc = BodyPersistTasks.updateBodyConfiguration(proposedDoc, getSessionFactory());
if (bodyConfigDoc == null) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2008-01-07 19:02:08
|
Revision: 671
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=671&view=rev
Author: iansmith
Date: 2008-01-07 10:09:53 -0800 (Mon, 07 Jan 2008)
Log Message:
-----------
Removed debug log message.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-04 18:34:35 UTC (rev 670)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-07 18:09:53 UTC (rev 671)
@@ -141,7 +141,6 @@
}
AccountDocument newAccountDoc = new AccountDocument(parseXML(request.getInputStream()));
- Log.debug("Received a possible new account document: "+newAccountDoc.toString());
AccountRecord newAccountRec = AccountPersistTasks.findAccountByUsername(newAccountDoc.getUsername(), sessionFactory);
if (newAccountRec != null) {
Log.error("Tried to create an account for existing username: " + newAccountDoc.getUsername());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2008-01-03 18:57:31
|
Revision: 669
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=669&view=rev
Author: iansmith
Date: 2008-01-03 10:57:35 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
Rolled in support for mail stuff trevor did.
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailClient.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
maven/trunk/ogoglio-server/src/test/java/com/ogoglio/persist/test/PersistTest.java
Added Paths:
-----------
maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement_Localized.java
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailClient.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailClient.java 2008-01-03 02:14:27 UTC (rev 668)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailClient.java 2008-01-03 18:57:35 UTC (rev 669)
@@ -23,6 +23,7 @@
private File outputDir = null;
+ public static final String FAKE_MAIL_PREFIX="Mail-Message-";
/**
* Sends all mail to individual files in outputDir
*/
@@ -58,7 +59,7 @@
}
private void sendToDisk(String to, String from, String subject, String body) throws IOException {
- FileOutputStream output = new FileOutputStream(new File(outputDir, "Mail-Message-" + System.currentTimeMillis()));
+ FileOutputStream output = new FileOutputStream(new File(outputDir, FAKE_MAIL_PREFIX + System.currentTimeMillis()));
output.write(("to: " + to + "\n").getBytes());
output.write(("from: " + from + "\n").getBytes());
output.write(("subject: " + subject + "\n").getBytes());
Added: maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement_Localized.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement_Localized.java (rev 0)
+++ maven/trunk/ogoglio-common/src/main/java/nanoxml/XMLElement_Localized.java 2008-01-03 18:57:35 UTC (rev 669)
@@ -0,0 +1,2958 @@
+/* XMLElement.java
+ *
+ * $Revision: 1.1 $
+ * $Date: 2005/10/13 15:48:55 $
+ * $Name: $
+ *
+ * This file is part of NanoXML 2 Lite.
+ * Copyright (C) 2000-2002 Marc De Scheemaecker, All Rights Reserved.
+ *
+ * This software is provided 'as-is', without any express or implied warranty.
+ * In no event will the authors be held liable for any damages arising from the
+ * use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software in
+ * a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source distribution.
+ *****************************************************************************/
+
+// TFS added some basic functions. Look for the ones without Javadocs. :-O
+// IES: fixed internationalization: now we FORCE it to EN_us
+package nanoxml;
+
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayReader;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.Writer;
+import java.text.ParseException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.Vector;
+
+/**
+ * XMLElement is a representation of an XML object. The object is able to parse XML code.
+ * <P>
+ * <DL>
+ * <DT><B>Parsing XML Data</B></DT>
+ * <DD> You can parse XML data using the following code:
+ * <UL>
+ * <CODE> XMLElement xml = new XMLElement();<BR>
+ * FileReader reader = new FileReader("filename.xml");<BR>
+ * xml.parseFromReader(reader); </CODE>
+ * </UL>
+ * </DD>
+ * </DL>
+ * <DL>
+ * <DT><B>Retrieving Attributes</B></DT>
+ * <DD> You can enumerate the attributes of an element using the method {@link #enumerateAttributeNames() enumerateAttributeNames}. The attribute values can be retrieved using the method {@link #getStringAttribute(java.lang.String) getStringAttribute}. The following example shows how to list the attributes of an element:
+ * <UL>
+ * <CODE> XMLElement element = ...;<BR>
+ * Enumeration enum = element.getAttributeNames();<BR>
+ * while (enum.hasMoreElements()) {<BR>
+ * String key = (String) enum.nextElement();<BR>
+ * String value = element.getStringAttribute(key);<BR>
+ * System.out.println(key + " = " + value);<BR> } </CODE>
+ * </UL>
+ * </DD>
+ * </DL>
+ * <DL>
+ * <DT><B>Retrieving Child Elements</B></DT>
+ * <DD> You can enumerate the children of an element using {@link #enumerateChildren() enumerateChildren}. The number of child elements can be retrieved using {@link #countChildren() countChildren}. </DD>
+ * </DL>
+ * <DL>
+ * <DT><B>Elements Containing Character Data</B></DT>
+ * <DD> If an elements contains character data, like in the following example:
+ * <UL>
+ * <CODE> <title>The Title</title> </CODE>
+ * </UL>
+ * you can retrieve that data using the method {@link #getContent() getContent}. </DD>
+ * </DL>
+ * <DL>
+ * <DT><B>Subclassing XMLElement</B></DT>
+ * <DD> When subclassing XMLElement, you need to override the method {@link #createAnotherElement() createAnotherElement} which has to return a new copy of the receiver. </DD>
+ * </DL>
+ * <P>
+ *
+ * @see nanoxml.XMLParseException
+ *
+ * @author Marc De Scheemaecker <<A href="mailto:cyb...@ma...">cyb...@ma...</A>>
+ * @version $Name: $, $Revision: 1.1 $
+ */
+public class XMLElement_Localized {
+
+ /**
+ * Serialization serial version ID.
+ */
+ static final long serialVersionUID = 6685035139346394777L;
+
+ /**
+ * Major version of NanoXML. Classes with the same major and minor version are binary compatible. Classes with the same major version are source compatible. If the major version is different, you may need to modify the client source code.
+ *
+ * @see nanoxml.XMLElement#NANOXML_MINOR_VERSION
+ */
+ public static final int NANOXML_MAJOR_VERSION = 2;
+
+ /**
+ * Minor version of NanoXML. Classes with the same major and minor version are binary compatible. Classes with the same major version are source compatible. If the major version is different, you may need to modify the client source code.
+ *
+ * @see nanoxml.XMLElement#NANOXML_MAJOR_VERSION
+ */
+ public static final int NANOXML_MINOR_VERSION = 2;
+
+ /**
+ * For dealing with files generated by us and distributed with system. We *always* use
+ * the US locale. Trust us, you don't want multiple file formats.
+ */
+ private static java.text.NumberFormat enUSFormat = java.text.NumberFormat.getInstance(Locale.US);
+
+ /*
+ * True if we have already updated the enUSFormat properly.
+ */
+ private static boolean haveUpdatedenUSFormat = false;
+
+ /**
+ * The attributes given to the element.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>The field can be empty.
+ * <li>The field is never <code>null</code>.
+ * <li>The keys and the values are strings.
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private Hashtable attributes;
+
+ /**
+ * Child elements of the element.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>The field can be empty.
+ * <li>The field is never <code>null</code>.
+ * <li>The elements are instances of <code>XMLElement</code> or a subclass of <code>XMLElement</code>.
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private Vector children;
+
+ /**
+ * The name of the element.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>The field is <code>null</code> iff the element is not initialized by either parse or setName.
+ * <li>If the field is not <code>null</code>, it's not empty.
+ * <li>If the field is not <code>null</code>, it contains a valid XML identifier.
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private String name;
+
+ /**
+ * The #PCDATA content of the object.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>The field is <code>null</code> iff the element is not a #PCDATA element.
+ * <li>The field can be any string, including the empty string.
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private String contents;
+
+ /**
+ * Conversion table for &...; entities. The keys are the entity names without the & and ; delimiters.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>The field is never <code>null</code>.
+ * <li>The field always contains the following associations: "lt" => "<", "gt" => ">", "quot" => "\"", "apos" => "'", "amp" => "&"
+ * <li>The keys are strings
+ * <li>The values are char arrays
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private Hashtable entities;
+
+ /**
+ * The line number where the element starts.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>lineNr >= 0</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private int lineNr;
+
+ /**
+ * <code>false</code> if the case of the element and attribute names are case insensitive.
+ */
+ private boolean ignoreCase;
+
+ /**
+ * <code>true</code> if the leading and trailing whitespace of #PCDATA sections have to be ignored.
+ */
+ private boolean ignoreWhitespace;
+
+ /**
+ * Character read too much. This character provides push-back functionality to the input reader without having to use a PushbackReader. If there is no such character, this field is '\0'.
+ */
+ private char charReadTooMuch;
+
+ /**
+ * The reader provided by the caller of the parse method.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>The field is not <code>null</code> while the parse method is running.
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private Reader reader;
+
+ /**
+ * The current line number in the source content.
+ *
+ * <dl>
+ * <dt><b>Invariants:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>parserLineNr > 0 while the parse method is running.
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ private int parserLineNr;
+
+ /**
+ * Creates and initializes a new XML element. Calling the construction is equivalent to:
+ * <ul>
+ * <code>new XMLElement(new Hashtable(), false, true);
+ * setName(name);
+ * </code>
+ * </ul>
+ */
+ public XMLElement_Localized(String name) {
+ this(new Hashtable(), false, true, false);
+ setName(name);
+ }
+
+ /**
+ * Creates and initializes a new XML element. Calling the construction is equivalent to:
+ * <ul>
+ * <code>new XMLElement(new Hashtable(), false, true);
+ * setName(name);
+ * setContent(content);
+ * </code>
+ * </ul>
+ */
+ public XMLElement_Localized(String name, String content) {
+ this(new Hashtable(), false, true, false);
+ setName(name);
+ setContent(content);
+ }
+
+ /**
+ * Creates and initializes a new XML element. Calling the construction is equivalent to:
+ * <ul>
+ * <code>new XMLElement(new Hashtable(), false, true)
+ * </code>
+ * </ul>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => 0
+ * <li>enumerateChildren() => empty enumeration
+ * <li>enumeratePropertyNames() => empty enumeration
+ * <li>getChildren() => empty vector
+ * <li>getContent() => ""
+ * <li>getLineNr() => 0
+ * <li>getName() => null
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable) XMLElement(Hashtable)
+ * @see nanoxml.XMLElement#XMLElement(boolean)
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable,boolean) XMLElement(Hashtable, boolean)
+ */
+ public XMLElement_Localized() {
+ this(new Hashtable(), false, true, false);
+ }
+
+ /**
+ * Creates and initializes a new XML element. Calling the construction is equivalent to:
+ * <ul>
+ * <code>new XMLElement(entities, false, true)
+ * </code>
+ * </ul>
+ *
+ * @param entities
+ * The entity conversion table.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>entities != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => 0
+ * <li>enumerateChildren() => empty enumeration
+ * <li>enumeratePropertyNames() => empty enumeration
+ * <li>getChildren() => empty vector
+ * <li>getContent() => ""
+ * <li>getLineNr() => 0
+ * <li>getName() => null
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#XMLElement()
+ * @see nanoxml.XMLElement#XMLElement(boolean)
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable,boolean) XMLElement(Hashtable, boolean)
+ */
+ public XMLElement_Localized(Hashtable entities) {
+ this(entities, false, true, false);
+ }
+
+ /**
+ * Creates and initializes a new XML element. Calling the construction is equivalent to:
+ * <ul>
+ * <code>new XMLElement(new Hashtable(), skipLeadingWhitespace, true)
+ * </code>
+ * </ul>
+ *
+ * @param skipLeadingWhitespace
+ * <code>true</code> if leading and trailing whitespace in PCDATA content has to be removed.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => 0
+ * <li>enumerateChildren() => empty enumeration
+ * <li>enumeratePropertyNames() => empty enumeration
+ * <li>getChildren() => empty vector
+ * <li>getContent() => ""
+ * <li>getLineNr() => 0
+ * <li>getName() => null
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#XMLElement()
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable) XMLElement(Hashtable)
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable,boolean) XMLElement(Hashtable, boolean)
+ */
+ public XMLElement_Localized(boolean skipLeadingWhitespace) {
+ this(new Hashtable(), skipLeadingWhitespace, true, false);
+ }
+
+ /**
+ * Creates and initializes a new XML element. Calling the construction is equivalent to:
+ * <ul>
+ * <code>new XMLElement(entities, skipLeadingWhitespace, true)
+ * </code>
+ * </ul>
+ *
+ * @param entities
+ * The entity conversion table.
+ * @param skipLeadingWhitespace
+ * <code>true</code> if leading and trailing whitespace in PCDATA content has to be removed.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>entities != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => 0
+ * <li>enumerateChildren() => empty enumeration
+ * <li>enumeratePropertyNames() => empty enumeration
+ * <li>getChildren() => empty vector
+ * <li>getContent() => ""
+ * <li>getLineNr() => 0
+ * <li>getName() => null
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#XMLElement()
+ * @see nanoxml.XMLElement#XMLElement(boolean)
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable) XMLElement(Hashtable)
+ */
+ public XMLElement_Localized(Hashtable entities, boolean skipLeadingWhitespace) {
+ this(entities, skipLeadingWhitespace, true, false);
+ }
+
+ /**
+ * Creates and initializes a new XML element.
+ *
+ * @param entities
+ * The entity conversion table.
+ * @param skipLeadingWhitespace
+ * <code>true</code> if leading and trailing whitespace in PCDATA content has to be removed.
+ * @param ignoreCase
+ * <code>true</code> if the case of element and attribute names have to be ignored.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>entities != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => 0
+ * <li>enumerateChildren() => empty enumeration
+ * <li>enumeratePropertyNames() => empty enumeration
+ * <li>getChildren() => empty vector
+ * <li>getContent() => ""
+ * <li>getLineNr() => 0
+ * <li>getName() => null
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#XMLElement()
+ * @see nanoxml.XMLElement#XMLElement(boolean)
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable) XMLElement(Hashtable)
+ * @see nanoxml.XMLElement#XMLElement(java.util.Hashtable,boolean) XMLElement(Hashtable, boolean)
+ */
+ public XMLElement_Localized(Hashtable entities, boolean skipLeadingWhitespace, boolean ignoreCase) {
+ this(entities, skipLeadingWhitespace, true, ignoreCase);
+ }
+
+ /**
+ * Creates and initializes a new XML element.
+ * <P>
+ * This constructor should <I>only</I> be called from {@link #createAnotherElement() createAnotherElement} to create child elements.
+ *
+ * @param entities
+ * The entity conversion table.
+ * @param skipLeadingWhitespace
+ * <code>true</code> if leading and trailing whitespace in PCDATA content has to be removed.
+ * @param fillBasicConversionTable
+ * <code>true</code> if the basic entities need to be added to the entity list.
+ * @param ignoreCase
+ * <code>true</code> if the case of element and attribute names have to be ignored.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>entities != null</code>
+ * <li>if <code>fillBasicConversionTable == false</code> then <code>entities</code> contains at least the following entries: <code>amp</code>, <code>lt</code>, <code>gt</code>, <code>apos</code> and <code>quot</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => 0
+ * <li>enumerateChildren() => empty enumeration
+ * <li>enumeratePropertyNames() => empty enumeration
+ * <li>getChildren() => empty vector
+ * <li>getContent() => ""
+ * <li>getLineNr() => 0
+ * <li>getName() => null
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#createAnotherElement()
+ */
+ protected XMLElement_Localized(Hashtable entities, boolean skipLeadingWhitespace, boolean fillBasicConversionTable, boolean ignoreCase) {
+ this.ignoreWhitespace = skipLeadingWhitespace;
+ this.ignoreCase = ignoreCase;
+ this.name = null;
+ this.contents = "";
+ this.attributes = new Hashtable();
+ this.children = new Vector();
+ this.entities = entities;
+ this.lineNr = 0;
+ Enumeration enumerator = this.entities.keys();
+ while (enumerator.hasMoreElements()) {
+ Object key = enumerator.nextElement();
+ Object value = this.entities.get(key);
+ if (value instanceof String) {
+ value = ((String) value).toCharArray();
+ this.entities.put(key, value);
+ }
+ }
+ if (fillBasicConversionTable) {
+ this.entities.put("amp", new char[] { '&' });
+ this.entities.put("quot", new char[] { '"' });
+ this.entities.put("apos", new char[] { '\'' });
+ this.entities.put("lt", new char[] { '<' });
+ this.entities.put("gt", new char[] { '>' });
+ }
+ }
+
+ /**
+ * Adds a child element.
+ *
+ * @param child
+ * The child element to add.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>child != null</code>
+ * <li><code>child.getName() != null</code>
+ * <li><code>child</code> does not have a parent element
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>countChildren() => old.countChildren() + 1
+ * <li>enumerateChildren() => old.enumerateChildren() + child
+ * <li>getChildren() => old.enumerateChildren() + child
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#countChildren()
+ * @see nanoxml.XMLElement#enumerateChildren()
+ * @see nanoxml.XMLElement#getChildren()
+ * @see nanoxml.XMLElement#removeChild(nanoxml.XMLElement) removeChild(XMLElement)
+ */
+ public void addChild(XMLElement_Localized child) {
+ this.children.addElement(child);
+ }
+
+ public void removeChildren(String name) {
+ XMLElement[] elements = this.getChildren(name);
+ for (int i = 0; i < elements.length; i++) {
+ removeChild(elements[i]);
+ }
+ }
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param value
+ * The value of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * <li><code>value != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>enumerateAttributeNames() => old.enumerateAttributeNames() + name
+ * <li>getAttribute(name) => value
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setDoubleAttribute(java.lang.String, double) setDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#setIntAttribute(java.lang.String, int) setIntAttribute(String, int)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String) getAttribute(String)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.lang.Object) getAttribute(String, Object)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getAttribute(String, Hashtable, String, boolean)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String) getStringAttribute(String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.lang.String) getStringAttribute(String, String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getStringAttribute(String, Hashtable, String, boolean)
+ */
+ public void setAttribute(String name, Object value) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ this.attributes.put(name, value);
+ }
+
+ public void setAttribute(String name, long value) {
+ setAttribute(name, new Long(value));
+ }
+
+ public void setAttribute(String name, boolean value) {
+ setAttribute(name, new Boolean(value));
+ }
+
+ public void setAttribute(String name, double value) {
+ //Object[] args = { new Double(value) };
+ setAttribute(name, new Double(value));
+ }
+
+ public void setAttribute(String name, float value) {
+ //Object[] args = { new Float(value) };
+ setAttribute(name, new Double(value));
+ }
+
+ public void setTypedAttribute(String name, String raw) {
+ boolean longOk=false;
+ boolean doubleOk=false;
+ boolean dump=false;
+ long l=-123L;
+ double d=-123.0;
+
+ if (raw.indexOf('@')!=-1) {
+ dump=true;
+ }
+ //try long in US format... note: you try this BEFORE you try the double since
+ //the double can also parse the long
+ try {
+ l=enUSFormat.parse(raw).longValue();
+ longOk=true;
+ } catch (ParseException e) {
+
+ }
+
+ //try understanding it as a double in US formate (xx.yyy)
+ try {
+ d=enUSFormat.parse(raw).doubleValue();
+ doubleOk=true;
+ } catch (ParseException ignored) {
+
+ }
+
+ if (dump) {
+ System.out.println("FART PARSE: Parsing "+raw+" and got "+longOk+" and "+doubleOk+" with "+l+" and "+d);
+ }
+
+ if ((longOk) && (doubleOk)) {
+ System.out.println("FART GOT BOTH OK:"+raw);
+ setAttribute(name, d);
+ return;
+ }
+
+ if (longOk) {
+ System.out.println("FART GOT LONG ONLY:"+raw);
+ setAttribute(name,l);
+ return;
+ }
+
+ if (doubleOk) {
+ System.out.println("FART GOT DOUBLE ONLY:"+raw);
+ setAttribute(name, d);
+ return;
+ }
+
+
+ //try boolean
+ if ((raw.equalsIgnoreCase("true")) || (raw.equalsIgnoreCase("false"))) {
+ raw=raw.toLowerCase();
+ setAttribute(name, Boolean.valueOf(raw));
+ return;
+ }
+
+ //hope it's a string
+ setAttribute(name, raw);
+ }
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param value
+ * The value of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>enumerateAttributeNames() => old.enumerateAttributeNames() + name
+ * <li>getIntAttribute(name) => value
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setDoubleAttribute(java.lang.String, double) setDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String) getIntAttribute(String)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, int) getIntAttribute(String, int)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getIntAttribute(String, Hashtable, String, boolean)
+ */
+ public void setIntAttribute(String name, int value) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ this.attributes.put(name, new Integer(value));
+ }
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param value
+ * The value of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li>enumerateAttributeNames() => old.enumerateAttributeNames() + name
+ * <li>getDoubleAttribute(name) => value
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setIntAttribute(java.lang.String, int) setIntAttribute(String, int)
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String) getDoubleAttribute(String)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, double) getDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getDoubleAttribute(String, Hashtable, String, boolean)
+ */
+ public void setDoubleAttribute(String name, double value) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ this.attributes.put(name, new Double(value));
+ }
+
+ /**
+ * Returns the number of child elements of the element.
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>result >= 0</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * @see nanoxml.XMLElement#addChild(nanoxml.XMLElement) addChild(XMLElement)
+ * @see nanoxml.XMLElement#enumerateChildren()
+ * @see nanoxml.XMLElement#getChildren()
+ * @see nanoxml.XMLElement#removeChild(nanoxml.XMLElement) removeChild(XMLElement)
+ */
+ public int countChildren() {
+ return this.children.size();
+ }
+
+ /**
+ * Enumerates the attribute names.
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>result != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * @see nanoxml.XMLElement#setDoubleAttribute(java.lang.String, double) setDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#setIntAttribute(java.lang.String, int) setIntAttribute(String, int)
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String) getAttribute(String)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.lang.Object) getAttribute(String, String)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getAttribute(String, Hashtable, String, boolean)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String) getStringAttribute(String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.lang.String) getStringAttribute(String, String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getStringAttribute(String, Hashtable, String, boolean)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String) getIntAttribute(String)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, int) getIntAttribute(String, int)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getIntAttribute(String, Hashtable, String, boolean)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String) getDoubleAttribute(String)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, double) getDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getDoubleAttribute(String, Hashtable, String, boolean)
+ * @see nanoxml.XMLElement#getBooleanAttribute(java.lang.String, java.lang.String, java.lang.String, boolean) getBooleanAttribute(String, String, String, boolean)
+ */
+ public Enumeration enumerateAttributeNames() {
+ return this.attributes.keys();
+ }
+
+ /**
+ * Enumerates the child elements.
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>result != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * @see nanoxml.XMLElement#addChild(nanoxml.XMLElement) addChild(XMLElement)
+ * @see nanoxml.XMLElement#countChildren()
+ * @see nanoxml.XMLElement#getChildren()
+ * @see nanoxml.XMLElement#removeChild(nanoxml.XMLElement) removeChild(XMLElement)
+ */
+ public Enumeration enumerateChildren() {
+ return this.children.elements();
+ }
+
+ /**
+ * Returns the child elements as a Vector. It is safe to modify this Vector.
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>result != null</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ *
+ * @see nanoxml.XMLElement#addChild(nanoxml.XMLElement) addChild(XMLElement)
+ * @see nanoxml.XMLElement#countChildren()
+ * @see nanoxml.XMLElement#enumerateChildren()
+ * @see nanoxml.XMLElement#removeChild(nanoxml.XMLElement) removeChild(XMLElement)
+ */
+ public Vector getChildren() {
+ try {
+ return (Vector) this.children.clone();
+ } catch (Exception e) {
+ // this never happens, however, some Java compilers are so
+ // braindead that they require this exception clause
+ return null;
+ }
+ }
+
+ /**
+ * Returns the first child element with this name or null if none matches.
+ */
+ public XMLElement getChild(String name) {
+ XMLElement[] kids = (XMLElement[]) getChildren().toArray(new XMLElement[0]);
+ for (int i = 0; i < kids.length; i++) {
+ if (kids[i].getName().equals(name)) {
+ return kids[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns all children with this name.
+ */
+ public XMLElement[] getChildren(String name) {
+ Vector results = new Vector();
+ XMLElement[] kids = (XMLElement[]) getChildren().toArray(new XMLElement[0]);
+ for (int i = 0; i < kids.length; i++) {
+ if (kids[i].getName().equals(name)) {
+ results.add(kids[i]);
+ }
+ }
+ return (XMLElement[]) results.toArray(new XMLElement[0]);
+ }
+
+ public XMLElement[] getAncestors(String name) {
+ Vector results = new Vector();
+ XMLElement[] kids = (XMLElement[]) getChildren().toArray(new XMLElement[0]);
+ for (int i = 0; i < kids.length; i++) {
+ if (kids[i].getName().equals(name)) {
+ results.add(kids[i]);
+ }
+ XMLElement[] subChildren = kids[i].getAncestors(name);
+ for (int j = 0; j < subChildren.length; j++) {
+ results.add(subChildren[j]);
+ }
+ }
+ return (XMLElement[]) results.toArray(new XMLElement[0]);
+
+ }
+
+ /**
+ * Returns the PCDATA content of the object. If there is no such content, <CODE>null</CODE> is returned.
+ *
+ * @see nanoxml.XMLElement#setContent(java.lang.String) setContent(String)
+ */
+ public String getContent() {
+ return this.contents;
+ }
+
+ /**
+ * Returns the line nr in the source data on which the element is found. This method returns <code>0</code> there is no associated source data.
+ *
+ * <dl>
+ * <dt><b>Postconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>result >= 0</code>
+ * </ul>
+ * </dd>
+ * </dl>
+ */
+ public int getLineNr() {
+ return this.lineNr;
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>null</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.lang.Object) getAttribute(String, Object)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getAttribute(String, Hashtable, String, boolean)
+ */
+ public Object getAttribute(String name) {
+ return this.getAttribute(name, null);
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>defaultValue</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param defaultValue
+ * Key to use if the attribute is missing.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String) getAttribute(String)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getAttribute(String, Hashtable, String, boolean)
+ */
+ public Object getAttribute(String name, Object defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = this.attributes.get(name);
+ if (value == null) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ /**
+ * Returns an attribute by looking up a key in a hashtable. If the attribute doesn't exist, the value corresponding to defaultKey is returned.
+ * <P>
+ * As an example, if valueSet contains the mapping <code>"one" =>
+ * "1"</code> and the element contains the attribute <code>attr="one"</code>, then <code>getAttribute("attr", mapping, defaultKey, false)</code> returns <code>"1"</code>.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param valueSet
+ * Hashtable mapping keys to values.
+ * @param defaultKey
+ * Key to use if the attribute is missing.
+ * @param allowLiterals
+ * <code>true</code> if literals are valid.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * <li><code>valueSet</code> != null
+ * <li>the keys of <code>valueSet</code> are strings
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String) getAttribute(String)
+ * @see nanoxml.XMLElement#getAttribute(java.lang.String, java.lang.Object) getAttribute(String, Object)
+ */
+ public Object getAttribute(String name, Hashtable valueSet, String defaultKey, boolean allowLiterals) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object key = this.attributes.get(name);
+ Object result;
+ if (key == null) {
+ key = defaultKey;
+ }
+ result = valueSet.get(key);
+ if (result == null) {
+ if (allowLiterals) {
+ result = key;
+ } else {
+ throw this.invalidValue(name, (String) key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>null</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.lang.String) getStringAttribute(String, String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getStringAttribute(String, Hashtable, String, boolean)
+ */
+ public String getStringAttribute(String name) {
+ return this.getStringAttribute(name, null);
+ }
+
+ public boolean getBooleanAttribute(String name) {
+ return this.getBooleanAttribute(name, false);
+ }
+
+ public boolean getBooleanAttribute(String name, boolean defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = this.attributes.get(name);
+ if (value == null) {
+ return defaultValue;
+ } else {
+ return ((Boolean)value).booleanValue();
+ }
+ }
+
+ public long getLongAttribute(String name, long defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = (Object) this.attributes.get(name);
+ if (value == null) {
+ return defaultValue;
+ } else {
+ if (value instanceof Double) {
+ Double d=(Double)value;
+ return d.longValue();
+ }
+ return ((Long)value).longValue();
+ }
+ }
+
+ public long getLongAttribute(String name) {
+ return getLongAttribute(name, -1L);
+ }
+
+ public float getFloatAttribute(String name, float defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = this.attributes.get(name);
+ if (value == null) {
+ return defaultValue;
+ } else {
+ //it's ok to convert a long or double to float
+ if (value instanceof Long) {
+ Long l=(Long)value;
+ return l.floatValue();
+ }
+ return ((Double)value).floatValue();
+ }
+ }
+
+ public float getFloatAttribute(String name) {
+ return getFloatAttribute(name, -1.0f);
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>defaultValue</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param defaultValue
+ * Key to use if the attribute is missing.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String) getStringAttribute(String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getStringAttribute(String, Hashtable, String, boolean)
+ */
+ public String getStringAttribute(String name, String defaultValue) {
+ Object raw = this.getAttribute(name);
+ //have to do this check first!
+ if (raw==null) {
+ return defaultValue;
+ }
+ if (raw instanceof Double) {
+ Double d = (Double)raw;
+ return unencode(enUSFormat.format(d.doubleValue()));
+ } else {
+ return unencode(raw.toString());
+ }
+ //return unencode((String) this.getAttribute(name, defaultValue));
+ }
+
+ /**
+ * Returns an attribute by looking up a key in a hashtable. If the attribute doesn't exist, the value corresponding to defaultKey is returned.
+ * <P>
+ * As an example, if valueSet contains the mapping <code>"one" =>
+ * "1"</code> and the element contains the attribute <code>attr="one"</code>, then <code>getAttribute("attr", mapping, defaultKey, false)</code> returns <code>"1"</code>.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param valueSet
+ * Hashtable mapping keys to values.
+ * @param defaultKey
+ * Key to use if the attribute is missing.
+ * @param allowLiterals
+ * <code>true</code> if literals are valid.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * <li><code>valueSet</code> != null
+ * <li>the keys of <code>valueSet</code> are strings
+ * <li>the values of <code>valueSet</code> are strings
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String) getStringAttribute(String)
+ * @see nanoxml.XMLElement#getStringAttribute(java.lang.String, java.lang.String) getStringAttribute(String, String)
+ */
+ public String getStringAttribute(String name, Hashtable valueSet, String defaultKey, boolean allowLiterals) {
+ return (String) this.getAttribute(name, valueSet, defaultKey, allowLiterals);
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>0</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setIntAttribute(java.lang.String, int) setIntAttribute(String, int)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, int) getIntAttribute(String, int)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getIntAttribute(String, Hashtable, String, boolean)
+ */
+ public int getIntAttribute(String name) {
+ return this.getIntAttribute(name, 0);
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>defaultValue</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param defaultValue
+ * Key to use if the attribute is missing.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setIntAttribute(java.lang.String, int) setIntAttribute(String, int)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String) getIntAttribute(String)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getIntAttribute(String, Hashtable, String, boolean)
+ */
+ public int getIntAttribute(String name, int defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = this.attributes.get(name);
+ if (value == null) {
+ return defaultValue;
+ } else {
+ if (value instanceof Long) {
+ Long l=(Long)value;
+ if ((l.longValue()>Integer.MAX_VALUE) || (l.longValue()<Integer.MIN_VALUE)) {
+ throw new IllegalArgumentException("Trying to convert a long that is too big (" + l+") to an int!");
+ }
+ return l.intValue();
+ }
+ if (value instanceof Double) {
+ Double d=(Double)value;
+ return d.intValue();
+ }
+ return ((Integer)value).intValue();
+ }
+ }
+
+ /**
+ * Returns an attribute by looking up a key in a hashtable. If the attribute doesn't exist, the value corresponding to defaultKey is returned.
+ * <P>
+ * As an example, if valueSet contains the mapping <code>"one" => 1</code> and the element contains the attribute <code>attr="one"</code>, then <code>getIntAttribute("attr", mapping, defaultKey, false)</code> returns <code>1</code>.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param valueSet
+ * Hashtable mapping keys to values.
+ * @param defaultKey
+ * Key to use if the attribute is missing.
+ * @param allowLiteralNumbers
+ * <code>true</code> if literal numbers are valid.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * <li><code>valueSet</code> != null
+ * <li>the keys of <code>valueSet</code> are strings
+ * <li>the values of <code>valueSet</code> are Integer objects
+ * <li><code>defaultKey</code> is either <code>null</code>, a key in <code>valueSet</code> or an integer.
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setIntAttribute(java.lang.String, int) setIntAttribute(String, int)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String) getIntAttribute(String)
+ * @see nanoxml.XMLElement#getIntAttribute(java.lang.String, int) getIntAttribute(String, int)
+ */
+ public int getIntAttribute(String name, Hashtable valueSet, String defaultKey, boolean allowLiteralNumbers) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object key = this.attributes.get(name);
+ Integer result;
+ if (key == null) {
+ key = defaultKey;
+ }
+ try {
+ result = (Integer) valueSet.get(key);
+ } catch (ClassCastException e) {
+ throw this.invalidValueSet(name);
+ }
+ if (result == null) {
+ if (!allowLiteralNumbers) {
+ throw this.invalidValue(name, (String) key);
+ }
+ try {
+ result = Integer.valueOf((String) key);
+ } catch (NumberFormatException e) {
+ throw this.invalidValue(name, (String) key);
+ }
+ }
+ return result.intValue();
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>0.0</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setDoubleAttribute(java.lang.String, double) setDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, double) getDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getDoubleAttribute(String, Hashtable, String, boolean)
+ */
+ public double getDoubleAttribute(String name) {
+ return this.getDoubleAttribute(name, -1);
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>defaultValue</code> is returned.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param defaultValue
+ * Key to use if the attribute is missing.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setDoubleAttribute(java.lang.String, double) setDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String) getDoubleAttribute(String)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, java.util.Hashtable, java.lang.String, boolean) getDoubleAttribute(String, Hashtable, String, boolean)
+ */
+ public double getDoubleAttribute(String name, double defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = this.attributes.get(name);
+ if (value == null) {
+ return defaultValue;
+ } else {
+ //some conversions are ok
+ if (value instanceof Long) {
+ Long l=(Long)value;
+ return l.doubleValue();
+ }
+ return ((Double)value).doubleValue();
+ }
+ }
+
+ /**
+ * Returns an attribute by looking up a key in a hashtable. If the attribute doesn't exist, the value corresponding to defaultKey is returned.
+ * <P>
+ * As an example, if valueSet contains the mapping <code>"one" =>
+ * 1.0</code> and the element contains the attribute <code>attr="one"</code>, then <code>getDoubleAttribute("attr", mapping, defaultKey, false)</code> returns <code>1.0</code>.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param valueSet
+ * Hashtable mapping keys to values.
+ * @param defaultKey
+ * Key to use if the attribute is missing.
+ * @param allowLiteralNumbers
+ * <code>true</code> if literal numbers are valid.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * <li><code>valueSet != null</code>
+ * <li>the keys of <code>valueSet</code> are strings
+ * <li>the values of <code>valueSet</code> are Double objects
+ * <li><code>defaultKey</code> is either <code>null</code>, a key in <code>valueSet</code> or a double.
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setDoubleAttribute(java.lang.String, double) setDoubleAttribute(String, double)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String) getDoubleAttribute(String)
+ * @see nanoxml.XMLElement#getDoubleAttribute(java.lang.String, double) getDoubleAttribute(String, double)
+ */
+ public double getDoubleAttribute(String name, Hashtable valueSet, String defaultKey, boolean allowLiteralNumbers) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object key = this.attributes.get(name);
+ Double result;
+ if (key == null) {
+ key = defaultKey;
+ }
+ try {
+ result = (Double) valueSet.get(key);
+ } catch (ClassCastException e) {
+ throw this.invalidValueSet(name);
+ }
+ if (result == null) {
+ if (!allowLiteralNumbers) {
+ throw this.invalidValue(name, (String) key);
+ }
+ try {
+ result = Double.valueOf((String) key);
+ } catch (NumberFormatException e) {
+ throw this.invalidValue(name, (String) key);
+ }
+ }
+ return result.doubleValue();
+ }
+
+ /**
+ * Returns an attribute of the element. If the attribute doesn't exist, <code>defaultValue</code> is returned. If the value of the attribute is equal to <code>trueValue</code>, <code>true</code> is returned. If the value of the attribute is equal to <code>falseValue</code>, <code>false</code> is returned. If the value doesn't match <code>trueValue</code> or
+ * <code>falseValue</code>, an exception is thrown.
+ *
+ * @param name
+ * The name of the attribute.
+ * @param trueValue
+ * The value associated with <code>true</code>.
+ * @param falseValue
+ * The value associated with <code>true</code>.
+ * @param defaultValue
+ * Value to use if the attribute is missing.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>name != null</code>
+ * <li><code>name</code> is a valid XML identifier
+ * <li><code>trueValue</code> and <code>falseValue</code> are different strings.
+ * </ul>
+ * </dd>
+ * </dl>
+ * <dl>
+ *
+ * @see nanoxml.XMLElement#setAttribute(java.lang.String, java.lang.Object) setAttribute(String, Object)
+ * @see nanoxml.XMLElement#removeAttribute(java.lang.String) removeAttribute(String)
+ * @see nanoxml.XMLElement#enumerateAttributeNames()
+ */
+ public boolean getBooleanAttribute(String name, String trueValue, String falseValue, boolean defaultValue) {
+ if (this.ignoreCase) {
+ name = name.toUpperCase();
+ }
+ Object value = this.attributes.get(name);
+ if (value == null) {
+ return defaultValue;
+ } else if (value.equals(trueValue)) {
+ return true;
+ } else if (value.equals(falseValue)) {
+ return false;
+ } else {
+ throw this.invalidValue(name, (String) value);
+ }
+ }
+
+ /**
+ * Returns the name of the element.
+ *
+ * @see nanoxml.XMLElement#setName(java.lang.String) setName(String)
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * Reads one XML element from a java.io.Reader and parses it.
+ *
+ * @param reader
+ * The reader from which to retrieve the XML data.
+ *
+ * </dl>
+ * <dl>
+ * <dt><b>Preconditions:</b></dt>
+ * <dd>
+ * <ul>
+ * <li><code>reader != null</code>
+ * <li><code>reader</code> is not closed
+ * </ul>
+ * </dd...
[truncated message content] |
|
From: <tre...@us...> - 2008-01-03 02:14:22
|
Revision: 668
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=668&view=rev
Author: trevorolio
Date: 2008-01-02 18:14:27 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Tweaked the test windows to close when the test is done.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2008-01-03 02:13:19 UTC (rev 667)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2008-01-03 02:14:27 UTC (rev 668)
@@ -470,10 +470,12 @@
testWindow.applet.sendChatMessage("Hey, this is a chat message");
assertEquals(basicAuthenticator.getAuthDocument(true).getUsername(), testWindow.applet.getUsername());
testWindow.cleanup();
-
+ testWindow.setVisible(false);
+
BodyAppletTestWindow bodyWindow = openBodyAppletTestWindow(basicAuthenticator);
bodyWindow.cleanup();
-
+ bodyWindow.setVisible(false);
+
basicWebClient.deleteSpace(spaceDocument.getSpaceID());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-03 02:13:15
|
Revision: 667
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=667&view=rev
Author: trevorolio
Date: 2008-01-02 18:13:19 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Fixed the browser test for the non-Java3D case.
Modified Paths:
--------------
maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java
Modified: maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java
===================================================================
--- maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java 2008-01-03 02:13:08 UTC (rev 666)
+++ maven/trunk/ogoglio-test-applet/src/main/java/com/ogoglio/testapplet/TestApplet.java 2008-01-03 02:13:19 UTC (rev 667)
@@ -1,6 +1,5 @@
package com.ogoglio.testapplet;
-
import java.applet.Applet;
import java.awt.Color;
@@ -27,10 +26,10 @@
public String getJavaVersion() {
return System.getProperty("java.specification.version");
}
-
+
public boolean hasAcceptableJava() {
String versionProp = getJavaVersion();
- if(versionProp == null) {
+ if (versionProp == null) {
return false;
}
try {
@@ -43,12 +42,22 @@
}
public String getJava3DVersion() {
- return Java3DTester.getVersion("com.sun.j3d.utils.universe", "SimpleUniverse");
+ try {
+ return Java3DTester.getVersion("com.sun.j3d.utils.universe", "SimpleUniverse");
+ } catch (Throwable e) {
+ System.out.println("Could not load Java3D: " + e);
+ return null;
+ }
}
-
+
public boolean hasJava3D() {
- System.out.println("Version: " + Java3DTester.getVersion("com.sun.j3d.utils.universe", "SimpleUniverse"));
- return Java3DTester.getVersion("com.sun.j3d.utils.universe", "SimpleUniverse") != null;
+ try {
+ System.out.println("Java3D Version: " + Java3DTester.getVersion("com.sun.j3d.utils.universe", "SimpleUniverse"));
+ return Java3DTester.getVersion("com.sun.j3d.utils.universe", "SimpleUniverse") != null;
+ } catch (Throwable e) {
+ System.out.println("Could not load Java3D: " + e);
+ return false;
+ }
}
public boolean canStartJava3D() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-03 02:13:06
|
Revision: 666
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=666&view=rev
Author: trevorolio
Date: 2008-01-02 18:13:08 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Fixed the browser test for the non-Java3D case.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js 2008-01-02 22:07:11 UTC (rev 665)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/browserTests.js 2008-01-03 02:13:08 UTC (rev 666)
@@ -23,7 +23,7 @@
var javaErrorMessage = "<br/><br/>Please check that Java support is enabled in your browser preferences.<br/>";
javaErrorMessage += "<br/>If your computer needs Java, use the free installer from <a href='http://java.com/en/download/'>Java.com</a>.<br/>";
-var java3DErrorMessage = "<br/>If your computer needs Java3D, a free installer is available <a href='/og/java3d-1_5_1-windows-i586.exe'>here</a>.";
+var java3DErrorMessage = "<br/>A free Java3D installer is available <a href='/og/java3d-1_5_1-windows-i586.exe'>here</a>. You must restart your browser after installation.";
function testJava(testSpan){
@@ -49,14 +49,14 @@
if(!document.testApplet.hasJava3D()){
var j3dVersion = document.testApplet.getJava3DVersion();
if(j3dVersion == null){
- requirementTests[1].failureMessage = "Unfortunately, you do not have Java3D installed.<br/>" + javaErrorMessage + java3DErrorMessage;
+ requirementTests[1].failureMessage = "Unfortunately, you do not have Java3D installed.<br/>" + java3DErrorMessage;
} else {
- requirementTests[1].failureMessage = "Unfortunately, this version of Java3D is not supported: " + j3dVersion + javaErrorMessage + java3DErrorMessage + "<br/>";
+ requirementTests[1].failureMessage = "Unfortunately, this version of Java3D is not supported: " + j3dVersion + java3DErrorMessage + "<br/>";
}
return false;
}
if(!document.testApplet.canStartJava3D()){
- requirementTests[1].failureMessage = "Unfortunately, you have Java3D but it can not initialize." + javaErrorMessage + java3DErrorMessage + "<br/>";
+ requirementTests[1].failureMessage = "Unfortunately, you have Java3D but it can not initialize." + java3DErrorMessage + "<br/>";
}
return true;
} catch (error){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-02 22:07:06
|
Revision: 665
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=665&view=rev
Author: trevorolio
Date: 2008-01-02 14:07:11 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Moved the mail code to appdev so it can be used by other webapps.
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/pom.xml
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractRemoteServlet.java
Added Paths:
-----------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/
Removed Paths:
-------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailTemplateFactory.java
Modified: maven/trunk/ogoglio-appdev/pom.xml
===================================================================
--- maven/trunk/ogoglio-appdev/pom.xml 2008-01-02 22:06:59 UTC (rev 664)
+++ maven/trunk/ogoglio-appdev/pom.xml 2008-01-02 22:07:11 UTC (rev 665)
@@ -15,6 +15,12 @@
<dependencies>
<dependency>
+ <groupId>com.sun</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.1.ga</version>
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractRemoteServlet.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractRemoteServlet.java 2008-01-02 22:06:59 UTC (rev 664)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractRemoteServlet.java 2008-01-02 22:07:11 UTC (rev 665)
@@ -27,9 +27,13 @@
private String ogoglioUsername = null;
private String ogoglioPassword = null;
-
+
+ private String mailDirectory = null;
+
+ private String baseURL = null;
+
public abstract String getOgoglioUsernameContextKey();
-
+
public abstract String getOgoglioPasswordContextKey();
public void init(ServletConfig config) throws ServletException {
@@ -41,7 +45,10 @@
ArgumentUtils.assertNotEmpty(ogoglioUsername);
ogoglioPassword = (String) envCtx.lookup(getOgoglioPasswordContextKey());
ArgumentUtils.assertNotEmpty(ogoglioPassword);
-
+ mailDirectory = (String) envCtx.lookup("ogoglio/mailDirectory");
+ if(mailDirectory.length() == 0){
+ mailDirectory = null;
+ }
} catch (NamingException e) {
throw new ServletException("Could not init EventServlet (probably forgot env variables in setup.xml): " + e);
}
@@ -66,8 +73,7 @@
super.service(request, response);
}
-
- public AuthDocument getAuthDocument(HttpServletRequest request) throws IOException {
+ public AuthDocument getAuthDocument(HttpServletRequest request) throws IOException {
String authCookie = getRequestAuthCookie(request);
if (authCookie == null) {
return null;
@@ -82,8 +88,13 @@
public String getOgoglioUsername() {
return ogoglioUsername;
}
-
- public String getOgoglioPassword(){
+
+ public String getOgoglioPassword() {
return ogoglioPassword;
}
+
+ public String getMailDirectory() {
+ return mailDirectory;
+ }
+
}
Copied: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail (from rev 632, maven/trunk/ogoglio-server/src/main/java/com/ogoglio/mail)
Deleted: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailTemplateFactory.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/mail/MailTemplateFactory.java 2007-12-13 01:58:05 UTC (rev 632)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/mail/MailTemplateFactory.java 2008-01-02 22:07:11 UTC (rev 665)
@@ -1,33 +0,0 @@
-package com.ogoglio.mail;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.ogoglio.util.StreamUtils;
-
-public class MailTemplateFactory {
-
- private static final String TEMPLATE_RESOURCE_PATH = "mail/";
-
- public static final String TEST_TEMPLATE_1 = "TestTemplate1.txt";
-
- public static final String EMAIL_VALIDATION_TEMPLATE = "EmailValidationTemplate.txt";
-
- public static String getTemplate(String templateName) {
- try {
- return StreamUtils.readResource(TEMPLATE_RESOURCE_PATH + templateName);
- } catch (IOException e) {
- return null;
- }
- }
-
- public static Map createEmailValidationMap(String emailToValidate, String validationURL, String serviceName, String serviceURL) {
- HashMap map = new HashMap();
- map.put("emailToValidate", emailToValidate);
- map.put("validationURL", validationURL);
- map.put("serviceName", serviceName);
- map.put("serviceURL", serviceURL);
- return map;
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-02 22:06:54
|
Revision: 664
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=664&view=rev
Author: trevorolio
Date: 2008-01-02 14:06:59 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Moved the mail code to appdev so it can be used by other webapps.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
maven/trunk/ogoglio-server/src/test/java/com/ogoglio/mail/test/MailTest.java
Removed Paths:
-------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/mail/
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-02 10:15:57 UTC (rev 663)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-02 22:06:59 UTC (rev 664)
@@ -17,6 +17,7 @@
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.HashMap;
import java.util.Map;
import javax.media.j3d.Transform3D;
@@ -36,14 +37,12 @@
import com.ogoglio.mail.MailClient;
import com.ogoglio.mail.MailFormatter;
import com.ogoglio.mail.MailSendException;
-import com.ogoglio.mail.MailTemplateFactory;
import com.ogoglio.media.MediaService;
import com.ogoglio.persist.AccountPersistTasks;
import com.ogoglio.persist.AccountRecord;
import com.ogoglio.persist.BodyConfigurationRecord;
import com.ogoglio.persist.BodyPersistTasks;
import com.ogoglio.persist.BodySettingRecord;
-import com.ogoglio.persist.BodyTextureRecord;
import com.ogoglio.persist.PendingEmailValidationRecord;
import com.ogoglio.persist.PendingEmailValidationTasks;
import com.ogoglio.persist.PossessionPersistTasks;
@@ -72,6 +71,8 @@
public static final String SECRET_PARAMETER = "secret";
+ public static final String EMAIL_VALIDATION_TEMPLATE = "EmailValidationTemplate.txt";
+
public String defaultAccountPhotoPath = null;
public static URI getAccountURI(AccountRecord accountRecord, URI baseURI) {
@@ -404,8 +405,8 @@
String validationURL = getSiteInfo().getBaseUrl() + "account/validate?" + SECRET_PARAMETER + "=" + validationRecord.getSecret();
MailFormatter mailFormatter = new MailFormatter();
- Map validationMap = MailTemplateFactory.createEmailValidationMap(validationRecord.getEmail(), validationURL, "Ogoglio", getSiteInfo().getBaseUrl());
- String body = mailFormatter.format(validationMap, MailTemplateFactory.getTemplate(MailTemplateFactory.EMAIL_VALIDATION_TEMPLATE));
+ Map validationMap = createEmailValidationMap(validationRecord.getEmail(), validationURL, "Ogoglio", getSiteInfo().getBaseUrl());
+ String body = mailFormatter.format(validationMap, getTemplate(EMAIL_VALIDATION_TEMPLATE));
MailClient mailClient = null;
if (getSiteInfo().getMailDirectory() == null) {
@@ -417,6 +418,23 @@
Log.info("Sent validation email to " + validationRecord.getEmail());
}
+ public static String getTemplate(String templateName) {
+ try {
+ return StreamUtils.readResource("mail/" + templateName);
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
+ public static Map createEmailValidationMap(String emailToValidate, String validationURL, String serviceName, String serviceURL) {
+ HashMap map = new HashMap();
+ map.put("emailToValidate", emailToValidate);
+ map.put("validationURL", validationURL);
+ map.put("serviceName", serviceName);
+ map.put("serviceURL", serviceURL);
+ return map;
+ }
+
private class EmailValidationResource extends AuthenticatedSiteResource {
public EmailValidationResource() {
super("validate", false, getSessionFactory());
Modified: maven/trunk/ogoglio-server/src/test/java/com/ogoglio/mail/test/MailTest.java
===================================================================
--- maven/trunk/ogoglio-server/src/test/java/com/ogoglio/mail/test/MailTest.java 2008-01-02 10:15:57 UTC (rev 663)
+++ maven/trunk/ogoglio-server/src/test/java/com/ogoglio/mail/test/MailTest.java 2008-01-02 22:06:59 UTC (rev 664)
@@ -11,7 +11,6 @@
import com.ogoglio.mail.MailClient;
import com.ogoglio.mail.MailFormatter;
import com.ogoglio.mail.MailSendException;
-import com.ogoglio.mail.MailTemplateFactory;
import com.ogoglio.util.ArgumentUtils;
import com.ogoglio.util.StreamUtils;
@@ -40,7 +39,7 @@
mailFormatter1 = new MailFormatter();
- testTemplate1 = MailTemplateFactory.getTemplate(MailTemplateFactory.TEST_TEMPLATE_1);
+ testTemplate1 = StreamUtils.readResource("mail/TestTemplate1.txt");
assertNotNull(testTemplate1);
testMap1 = new HashMap();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2008-01-02 10:15:52
|
Revision: 663
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=663&view=rev
Author: trevorolio
Date: 2008-01-02 02:15:57 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Use a proxy instead of a redirect on the account photo resource to make WinIE happy. *sigh*
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/defaultAccountPhoto.jpg
Removed Paths:
-------------
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/defaultAccountPhoto.gif
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-02 06:00:45 UTC (rev 662)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-01-02 10:15:57 UTC (rev 663)
@@ -95,7 +95,7 @@
public SiteResource createBaseResource(ServletConfig servletConfig) {
if (servletNeeded) {
- defaultAccountPhotoPath = getBaseUrl() + "defaultAccountPhoto.gif";
+ defaultAccountPhotoPath = getBaseUrl() + "defaultAccountPhoto.jpg";
return new AccountsResource();
} else {
Log.info("Turning off account servlet, this host doesn't want it.");
@@ -460,7 +460,7 @@
DecoratedInputStream data = getMediaService().getData(MediaService.getAccountPhotoName(accountRec.getUsername()));
if (data == null) {
- response.sendRedirect(defaultAccountPhotoPath);
+ proxy(URI.create(defaultAccountPhotoPath), "GET", request, response);
return;
}
response.setStatus(HttpServletResponse.SC_OK);
Deleted: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/defaultAccountPhoto.gif
===================================================================
(Binary files differ)
Added: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/defaultAccountPhoto.jpg
===================================================================
(Binary files differ)
Property changes on: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/defaultAccountPhoto.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|