Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31645/src/net/sourceforge/bprocessor/model
Modified Files:
Project.java
Log Message:
Index: Project.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v
retrieving revision 1.191
retrieving revision 1.192
diff -C2 -d -r1.191 -r1.192
*** Project.java 18 May 2010 13:38:07 -0000 1.191
--- Project.java 18 May 2010 14:32:37 -0000 1.192
***************
*** 11,15 ****
import java.io.ByteArrayOutputStream;
import java.io.File;
- import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
--- 11,14 ----
***************
*** 85,90 ****
public static final boolean SENSE = false;
- private static final boolean DBK_FILE = false;
-
/** */
public static final boolean BRUN = false;
--- 84,87 ----
***************
*** 448,466 ****
instance = new Project();
try {
! InputStream input = null;
! File file = new File("Classification.xml");
! if (file.exists() && DBK_FILE) {
! input = new FileInputStream(file);
! } else {
!
! ClassLoader cl = Thread.currentThread().getContextClassLoader();
! URL url = cl.getResource("Classification.xml");
! input = url.openStream();
! if (input != null) {
! System.out.println("found classification file");
! }
}
Object[] loaded = Persistence.loadDBK(input);
constructionClas = (Classification)loaded[0];
--- 445,460 ----
instance = new Project();
try {
! String name = "/Classification.xml";
! URL url = Project.class.getResource(name);
! if (url != null) {
! System.out.println("url: " + url);
}
+ InputStream input = url.openStream();
+ if (input != null) {
+ System.out.println("found classification file");
+ }
+
Object[] loaded = Persistence.loadDBK(input);
constructionClas = (Classification)loaded[0];
|