[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Thu Apr 7 22:31:34 UTC 2005


kawas
Thu Apr  7 18:31:34 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util
In directory pub.open-bio.org:/tmp/cvs-serv5484/org/biomoby/registry/rdfagent/util

Modified Files:
	XMLBuilder.java Constants.java BadConfigException.java 
	Log.java 
Log Message:
renamed enum to _enum for eventual 1.5 compatibility

moby-live/Java/src/main/org/biomoby/registry/rdfagent/util XMLBuilder.java,1.1,1.2 Constants.java,1.2,1.3 BadConfigException.java,1.1,1.2 Log.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/XMLBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/XMLBuilder.java	2004/10/28 17:55:43	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/XMLBuilder.java	2005/04/07 22:31:34	1.2
@@ -13,11 +13,9 @@
  * Window>Preferences>Java>Code Generation>Code and Comments
  */
 
-import java.io.BufferedWriter;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.File;
-import org.biomoby.registry.rdfagent.verifier.*;
+import org.biomoby.registry.rdfagent.verifier.DataMngr;
+import org.biomoby.registry.rdfagent.verifier.Secondary;
+import org.biomoby.registry.rdfagent.verifier.ServSignature;
 
 public class XMLBuilder {	
 	
@@ -129,9 +127,9 @@
 			Report.doBuild("        <minimum_value>"+second.getMinimumValue()+"</minimum_value>");							   
 		}
   	    	
-        String enum = second.getEnumValue();
-          if (enum !=null) {     	        
-			String[] result = enum.split(",");
+        String _enum = second.getEnumValue();
+          if (_enum !=null) {     	        
+			String[] result = _enum.split(",");
 			for (int i=0; i<result.length; i++) {	
 			  Report.doBuild("        <enum_value>"+result[i]+"</enum_value>");
 			}

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Constants.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Constants.java	2004/11/05 00:49:20	1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Constants.java	2005/04/07 22:31:34	1.3
@@ -1,124 +1,123 @@
-
-package org.biomoby.registry.rdfagent.util;
-
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-
-import javax.swing.*;
-import java.io.File;
-import java.io.IOException;
-
-//import ca.icapture.moby.util.Log;
-
-/**
- * @author Nina Opushneva
- *
- *  The Constants is a  software component for processing RDFagent config file..
- *  
- */
-
-
-public class Constants {
-   
-
-//  * Name of the environment variable for application home director      
-    public final static String ENV_PROPERTY_NAME = "RDFagent.home";
-	   
-// * name of the MOBY RDF Agent General properties file       
-	public final static String CONFIG_FILE = "/RDFagent_config.xml";
-
-	public static String RDFagentHome;   
-
-    public static String MB_ADMIN_EMAIL = null;
-    public static String MB_SUBJECT = null;
-    public static String MB_ERR_MSG = null;
-    public static String MB_MAIL_SERVER = null;
-	public static String MB_MAIL_USER = null;
-	public static String MB_MAIL_PSWD = null;
-    public static String MB_FROM = null;
-    
-    public static String SP_SUBJECT = null;
-    public static String SP_ERR_MSG_CON = null;
-    
-    public static String DB_URL = null;
-    public static String DB_DRIVER_CLASS = null;
-    public static String DB_NAME = null;
-    public static String DB_USER = null;
-    public static String DB_PASSWD = null;
-    public static String DB_PORT = null;
-    
-    public static String SV_LOGFILE_PATH = null;
-	public static String SV_REPORT_PATH = null;
-	public static String SV_DELFILE_PATH = null;
-	public static String SV_SIGN_URL_PATH = null;
-    public static int SV_LOG_LEVEL = 1;
-               
-  static{   
-		try {
-		  final SAXBuilder builder = new SAXBuilder();
-		   RDFagentHome = System.getProperty(ENV_PROPERTY_NAME);
-		  
-	
-     	String str = RDFagentHome +	CONFIG_FILE;
-System.out.println("config_path = "+str);
-      
-       
-           File file = new File(str);
-            final Document doc = builder.build(file);
-            final Element root = doc.getRootElement();
-            final Element moby = root.getChild("moby");           
-            final Element sProvider = root.getChild("serviceProvider");
-
-            if (moby != null){
-                MB_ADMIN_EMAIL = moby.getChildTextTrim("adminEmail");
-                MB_SUBJECT = moby.getChildTextTrim("subject");
-				MB_ERR_MSG = moby.getChildTextTrim("errMessage");
-				MB_MAIL_SERVER = moby.getChildTextTrim("mailServer");
-				MB_MAIL_USER = moby.getChildTextTrim("mailUser");
-				MB_MAIL_PSWD = moby.getChildTextTrim("mailPswd"); 				
-				MB_FROM = moby.getChildTextTrim("from");
-            }
-
-         if (sProvider != null) {
-             SP_SUBJECT = sProvider.getChildTextTrim("subject");
-             SP_ERR_MSG_CON = sProvider.getChildTextTrim("errMesConnect");
-         } else {
-             Log.warning("The <serviceProvider> node is not defined in the config file. Sending messages to a service provider is impossible");
-         }
-
-         final Element sv = root.getChild("serviceValidator");
-			if (sv != null){
-			    final Element db = sv.getChild("db");
-                if (db != null){
-                  DB_URL = db.getChildTextTrim("url");
-				  DB_DRIVER_CLASS = db.getChildTextTrim("driver");
-				  DB_NAME = db.getChildTextTrim("name");
-                  DB_USER = db.getChildTextTrim("user");
-                  DB_PASSWD = db.getChildTextTrim("passwd");
-				  DB_PORT = db.getChildTextTrim("port");
-                }
-                SV_LOGFILE_PATH = sv.getChildTextTrim("logFilePath");
-				SV_REPORT_PATH = sv.getChildTextTrim("reportFilePath");
-				SV_DELFILE_PATH = sv.getChildTextTrim("deletedFilePath");
-				SV_SIGN_URL_PATH = sv.getChildTextTrim("signURLFilePath");
-				SV_LOG_LEVEL = Integer.parseInt(sv.getChildTextTrim("logLevel"));
-			}else{
-                Log.warning("The <serviceValidator> node is not defined in the config file. Writing recordes into log/report files is impossible");
-            }
-            
-     } 
-     catch (JDOMException e) {
-		Log.severe(e.getMessage());
-     } 
-     catch (IOException e) {
-		Log.severe(e.getMessage());
-     } 
-      
-    
-  }    
- }
-
-
-
+
+package org.biomoby.registry.rdfagent.util;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+
+//import ca.icapture.moby.util.Log;
+
+/**
+ * @author Nina Opushneva
+ *
+ *  The Constants is a  software component for processing RDFagent config file..
+ *  
+ */
+
+
+public class Constants {
+   
+
+//  * Name of the environment variable for application home director      
+    public final static String ENV_PROPERTY_NAME = "RDFagent.home";
+	   
+// * name of the MOBY RDF Agent General properties file       
+	public final static String CONFIG_FILE = "/RDFagent_config.xml";
+
+	public static String RDFagentHome;   
+
+    public static String MB_ADMIN_EMAIL = null;
+    public static String MB_SUBJECT = null;
+    public static String MB_ERR_MSG = null;
+    public static String MB_MAIL_SERVER = null;
+	public static String MB_MAIL_USER = null;
+	public static String MB_MAIL_PSWD = null;
+    public static String MB_FROM = null;
+    
+    public static String SP_SUBJECT = null;
+    public static String SP_ERR_MSG_CON = null;
+    
+    public static String DB_URL = null;
+    public static String DB_DRIVER_CLASS = null;
+    public static String DB_NAME = null;
+    public static String DB_USER = null;
+    public static String DB_PASSWD = null;
+    public static String DB_PORT = null;
+    
+    public static String SV_LOGFILE_PATH = null;
+	public static String SV_REPORT_PATH = null;
+	public static String SV_DELFILE_PATH = null;
+	public static String SV_SIGN_URL_PATH = null;
+    public static int SV_LOG_LEVEL = 1;
+               
+  static{   
+		try {
+		  final SAXBuilder builder = new SAXBuilder();
+		   RDFagentHome = System.getProperty(ENV_PROPERTY_NAME);
+		  
+	
+     	String str = RDFagentHome +	CONFIG_FILE;
+System.out.println("config_path = "+str);
+      
+       
+           File file = new File(str);
+            final Document doc = builder.build(file);
+            final Element root = doc.getRootElement();
+            final Element moby = root.getChild("moby");           
+            final Element sProvider = root.getChild("serviceProvider");
+
+            if (moby != null){
+                MB_ADMIN_EMAIL = moby.getChildTextTrim("adminEmail");
+                MB_SUBJECT = moby.getChildTextTrim("subject");
+				MB_ERR_MSG = moby.getChildTextTrim("errMessage");
+				MB_MAIL_SERVER = moby.getChildTextTrim("mailServer");
+				MB_MAIL_USER = moby.getChildTextTrim("mailUser");
+				MB_MAIL_PSWD = moby.getChildTextTrim("mailPswd"); 				
+				MB_FROM = moby.getChildTextTrim("from");
+            }
+
+         if (sProvider != null) {
+             SP_SUBJECT = sProvider.getChildTextTrim("subject");
+             SP_ERR_MSG_CON = sProvider.getChildTextTrim("errMesConnect");
+         } else {
+             Log.warning("The <serviceProvider> node is not defined in the config file. Sending messages to a service provider is impossible");
+         }
+
+         final Element sv = root.getChild("serviceValidator");
+			if (sv != null){
+			    final Element db = sv.getChild("db");
+                if (db != null){
+                  DB_URL = db.getChildTextTrim("url");
+				  DB_DRIVER_CLASS = db.getChildTextTrim("driver");
+				  DB_NAME = db.getChildTextTrim("name");
+                  DB_USER = db.getChildTextTrim("user");
+                  DB_PASSWD = db.getChildTextTrim("passwd");
+				  DB_PORT = db.getChildTextTrim("port");
+                }
+                SV_LOGFILE_PATH = sv.getChildTextTrim("logFilePath");
+				SV_REPORT_PATH = sv.getChildTextTrim("reportFilePath");
+				SV_DELFILE_PATH = sv.getChildTextTrim("deletedFilePath");
+				SV_SIGN_URL_PATH = sv.getChildTextTrim("signURLFilePath");
+				SV_LOG_LEVEL = Integer.parseInt(sv.getChildTextTrim("logLevel"));
+			}else{
+                Log.warning("The <serviceValidator> node is not defined in the config file. Writing recordes into log/report files is impossible");
+            }
+            
+     } 
+     catch (JDOMException e) {
+		Log.severe(e.getMessage());
+     } 
+     catch (IOException e) {
+		Log.severe(e.getMessage());
+     } 
+      
+    
+  }    
+ }
+
+
+

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/BadConfigException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/BadConfigException.java	2004/10/28 17:55:43	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/BadConfigException.java	2005/04/07 22:31:34	1.2
@@ -1,11 +1,16 @@
-/*
- *
- */
-package org.biomoby.registry.rdfagent.util;
-
-public class BadConfigException extends Exception{
-
-    public BadConfigException(String message) {
-        super(message);
-    }
-}
+/*
+ *
+ */
+package org.biomoby.registry.rdfagent.util;
+
+public class BadConfigException extends Exception{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    public BadConfigException(String message) {
+        super(message);
+    }
+}

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java	2004/10/28 17:55:43	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java	2005/04/07 22:31:34	1.2
@@ -1,47 +1,47 @@
-
-
-package org.biomoby.registry.rdfagent.util;
-
-import java.util.logging.*;
-import java.util.Date;
-import java.util.Calendar;
-import java.io.*;  
-
-public class Log {
-	
-	static Logger  logger;
-	
-	
-	public static void start() {		
-				
-         logger = Logger.getLogger("org.biomoby.registry.rdfagent");
-         	try {
-    	  String logFile = Constants.RDFagentHome+Constants.SV_LOGFILE_PATH;	 
-          FileHandler fh = new FileHandler(logFile);
-			fh.setFormatter(new SimpleFormatter());			   
-				logger.addHandler(fh);
-				} catch (IOException e) {
-				}
-        info("************ START MOBY RDFAgent LOG ***********");
-	 }
-
-    public static void warning(String msg){
-
-		logger.warning(msg);
-    }
-     
-    public static void info(String msg){
-    
-		logger.info(msg);
-    }
-
-    public static void severe(String msg){
-    
-		logger.severe(msg);
-    }
-    
-	public static void stop() {
-
-          info("************ STOP MOBY RDFAgent LOG **********");
-		}
-}
+
+
+package org.biomoby.registry.rdfagent.util;
+
+import java.io.IOException;
+import java.util.logging.FileHandler;
+import java.util.logging.Logger;
+import java.util.logging.SimpleFormatter;
+
+public class Log {
+	
+	static Logger  logger;
+	
+	
+	public static void start() {		
+				
+         logger = Logger.getLogger("org.biomoby.registry.rdfagent");
+         	try {
+    	  String logFile = Constants.RDFagentHome+Constants.SV_LOGFILE_PATH;	 
+          FileHandler fh = new FileHandler(logFile);
+			fh.setFormatter(new SimpleFormatter());			   
+				logger.addHandler(fh);
+				} catch (IOException e) {
+				}
+        info("************ START MOBY RDFAgent LOG ***********");
+	 }
+
+    public static void warning(String msg){
+
+		logger.warning(msg);
+    }
+     
+    public static void info(String msg){
+    
+		logger.info(msg);
+    }
+
+    public static void severe(String msg){
+    
+		logger.severe(msg);
+    }
+    
+	public static void stop() {
+
+          info("************ STOP MOBY RDFAgent LOG **********");
+		}
+}




More information about the MOBY-guts mailing list