Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pennsylvania BANNER Users Group 2006 Staff Directory on the Web.

Similar presentations


Presentation on theme: "Pennsylvania BANNER Users Group 2006 Staff Directory on the Web."— Presentation transcript:

1 Pennsylvania BANNER Users Group 2006 Staff Directory on the Web

2 General Announcements: Please turn off all cell phones/pagers If you must leave the session early, please do so as discreetly as possible Please avoid side conversations during the session Questions will be answered at the end of the session Thank you for your cooperation

3 Contact Informatin Calvin Deiterich Harrisburg Area Community College (717)

4 Primary Goal To provide a comprehensive staff directory with photographs.

5 Issues What data to display? Storage vs. Speed What language to use? What framework to use?

6 Accomplished So Far Created a view to supply the data elements Use of Oracle Intermedia 10g Opted for speed Language – Java Framework – Struts

7 What Happened Had base code written in Banner6/Oracle 9 Tried to import images in Oracle 10 – errors Oracle 10 does not seem to handle BLOBs Needed to migrate everything to Ordimage

8 Data Supplied via View Column NameIDData TypeNull STAFF_PIDM1NUMBER (8)N STAFF_ID2VARCHAR2 (9 Byte)Y STAFF_NAME_LFMI3VARCHAR2 (120 Byte)Y STAFF_NAME_FMIL4VARCHAR2 (120 Byte)Y ROOM5VARCHAR2 (30 Byte)Y CAMPUS6VARCHAR2 (20 Byte)Y PHONE_NUMB7VARCHAR2 (8 Byte)Y PHONE_EXT8VARCHAR2 (4 Byte)Y ECLS_CODE9VARCHAR2 (2 Byte)Y DIVISION10VARCHAR2 (30 Byte)Y DICD_CODE11VARCHAR2 (3 Byte)Y TITLE12VARCHAR2 (30 Byte)Y PREF_ 13VARCHAR2 (90 Byte)Y HACC_ 14VARCHAR2 (90 Byte)Y

9 Image_Xfr_Table Column NameIDPkNull?Data Type ID11NVARCHAR2 (20 Byte) IMG2YORDIMAGE PIDM4YNUMBER

10 GZTPOTO Table Column NameIDPkNull?Data Type GZTPOTO_PIDM11NNUMBER GZTPOTO_IMAGE2YORDIMAGE GZTPOTO_ACTIVITY_DATE3NDATE GZTPOTO_USER4NVARCHAR2 GZTPOTO_THUMB5YORDIMAGE GZTPOTO_STATUS6YVARCHAR2

11 Processing Steps Copy images to UNIX directory Java code to read the file names into a table Procedure to load images & set image properties Procedure to resize images & store – fixedscale= – fixedscale= Cleanup

12 The Java Code CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HACCINST1."DirList AS import java.io.*; import java.sql.*; public class DirList { public static void getList(String directory) throws SQLException { File path = new File( directory ); String[] list = path.list(); String element; for(int i = 0; i < list.length; i++) { element = list[i]; #sql { INSERT INTO DIR_LIST (FILENAME) VALUES (:element) }; }

13 Loading the images INSERT INTO IMAGE_XFR_TABLE VALUES( image_id, ORDSYS.ORDIMAGE.init('FILE','IMAGEDIR',filename), NULL); SELECT img INTO myImage FROM IMAGE_XFR_TABL WHERE ID = image_id FOR UPDATE; --- we import the image into the table using a buffer (ctx). myImage.import(ctx); --- we do a setproperties on the object which sets the --- attributes of the object such as mimetype from the metadata in --- the image file. myImage.setproperties(); UPDATE IMAGE_XFR_TABLE SET img=myImage WHERE ID=image_id;

14 The Move Code PROCEDURE move_photo(pidm in number, initialImage in ORDSYS.ORDImage) IS myNewImage ORDSYS.ORDImage; myThumbnail ORDSYS.ORDImage; tempImage ORDSYS.ORDImage; BEGIN INSERT INTO gztpoto(gztpoto_pidm,gztpoto_image,gztpoto_activity_date, gztpoto_user, gztpoto_thumb, gztpoto_status) VALUES(pidm, ORDSYS.ORDIMAGE.init(), trunc(sysdate), USER, ORDSYS.ORDIMAGE.init(),NULL); SELECT gztpoto_image, gztpoto_thumb INTO myNewImage, myThumbnail from gztpoto WHERE gztpoto_pidm = pidm FOR UPDATE; tempImage := initialImage; tempImage.processcopy('fileFormat=JFIF fixedscale= ', myNewImage); tempImage.processcopy('fileFormat=JFIF fixedscale= ', myThumbnail); UPDATE gztpoto SET gztpoto_image = myNewImage, gztpoto_thumb = myThumbnail WHERE gztpoto_pidm = pidm;

15 Needs to be done. Figure out how to display the images Finalize new code Migrate JSPs to Struts Migrate Guard-Card database to Oracle – Create triggers to move information – Create Scripts to copy & resize photos Archiving images(5 year plan)

16 Pennsylvania BANNER Users Group 2006 Questions?

17 Pennsylvania BANNER Users Group 2006 Have a great day!


Download ppt "Pennsylvania BANNER Users Group 2006 Staff Directory on the Web."

Similar presentations


Ads by Google