From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 16:51:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCnf009588@pub.open-bio.org> gss Tue Nov 1 11:28:11 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/tools Modified Files: InvocationBroker.java KeywordFinder.java KeywordList.java URIInvestigator.java KeywordQuery.java DiscoveryQuery.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.5,1.6 KeywordFinder.java,1.6,1.7 KeywordList.java,1.3,1.4 URIInvestigator.java,1.6,1.7 KeywordQuery.java,1.6,1.7 DiscoveryQuery.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/10/09 01:11:21 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/01 16:28:11 1.6 @@ -9,8 +9,6 @@ import org.semanticmoby.http.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.vocabulary.MOBY; import java.io.*; @@ -23,7 +21,7 @@ /** * This class is used to invoke and display the results of Semantic - * MOBY services. + * MOBY resources. */ public class InvocationBroker { @@ -54,49 +52,49 @@ this.response = response; } - private String rdfxmlString(MOBYService service) { + private String rdfxmlString(MOBYResource resource) { StringWriter writer = new StringWriter(); - service.getJenaModel().write(writer); + resource.getJenaModel().write(writer); return writer.toString(); } - private String n3String(MOBYService service) { + private String n3String(MOBYResource resource) { StringWriter writer = new StringWriter(); - service.getJenaModel().write(writer, "N3"); + resource.getJenaModel().write(writer, "N3"); return writer.toString(); } /** - * Handle a request to invoke a service at a given URI. - * If the service requires inputs, and the service has + * Handle a request to invoke a resource at a given URI. + * If the resource requires inputs, and the resource has * a valid inputURI property, redirect to the URI that is - * the value of the property. If the service requires input + * the value of the property. If the resource requires input * and has no inputURI property, then build a simple input * GUI from scratch. *

- * If the service doesn't require any inputs, then do an HTTP - * POST to the service URI, passing the graph as a parameter. + * If the resource doesn't require any inputs, then do an HTTP + * POST to the resource URI, passing the graph as a parameter. */ - public void invokeURI(String serviceURI) { + public void invokeURI(String resourceURI) { - // Try to retrieve and parse a service graph from the URI; + // Try to retrieve and parse a resource graph from the URI; // on failure, print a message and return. // - MOBYService service = null; + MOBYResource resource = null; try { Model model = ModelFactory.createDefaultModel(); - model.read(serviceURI); + model.read(resourceURI); Parser parser = new Parser(model); - service = parser.parseService(); + resource = parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); @@ -104,18 +102,18 @@ return; } - if (requiresInputs(service)) { + if (requiresInputs(resource)) { - // Since the service requires input, either redirect to its + // Since the resource requires input, either redirect to its // inputURI (if it has one) or build a simple GUI for it. // try { - String inputURI = getInputURI(service); + String inputURI = getInputURI(resource); if (inputURI == null) { - buildInputGUI(service); + buildInputGUI(resource); } else { // Do an HTTP HEAD request to find out if the @@ -131,24 +129,24 @@ response.sendRedirect(inputURI); } else { - buildInputGUI(service); + buildInputGUI(resource); } } } catch (Throwable t) { t.printStackTrace(); - buildInputGUI(service); + buildInputGUI(resource); } } else // No input required { try { - // Invoke the service + // Invoke the resource // - HTTPRequest rqst = HTTPRequest.newPostRequest(service.getURI()); + HTTPRequest rqst = HTTPRequest.newPostRequest(resource.getURI()); rqst.addParameter(MOBY.GRAPH_PARAMETER_NAME, - rdfxmlString(service)); + rdfxmlString(resource)); HTTPResponse resp = rqst.send(); @@ -165,16 +163,16 @@ model.read(resp.getBodyAsStream(), ""); Parser parser = new Parser(model); - MOBYService resultsService = parser.parseService(); + MOBYResource resultsResource = parser.parseResource(); - String outputURI = getOutputURI(resultsService); + String outputURI = getOutputURI(resultsResource); if (outputURI == null) { // No output URI was specified, so build a generic // display of the results // - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } else { // There is an output URI. Conceptually, what we want @@ -193,7 +191,7 @@ // rqst = HTTPRequest.newPostRequest(outputURI); - String graphString = rdfxmlString(resultsService); + String graphString = rdfxmlString(resultsResource); rqst.addParameter(MOBY.GRAPH_PARAMETER_NAME, graphString); resp = rqst.send(); @@ -210,12 +208,12 @@ // The output URI returned a status other than // 200 OK, so fall back to a default output GUI // - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } } catch (Throwable t) { t.printStackTrace(); - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } } } else { @@ -252,13 +250,13 @@ } - private String getInputURI(MOBYService service) { + private String getInputURI(MOBYResource resource) { try { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Statement stmt = - model.getProperty(service.getResource(), MOBY.inputURI); + model.getProperty(resource.getResource(), MOBY.inputURI); if (stmt != null) { @@ -276,13 +274,13 @@ } - private String getOutputURI(MOBYService service) { + private String getOutputURI(MOBYResource resource) { try { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Statement stmt = - model.getProperty(service.getResource(), MOBY.outputURI); + model.getProperty(resource.getResource(), MOBY.outputURI); return stmt.getString(); } catch (Throwable t) { @@ -294,30 +292,30 @@ } - public void buildInputGUI(MOBYService service) { + public void buildInputGUI(MOBYResource resource) { // error message } - public void buildOutputGUI(MOBYService service) + public void buildOutputGUI(MOBYResource resource) throws IOException, ServletException { HttpSession session = request.getSession(true); session.setAttribute("n3Graph", - n3String(service).replaceAll("<", "<") + n3String(resource).replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """)); session.setAttribute("rdfxmlGraph", - rdfxmlString(service).replaceAll("<", "<") + rdfxmlString(resource).replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """)); redirectToPage("/jsp/display.jsp"); } - private boolean requiresInputs(MOBYService service) { + private boolean requiresInputs(MOBYResource resource) { - return getInputURI(service) != null; + return getInputURI(resource) != null; } } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/01 16:28:11 1.7 @@ -6,8 +6,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.vocabulary.MOBY; import java.util.*; @@ -16,15 +14,15 @@ public class KeywordFinder { /** - * The MOBY service for which to find keywords + * The MOBY resource for which to find keywords */ - private MOBYService service; + private MOBYResource resource; /** - * The underlying Jena model on which the MOBY service + * The underlying Jena model on which the MOBY resource * is based */ - private Model serviceModel; + private Model resourceModel; /** * A keyword list object to hold the keywords that are @@ -33,17 +31,17 @@ private KeywordList keywords = null; /** - * Construct an instance for the given service and model + * Construct an instance for the given resource and model */ - public KeywordFinder(MOBYService service) { + public KeywordFinder(MOBYResource resource) { - this.service = service; - this.serviceModel = service.getJenaModel(); + this.resource = resource; + this.resourceModel = resource.getJenaModel(); } /** * Retrieve, if necessary, and return the keywords associated - * with the service. + * with the resource. */ public KeywordList getKeywords() throws Exception { @@ -58,20 +56,20 @@ /** - * Collect keywords for the service + * Collect keywords for the resource */ - private void collectKeywords() { // Add keywords from classes that the service is asserted to + private void collectKeywords() { // Add keywords from classes that the resource is asserted to - // be an instance of (i.e. service rdf:type ) + // be an instance of (i.e. resource rdf:type ) // - Resource res = service.getResource(); + Resource res = resource.getResource(); - keywords.addServiceKeywords(getKeywordsFor(res)); + keywords.addResourceKeywords(getKeywordsFor(res)); // Add keywords from subjects and objects of each // operatesOn subgraph // - for (Iterator it = service.getOperatesOn(); it.hasNext();) { + for (Iterator it = resource.getOperatesOn(); it.hasNext();) { MOBYGraphNode node = (MOBYGraphNode) it.next(); @@ -176,7 +174,7 @@ // Iterate over the resource's rdf:type properties // StmtIterator it = - serviceModel.listStatements(res, RDF.type, (RDFNode) null); + resourceModel.listStatements(res, RDF.type, (RDFNode) null); while (it.hasNext()) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/10/09 01:11:21 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/01 16:28:11 1.4 @@ -7,25 +7,25 @@ public class KeywordList { - private Set serviceKeywords = new HashSet(); + private Set resourceKeywords = new HashSet(); private Set subjectKeywords = new HashSet(); private Set objectKeywords = new HashSet(); - public void addServiceKeyword(String keyword) { + public void addResourceKeyword(String keyword) { - serviceKeywords.add(keyword); + resourceKeywords.add(keyword); } - public void addServiceKeywords(List keywords) { + public void addResourceKeywords(List keywords) { - serviceKeywords.addAll(keywords); + resourceKeywords.addAll(keywords); } - public Iterator getServiceKeywords() { + public Iterator getResourceKeywords() { - return serviceKeywords.iterator(); + return resourceKeywords.iterator(); } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/01 16:28:11 1.7 @@ -9,8 +9,6 @@ import org.semanticmoby.http.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.*; @@ -46,15 +44,15 @@ * The URL that is to be investigated for possible inclusion in the * metadata repository. */ - private String serviceURL; + private String resourceURL; /** * Create an instance for investingating the given resource URL * @param resourceURL the URL to investigate */ - private URIInvestigator(String serviceURL) { + private URIInvestigator(String resourceURL) { - this.serviceURL = serviceURL; + this.resourceURL = resourceURL; } /** @@ -64,19 +62,19 @@ * investigated, then this call is a NO-OP. * @param resourceURL the URL to investigate */ - public synchronized static void investigate(String serviceURL) { + public synchronized static void investigate(String resourceURL) { synchronized (instances) { - if (instances.get(serviceURL) != null) { + if (instances.get(resourceURL) != null) { - syncLog.warn("Already investigating " + serviceURL); + syncLog.warn("Already investigating " + resourceURL); return; } - URIInvestigator investigator = new URIInvestigator(serviceURL); - instances.put(serviceURL, investigator); + URIInvestigator investigator = new URIInvestigator(resourceURL); + instances.put(resourceURL, investigator); investigator.start(); } } @@ -121,7 +119,7 @@ // synchronized (instances) { - instances.remove(serviceURL); + instances.remove(resourceURL); } } } @@ -152,13 +150,13 @@ try { - lastModifiedDate = manager.getLastModifiedDate(serviceURL); + lastModifiedDate = manager.getLastModifiedDate(resourceURL); alreadyRegistered = (lastModifiedDate != null); } catch (StorageException e) { e.printStackTrace(); syncLog.error("Couldn't check for last modified date of resource URL " + - serviceURL, e); + resourceURL, e); e.printStackTrace(); return; @@ -166,7 +164,7 @@ // Helper class for making the HTTP GET call // - HTTPRequest request = HTTPRequest.newGetRequest(serviceURL); + HTTPRequest request = HTTPRequest.newGetRequest(resourceURL); // If there was a last modified date, then request that the graph only // be sent if it has been modified since that date @@ -190,7 +188,7 @@ } catch (HTTPException e) { e.printStackTrace(); - syncLog.warn("Couldn't reach suggested resource " + serviceURL); + syncLog.warn("Couldn't reach suggested resource " + resourceURL); return; } @@ -202,7 +200,7 @@ // The resource has not been modified since it was // registered, so there is nothing to do but log a message. // - syncLog.info("IN-SYNC : " + serviceURL); + syncLog.info("IN-SYNC : " + resourceURL); break; @@ -214,10 +212,10 @@ if (alreadyRegistered) { deregisterResource(manager, true); - syncLog.info("ALREADY REGISTERED : " + serviceURL); + syncLog.info("ALREADY REGISTERED : " + resourceURL); } else { - syncLog.info("IGNORED : " + serviceURL + " doesn't exist"); + syncLog.info("IGNORED : " + resourceURL + " doesn't exist"); } break; @@ -245,7 +243,7 @@ // e.printStackTrace(); syncLog.warn("Unable to get Last-Modified date for " + - serviceURL + "; using current date"); + resourceURL + "; using current date"); lastModifiedDate = new Date(); } catch (Throwable t) { @@ -254,7 +252,7 @@ // t.printStackTrace(); syncLog.warn("Unparsable Last-Modified date " + "(\"" + - dateString + "\") for " + serviceURL + + dateString + "\") for " + resourceURL + "; ignoring"); } @@ -270,48 +268,48 @@ } catch (HTTPException e) { e.printStackTrace(); - syncLog.error("Couldn't retrieve graph from " + serviceURL); + syncLog.error("Couldn't retrieve graph from " + resourceURL); return; } - MOBYService service = null; + MOBYResource resource = null; try { Parser parser = Parser.forInputStream(in, Parser.LANGUAGE_RDF_XML); - service = parser.parseService(); + resource = parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); System.err.println("Parse error: " + t); } - if (service == null) { + if (resource == null) { // De-register the resource, printing a removal message if - // a service couldn't be parsed - deregisterResource(manager, service == null); - syncLog.error("Couldn't parse a resource from graph at " + serviceURL); + // a resource couldn't be parsed + deregisterResource(manager, resource == null); + syncLog.error("Couldn't parse a resource from graph at " + resourceURL); - // If a service was parsed, then register it + // If a resource was parsed, then register it } else { try { - manager.registerResource(service, lastModifiedDate); + manager.registerResource(resource, lastModifiedDate); // Log a message about successfully registering the graph: // syncLog.info(( alreadyRegistered ? "UPDATED : " : "ADDED : " - ) + serviceURL); + ) + resourceURL); } catch (Exception e) { e.printStackTrace(); - syncLog.error("Error storing graph for " + serviceURL, e); + syncLog.error("Error storing graph for " + resourceURL, e); } } @@ -322,7 +320,7 @@ // Log a message about the failed attempt to contact the URL // syncLog.error("Status " + status + " received while trying " + - "to contact resource " + serviceURL); + "to contact resource " + resourceURL); break; } @@ -333,16 +331,16 @@ try { - manager.deregisterResource(serviceURL); + manager.deregisterResource(resourceURL); if (removing) { - syncLog.info("REMOVED : " + serviceURL); + syncLog.info("REMOVED : " + resourceURL); } } catch (StorageException e) { e.printStackTrace(); - syncLog.error("Unable to de-register resource " + serviceURL, e); + syncLog.error("Unable to de-register resource " + resourceURL, e); } } } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java 2005/11/01 16:28:11 1.7 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.Util; @@ -50,7 +48,7 @@ while (rs.next()) { String uri = rs.getString("resource_uri"); - MOBYService resource = serviceAt(uri, model); + MOBYResource resource = resourceAt(uri, model); if (resource != null) { @@ -75,7 +73,7 @@ } - private MOBYService serviceAt(String uri, Model model) { + private MOBYResource resourceAt(String uri, Model model) { Model resourceModel = ModelFactory.createDefaultModel(); Resource resource = resourceModel.createResource(uri); @@ -86,7 +84,7 @@ Parser parser = new Parser(resourceModel); - return parser.parseService(); + return parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/01 16:28:11 1.7 @@ -10,8 +10,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.Util; @@ -53,7 +51,7 @@ /** * The graph that serves as a template for resources that match. */ - private MOBYService queryResource; + private MOBYResource queryResource; /** * Flag indicating which statements should be returned: URI_ONLY, @@ -79,25 +77,25 @@ * @param statementsToReturn which statements should be returned: URI_ONLY, * QUERY_STMTS_ONLY, or ALL_STMTS (use the static constants on this class). */ - private DiscoveryQuery(MOBYService queryResource, int statementsToReturn) { + private DiscoveryQuery(MOBYResource queryResource, int statementsToReturn) { this.queryResource = queryResource; this.statementsToReturn = statementsToReturn; } - public static DiscoveryQuery newMinimalStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newMinimalStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, MINIMAL_STMTS); } - public static DiscoveryQuery newQueryStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newQueryStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, QUERY_STMTS); } - public static DiscoveryQuery newReachableStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newReachableStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, REACHABLE_STMTS); } @@ -114,7 +112,7 @@ } - public MOBYServiceSet findMatchingGraphs() { + public MOBYResourceSet findMatchingGraphs() { init(); @@ -123,7 +121,7 @@ try { Model queryModel = - ((MOBYService) queryResource).getJenaModel(); + ((MOBYResource) queryResource).getJenaModel(); String queryString = buildQueryString(queryModel); StorageManager manager = new StorageManager(); dbModel = manager.openDBModel(); @@ -142,14 +140,14 @@ results.close(); - MOBYServiceSet returnSet = new MOBYServiceSet(); + MOBYResourceSet returnSet = new MOBYResourceSet(); for (Iterator it = matching.iterator(); it.hasNext();) { Object next = it.next(); - MOBYService mp = + MOBYResource mp = buildGraphModel(dbModel, queryModel, (ResultBinding) next); - returnSet.addService(mp); + returnSet.addResource(mp); } return returnSet; @@ -273,7 +271,7 @@ * @param binding bindings for variables * @return */ - private MOBYService buildGraphModel(Model dbModel, Model queryModel, + private MOBYResource buildGraphModel(Model dbModel, Model queryModel, ResultBinding binding) throws NonCanonicalException { @@ -313,7 +311,7 @@ // Parser parser = new Parser(adjusted); - return parser.parseService(); + return parser.parseResource(); } @@ -361,7 +359,7 @@ try { Statement resourceTypeStmt = - original.listStatements(null, RDF.type, MOBY.Service) + original.listStatements(null, RDF.type, MOBY.Resource) .nextStatement(); minimal.add(resourceTypeStmt); @@ -433,7 +431,7 @@ try { Statement resourceTypeStmt = - original.listStatements(null, RDF.type, MOBY.Service) + original.listStatements(null, RDF.type, MOBY.Resource) .nextStatement(); Resource subject = resourceTypeStmt.getSubject(); Util.addReachableStmts(dbModel, reachable, subject, subject.getURI()); From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 16:51:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCc0009634@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java DBConnection.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.6,1.7 DBConnection.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/01 16:28:12 1.7 @@ -60,16 +60,16 @@ * are in the resource graph's namespace will be stored in the global repository, * and all statements from the resource graph are stored in a separate model * that has as its name the fully expanded URI of the resource. - * @param service the resource to store + * @param resource the resource to store * @param lastModifiedDate when the graph was last modified * @throws StorageException if unable to access the database */ - public void registerResource(MOBYService service, Date lastModifiedDate) + public void registerResource(MOBYResource resource, Date lastModifiedDate) throws StorageException { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Model dbModel = null; - String uriString = service.getResource().getURI(); + String uriString = resource.getResource().getURI(); Resource uri = model.createResource(uriString); try { @@ -119,8 +119,8 @@ // Add keywords associated with the resource // - KeywordFinder finder = new KeywordFinder(service); - addKeywords(service.getResource().getURI(), finder.getKeywords(), + KeywordFinder finder = new KeywordFinder(resource); + addKeywords(resource.getResource().getURI(), finder.getKeywords(), dbModel); // Commit the transaction on the database model @@ -154,7 +154,7 @@ java.sql.Statement sql = conn.createStatement(); - doAddKeywords(resourceURI, list.getServiceKeywords(), "P", sql); + doAddKeywords(resourceURI, list.getResourceKeywords(), "P", sql); doAddKeywords(resourceURI, list.getSubjectKeywords(), "S", sql); doAddKeywords(resourceURI, list.getObjectKeywords(), "O", sql); } catch (Throwable t) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/10/09 01:11:22 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/01 16:28:12 1.2 @@ -57,17 +57,11 @@ * for this application. */ public DBConnection() { - - this.propsFileName = propsFileName; - this.logFileName = logFileName; - try { - startLog(); loadDBProperties(); connect(); } catch (Exception e) { - System.err.println(); e.printStackTrace(); } From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 16:51:26 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCxZ009677@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/.settings In directory pub.open-bio.org:/tmp/cvs-serv9543/.settings Added Files: org.eclipse.jdt.core.prefs org.eclipse.jdt.ui.prefs Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/.settings org.eclipse.jdt.core.prefs,NONE,1.1 org.eclipse.jdt.ui.prefs,NONE,1.1 From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 16:51:28 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCDk009661@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets Modified Files: DiscoveryServlet.java KeywordSearchServlet.java ResultsDisplayServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets DiscoveryServlet.java,1.5,1.6 KeywordSearchServlet.java,1.7,1.8 ResultsDisplayServlet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/10/28 04:12:26 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/01 16:28:12 1.6 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.*; import org.semanticmoby.servlet.*; @@ -50,9 +48,9 @@ ParamReader.getParameter("query-graph", request); // Parse the query graph into a MOBYGraph object - Parser parser = + Parser parser = Parser.forString(graphString, Parser.LANGUAGE_RDF_XML); - MOBYService service = parser.parseService(); + MOBYResource resource = parser.parseResource(); // Find which statements the user wishes to have returned String statements = @@ -66,17 +64,14 @@ DiscoveryQuery q = null; if (statements.equalsIgnoreCase("minimal")) { - - q = DiscoveryQuery.newMinimalStmtsQuery(service); + q = DiscoveryQuery.newMinimalStmtsQuery(resource); } else if (statements.equalsIgnoreCase("query")) { - - q = DiscoveryQuery.newQueryStmtsQuery(service); + q = DiscoveryQuery.newQueryStmtsQuery(resource); } else { - - q = DiscoveryQuery.newReachableStmtsQuery(service); + q = DiscoveryQuery.newReachableStmtsQuery(resource); } - MOBYServiceSet matching = q.findMatchingGraphs(); + MOBYResourceSet matching = q.findMatchingGraphs(); if ((matching == null) || (matching.size() == 0)) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/10/28 04:12:26 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/01 16:28:12 1.8 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.tools.*; import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.ref.tools.db.DBConnection; @@ -87,7 +85,7 @@ String uri = result.getString(1); row.add(uri); - MOBYService resource = resourceAt(uri, model); + MOBYResource resource = resourceAt(uri, model); String name = resource.getName(); row.add(name); @@ -194,7 +192,7 @@ } - private MOBYService resourceAt(String uri, Model model) { + private MOBYResource resourceAt(String uri, Model model) { Model resourceModel = ModelFactory.createDefaultModel(); Resource resource = resourceModel.createResource(uri); @@ -205,7 +203,7 @@ Parser parser = new Parser(resourceModel); - return parser.parseService(); + return parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java 2005/11/01 16:28:12 1.5 @@ -1,8 +1,7 @@ package org.semanticmoby.ref.servlets; -import org.semanticmoby.graph.MOBYService; - -import org.semanticmoby.parser.Parser; +import org.semanticmoby.graph.MOBYResource; +import org.semanticmoby.graph.Parser; import org.semanticmoby.ref.tools.*; @@ -26,15 +25,15 @@ // Read the invocation graph from the MOBY.GRAPH_PARAMETER_NAME // parameter and parse it into a MOBYGraph object // - String graphString = + String graphString = ParamReader.getParameter(MOBY.GRAPH_PARAMETER_NAME, request); - Parser parser = + Parser parser = Parser.forString(graphString, Parser.LANGUAGE_RDF_XML); - MOBYService service = parser.parseService(); + MOBYResource resource = parser.parseResource(); InvocationBroker broker = new InvocationBroker(this, request, response); - broker.buildOutputGUI(service); + broker.buildOutputGUI(resource); } catch (Throwable t) { t.printStackTrace(); From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 16:51:29 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCaU009699@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets/example Modified Files: HelloWorldServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example HelloWorldServlet.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/10/28 04:12:27 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/01 16:28:12 1.6 @@ -32,11 +32,11 @@ } - protected void handleRequest(MOBYService service) { + protected void handleRequest(MOBYResource resource) { try { - MOBYGraph graph = (MOBYGraph) service.getOperatesOn().next(); + MOBYGraph graph = (MOBYGraph) resource.getOperatesOn().next(); MOBYSubject subject = (MOBYSubject) graph.getHasMapping(); From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 16:51:32 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCGF009610@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets/dev Modified Files: MOBYGraphValidationServlet.java ResourceListServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev MOBYGraphValidationServlet.java,1.4,1.5 ResourceListServlet.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java 2005/11/01 16:28:12 1.5 @@ -4,9 +4,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.NonCanonicalException; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.servlets.BaseServlet; import org.semanticmoby.servlet.*; @@ -35,7 +32,7 @@ baseModel.read(reader, null); Parser parser = new Parser(baseModel); - parser.parseService(); + parser.parseResource(); out.println("Model is canonical"); } catch (ParameterException e) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/10/28 04:12:26 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/01 16:28:12 1.2 @@ -29,7 +29,7 @@ Model dbModel = manager.openDBModel(); int count = 0; StmtIterator it = - dbModel.listStatements(null, RDF.type, MOBY.Service); + dbModel.listStatements(null, RDF.type, MOBY.Resource); while (it.hasNext()) { From gss at pub.open-bio.org Tue Nov 1 19:29:07 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue Nov 1 19:26:59 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020029.jA20T7iY011446@pub.open-bio.org> gss Tue Nov 1 19:29:07 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv11421/src/org/semanticmoby/graph Modified Files: Parser.java Log Message: (adf) Added comments about things we might want to resolve later s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/10/31 17:23:27 1.1 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2 @@ -268,6 +268,8 @@ // Since the resource is a MOBY Graph, it should have exactly one // hasMapping property that leads to its mapping subgraph. // + // TODO: adf wonders if the constraint that there is exactly one + // hasMapping property is necessary Statement hasMappingStmt = model.listStatements(res, MOBY.hasMapping, (RDFNode) null).nextStatement(); @@ -275,7 +277,7 @@ return new MOBYGraph(model, typeStmt, hasMappingStmt, parseHasMapping(hasMappingObject)); - } else { + } else if (isDataStructure(res)) { // Throw an exception if it is also a graph // if (isGraph(res)) { @@ -304,6 +306,10 @@ // of the collection depends on the type of the passed resource // return collectionFor(res, subgraphs); + } else { + throw new NonCanonicalException( + "A resource was found to be neither a Graph " + + "nor Data Structure", model); } } From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 2 01:36:59 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6u2012212@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv12193/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.45,1.46 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/10/27 04:15:23 1.45 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/02 06:39:05 1.46 @@ -1,3 +1,9 @@ +2005-11-02 Martin Senger + + * Changed method equals() in MobyService. + + * Add Comparator interface/implementation to MobyService. + 2005-10-26 Martin Senger * Add Comparator interface/implementtaion to MobyServiceType. From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 2 01:37:04 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d66H012252@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java DataTypesTree.java NamespacesTree.java RegistryModel.java RegistryPanel.java ServiceTypesTree.java Added Files: ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard ServicesBoard.java,NONE,1.1 ServicesTree.java,NONE,1.1 CommonTree.java,1.9,1.10 DataTypesTree.java,1.6,1.7 NamespacesTree.java,1.1,1.2 RegistryModel.java,1.11,1.12 RegistryPanel.java,1.15,1.16 ServiceTypesTree.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/10/28 11:30:37 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/02 06:39:06 1.10 @@ -55,14 +55,23 @@ protected final static String AC_EXPAND = "ac-expand"; protected final static String AC_COLLAPSE = "ac-collapse"; protected final static String AC_RELOAD = "ac-reload"; + protected final static String AC_NSORT = "ac-nsort"; + protected final static String AC_ASORT = "ac-asort"; // some shared constants - final static protected int SORTED_BY_NAME = 0; - final static protected int SORTED_BY_AUTHORITY = 1; + final static protected int SORTED_BY_NAME = 0; + final static protected int SORTED_BY_AUTHORITY = 1; + final static protected int SORTED_UNUSUAL = 9; + // all higher numbers indicates an unusual sorting order that we + // will not keep in case of reloading + final static protected int SORTED_BY_SERVICE_TYPE = 11; + final static protected int SORTED_BY_INPUT_DATA = 12; + final static protected int SORTED_BY_OUTPUT_DATA = 13; // tree components protected JPopupMenu popup; protected String lastSearchText = ""; + protected int lastSorted = SORTED_BY_NAME; // shared icons static protected Icon searchIcon; @@ -70,6 +79,11 @@ static protected Icon menuExpandIcon, menuExpandIconDis; static protected Icon menuCollapseIcon, menuCollapseIconDis; static protected Icon menuReloadIcon, menuReloadIconDis; + static protected Icon smallNIcon, smallNIconDis; + static protected Icon smallAIcon, smallAIconDis; + static protected Icon smallTIcon, smallTIconDis; + static protected Icon smallIIcon, smallIIconDis; + static protected Icon smallOIcon, smallOIconDis; protected String rootNode; @@ -212,6 +226,22 @@ if (menuReloadIconDis == null) menuReloadIconDis = SwingUtils.createIcon ("images/smallReload_dis.gif", Dashboard.class); + + if (smallNIcon == null) smallNIcon = loadIcon ("images/smallN.gif"); + if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallN_dis.gif"); + if (smallAIcon == null) smallAIcon = loadIcon ("images/smallA.gif"); + if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallA_dis.gif"); + if (smallTIcon == null) smallTIcon = loadIcon ("images/smallT.gif"); + if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallT_dis.gif"); + if (smallIIcon == null) smallIIcon = loadIcon ("images/smallI.gif"); + if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); + if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); + if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + } + + // + private Icon loadIcon (String path) { + return SwingUtils.createIcon (path, Dashboard.class); } /********************************************************************* @@ -312,6 +342,25 @@ } /********************************************************************* + * Adding sorting items to the popup menu. + ********************************************************************/ + protected void addSortingItems() { + popup.addSeparator(); + popup.add + (createMenuItem (new AbstractAction ("Sort by names") { + public void actionPerformed (ActionEvent e) { + update (lastSorted = SORTED_BY_NAME, null); + } + }, AC_NSORT, smallNIcon, smallNIconDis)); + popup.add + (createMenuItem (new AbstractAction ("Sort by authorities") { + public void actionPerformed (ActionEvent e) { + update (lastSorted = SORTED_BY_AUTHORITY, null); + } + }, AC_ASORT, smallAIcon, smallAIconDis)); + } + + /********************************************************************* * Collapse all nodes, starting from the root.

********************************************************************/ protected void collapse() { @@ -389,7 +438,8 @@ Enumeration en = root.depthFirstEnumeration(); while (en.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)en.nextElement(); - if (toBeHighlighted.contains (node.getUserObject().toString())) { +// if (toBeHighlighted.contains (node.getUserObject().toString())) { + if (toBeHighlighted.contains ( ((CommonNode)node.getUserObject()).getValue())) { makeVisible (new TreePath (tModel.getPathToRoot (node))); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/10/28 11:30:37 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/02 06:39:06 1.7 @@ -46,8 +46,6 @@ org.apache.commons.logging.LogFactory.getLog (DataTypesTree.class); // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; protected final static String AC_HASA = "ac-hasa"; protected final static String AC_DEPR = "ac-depr"; @@ -56,7 +54,6 @@ CommonConsole console; MobyDataType[] dataTypes = null; - int lastSorted = SORTED_BY_NAME; boolean showBadGuys = false; boolean showMembers = false; JCheckBoxMenuItem deprecatedBox; @@ -83,21 +80,7 @@ ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - deprecatedBox.setEnabled (true); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - deprecatedBox.setEnabled (false); - } - }, AC_ASORT)); + addSortingItems(); popup.addSeparator(); JCheckBoxMenuItem showBox = new JCheckBoxMenuItem ("Show HAS/HASA members"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.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/service/dashboard/NamespacesTree.java 2005/10/28 13:39:09 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/02 06:39:06 1.2 @@ -45,16 +45,11 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (NamespacesTree.class); - // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; - // remembered from constructor RegistryModel registryModel; CommonConsole console; MobyNamespace[] namespaces = null; - int lastSorted = SORTED_BY_NAME; MobyException updateException = null; final static String NAMESPACES_ACCESS_ERROR = @@ -73,24 +68,11 @@ } /********************************************************************* - * Adding data types tree specific menu items to a - * right-click-popup. + * ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - } - }, AC_ASORT)); + addSortingItems(); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/10/28 13:39:09 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/02 06:39:06 1.12 @@ -13,6 +13,7 @@ import org.biomoby.shared.NoSuccessException; import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyServiceType; +import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.CentralAll; import org.biomoby.client.CentralDigestCachedImpl; @@ -46,6 +47,7 @@ Hashtable dataTypesTable = new Hashtable(); Hashtable serviceTypesTable = new Hashtable(); Hashtable namespacesTable = new Hashtable(); + Hashtable servicesTable = new Hashtable(); private static final String MSG_REG_PENDING_CURATION = "Registration reports 'Pending curation'...\n" + @@ -183,13 +185,13 @@ public void registerServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); - try { - worker.registerServiceType (serviceType); - } catch (PendingCurationException e) { - throw new MobyException (MSG_REG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.registerServiceType (serviceType); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -198,13 +200,13 @@ public void unRegisterServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); - try { - worker.unregisterServiceType (serviceType); - } catch (PendingCurationException e) { - throw new MobyException (MSG_UNREG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.unregisterServiceType (serviceType); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -269,13 +271,13 @@ public void registerNamespace (MobyNamespace namespace) throws MobyException { initWorker(); - try { - worker.registerNamespace (namespace); - } catch (PendingCurationException e) { - throw new MobyException (MSG_REG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.registerNamespace (namespace); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -284,13 +286,13 @@ public void unRegisterNamespace (MobyNamespace namespace) throws MobyException { initWorker(); - try { - worker.unregisterNamespace (namespace); - } catch (PendingCurationException e) { - throw new MobyException (MSG_UNREG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.unregisterNamespace (namespace); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -345,6 +347,94 @@ /********************************************************************* * + * Dealing with Moby Services. + * + ********************************************************************/ + + + /********************************************************************* + * + ********************************************************************/ + public void registerService (MobyService service) + throws MobyException { + initWorker(); +// try { +// worker.registerService (service); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } + } + + /********************************************************************* + * + ********************************************************************/ + public void unRegisterService (MobyService service) + throws MobyException { + initWorker(); +// try { +// worker.unregisterService (service); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } + } + + /********************************************************************* + * Fetch services (from a cache or from a registry). When done, + * signal that services are updated. If an initiator is known (not + * null), signal, who asked for it, as well. + ********************************************************************/ + public synchronized MobyService[] getServices (Object initiator) + throws MobyException { + initWorker(); + if (initiator != null) + fireEvent (initiator, AUTHORITIES_RESET, "", null); + MobyService[] services = worker.getServices(); + servicesTable = new Hashtable(); + for (int i = 0; i < services.length; i++) + servicesTable.put (services[i].getUniqueName(), + services[i]); + if (initiator != null) + fireEvent (initiator, AUTHORITIES_UPDATED, "", services); + return services; + } + + /********************************************************************* + * + ********************************************************************/ + public MobyService getService (String combinedServiceName) + throws MobyException { + if (combinedServiceName == null) + return null; + MobyService[] services = getServices (null); + return (MobyService)servicesTable.get (combinedServiceName); + } + + /********************************************************************* + * Return a HashSet filled with names of services that have + * somewhere given 'searchText'. Add case-insensitivity to the + * regular expression in 'searchText'. + ********************************************************************/ + public HashSet findInServices (String searchText) + throws MobyException { + HashSet found = new HashSet(); + MobyService[] services = getServices (null); + if (! searchText.startsWith ("(?i)")) + searchText = "(?i)" + searchText; + Pattern pattern = Pattern.compile (searchText); + for (int i = 0; i < services.length; i++) { + if (pattern.matcher (services[i].toString()).find()) + found.add (services[i].getUniqueName()); + } + return found; + } + + + /********************************************************************* + * * The rest... * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/10/28 13:39:09 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/02 06:39:06 1.16 @@ -119,7 +119,6 @@ console.setAppendMode (false); // ontology trees - ServicesTree servicesTree = new ServicesTree(); DataTypesBoard dataTypesBoard = new DataTypesBoard (registryModel, console, @@ -135,9 +134,15 @@ console, propertyChannel); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); + ServicesBoard servicesBoard = + new ServicesBoard (registryModel, + console, + propertyChannel); + servicesBoard.updateTree (CommonTree.SORTED_BY_NAME); + // split it into moving panels JSplitPane split1 = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, - servicesTree.scrollable(), + servicesBoard, dataTypesBoard); split1.setResizeWeight (0.5); split1.setContinuousLayout (true); @@ -318,35 +323,6 @@ /************************************************************************** * **************************************************************************/ - class ServicesTree extends CommonTree { - public ServicesTree() { - super ("Services"); - } - } - - - /************************************************************************** - * - **************************************************************************/ - class ServiceTypesTree extends CommonTree { - public ServiceTypesTree() { - super ("Service Types"); - } - } - - - /************************************************************************** - * - **************************************************************************/ - class NamespacesTree extends CommonTree { - public NamespacesTree() { - super ("Namespaces"); - } - } - - /************************************************************************** - * - **************************************************************************/ public String getName() { return "Registry Browser"; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.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/service/dashboard/ServiceTypesTree.java 2005/10/28 13:39:09 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/02 06:39:06 1.3 @@ -46,16 +46,11 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (ServiceTypesTree.class); - // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; - // remembered from constructor RegistryModel registryModel; CommonConsole console; MobyServiceType[] serviceTypes = null; - int lastSorted = SORTED_BY_NAME; MobyException updateException = null; final static String SERVICE_TYPES_ACCESS_ERROR = @@ -74,24 +69,11 @@ } /********************************************************************* - * Adding data types tree specific menu items to a - * right-click-popup. + * ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - } - }, AC_ASORT)); + addSortingItems(); } /********************************************************************* From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 2 01:37:19 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6sl012267@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/service/dashboard/images Added Files: smallA.gif smallA_dis.gif smallI.gif smallI_dis.gif smallN.gif smallN_dis.gif smallO.gif smallO_dis.gif smallT.gif smallT_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallA.gif,NONE,1.1 smallA_dis.gif,NONE,1.1 smallI.gif,NONE,1.1 smallI_dis.gif,NONE,1.1 smallN.gif,NONE,1.1 smallN_dis.gif,NONE,1.1 smallO.gif,NONE,1.1 smallO_dis.gif,NONE,1.1 smallT.gif,NONE,1.1 smallT_dis.gif,NONE,1.1 From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 2 01:37:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6QY012291@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java MobyService.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.3,1.4 MobyService.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/09/22 16:07:09 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/02 06:39:06 1.4 @@ -78,6 +78,15 @@ return true; } + public MobyDataType getDataType() { + synchronized (elements) { + if (elements.size() > 0) + return ((MobyPrimaryDataSimple)elements.firstElement()).getDataType(); + else + return null; + } + } + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/09/22 16:07:09 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/02 06:39:06 1.8 @@ -9,6 +9,7 @@ import org.tulsoft.shared.UUtils; +import java.util.Comparator; import java.util.Enumeration; import java.util.Vector; @@ -24,7 +25,8 @@ * @version $Id$ */ -public class MobyService { +public class MobyService + implements Comparable { /** * A dummy name used for MobyService instances that do not have @@ -57,6 +59,18 @@ protected Vector primaryOutputs = new Vector(); /************************************************************************** + * Implementing Comparable interface. + *************************************************************************/ + public int compareTo (Object obj) { + return getUniqueName().compareToIgnoreCase ( ((MobyService)obj).getUniqueName() ); + } + + public boolean equals (Object obj) { + if (obj == null) return false; + return getUniqueName().equals ( ((MobyService)obj).getUniqueName() ); + } + + /************************************************************************** * Default constructor. *************************************************************************/ public MobyService() { @@ -299,9 +313,10 @@ } } + // some historical reasons for this method... public boolean equals (MobyService anotherOne) { - if (anotherOne == null) return false; - return this.name.equals (anotherOne.getName()); + if (anotherOne == null) return false; + return equals ((Object)anotherOne); } public String toString() { @@ -336,8 +351,32 @@ return new String (buf); } + /************************************************************************** + * It combines this service name and its authority name. It is + * used also in {@link #equals} and {@link #compareTo} methods.

+ * + * TBD: The authority should be checked that it does not contain + * character sequence 'space followed by a left parenthesis'. + *************************************************************************/ public String toShortString() { return name + " (" + authority + ")"; } + /************************************************************************** + * Create a comparator for case-insensitive sorting of services by + * their authorities. + *************************************************************************/ + public static Comparator getAuthorityComparator() { + return new Comparator() { + public int compare (Object o1, Object o2) { + String a1 = ((MobyService)o1).getAuthority(); + String a2 = ((MobyService)o2).getAuthority(); + int compared = (a1).compareToIgnoreCase ((String)a2); + if (compared == 0) + return ( ((MobyService)o1).getName().compareToIgnoreCase ( ((MobyService)o2).getName() ) ); + else + return compared; + } + }; + } } From senger at pub.open-bio.org Thu Nov 3 03:38:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 3 03:36:26 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511030838.jA38ceGL018463@pub.open-bio.org> senger Thu Nov 3 03:38:40 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv18397/src/main/org/biomoby/service/dashboard/images Added Files: smallRegister.gif smallRegister_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallRegister.gif,NONE,1.1 smallRegister_dis.gif,NONE,1.1 From senger at pub.open-bio.org Thu Nov 3 10:21:57 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 3 10:20:36 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031521.jA3FLvns020067@pub.open-bio.org> senger Thu Nov 3 10:21:57 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv20017/src/main/org/biomoby/shared Modified Files: MobyService.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyService.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/02 06:39:06 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/03 15:21:57 1.9 @@ -16,7 +16,7 @@ /** * A container representing a service. But do not be too excited - * this is not a real service but only its definition as it appears in - * the BioMoby regustry.

+ * the BioMoby registry.

* * This container is used mainly to register a new service in a * Moby registry, and to find registered services later.

From senger at pub.open-bio.org Thu Nov 3 10:21:57 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 3 10:20:41 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031521.jA3FLvqQ020048@pub.open-bio.org> senger Thu Nov 3 10:21:57 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20017/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java DashboardProperties.java NOTES RegistrationPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.12,1.13 DashboardProperties.java,1.9,1.10 NOTES,1.15,1.16 RegistrationPanel.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 08:38:39 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 15:21:57 1.13 @@ -94,6 +94,8 @@ // re-use "style" components protected static final Insets BREATH_TOP = new Insets (10,0,0,0); + protected static final Insets BREATH_TOP_LEFT = new Insets (10,10,0,0); + protected static final Insets BREATH_LEFT = new Insets (0,10,0,0); protected static final Font MSG_AREA_FONT = new Font ("Courier", Font.PLAIN, 10); protected static final Font TITLE_FONT = new Font ("Serif", Font.BOLD, 20); protected static final Color TITLE_FGCOLOR = new Color (12, 55, 241); @@ -213,7 +215,8 @@ JCheckBox box = new JCheckBox (label, isSelected); if (mnemonic > 0) box.setMnemonic (mnemonic); - box.addItemListener (listener); + if (listener != null) + box.addItemListener (listener); box.setFocusPainted (false); return box; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 08:38:39 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 15:21:57 1.10 @@ -58,6 +58,16 @@ static final String DP_REG_ST_ISA = "dp-reg-st-isa"; static final String DP_REG_ST_COPY_BY_SELECT = "dp-reg-st-cbs"; // type: Boolean + static final String DP_REG_S_NAME = "dp-reg-s-name"; + static final String DP_REG_S_AUTH = "dp-reg-s-auth"; + static final String DP_REG_S_EMAIL = "dp-reg-s-email"; + static final String DP_REG_S_DESC = "dp-reg-s-desc"; + static final String DP_REG_S_URL = "dp-reg-s-url"; + static final String DP_REG_S_RDF_URL = "dp-reg-s-rdf-url"; + static final String DP_REG_S_RDF_PATH = "dp-reg-s-rdf-path"; + static final String DP_USE_SIGNATURE = "dp-use-signature"; // type: Boolean + static final String DP_USE_AUTHORITATIVE = "dp-use-auth"; // type: Boolean + /** A filename containing Java properties that configure the dashboard. */ static final String DASHBOARD_PROPERTIES_FILE = "dashboard.properties"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 08:38:39 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 15:21:57 1.16 @@ -1,3 +1,8 @@ +* show/store XML sent to register this service + (a place for using it other time?) + +* how to squeeze too long combo boxes into smaller place ? + * registration: selecting an authority is really propagated to the text fields? (Do for data type registration the same as was done for Namespace registration.) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 08:38:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 15:21:57 1.7 @@ -13,6 +13,7 @@ import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyServiceType; +import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; @@ -73,7 +74,8 @@ static final String COPY_BY_SELECT_NS = "ns-copy-by-select"; static final String COPY_BY_SELECT_ST = "st-copy-by-select"; static final String COPY_BY_SELECT_DT = "dt-copy-by-select"; - static final String COPY_BY_SELECT_S = "s-copy-by-select"; + static final String USE_SIGNATURE = "use-signature"; + static final String USE_AUTHORITATIVE = "use-authoritative"; // associated model working behind the scenes RegistryModel registryModel; @@ -86,14 +88,18 @@ JButton sRegisterButton; CommonConsole console; - JTextFieldWithHistory dtName, nsName, stName; - JTextFieldWithHistory dtAuth, nsAuth, stAuth; - JTextFieldWithHistory dtEmail, nsEmail, stEmail; - JTextArea dtDescArea, nsDescArea, stDescArea; + JTextFieldWithHistory dtName, nsName, stName, sName; + JTextFieldWithHistory dtAuth, nsAuth, stAuth, sAuth; + JTextFieldWithHistory dtEmail, nsEmail, stEmail, sEmail; + JTextArea dtDescArea, nsDescArea, stDescArea, sDescArea; JLabel stISA; + JLabel sType, labelSigURL, labelRDFPath; + JTextFieldWithHistory sURL, sSigURL; + JFileChooserWithHistory localRDFFile; + JCheckBox useAuth; - MobyException dtException, nsException, stException; - MobyException dtUnregException, nsUnregException, stUnregException; + MobyException dtException, nsException, stException, sException; + MobyException dtUnregException, nsUnregException, stUnregException, sUnregException; // shared icons protected static Icon menuAddISAIcon, menuAddISAIconDis; @@ -126,6 +132,12 @@ final static String SERVICE_TYPE_UNREG_PROLOGUE = "An error occured when trying to unregister a service type.\n\n"; + final static String SERVICE_PROLOGUE = + "An error occured when trying to register a new service.\n\n"; + + final static String SERVICE_UNREG_PROLOGUE = + "An error occured when trying to unregister a service.\n\n"; + /********************************************************************* * Default constructor. ********************************************************************/ @@ -306,11 +318,173 @@ protected JPanel getServiceRegistration() { JPanel p = new JPanel (new GridBagLayout()); - SwingUtils.addComponent (p, new JLabel ("Not Yet Implemented"), 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + + // text fields to define new service + JLabel labelSName = new JLabel ("Service name"); + sName = createText (null, "serviceName", DP_REG_S_NAME); + JLabel labelSAuth = new JLabel ("Authority"); + sAuth = createText (null, "serviceAuth", DP_REG_S_AUTH); + JLabel labelSEmail = new JLabel ("Contact email"); + sEmail = createText (null, "serviceEmail", DP_REG_S_EMAIL); + JLabel labelSURL = new JLabel ("Service endpoint - URL"); + sURL = createText (null, "serviceURL", DP_REG_S_URL); + boolean usingAuth = getPrefValue (USE_AUTHORITATIVE, true); + useAuth = + createCheckBox ("authoritative", usingAuth, KeyEvent.VK_A, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + onAuth (e.getStateChange() == ItemEvent.SELECTED); + } + }); + onAuth (usingAuth); + + // group of fields for RDF signature + labelSigURL = new JLabel ("RDF endpoint - signature URL"); + sSigURL = createText (null, "signatureURL", DP_REG_S_RDF_URL); + labelRDFPath = new JLabel ("Where to store RDF document"); + String defValue = + System.getProperty ("java.io.tmpdir") + + System.getProperty ("file.separator") + + "service.rdf"; + localRDFFile = createFileSelector ("File name for RDF service signature", + "Select", + defValue, + "localRDFFile", + DP_REG_S_RDF_PATH); + boolean usingSignature = getPrefValue (USE_SIGNATURE, false); + JCheckBox useSignature = + createCheckBox ("Use RDF signature", usingSignature, KeyEvent.VK_R, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + onUseRDFSignature (e.getStateChange() == ItemEvent.SELECTED); + } + }); + onUseRDFSignature (usingSignature); + + JPanel pRDF = createTitledPanel ("Service RDF Signature"); + SwingUtils.addComponent (pRDF, useSignature, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (pRDF, labelSigURL, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (pRDF, sSigURL, 0, 2, 1, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (pRDF, labelRDFPath, 0, 3, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (pRDF, localRDFFile, 0, 4, 1, 1, HORI, NWEST, 1.0, 0.0); + + // service type + JPanel serviceType = new JPanel (new GridBagLayout()); + JLabel labelST = new JLabel ("Service type: "); + sType = new JLabel (""); + SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + + // put together service fields + JPanel defs = new JPanel (new GridBagLayout()); + SwingUtils.addComponent (defs, labelSName, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sName, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, useAuth, 1, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_LEFT); + SwingUtils.addComponent (defs, labelSAuth, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sAuth, 0, 3, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, labelSEmail, 0, 4, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sEmail, 0, 5, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, labelSURL, 0, 6, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sURL, 0, 7, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, pRDF, 0, 8, 2, 1, HORI, NWEST, 1.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (defs, serviceType, 0, 9, 2, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + + // description + sDescArea = new JTextArea(); + JPanel sDesc = createCustomTextArea ("Description", null, "serviceDesc", DP_REG_S_DESC, + sDescArea); + + // a tree with all service types + ServiceTypesBoard stBoard = + new ServiceTypesBoard (registryModel, + console, + propertyChannel, + new CustomServiceTypesTree2 (registryModel, console)); + stBoard.updateTree (CommonTree.SORTED_BY_NAME); + + JPanel main = createTitledPanel ("New Service"); + SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); + SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + + // sub-panels for input/output data + JTabbedPane dataPane = new JTabbedPane(); + dataPane.addTab ("Primary Inputs", getPrimaryInputs()); + dataPane.addTab ("Secondary Inputs", getSecondaryInputs()); + dataPane.addTab ("Outputs", getOutputs()); + + // split data defs and service fields + JSplitPane split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, + main, + dataPane); + split.setResizeWeight (0.3); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + + // registration button + sRegisterButton = + createButton (" Register Service ", + "Register a new service in a Biomoby registry", + KeyEvent.VK_S, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + onRegisterService(); + } + }); + sRegisterButton.setIcon (registerIcon); + sRegisterButton.setDisabledIcon (registerIconDis); + + // put it together + SwingUtils.addComponent (p, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, sRegisterButton, 0, 1, 1, 1, NONE, CENTER, 0.0, 0.0); return p; } /************************************************************************** + * + **************************************************************************/ + protected void onUseRDFSignature (boolean enabled) { + sSigURL.setEnabled (enabled); + labelSigURL.setEnabled (enabled); + localRDFFile.setEnabled (enabled); + labelRDFPath.setEnabled (enabled); + setPrefValue (USE_SIGNATURE, enabled); + propertyChannel.put (DP_USE_SIGNATURE, new Boolean (enabled).toString()); + } + + /************************************************************************** + * + **************************************************************************/ + protected void onAuth (boolean enabled) { + setPrefValue (USE_AUTHORITATIVE, enabled); + propertyChannel.put (DP_USE_AUTHORITATIVE, new Boolean (enabled).toString()); + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getPrimaryInputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getSecondaryInputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getOutputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** * Panel to register a namespace and a service type. **************************************************************************/ protected JPanel getOtherRegistration() { @@ -728,6 +902,75 @@ /************************************************************************** * **************************************************************************/ + public void onRegisterService() { + sRegisterButton.setEnabled (false); + sException = null; + final SwingWorker worker = new SwingWorker() { + public Object construct() { + try { + String value = sName.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Service name is still missing. Please fill it first."); + return null; + } + MobyService service = new MobyService (value); + + value = sAuth.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have an authority.\n" + + "Please fill it."); + return null; + } + service.setAuthority (value); + + value = sEmail.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have a contact person.\n" + + "Please fill in an email address."); + return null; + } + service.setEmailContact (value); + + value = sDescArea.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have a description.\n" + + "Please fill in the most detailed one."); + return null; + } + service.setDescription (value); + + value = sType.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must belong to an existing service type.\n" + + "Please select a type from available service types."); + return null; + } + service.setType (value); + + console.setText ("Service to be registered:\n" + + "-------------------------\n" + service.toString()); + registryModel.registerService (service); + console.setText ("\nRegistration successful!\n\n"); + + } catch (MobyException e) { + sException = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (sException != null) + error (SERVICE_PROLOGUE, sException); + sRegisterButton.setEnabled (true); + } + }; + worker.start(); + } + + /************************************************************************** + * + **************************************************************************/ public String getName() { return "Biomoby Registration"; } @@ -1235,4 +1478,48 @@ } + + /************************************************************************** + * + * Customized tree of service types - use for service registration + * + **************************************************************************/ + protected class CustomServiceTypesTree2 + extends ServiceTypesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomServiceTypesTree2 (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected service type to the service fields. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) + sType.setText (nodeObject.getValue()); + } + } } From mwilkinson at pub.open-bio.org Thu Nov 3 11:39:42 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Thu Nov 3 11:37:23 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031639.jA3Gdgsn021261@pub.open-bio.org> mwilkinson Thu Nov 3 11:39:42 EST 2005 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory pub.open-bio.org:/tmp/cvs-serv21242 Modified Files: ConstructingYourService.html Log Message: fixed a URL typo and added a link to the register service tutorial moby-live/Docs/MOBY-S_API/Perl ConstructingYourService.html,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html 2005/09/28 00:24:26 1.3 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html 2005/11/03 16:39:42 1.4 @@ -27,7 +27,7 @@

  • Does an appropriate service type term already exist in the Service Ontology? You need to register your new service type in +href="RegisterServiceType.html">register your new service type in the MOBY-S service ontology.
  • Do the namespaces that you are going to use in your objects @@ -39,7 +39,7 @@ If all object types, service types, and namespaces already exist in -the ontology then you are ready to set up your service. +the ontology then you are ready to set up your service. Once you have finished setting it up following the guidelines below, you will then need to Register your service for it to become visible on the MOBY Central registry. In Perl, MOBY-S services are currently limited to SOAP over HTTP; the name of the method call (i.e. the SOAP Action header) is the same as @@ -340,5 +340,9 @@ return ($dbh); } + + +When you have finished writing your service, test it (link coming soon!) and then Register it. - \ No newline at end of file + + From gss at pub.open-bio.org Thu Nov 3 17:31:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:28:39 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MV0aK022160@pub.open-bio.org> gss Thu Nov 3 17:31:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv22135/src/org/semanticmoby/graph Modified Files: MOBYResource.java Log Message: Added inputURI, outputURI s-moby/ref-impl/core/src/org/semanticmoby/graph MOBYResource.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/10/31 17:24:54 1.4 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/11/03 22:31:00 1.5 @@ -24,18 +24,30 @@ private Statement nameStmt; /** - * A one line description of the provider; stored in the + * A one line description of the resource; stored in the * MOBY.oneLineDescription property */ private Statement oneLineDescriptionStmt; /** * A URI at which more information can be retrieved about the - * provider; stored in the MOBY.moreInfoURI property + * resource; stored in the MOBY.moreInfoURI property */ private Statement aboutURIStmt; /** + * A URI that can be accessed to get a page for an end user to fill in + * information for this resource; stored in the MOBY.inputURI property + */ + private Statement inputURIStmt; + + /** + * A URI that can be accessed to display this resource; stored in the + * MOBY.outputURI property + */ + private Statement outputURIStmt; + + /** * The MOBYGraphNode objects that this Resource operates on (instances of * either MOBYCollection or MOBYGraph), each keyed by the statement that * links this resource's URI to it via a hasMapping property @@ -92,13 +104,21 @@ * Constructor for creating an instance from existing RDF statements, as * is the case when parsing an existing model. */ - MOBYResource(Model jenaModel, Statement definingStmt, - Statement nameStmt, Statement oneLineDescriptionStmt, - Statement aboutURIStmt, Map operatesOnGraphs) { + MOBYResource(Model jenaModel, + Statement definingStmt, + Statement nameStmt, + Statement oneLineDescriptionStmt, + Statement aboutURIStmt, + Statement inputURIStmt, + Statement outputURIStmt, + Map operatesOnGraphs) { super(jenaModel, definingStmt); + this.nameStmt = nameStmt; this.oneLineDescriptionStmt = oneLineDescriptionStmt; this.aboutURIStmt = aboutURIStmt; + this.inputURIStmt = inputURIStmt; + this.outputURIStmt = outputURIStmt; for (Iterator it = operatesOnGraphs.keySet().iterator(); it.hasNext();) { Statement operatesOnStmt = (Statement) it.next(); @@ -191,7 +211,9 @@ * Return a descriptive name for the provider. */ public String getName() { - return (nameStmt == null) ? "" : nameStmt.getObject().toString(); + return (nameStmt == null) + ? null + : nameStmt.getObject().toString(); } /** @@ -199,7 +221,7 @@ */ public String getOneLineDescription() { return (oneLineDescriptionStmt == null) - ? "" + ? null : oneLineDescriptionStmt.getObject().toString(); } @@ -209,11 +231,30 @@ */ public String getAboutURI() { return (aboutURIStmt == null) - ? "" + ? null : aboutURIStmt.getObject().toString(); } /** + * Return a URI that can be accessed to get a page for an end user + * to fill in information for this resource + */ + public String getInputURI() { + return (inputURIStmt == null) + ? null + : inputURIStmt.getObject().toString(); + } + + /** + * Return a URI that can be accessed to display this resource + */ + public String getOutputURI() { + return (outputURIStmt == null) + ? null + : outputURIStmt.getObject().toString(); + } + + /** * Serialize the underlying model as RDF/XML to the given output stream */ public void serialize(OutputStream out) { From gss at pub.open-bio.org Thu Nov 3 17:31:18 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:28:57 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MVIOi022198@pub.open-bio.org> gss Thu Nov 3 17:31:18 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv22173/src/org/semanticmoby/graph Modified Files: Parser.java Log Message: Parse inputURI and outputURI s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/03 22:31:18 1.3 @@ -198,7 +198,6 @@ // exception if any are missing // Statement nameStmt = model.getProperty(headResource, MOBY.name); - if (nameStmt == null) { throw new NonCanonicalException("Missing " + MOBY.name + " property", model); @@ -206,18 +205,16 @@ Statement oneLineDescriptionStmt = model.getProperty(headResource, MOBY.oneLineDescription); - if (oneLineDescriptionStmt == null) { throw new NonCanonicalException("Missing " + MOBY.oneLineDescription + " property", model); } + // Consider aboutURI, inputURI, and outputURI to be optional + // Statement aboutURIStmt = model.getProperty(headResource, MOBY.aboutURI); - - if (aboutURIStmt == null) { - throw new NonCanonicalException("Missing " + MOBY.aboutURI + - " property", model); - } + Statement inputURIStmt = model.getProperty(headResource, MOBY.inputURI); + Statement outputURIStmt = model.getProperty(headResource, MOBY.outputURI); // A resource can have multiple operatesOn properties, each of // which leads to a subgraph. Parse each of these subgraphs. @@ -236,8 +233,14 @@ // Create and return a new Resource object using the resource URI, name, // oneLineDescription, aboutURI, and collection of operatesOn subgraphs // - return new MOBYResource(model, typeStmt, nameStmt, - oneLineDescriptionStmt, aboutURIStmt, operatesOn); + return new MOBYResource(model, + typeStmt, + nameStmt, + oneLineDescriptionStmt, + aboutURIStmt, + inputURIStmt, + outputURIStmt, + operatesOn); } /** From gss at pub.open-bio.org Thu Nov 3 17:31:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:29:21 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MVgOi022236@pub.open-bio.org> gss Thu Nov 3 17:31:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv22211/src/org/semanticmoby/vocabulary Modified Files: MOBY.java Log Message: Added inputURI and outputURI; formatting s-moby/ref-impl/core/src/org/semanticmoby/vocabulary MOBY.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/10/27 22:22:09 1.4 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/03 22:31:42 1.5 @@ -19,30 +19,50 @@ * value is a serialized RDF/XML graph. */ public final static String GRAPH_PARAMETER_NAME = "graph"; - public static final Resource Resource = resource(getURI(), "Resource"); - public static final Resource Graph = resource(getURI(), "Graph"); - public static final Resource Subject = resource(getURI(), "Subject"); - public static final Resource Object = resource(getURI(), "Object"); - public static final Property name = property(getURI(), "name"); + + public static final Resource Resource = + resource(getURI(), "Resource"); + + public static final Resource Graph = + resource(getURI(), "Graph"); + + public static final Resource Subject = + resource(getURI(), "Subject"); + + public static final Resource Object = + resource(getURI(), "Object"); + + public static final Property name = + property(getURI(), "name"); + public static final Property oneLineDescription = property(getURI(), "oneLineDescription"); - public static final Property aboutURI = + + public static final Property aboutURI = property(getURI(), "aboutURI"); - public static final Property inputURI = + + public static final Property inputURI = property(getURI(), "inputURI"); - public static final Property outputURI = + + public static final Property outputURI = property(getURI(), "outputURI"); - public static final Property operatesOn = + + public static final Property operatesOn = property(getURI(), "operatesOn"); - public static final Property hasMapping = + + public static final Property hasMapping = property(getURI(), "hasMapping"); - public static final Property mapsTo = + + public static final Property mapsTo = property(getURI(), "mapsTo"); + public static final Property lastModifiedDate = property(getURI(), "lastModifiedDate"); - public static final Property Property = + + public static final Property Property = property(getURI(), "Property"); - public static final Property keyword = + + public static final Property keyword = property(getURI(), "keyword"); public static String getURI() { @@ -50,15 +70,11 @@ return "http://www.semanticmoby.org/ontologies/core/"; } - public static String getNsPrefix() { - return "moby"; } - public static void addNsPrefix(Model model) { - model.setNsPrefix(getNsPrefix(), getURI()); } } From gss at pub.open-bio.org Thu Nov 3 17:32:25 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:30:08 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032232.jA3MWPcH022274@pub.open-bio.org> gss Thu Nov 3 17:32:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22249/src/org/semanticmoby/ref/servlets Modified Files: BaseServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets BaseServlet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java 2005/11/03 22:32:25 1.5 @@ -4,12 +4,8 @@ import org.semanticmoby.ref.tools.*; -import org.semanticmoby.servlet.*; - import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:32:38 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:30:17 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032232.jA3MWc6x022312@pub.open-bio.org> gss Thu Nov 3 17:32:38 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22287/src/org/semanticmoby/ref/servlets Modified Files: DiscoveryServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets DiscoveryServlet.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/03 03:22:54 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/03 22:32:38 1.8 @@ -1,8 +1,5 @@ package org.semanticmoby.ref.servlets; -import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.rdql.*; - import org.semanticmoby.graph.*; import org.semanticmoby.ref.tools.*; @@ -11,8 +8,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:33:05 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:30:43 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MX5Z9022350@pub.open-bio.org> gss Thu Nov 3 17:33:05 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22325/src/org/semanticmoby/ref/servlets Modified Files: KeywordSearchServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets KeywordSearchServlet.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/03 03:22:54 1.9 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/03 22:33:05 1.10 @@ -5,14 +5,11 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.ref.tools.*; import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.ref.tools.db.DBConnection; import org.semanticmoby.tools.Util; -import org.semanticmoby.vocabulary.MOBY; - import java.io.*; import java.sql.*; @@ -54,7 +51,7 @@ sessionData = (SessionData) request.getSession().getAttribute("sessionData"); - DBConnection db = new DBConnection(); + DBConnection db = new DBConnection(getServletContext().getRealPath("/")); StorageManager mgr = new StorageManager(); ModelRDB model = (ModelRDB) mgr.openDBModel(); @@ -84,11 +81,8 @@ String uri = result.getString(1); row.add(uri); - System.out.println(" ##### 1 #####"); MOBYResource resource = resourceAt(uri, model); - System.out.println(" ##### 2 #####"); String name = resource.getName(); - System.out.println(" ##### 3 #####"); row.add(name); String description = resource.getOneLineDescription(); From gss at pub.open-bio.org Thu Nov 3 17:33:24 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:31:03 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXONi022388@pub.open-bio.org> gss Thu Nov 3 17:33:24 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22363/src/org/semanticmoby/ref/servlets Modified Files: ResourceInvestigationServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets ResourceInvestigationServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java 2005/11/03 03:22:54 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java 2005/11/03 22:33:23 1.3 @@ -2,17 +2,10 @@ import org.apache.commons.logging.*; -import org.semanticmoby.graph.*; - import org.semanticmoby.ref.tools.*; -import org.semanticmoby.ref.tools.db.*; - -import org.semanticmoby.servlet.*; import java.io.*; -import java.util.logging.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:33:34 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:31:16 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXYbl022426@pub.open-bio.org> gss Thu Nov 3 17:33:34 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22401/src/org/semanticmoby/ref/servlets Modified Files: SqlQueryServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets SqlQueryServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java 2005/10/28 04:12:26 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java 2005/11/03 22:33:34 1.3 @@ -1,17 +1,7 @@ package org.semanticmoby.ref.servlets; -import org.semanticmoby.graph.*; - -import org.semanticmoby.ref.tools.*; - -import org.semanticmoby.vocabulary.MOBY; - import java.io.*; -import java.sql.*; - -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:33:47 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:31:26 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXlOr022464@pub.open-bio.org> gss Thu Nov 3 17:33:47 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv22439/src/org/semanticmoby/ref/servlets/dev Modified Files: ResourceListServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev ResourceListServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/01 16:28:12 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/03 22:33:47 1.3 @@ -10,8 +10,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:34:14 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:31:53 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032234.jA3MYExg022502@pub.open-bio.org> gss Thu Nov 3 17:34:14 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example In directory pub.open-bio.org:/tmp/cvs-serv22477/src/org/semanticmoby/ref/servlets/example Modified Files: HelloWorldServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example HelloWorldServlet.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/01 16:28:12 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/03 22:34:14 1.7 @@ -2,18 +2,12 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.ref.servlets.*; - import org.semanticmoby.servlet.*; import java.io.*; -import java.util.*; - -import javax.servlet.*; import javax.servlet.http.*; - public class HelloWorldServlet extends AbstractMobyServlet { /** From gss at pub.open-bio.org Thu Nov 3 17:34:31 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:32:09 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032234.jA3MYVcT022540@pub.open-bio.org> gss Thu Nov 3 17:34:31 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22515/src/org/semanticmoby/ref/tools Modified Files: DiscoveryQuery.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools DiscoveryQuery.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/03 22:34:31 1.8 @@ -5,7 +5,6 @@ import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.rdql.*; import com.hp.hpl.jena.shared.*; -import com.hp.hpl.jena.util.iterator.*; import com.hp.hpl.jena.vocabulary.RDF; import org.semanticmoby.graph.*; @@ -16,10 +15,6 @@ import org.semanticmoby.vocabulary.*; -import java.io.*; - -import java.text.*; - import java.util.*; From gss at pub.open-bio.org Thu Nov 3 17:35:07 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:32:45 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZ7sl022580@pub.open-bio.org> gss Thu Nov 3 17:35:07 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22555/src/org/semanticmoby/ref/tools Modified Files: InvocationBroker.java Log Message: Use getInputURI and getOutputURI on Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/01 16:28:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/03 22:35:07 1.7 @@ -1,7 +1,6 @@ package org.semanticmoby.ref.tools; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; import org.apache.commons.httpclient.*; @@ -13,8 +12,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; @@ -109,7 +106,7 @@ // try { - String inputURI = getInputURI(resource); + String inputURI = resource.getInputURI(); if (inputURI == null) { @@ -165,7 +162,7 @@ Parser parser = new Parser(model); MOBYResource resultsResource = parser.parseResource(); - String outputURI = getOutputURI(resultsResource); + String outputURI = resultsResource.getOutputURI(); if (outputURI == null) { @@ -249,49 +246,6 @@ dispatcher.forward(request, response); } - - private String getInputURI(MOBYResource resource) { - - try { - - Model model = resource.getJenaModel(); - Statement stmt = - model.getProperty(resource.getResource(), MOBY.inputURI); - - if (stmt != null) { - - return stmt.getString(); - } else { - - return null; - } - } catch (Throwable t) { - - t.printStackTrace(); - - return null; - } - } - - - private String getOutputURI(MOBYResource resource) { - - try { - - Model model = resource.getJenaModel(); - Statement stmt = - model.getProperty(resource.getResource(), MOBY.outputURI); - - return stmt.getString(); - } catch (Throwable t) { - - t.printStackTrace(); - - return null; - } - } - - public void buildInputGUI(MOBYResource resource) { // error message @@ -316,6 +270,6 @@ private boolean requiresInputs(MOBYResource resource) { - return getInputURI(resource) != null; + return resource.getInputURI() != null; } } From gss at pub.open-bio.org Thu Nov 3 17:35:19 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:32:58 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZJ4n022618@pub.open-bio.org> gss Thu Nov 3 17:35:19 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22593/src/org/semanticmoby/ref/tools Modified Files: KeywordFinder.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordFinder.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/03 22:35:19 1.8 @@ -1,7 +1,6 @@ package org.semanticmoby.ref.tools; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; import com.hp.hpl.jena.vocabulary.*; import org.semanticmoby.graph.*; From gss at pub.open-bio.org Thu Nov 3 17:35:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:33:20 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZgSh022656@pub.open-bio.org> gss Thu Nov 3 17:35:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22631/src/org/semanticmoby/ref/tools Modified Files: KeywordList.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordList.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/01 16:28:11 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/03 22:35:42 1.5 @@ -1,10 +1,7 @@ package org.semanticmoby.ref.tools; -import com.hp.hpl.jena.rdf.model.*; - import java.util.*; - public class KeywordList { private Set resourceKeywords = new HashSet(); From gss at pub.open-bio.org Thu Nov 3 17:35:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:33:34 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZtoc022694@pub.open-bio.org> gss Thu Nov 3 17:35:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22669/src/org/semanticmoby/ref/tools Modified Files: URIInvestigator.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools URIInvestigator.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/03 22:35:55 1.8 @@ -1,7 +1,5 @@ package org.semanticmoby.ref.tools; -import com.hp.hpl.jena.rdf.model.Model; - import org.apache.commons.httpclient.util.*; import org.apache.commons.logging.*; From gss at pub.open-bio.org Thu Nov 3 17:36:25 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:34:03 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MaPCh022732@pub.open-bio.org> gss Thu Nov 3 17:36:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv22707/src/org/semanticmoby/ref/tools/db Modified Files: DBConnection.java Log Message: Removed unused imports; use path relative to web root s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db DBConnection.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/01 16:28:12 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/03 22:36:25 1.3 @@ -1,18 +1,11 @@ package org.semanticmoby.ref.tools.db; -import java.awt.*; -import java.awt.event.*; - import java.io.*; import java.sql.*; import java.util.*; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.event.*; - /** * @@ -20,13 +13,14 @@ */ public class DBConnection { + private static String webrootPath; public static final int INSERT = 0; public static final int UPDATE = 1; public static final int DELETE = 2; public static final int OTHER = 3; public static String propsFileName = - "../webapps/ROOT/WEB-INF/smoby.properties"; - public static String logFileName = "../logs/smoby.dblog"; + "/WEB-INF/smoby.properties"; + public static String logFileName = "/WEB-INF/smoby.dblog"; public static String dbUserId = "postgres"; public static String dbPassword = "postgres"; public static String dbRepositoryName = "smoby-dev"; @@ -56,7 +50,8 @@ * @param logFileName The name (including path) of the log file to create * for this application. */ - public DBConnection() { + public DBConnection(String webroot) { + webrootPath = webroot; try { startLog(); loadDBProperties(); @@ -123,7 +118,7 @@ try { - File logFile = new File(logFileName); + File logFile = new File(webrootPath + File.separator + logFileName); if (logFile.exists()) { @@ -145,13 +140,13 @@ void loadDBProperties() { try { - + String propsFilePath = webrootPath + File.separator + propsFileName; logMsg(" "); - logMsg("loading database properties from " + propsFileName + + logMsg("loading database properties from " + propsFilePath + " ..."); dbProps = new Properties(); - dbProps.load(new FileInputStream(propsFileName)); + dbProps.load(new FileInputStream(propsFilePath)); if (dbProps.getProperty("DB_USER_ID") != null) { @@ -224,6 +219,7 @@ */ public static void saveDBProperties() { + String propFilePath = webrootPath + File.separator + propsFileName; try { String header = "# Semantic Moby Database Properties"; @@ -241,7 +237,7 @@ dbProps.setProperty("DB_URL", dbUrl); logMsg(" DB_URL = " + dbUrl + "\n"); - dbProps.store(new FileOutputStream(propsFileName), header); + dbProps.store(new FileOutputStream(propFilePath), header); logMsg("finished"); logMsg(" "); From gss at pub.open-bio.org Thu Nov 3 17:36:40 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:34:18 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MaeVG022770@pub.open-bio.org> gss Thu Nov 3 17:36:39 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv22745/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/01 16:28:12 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/03 22:36:39 1.8 @@ -2,8 +2,6 @@ import com.hp.hpl.jena.db.*; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; -import com.hp.hpl.jena.vocabulary.*; import org.semanticmoby.graph.*; From gss at pub.open-bio.org Thu Nov 3 17:36:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:34:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MatZl022808@pub.open-bio.org> gss Thu Nov 3 17:36:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example In directory pub.open-bio.org:/tmp/cvs-serv22783/src/org/semanticmoby/ref/vocabulary/example Modified Files: Hello.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example Hello.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java 2005/10/28 04:12:27 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java 2005/11/03 22:36:55 1.4 @@ -1,6 +1,5 @@ package org.semanticmoby.ref.vocabulary.example; -import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*; import org.semanticmoby.vocabulary.*; From gss at pub.open-bio.org Thu Nov 3 17:37:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:34:50 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032237.jA3MbCmX022842@pub.open-bio.org> gss Thu Nov 3 17:37:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv22813/WebRoot/examples/hello Modified Files: hello-world.rdf hello-world.n3 Log Message: Changed outputURI s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello hello-world.rdf,1.5,1.6 hello-world.n3,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/10/28 04:08:39 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/03 22:37:11 1.6 @@ -11,10 +11,11 @@ - + VPIN Hello World resource Simple example of a VPIN resource + http://www.semanticmoby.org/examples/hello-world http://www.semanticmoby.org/examples/display-hello-world =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/10/28 04:08:39 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/03 22:37:11 1.6 @@ -10,7 +10,8 @@ a moby:Resource, exterms:GreetingResource ; moby:name "VPIN Hello World resource" ; moby:oneLineDescription "Simple example of a VPIN resource" ; - moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world-results" ; + moby:aboutURI "http://www.semanticmoby.org/examples/hello-world" ; + moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world" ; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Thu Nov 3 17:37:30 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu Nov 3 17:35:09 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032237.jA3MbU6m022884@pub.open-bio.org> gss Thu Nov 3 17:37:29 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core In directory pub.open-bio.org:/tmp/cvs-serv22847/WebRoot/ontologies/core Modified Files: operatesOn.n3 Resource Resource.n3 operatesOn Log Message: Ontology changes s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core operatesOn.n3,1.2,1.3 Resource,1.1,1.2 Resource.n3,1.1,1.2 operatesOn,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3 2005/11/03 22:37:29 1.3 @@ -6,5 +6,8 @@ moby:operatesOn a owl:ObjectProperty ; - rdfs:domain moby:Service ; - rdfs:range moby:Graph . + rdfs:domain moby:Resource ; + rdfs:range [ + a owl:Class ; + owl:unionOf (moby:Graph rdf:List rdf:Bag rdf:Seq rdf:Alt) + ] . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource 2005/11/03 22:37:29 1.2 @@ -9,7 +9,7 @@ 1 - + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3 2005/11/03 22:37:29 1.2 @@ -4,7 +4,7 @@ @prefix rdf: . @prefix owl: . -moby:Service +moby:Resource a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/03 22:37:29 1.3 @@ -1,12 +1,36 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file From gss at pub.open-bio.org Fri Nov 4 12:45:06 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri Nov 4 12:42:39 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511041745.jA4Hj6rG027213@pub.open-bio.org> gss Fri Nov 4 12:45:06 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet In directory pub.open-bio.org:/tmp/cvs-serv27186/src/org/semanticmoby/servlet Modified Files: AbstractMobyServlet.java Log Message: When responding to GET or POST, set content type of response to application/RDF+XML s-moby/ref-impl/core/src/org/semanticmoby/servlet AbstractMobyServlet.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java 2005/10/31 17:24:54 1.5 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java 2005/11/04 17:45:06 1.6 @@ -37,6 +37,7 @@ // Write everything from the reader to the writer // + response.setContentType("application/rdf+xml"); PrintWriter writer = response.getWriter(); String line; @@ -76,13 +77,11 @@ protected BufferedReader getFileReader(String fileName) { try { - - return new BufferedReader(new InputStreamReader(getServletContext() - .getResourceAsStream(fileName))); + return new BufferedReader( + new InputStreamReader( + getServletContext().getResourceAsStream(fileName))); } catch (Throwable t) { - t.printStackTrace(); - return null; } } @@ -134,6 +133,7 @@ // Send the graph back in response // + response.setContentType("application/rdf+xml"); resource.serialize(out); } catch (Throwable t) { From gss at pub.open-bio.org Fri Nov 4 19:46:33 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri Nov 4 19:44:08 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511050046.jA50kXCX028368@pub.open-bio.org> gss Fri Nov 4 19:46:33 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv28343/WebRoot/developer Modified Files: dev-tools.jsp Log Message: Fixed URIs s-moby/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.jsp,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/04 20:39:40 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/05 00:46:33 1.4 @@ -13,7 +13,7 @@ Convert a Graph to a Different Format -
    + Paste a graph, select its input format, and press "Convert Graph" to convert to the other format @@ -48,61 +48,6 @@
    -
    - -

    - List All Statements in the S-MOBY Metadata Repository -

    - -
    - - - -
    - -
    - -

    - Validate an OWL Graph using Jena -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see what type of - OWL the graph represents - - - -
    -
    - - - -
    - -
    - -

    - Validate an OWL Graph for MOBY Canonical Form -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see if it is MOBY - canonical form - - - -
    -
    - - - -
    - -
    - <%@ include file="/footer.jsp" %> From gss at pub.open-bio.org Fri Nov 4 19:47:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri Nov 4 19:44:32 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511050047.jA50l08r028398@pub.open-bio.org> gss Fri Nov 4 19:47:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv28373/WebRoot/developer Modified Files: index.jsp Log Message: Changed wording to omit validation s-moby/ref-impl/semanticmoby.org/WebRoot/developer index.jsp,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp 2005/11/04 20:39:40 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp 2005/11/05 00:47:00 1.6 @@ -13,17 +13,6 @@ - - - - From senger at pub.open-bio.org Sat Nov 5 12:51:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 5 12:48:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp4ib001464@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/service/dashboard/images Added Files: magentaDiamond.gif smallAddData.gif smallAddData_dis.gif smallDone.gif smallEdit.gif smallEdit_dis.gif smallInfo.gif smallPage.gif smallPageStar.gif smallTrash.gif smallTrash_gis.gif smallTree.gif small_yellow.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images magentaDiamond.gif,NONE,1.1 smallAddData.gif,NONE,1.1 smallAddData_dis.gif,NONE,1.1 smallDone.gif,NONE,1.1 smallEdit.gif,NONE,1.1 smallEdit_dis.gif,NONE,1.1 smallInfo.gif,NONE,1.1 smallPage.gif,NONE,1.1 smallPageStar.gif,NONE,1.1 smallTrash.gif,NONE,1.1 smallTrash_gis.gif,NONE,1.1 smallTree.gif,NONE,1.1 small_yellow.gif,NONE,1.1 From senger at pub.open-bio.org Sat Nov 5 12:51:05 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 5 12:49:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp5FN001483@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/02 06:39:06 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/05 17:51:04 1.5 @@ -87,6 +87,13 @@ } } + public void setDataType (MobyDataType dataType) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).setDataType (dataType); + } + } + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: From senger at pub.open-bio.org Sat Nov 5 12:51:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 5 12:49:37 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp4LY001449@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java CommonTree.java Dashboard.java DataTypesTree.java NOTES NamespacesTree.java RegistrationPanel.java RegistryPanel.java ServiceTypesTree.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.13,1.14 CommonTree.java,1.11,1.12 Dashboard.java,1.10,1.11 DataTypesTree.java,1.8,1.9 NOTES,1.16,1.17 NamespacesTree.java,1.3,1.4 RegistrationPanel.java,1.7,1.8 RegistryPanel.java,1.16,1.17 ServiceTypesTree.java,1.4,1.5 ServicesTree.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 15:21:57 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/05 17:51:04 1.14 @@ -17,6 +17,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.JSplitPane; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -406,6 +407,32 @@ } /********************************************************************* + * Split two components horizontaly with given weight. Add some + * common style. + ********************************************************************/ + protected JSplitPane hSplit (Component a, Component b, double weight) { + JSplitPane split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, + a, b); + split.setResizeWeight (0.5); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + return split; + } + + /********************************************************************* + * Split two components vertically with given weight. Add some + * common style. + ********************************************************************/ + protected JSplitPane vSplit (Component a, Component b, double weight) { + JSplitPane split = new JSplitPane (JSplitPane.VERTICAL_SPLIT, + a, b); + split.setResizeWeight (0.5); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + return split; + } + + /********************************************************************* * ********************************************************************/ protected String getPrefValue (String key, =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/03 08:38:39 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 17:51:04 1.12 @@ -84,6 +84,7 @@ static protected Icon smallTIcon, smallTIconDis; static protected Icon smallIIcon, smallIIconDis; static protected Icon smallOIcon, smallOIconDis; + static protected Icon sLeafIcon, stLeafIcon, dtLeafIcon, nsLeafIcon; protected String rootNode; @@ -123,11 +124,18 @@ loadIcons(); } - // + /********************************************************************* + * + ********************************************************************/ class CommonTreeCellRenderer extends DefaultTreeCellRenderer { HashSet toBeHighlighted; + Icon leafImage; + + public void setLeafIcon (Icon icon) { + leafImage = icon; + } public void setToBeHighlighted (HashSet toBeHighlighted) { this.toBeHighlighted = toBeHighlighted; @@ -160,9 +168,9 @@ setText (rootNode); } - // TBD: whale icon? -// if (leaf) -// ((JLabel)c).setIcon (icons [COMPUTER]); + // some icons + if (leaf) + ((JLabel)c).setIcon (leafImage); // do highlight @@ -176,6 +184,14 @@ } /********************************************************************* + * + ********************************************************************/ + public void setLeafIcon (Icon icon) { + CommonTreeCellRenderer r = (CommonTreeCellRenderer)getCellRenderer(); + r.setLeafIcon (icon); + } + + /********************************************************************* * Put this tree in a scrollable pane. ********************************************************************/ public JScrollPane scrollable() { @@ -237,6 +253,11 @@ if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + + if (nsLeafIcon == null) nsLeafIcon = loadIcon ("images/small_yellow.gif"); + if (stLeafIcon == null) stLeafIcon = loadIcon ("images/magentaDiamond.gif"); + if (sLeafIcon == null) sLeafIcon = loadIcon ("images/console.gif"); + if (dtLeafIcon == null) dtLeafIcon = loadIcon ("images/smallPage.gif"); } // =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/10/28 11:30:37 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/05 17:51:04 1.11 @@ -23,10 +23,12 @@ import javax.swing.text.html.HTMLDocument; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; +import javax.swing.SwingUtilities; import java.awt.GridBagLayout; import java.awt.Font; import java.awt.Color; +import java.awt.Insets; import java.awt.Dimension; import java.beans.PropertyChangeListener; @@ -115,7 +117,15 @@ JFrame frame = SwingUtils.createMainFrame (getComponent (propertyChannel), getName()); addMenuBar (frame); - SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); +// SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); + SwingUtils.showMainFrame (frame, new Dimension (1000, 800)); + } + + /************************************************************************** + * + **************************************************************************/ + public Dimension getPreferredSize() { + return new Dimension (800, 640); } /************************************************************************** @@ -211,9 +221,10 @@ ProgressView.monitor.destroy(); // put it all together + Insets BREATH = new Insets (5,5,5,5); SwingUtils.addComponent (p, header, 0, 0, 1, 1, AbstractPanel.HORI, AbstractPanel.NWEST, 1.0, 0.0); SwingUtils.addComponent (p, tabbedPane, 0, 1, 1, 1, AbstractPanel.BOTH, AbstractPanel.NWEST, 1.0, 1.0); - SwingUtils.addComponent (p, statusBar, 0, 2, 1, 1, AbstractPanel.HORI, AbstractPanel.WEST, 1.0, 0.0); + SwingUtils.addComponent (p, statusBar, 0, 2, 1, 1, AbstractPanel.HORI, AbstractPanel.WEST, 1.0, 0.0, BREATH); return p; } @@ -261,6 +272,7 @@ class StatusBar extends JLabel implements PropertyChangeListener { DateFormat df = DateFormat.getTimeInstance(); + Icon myIcon; public StatusBar (String text) { super (text); } @@ -272,6 +284,11 @@ if (prop.equalsIgnoreCase (DP_STATUS_MSG)) setText ("[" + df.format (new Date()) + "] " + value.toString()); } + public Icon getIcon() { + if (myIcon == null) + myIcon = SwingUtils.createIcon ("images/smallDone.gif", Dashboard.class); + return myIcon; + } } /************************************************************************** @@ -302,7 +319,13 @@ public static void main (String[] args) { if (args.length > 0 && args[0].equals ("-nop")) Dashboard.useLoadMonitor = false; - new Dashboard().show(); + + // schedule a job for the event-dispatching thread + SwingUtilities.invokeLater (new Runnable() { + public void run() { + new Dashboard().show(); + } + }); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/03 08:38:39 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/05 17:51:04 1.9 @@ -72,6 +72,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Data Types Menu"); + setLeafIcon (dtLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 15:21:57 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/05 17:51:04 1.17 @@ -1,3 +1,8 @@ +* better initial dimension of the whole dashboard +* too much empty space in the dashboard title... + (perhaps to move the icon somewhere else - like a "splash panel") + +--- * show/store XML sent to register this service (a place for using it other time?) @@ -125,8 +130,6 @@ * Icons: - better icon for AddHAS (with a small star) ? small icons to buttons - ? graphics to trees - - small icon to the status bar * alltools2: - JTextFieldWithHistory should remember also an empty value ("") @@ -134,4 +137,4 @@ ? use FileSystemView in file choosers * BUG: not sure why so many (repeated) changes from the actionlistener in JFieldTextWithHistory - + * SwingUtils can be simplified (closeOnExit etc.) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/03 08:38:39 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/05 17:51:04 1.4 @@ -65,6 +65,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Namespaces Menu"); + setLeafIcon (nsLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 15:21:57 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 17:51:04 1.8 @@ -17,6 +17,10 @@ import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; +import org.biomoby.shared.MobyData; +import org.biomoby.shared.MobyPrimaryDataSimple; +import org.biomoby.shared.MobyPrimaryDataSet; +import org.biomoby.shared.MobySecondaryData; import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; @@ -33,17 +37,32 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JComboBox; import javax.swing.JPopupMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.AbstractAction; import javax.swing.JComponent; +import javax.swing.DefaultListModel; +import javax.swing.DefaultComboBoxModel; +import javax.swing.DefaultCellEditor; import javax.swing.text.html.HTMLDocument; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableCellRenderer; +import javax.swing.table.TableCellEditor; +import javax.swing.table.TableColumn; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.AbstractCellEditor; +import javax.swing.BorderFactory; +import javax.swing.border.Border; import java.awt.GridBagLayout; import java.awt.Font; +import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -98,6 +117,9 @@ JFileChooserWithHistory localRDFFile; JCheckBox useAuth; + JTable table; + PrimaryDataTableModel tableModel; + MobyException dtException, nsException, stException, sException; MobyException dtUnregException, nsUnregException, stUnregException, sUnregException; @@ -107,6 +129,9 @@ protected static Icon menuAddHASIcon, menuAddHASIconDis; protected static Icon menuUnregisterIcon, menuUnregisterIconDis; protected static Icon registerIcon, registerIconDis; + protected static Icon addDataIcon, addDataIconDis; + protected static Icon editDataIcon, editDataIconDis; + protected static Icon deleteDataIcon, trashIcon; // some texts final static String DATA_TYPE_PROLOGUE = @@ -174,6 +199,20 @@ registerIcon = loadIcon ("images/smallRegister.gif"); if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); + + if (addDataIcon == null) + addDataIcon = loadIcon ("images/smallAddData.gif"); + if (addDataIconDis == null) + addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); + + if (editDataIcon == null) + editDataIcon = loadIcon ("images/smallEdit.gif"); + if (editDataIconDis == null) + editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); + + if (deleteDataIcon == null) deleteDataIcon = loadIcon ("images/smallRemove.gif"); + if (trashIcon == null) trashIcon = loadIcon ("images/smallTrash.gif"); + } /************************************************************************** @@ -464,10 +503,351 @@ * **************************************************************************/ protected JPanel getPrimaryInputs() { - JPanel p = new JPanel (new GridBagLayout()); + + JPanel p = createTitledPanel (""); + + tableModel = new PrimaryDataTableModel(); + table = new JTable (tableModel); + + // set renderers for buttons column + TableColumn buttonColumn = + table.getColumnModel().getColumn (PrimaryDataTableModel.COL_BUTTON); + if (trashIcon != null) + buttonColumn.setMaxWidth (trashIcon.getIconWidth() + 15); + buttonColumn.setCellRenderer (new ButtonRenderer()); + buttonColumn.setCellEditor (new ButtonEditor()); + buttonColumn.setHeaderRenderer (new TableCellRenderer() { + public Component getTableCellRendererComponent + (JTable table, Object value, boolean isSelected, + boolean hasFocus, int row, int column) { + return (JComponent)value; + } + }); + JButton headerButton = new JButton ("", trashIcon); + headerButton.setToolTipText ("Click in this column to remove data from this service"); + buttonColumn.setHeaderValue (headerButton); + + // set renderers for namespaces column + TableColumn nsColumn = + table.getColumnModel().getColumn (PrimaryDataTableModel.COL_NAMESPACE); + nsColumn.setCellRenderer (new NamespaceRenderer()); + nsColumn.setCellEditor (new NamespaceEditor()); + + JScrollPane tablePane = new JScrollPane (table); + + // an add button + JButton addButton = + createButton (" Add new data ", + "Add new data to the service definition", + KeyEvent.VK_A, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + onAddData(); + } + }); + addButton.setIcon (addDataIcon); + addButton.setDisabledIcon (addDataIconDis); + + // a tree with all already existing data types + DataTypesBoard dataTypesBoard = + new DataTypesBoard (registryModel, + console, + propertyChannel, + new CustomDataTypesSimplestTree (registryModel, console)); + dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); + + // a tree with all already existing namespaces + NamespacesBoard namespacesBoard = + new NamespacesBoard (registryModel, + console, + propertyChannel, + new CustomNamespacesSimplestTree (registryModel, console)); + namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); + + // split the trees + JSplitPane split = hSplit (dataTypesBoard, namespacesBoard, 0.5); + + // put it together + SwingUtils.addComponent (p, addButton, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, tablePane, 0, 1, 1, 1, BOTH, NWEST, 1.0, 0.3, BREATH_TOP); + SwingUtils.addComponent (p, split, 0, 2, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); return p; } + + private Vector data = new Vector(); + + /************************************************************************** + * + **************************************************************************/ + protected void onAddData() { + data.addElement (new MobyPrimaryDataSimple ("")); + + int rowCount = tableModel.getRowCount(); + tableModel.fireTableRowsInserted (rowCount-1, rowCount-1); + } + + /************************************************************************** + * + **************************************************************************/ + class DeleteRowButton extends JButton { + int rowToDelete = -1; + public DeleteRowButton() { + super(); + setText (""); + setIcon (deleteDataIcon); + setToolTipText ("Remove this data from this service"); + setFocusPainted (false); + addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + if (rowToDelete >= 0) { + tableModel.removeRow (rowToDelete); + } + } + }); + } + public void setRowToDelete (int row) { + rowToDelete = row; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ButtonRenderer extends DeleteRowButton + implements TableCellRenderer { + public ButtonRenderer() { + setOpaque (true); + } + public Component getTableCellRendererComponent (JTable table, + Object value, + boolean isSelected, + boolean hasFocus, + int row, int column) { + return this; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ButtonEditor extends AbstractCellEditor + implements TableCellEditor { + public Object getCellEditorValue() { + return null; + } + public Component getTableCellEditorComponent (JTable table, + Object value, + boolean isSelected, + int row, int column) { + DeleteRowButton button = new DeleteRowButton(); + button.setRowToDelete (row); + return button; + } + } + + /************************************************************************** + * + **************************************************************************/ + class NamespaceRenderer extends DefaultTableCellRenderer { + + public NamespaceRenderer() { + setOpaque (true); + } + protected void setValue (Object value) { + if (value == null) { + setText (""); + return; + } + MobyPrimaryDataSimple simple = null; + if (value instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)value; + } else if (value instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + MobyNamespace[] nss = simple.getNamespaces(); + if (nss.length == 0) + setText (""); + else if (nss.length == 1) + setText (nss[0].getName()); + else + setText (nss.length + " chosen"); + } + } + } + + /************************************************************************** + * + **************************************************************************/ + class NamespaceEditor extends AbstractCellEditor + implements TableCellEditor { + DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); + + public Object getCellEditorValue() { + return null; + } + + public Component getTableCellEditorComponent (JTable table, + Object value, + boolean isSelected, + int row, int column) { + + JComboBox comboBox = new JComboBox (comboModel); + comboBox.setOpaque (true); + + MobyPrimaryDataSimple simple = null; + if (value instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)value; + } else if (value instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + MobyNamespace[] nss = simple.getNamespaces(); + comboModel.removeAllElements(); + for (int i = 0; i < nss.length; i++) { + comboModel.addElement (nss[i].getName()); + } + } + return comboBox; + } + } + + /************************************************************************** + * + **************************************************************************/ + class PrimaryDataTableModel extends AbstractTableModel { + public final static int COL_BUTTON = 0; + public final static int COL_ARTICLE = 1; + public final static int COL_DATATYPE = 2; + public final static int COL_IN_SET = 3; + public final static int COL_NAMESPACE = 4; + + private String[] columnNames = new String[] { + "Remove", + "Article name", + "Data Type", + "In Set", + "Namespaces" }; + + private Class[] columnClasses = new Class[] { + Integer.class, + String.class, + String.class, + Boolean.class, + MobyData.class }; + + public int getColumnCount() { + return columnNames.length; + } + + public int getRowCount() { + return data.size(); + } + + public String getColumnName (int col) { + return columnNames [col]; + } + + public Class getColumnClass (int col) { + return columnClasses [col]; + } + + private String getDataTypeName (MobyData data) { + if (data == null) return ""; + MobyDataType dataType = null; + if (data instanceof MobyPrimaryDataSimple) + dataType = ((MobyPrimaryDataSimple)data).getDataType(); + else if (data instanceof MobyPrimaryDataSet) + dataType = ((MobyPrimaryDataSet)data).getDataType(); + if (dataType == null) return ""; + String name = dataType.getName(); + return (name == null ? "" : name); + } + + private void setDataTypeName (MobyData data, String name) { + if (data == null) return; + MobyDataType dataType = new MobyDataType (name); + if (data instanceof MobyPrimaryDataSimple) + ((MobyPrimaryDataSimple)data).setDataType (dataType); + else if (data instanceof MobyPrimaryDataSet) + ((MobyPrimaryDataSet)data).setDataType (dataType); + } + + public Object getValueAt (int row, int col) { + try { + MobyData d = (MobyData)data.elementAt (row); + switch (col) { + case COL_BUTTON: return new Integer (row); + case COL_ARTICLE: return d.getName(); + case COL_DATATYPE: return getDataTypeName (d); + case COL_IN_SET: return new Boolean (d instanceof MobyPrimaryDataSet); + case COL_NAMESPACE: return d; + } + } catch (Exception e) { } + return ""; + } + + public void setValueAt (Object value, int row, int col) { + // TBD: I do not know why this method is called after a + // last row has been deleted - so the 'row' is actually + // out of bounds; but if other than last row is deleted + // things work fine... (that's why i put here try{} but I + // am not happy about it + try { + MobyData d = (MobyData)data.elementAt (row); + switch (col) { + case COL_ARTICLE: + d.setName (value.toString()); + break; + case COL_DATATYPE: + setDataTypeName (d, value.toString()); + break; + case COL_IN_SET: + if ( ((Boolean)value).booleanValue() ) { + // change data to a collection (if necessary) + if (d instanceof MobyPrimaryDataSimple) { + MobyPrimaryDataSet set = new MobyPrimaryDataSet (d.getName()); + set.addElement ((MobyPrimaryDataSimple)d); + synchronized (data) { + data.removeElementAt (row); + data.insertElementAt (set, row); + } + } + } else { + // change data to a simple (if necessary) + if (d instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = + ((MobyPrimaryDataSet)d).getElements(); + if (simples.length > 0) { + simples[0].setName (d.getName()); + synchronized (data) { + data.removeElementAt (row); + data.insertElementAt (simples[0], row); + } + } + } + } + break; + } + fireTableCellUpdated (row, col); + } catch (Exception e) { } + } + + public void removeRow (int row) { + data.removeElementAt (row); + fireTableRowsDeleted (row, row); + } + + public boolean isCellEditable (int row, int col) { + return (col != COL_DATATYPE); + } + } + /************************************************************************** * **************************************************************************/ @@ -1522,4 +1902,123 @@ sType.setText (nodeObject.getValue()); } } + + + /************************************************************************** + * + * Customized tree of data types - use for service registration + * + **************************************************************************/ + protected class CustomDataTypesSimplestTree + extends DataTypesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomDataTypesSimplestTree (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeFromPopups (AC_HASA); + removeFromPopups (AC_DEPR); + removeSeparatorAfter (AC_ASORT); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected data type to the data table. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_DATA_TYPE) { + int[] rows = table.getSelectedRows(); + for (int i = 0; i < rows.length; i++) { + String value = nodeObject.getValue(); + table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); + Object article = table.getValueAt (rows[i],PrimaryDataTableModel.COL_ARTICLE); + if (article == null || UUtils.isEmpty (article.toString())) + table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_ARTICLE); + } + } + } + } + + /************************************************************************** + * + * Customized tree of namespaces - use for service registration + * + **************************************************************************/ + protected class CustomNamespacesSimplestTree + extends NamespacesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomNamespacesSimplestTree (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected namespace to the data table. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_NAMESPACE) { + int[] rows = table.getSelectedRows(); + for (int i = 0; i < rows.length; i++) { + String value = nodeObject.getValue(); +// table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); + Object data = table.getValueAt (rows[i],PrimaryDataTableModel.COL_NAMESPACE); + MobyPrimaryDataSimple simple = null; + if (data instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)data; + } else if (data instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)data).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + simple.addNamespace (new MobyNamespace (value)); + tableModel.fireTableCellUpdated (rows[i], PrimaryDataTableModel.COL_NAMESPACE); + } + } + } + } + } + } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/02 06:39:06 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 17:51:04 1.17 @@ -81,6 +81,9 @@ JLabel labelCacheDir; CommonConsole console; + // shared icons + protected static Icon infoIcon, infoIconDis; + /********************************************************************* * Default constructor. ********************************************************************/ @@ -88,6 +91,14 @@ super(); } + /********************************************************************* + * Load shared icons. + ********************************************************************/ + protected void loadIcons() { + super.loadIcons(); + if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + } + /************************************************************************** * **************************************************************************/ @@ -289,6 +300,8 @@ onCacheInfo(); } }); +// infoButton.setIcon (infoIcon); + JButton updateButton = createButton (" Update ", "Update local cache from Biomoby registry", =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/03 08:38:39 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/05 17:51:04 1.5 @@ -66,6 +66,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Service Types Menu"); + setLeafIcon (stLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.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/service/dashboard/ServicesTree.java 2005/11/02 06:39:06 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/05 17:51:04 1.2 @@ -75,6 +75,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Services Menu"); + setLeafIcon (sLeafIcon); } /********************************************************************* From senger at pub.open-bio.org Sat Nov 5 15:14:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 5 15:12:18 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511052014.jA5KEncD001879@pub.open-bio.org> senger Sat Nov 5 15:14:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1852/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java RegistrationPanel.java RegistryPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonTree.java,1.12,1.13 RegistrationPanel.java,1.8,1.9 RegistryPanel.java,1.17,1.18 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 17:51:04 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 20:14:49 1.13 @@ -243,16 +243,16 @@ menuReloadIconDis = SwingUtils.createIcon ("images/smallReload_dis.gif", Dashboard.class); - if (smallNIcon == null) smallNIcon = loadIcon ("images/smallN.gif"); - if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallN_dis.gif"); - if (smallAIcon == null) smallAIcon = loadIcon ("images/smallA.gif"); - if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallA_dis.gif"); - if (smallTIcon == null) smallTIcon = loadIcon ("images/smallT.gif"); - if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallT_dis.gif"); - if (smallIIcon == null) smallIIcon = loadIcon ("images/smallI.gif"); - if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); - if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); - if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + if (smallNIcon == null) smallNIcon = loadIcon ("images/smallSortAZ.gif"); + if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallSortAZ_dis.gif"); + if (smallAIcon == null) smallAIcon = loadIcon ("images/smallAuth.gif"); + if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallAuth_dis.gif"); + if (smallTIcon == null) smallTIcon = loadIcon ("images/smallInher.gif"); + if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallInher_dis.gif"); + if (smallIIcon == null) smallIIcon = loadIcon ("images/smallImport.gif"); + if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallImport_dis.gif"); + if (smallOIcon == null) smallOIcon = loadIcon ("images/smallExport.gif"); + if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallExport_dis.gif"); if (nsLeafIcon == null) nsLeafIcon = loadIcon ("images/small_yellow.gif"); if (stLeafIcon == null) stLeafIcon = loadIcon ("images/magentaDiamond.gif"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 17:51:04 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 20:14:49 1.9 @@ -190,15 +190,11 @@ if (menuAddHASIconDis == null) menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); - if (menuUnregisterIcon == null) - menuUnregisterIcon = loadIcon ("images/smallUnregister.gif"); - if (menuUnregisterIconDis == null) - menuUnregisterIconDis = loadIcon ("images/smallUnregister_dis.gif"); - - if (registerIcon == null) - registerIcon = loadIcon ("images/smallRegister.gif"); - if (registerIconDis == null) - registerIconDis = loadIcon ("images/smallRegister_dis.gif"); + if (menuUnregisterIcon == null) menuUnregisterIcon = loadIcon ("images/smallTrash.gif"); + if (menuUnregisterIconDis == null) menuUnregisterIconDis = loadIcon ("images/smallTrash_dis.gif"); + + if (registerIcon == null) registerIcon = loadIcon ("images/smallRegister.gif"); + if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); if (addDataIcon == null) addDataIcon = loadIcon ("images/smallAddData.gif"); @@ -697,6 +693,7 @@ JComboBox comboBox = new JComboBox (comboModel); comboBox.setOpaque (true); + createPopups ("Namespace Menu", comboBox); MobyPrimaryDataSimple simple = null; if (value instanceof MobyPrimaryDataSimple) { @@ -2021,4 +2018,57 @@ } } + + + + protected JPopupMenu popup; + + /********************************************************************* + * Create a popup object with common items. Subclasses can (and + * usually do) add more items, or re-created the whole popup.

    + * + * @param title is given to the popups + ********************************************************************/ + protected void createPopups (String title, JComponent component) { + System.out.println ("POPUP"); + popup = new JPopupMenu (title); + popup.add + (CommonTree.createMenuItem (new AbstractAction ("Remove") { + public void actionPerformed (ActionEvent e) { + } + }, "R", trashIcon, trashIcon)); + + // add listener to this tree to bring up popup menus + MouseListener popupListener = new PopupListener(); + component.addMouseListener (popupListener); + } + + class PopupListener extends MouseAdapter { + public void mousePressed (MouseEvent e) { + maybeShowPopup (e); + } + public void mouseReleased (MouseEvent e) { + maybeShowPopup (e); + } + private void maybeShowPopup (MouseEvent e) { + System.out.println ("ME: " + e); + if (e.isPopupTrigger() && popup.isEnabled()) { + popup.show (e.getComponent(), + e.getX(), e.getY()); + } + } + } + + + + + + + + + + + + + } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 17:51:04 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 20:14:49 1.18 @@ -82,7 +82,9 @@ CommonConsole console; // shared icons - protected static Icon infoIcon, infoIconDis; + protected static Icon defaultsIcon; + protected static Icon reloadIcon; + protected static Icon infoIcon, updateIcon, eraseIcon; /********************************************************************* * Default constructor. @@ -96,7 +98,11 @@ ********************************************************************/ protected void loadIcons() { super.loadIcons(); - if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + if (defaultsIcon == null) defaultsIcon = loadIcon ("images/smallUndo.gif"); + if (reloadIcon == null) reloadIcon = loadIcon ("images/smallReload.gif"); + if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + if (updateIcon == null) updateIcon = loadIcon ("images/smallSynch.gif"); + if (eraseIcon == null) eraseIcon = loadIcon ("images/smallTrash.gif"); } /************************************************************************** @@ -247,6 +253,7 @@ onReloadAll(); } }); + reloadAllButton.setIcon (reloadIcon); JButton defaultsButton = createButton (" Restore defaults ", "Fill the text fields above with the default values", @@ -256,6 +263,8 @@ onDefaults(); } }); + defaultsButton.setIcon (defaultsIcon); + JPanel buttonPanel = createButtonPanel (new JButton[] { reloadAllButton, defaultsButton }); JPanel rLocation = createTitledPanel ("Biomoby registry location"); @@ -300,7 +309,7 @@ onCacheInfo(); } }); -// infoButton.setIcon (infoIcon); + infoButton.setIcon (infoIcon); JButton updateButton = createButton (" Update ", @@ -311,6 +320,7 @@ onCacheUpdate(); } }); + updateButton.setIcon (updateIcon); JButton eraseButton = createButton (" Erase ", "Remove everything from the local cache", @@ -320,6 +330,7 @@ onCacheErase(); } }); + eraseButton.setIcon (eraseIcon); JPanel buttonPanel = createButtonPanel (new JButton[] { infoButton, updateButton, eraseButton }); From senger at pub.open-bio.org Sat Nov 5 15:14:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 5 15:12:19 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511052014.jA5KEnLa001917@pub.open-bio.org> senger Sat Nov 5 15:14:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv1852/src/main/org/biomoby/service/dashboard/images Modified Files: smallInfo.gif smallRegister.gif smallRegister_dis.gif Added Files: smallAuth.gif smallAuth_dis.gif smallExport.gif smallExport_dis.gif smallImport.gif smallImport_dis.gif smallInher.gif smallInher_dis.gif smallSortAZ.gif smallSortAZ_dis.gif smallSynch.gif smallSynch_dis.gif smallTrash_dis.gif smallUndo.gif smallUndo_dis.gif Removed Files: smallA.gif smallA_dis.gif smallI.gif smallI_dis.gif smallN.gif smallN_dis.gif smallO.gif smallO_dis.gif smallT.gif smallT_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallAuth.gif,NONE,1.1 smallAuth_dis.gif,NONE,1.1 smallExport.gif,NONE,1.1 smallExport_dis.gif,NONE,1.1 smallImport.gif,NONE,1.1 smallImport_dis.gif,NONE,1.1 smallInher.gif,NONE,1.1 smallInher_dis.gif,NONE,1.1 smallSortAZ.gif,NONE,1.1 smallSortAZ_dis.gif,NONE,1.1 smallSynch.gif,NONE,1.1 smallSynch_dis.gif,NONE,1.1 smallTrash_dis.gif,NONE,1.1 smallUndo.gif,NONE,1.1 smallUndo_dis.gif,NONE,1.1 smallInfo.gif,1.1,1.2 smallRegister.gif,1.1,1.2 smallRegister_dis.gif,1.1,1.2 smallA.gif,1.1,NONE smallA_dis.gif,1.1,NONE smallI.gif,1.1,NONE smallI_dis.gif,1.1,NONE smallN.gif,1.1,NONE smallN_dis.gif,1.1,NONE smallO.gif,1.1,NONE smallO_dis.gif,1.1,NONE smallT.gif,1.1,NONE smallT_dis.gif,1.1,NONE =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif 2005/11/05 17:51:04 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif: diff failed =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif 2005/11/03 08:38:40 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif: diff failed =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif 2005/11/03 08:38:40 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif: diff failed rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallA.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallA_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallI.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallI_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallN.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallN_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallO.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallO_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallT.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallT_dis.gif,v: No such file or directory From senger at pub.open-bio.org Sun Nov 6 00:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 00:30:41 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZ7q003429@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv3367/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSimple.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSimple.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/09/22 16:07:09 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 05:31:35 1.6 @@ -100,6 +100,20 @@ return true; } + public void removeNamespace (String namespaceName) { + removeNamespace (new MobyNamespace (namespaceName)); + } + + public void removeNamespace (MobyNamespace value) { + for (Enumeration en = namespaces.elements(); en.hasMoreElements(); ) { + if (en.nextElement().equals (value)) { + namespaces.removeElement (value); + return; + } + } + } + + /************************************************************************** * Convert this instance into XML. * The XML will look like this: From senger at pub.open-bio.org Sun Nov 6 00:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 00:30:45 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZOm003386@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv3367/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.46,1.47 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/02 06:39:05 1.46 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 05:31:34 1.47 @@ -1,3 +1,14 @@ +2005-11-06 Martin Senger + + * Added test for not to duplicate same namespaces in + MobyPrimaryData. + + * Added new class MobyPrimaryData in between MobyData and + MobyPrimaryDataSimple/Set - helps better distinguished between + primary and secondary data. + + * Added removeNamespace() to MobyPrimaryDataSimple. + 2005-11-02 Martin Senger * Changed method equals() in MobyService. From senger at pub.open-bio.org Sun Nov 6 00:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 00:30:49 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZRB003409@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv3367/src/main/org/biomoby/service/dashboard Modified Files: NOTES RegistrationPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,1.17,1.18 RegistrationPanel.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/05 17:51:04 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/06 05:31:35 1.18 @@ -127,9 +127,6 @@ * The same, after de-registration * Then make the reg/unreg real... -* Icons: - - better icon for AddHAS (with a small star) - ? small icons to buttons * alltools2: - JTextFieldWithHistory should remember also an empty value ("") =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 20:14:49 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/06 05:31:35 1.10 @@ -38,12 +38,14 @@ import javax.swing.JTextArea; import javax.swing.JTabbedPane; import javax.swing.JTable; +import javax.swing.JList; import javax.swing.JComboBox; import javax.swing.JPopupMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.AbstractAction; import javax.swing.JComponent; +import javax.swing.ListCellRenderer; import javax.swing.DefaultListModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultCellEditor; @@ -59,6 +61,8 @@ import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; import javax.swing.border.Border; +import javax.swing.event.PopupMenuListener; +import javax.swing.event.PopupMenuEvent; import java.awt.GridBagLayout; import java.awt.Font; @@ -175,20 +179,15 @@ ********************************************************************/ protected void loadIcons() { super.loadIcons(); - if (menuAddISAIcon == null) - menuAddISAIcon = loadIcon ("images/smallAddISA.gif"); - if (menuAddISAIconDis == null) - menuAddISAIconDis = loadIcon ("images/smallAddISA_dis.gif"); + + if (menuAddISAIcon == null) menuAddISAIcon = loadIcon ("images/smallAddISA.gif"); + if (menuAddISAIconDis == null) menuAddISAIconDis = loadIcon ("images/smallAddISA_dis.gif"); - if (menuAddHASAIcon == null) - menuAddHASAIcon = loadIcon ("images/smallAddHASA.gif"); - if (menuAddHASAIconDis == null) - menuAddHASAIconDis = loadIcon ("images/smallAddHASA_dis.gif"); + if (menuAddHASAIcon == null) menuAddHASAIcon = loadIcon ("images/smallAddHASA.gif"); + if (menuAddHASAIconDis == null) menuAddHASAIconDis = loadIcon ("images/smallAddHASA_dis.gif"); - if (menuAddHASIcon == null) - menuAddHASIcon = loadIcon ("images/smallAddHAS.gif"); - if (menuAddHASIconDis == null) - menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); + if (menuAddHASIcon == null) menuAddHASIcon = loadIcon ("images/smallAddHAS.gif"); + if (menuAddHASIconDis == null) menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); if (menuUnregisterIcon == null) menuUnregisterIcon = loadIcon ("images/smallTrash.gif"); if (menuUnregisterIconDis == null) menuUnregisterIconDis = loadIcon ("images/smallTrash_dis.gif"); @@ -196,19 +195,14 @@ if (registerIcon == null) registerIcon = loadIcon ("images/smallRegister.gif"); if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); - if (addDataIcon == null) - addDataIcon = loadIcon ("images/smallAddData.gif"); - if (addDataIconDis == null) - addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); - - if (editDataIcon == null) - editDataIcon = loadIcon ("images/smallEdit.gif"); - if (editDataIconDis == null) - editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); + if (addDataIcon == null) addDataIcon = loadIcon ("images/smallAddData.gif"); + if (addDataIconDis == null) addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); + + if (editDataIcon == null) editDataIcon = loadIcon ("images/smallEdit.gif"); + if (editDataIconDis == null) editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); if (deleteDataIcon == null) deleteDataIcon = loadIcon ("images/smallRemove.gif"); if (trashIcon == null) trashIcon = loadIcon ("images/smallTrash.gif"); - } /************************************************************************** @@ -675,12 +669,59 @@ } } - /************************************************************************** + /************************************************************************** * **************************************************************************/ class NamespaceEditor extends AbstractCellEditor implements TableCellEditor { + + // this is what is diplay when some namespaces are present DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); + JComboBox comboBox; + + // used when there are no namespaces (so a combo box is useless) + DefaultTableCellRenderer defaultRenderer = new DefaultTableCellRenderer(); + + // remember where this combo box is located it (we will need + // it to fire 'table update' when we remove some namespaces) + JTable table; + int row, col; + + // remember where the displayed namespaces come from + MobyPrimaryDataSimple lastSimple = null; + + public NamespaceEditor() { + defaultRenderer.setText (""); + comboBox = new JComboBox (comboModel); + comboBox.setOpaque (true); + comboBox.setRenderer (new ComboBoxRenderer()); + comboBox.addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + if ( (e.getModifiers() & ActionEvent.CTRL_MASK) > 0) { + JComboBox cb = (JComboBox)e.getSource(); + Object selectedItem = cb.getSelectedItem(); + if (selectedItem != null) { + String namespace = selectedItem.toString(); + if (lastSimple != null) { + lastSimple.removeNamespace (namespace); + ((AbstractTableModel)table.getModel()).fireTableCellUpdated (row, col); + + } + } + } + // make the renderer reappear + fireEditingStopped(); + } + }); + comboBox.addPopupMenuListener (new PopupMenuListener() { + public void popupMenuCanceled (PopupMenuEvent e) { + // make the renderer reappear + fireEditingStopped(); + } + public void popupMenuWillBecomeVisible (PopupMenuEvent e) {} + public void popupMenuWillBecomeInvisible (PopupMenuEvent e) {} + }); + } public Object getCellEditorValue() { return null; @@ -689,28 +730,63 @@ public Component getTableCellEditorComponent (JTable table, Object value, boolean isSelected, - int row, int column) { + int row, int col) { - JComboBox comboBox = new JComboBox (comboModel); - comboBox.setOpaque (true); - createPopups ("Namespace Menu", comboBox); + // remember (used when a namespace is being deleted) + this.table = table; + this.row = row; + this.col = col; - MobyPrimaryDataSimple simple = null; + // fill combo box with the current namespaces + lastSimple = null; if (value instanceof MobyPrimaryDataSimple) { - simple = (MobyPrimaryDataSimple)value; + lastSimple = (MobyPrimaryDataSimple)value; } else if (value instanceof MobyPrimaryDataSet) { MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); if (simples.length > 0) - simple = simples[0]; + lastSimple = simples[0]; } - if (simple != null) { - MobyNamespace[] nss = simple.getNamespaces(); - comboModel.removeAllElements(); - for (int i = 0; i < nss.length; i++) { - comboModel.addElement (nss[i].getName()); + if (lastSimple != null) { + MobyNamespace[] nss = lastSimple.getNamespaces(); + if (nss.length > 0) { + comboModel.removeAllElements(); + for (int i = 0; i < nss.length; i++) + comboModel.addElement (nss[i].getName()); + return comboBox; } } - return comboBox; + return defaultRenderer; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ComboBoxRenderer extends JLabel + implements ListCellRenderer { + + public ComboBoxRenderer() { + setOpaque (true); + setIcon (trashIcon); + } + + public Component getListCellRendererComponent (JList list, + Object value, + int index, + boolean isSelected, + boolean cellHasFocus) { + if (isSelected) { + setBackground (list.getSelectionBackground()); + setForeground (list.getSelectionForeground()); + if (index > -1) + list.setToolTipText ("To remove a namespce, hold CTRL and select it"); + + } else { + setBackground (list.getBackground()); + setForeground (list.getForeground()); + } + setText (value == null ? "" : value.toString()); + return this; } } @@ -1999,7 +2075,6 @@ int[] rows = table.getSelectedRows(); for (int i = 0; i < rows.length; i++) { String value = nodeObject.getValue(); -// table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); Object data = table.getValueAt (rows[i],PrimaryDataTableModel.COL_NAMESPACE); MobyPrimaryDataSimple simple = null; if (data instanceof MobyPrimaryDataSimple) { @@ -2017,58 +2092,4 @@ } } } - - - - - protected JPopupMenu popup; - - /********************************************************************* - * Create a popup object with common items. Subclasses can (and - * usually do) add more items, or re-created the whole popup.

    - * - * @param title is given to the popups - ********************************************************************/ - protected void createPopups (String title, JComponent component) { - System.out.println ("POPUP"); - popup = new JPopupMenu (title); - popup.add - (CommonTree.createMenuItem (new AbstractAction ("Remove") { - public void actionPerformed (ActionEvent e) { - } - }, "R", trashIcon, trashIcon)); - - // add listener to this tree to bring up popup menus - MouseListener popupListener = new PopupListener(); - component.addMouseListener (popupListener); - } - - class PopupListener extends MouseAdapter { - public void mousePressed (MouseEvent e) { - maybeShowPopup (e); - } - public void mouseReleased (MouseEvent e) { - maybeShowPopup (e); - } - private void maybeShowPopup (MouseEvent e) { - System.out.println ("ME: " + e); - if (e.isPopupTrigger() && popup.isEnabled()) { - popup.show (e.getComponent(), - e.getX(), e.getY()); - } - } - } - - - - - - - - - - - - - } From senger at pub.open-bio.org Sun Nov 6 11:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:21:20 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNniP013637@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv13600/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/10/27 08:55:48 1.3 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/06 16:23:49 1.4 @@ -1,3 +1,3 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel -org.biomoby.service.dashboard.DebuggingPanel +#org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Sun Nov 6 11:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:22:00 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNo70013750@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java MobyPrimaryDataSimple.java MobySecondaryData.java Added Files: MobyPrimaryData.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryData.java,NONE,1.1 MobyPrimaryDataSet.java,1.5,1.6 MobyPrimaryDataSimple.java,1.6,1.7 MobySecondaryData.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/05 17:51:04 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/06 16:23:50 1.6 @@ -24,7 +24,7 @@ */ public class MobyPrimaryDataSet - extends MobyData { + extends MobyPrimaryData { protected Vector elements = new Vector(); // elemenst are of type MobyPrimaryDataSimple @@ -74,10 +74,11 @@ elements.addElement (value); } - public boolean isPrimary() { - return true; - } - + /************************************************************************** + * Return a data type of the first element of this collection + * (according the Biomoby API, however, all elements should have + * the same data type). + *************************************************************************/ public MobyDataType getDataType() { synchronized (elements) { if (elements.size() > 0) @@ -87,6 +88,11 @@ } } + /************************************************************************** + * Set given data type to all elements of this collection + * (according the Biomoby API all elements should have the same + * data type). + *************************************************************************/ public void setDataType (MobyDataType dataType) { synchronized (elements) { for (Enumeration en = elements.elements(); en.hasMoreElements(); ) @@ -95,6 +101,59 @@ } /************************************************************************** + * Return namespaces of the first element of this collection. + *************************************************************************/ + public MobyNamespace[] getNamespaces() { + synchronized (elements) { + if (elements.size() > 0) + return ((MobyPrimaryDataSimple)elements.firstElement()).getNamespaces(); + else + return new MobyNamespace[] {}; + } + } + + /************************************************************************** + * Set given namespaces of all elements of this collection. + *************************************************************************/ + public void setNamespaces (MobyNamespace[] value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).setNamespaces (value); + } + } + + /************************************************************************** + * Add given namespace of all elements of this collection. + *************************************************************************/ + public void addNamespace (MobyNamespace value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).addNamespace (value); + } + } + + /************************************************************************** + * Remove given namespace (defined by its name) from all elements + * of this collection. + *************************************************************************/ + public void removeNamespace (String namespaceName) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).removeNamespace (namespaceName); + } + } + + /************************************************************************** + * Remove given namespace from all elements of this collection. + *************************************************************************/ + public void removeNamespace (MobyNamespace value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).removeNamespace (value); + } + } + + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: * =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 05:31:35 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 16:23:50 1.7 @@ -26,7 +26,7 @@ */ public class MobyPrimaryDataSimple - extends MobyData { + extends MobyPrimaryData { protected Vector namespaces = new Vector(); // elements are of type MobyNamespace protected MobyDataType dataType; @@ -72,48 +72,71 @@ } } + /************************************************************************** + * + *************************************************************************/ public MobyDataType getDataType() { return dataType; } + + /************************************************************************** + * + *************************************************************************/ public void setDataType (MobyDataType value) { dataType = value; } + /************************************************************************** + * Return all namespaces defined in this data container. + *************************************************************************/ public MobyNamespace[] getNamespaces() { MobyNamespace[] result = new MobyNamespace [namespaces.size()]; namespaces.copyInto (result); return result; } + + /************************************************************************** + * Replace all existing namespaces (if any) by a new array of + * namespaces. Do not accept duplicates (same names). + *************************************************************************/ public void setNamespaces (MobyNamespace[] value) { if (value == null) { namespaces.clear(); } else { for (int i = 0; i < value.length; i++) - namespaces.addElement (value[i]); + addNamespace (value[i]); } } - public void addNamespace (MobyNamespace value) { - namespaces.addElement (value); - } - public boolean isPrimary() { - return true; + /************************************************************************** + * Add one namespace to already existing ones (but only if a + * namespace of the same name does not exist yet). + *************************************************************************/ + public void addNamespace (MobyNamespace value) { + synchronized (namespaces) { + if (! namespaces.contains (value)) + namespaces.addElement (value); + } } + /************************************************************************** + * Remove namespace given by its name. + *************************************************************************/ public void removeNamespace (String namespaceName) { removeNamespace (new MobyNamespace (namespaceName)); } + /************************************************************************** + * Remove given namespace. + *************************************************************************/ public void removeNamespace (MobyNamespace value) { - for (Enumeration en = namespaces.elements(); en.hasMoreElements(); ) { - if (en.nextElement().equals (value)) { - namespaces.removeElement (value); - return; - } + synchronized (namespaces) { + int index = namespaces.indexOf (value); + if (index > -1) + namespaces.remove (index); } } - /************************************************************************** * Convert this instance into XML. * The XML will look like this: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java 2005/09/22 16:07:09 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java 2005/11/06 16:23:50 1.5 @@ -26,7 +26,7 @@ public class MobySecondaryData extends MobyData { - protected String dataType = "STRING"; + protected String dataType = "String"; protected String defaultValue = ""; protected int minimumValue = Integer.MIN_VALUE; protected int maximumValue = Integer.MAX_VALUE; From senger at pub.open-bio.org Sun Nov 6 11:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:22:02 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNofh013772@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/shared/datatypes Modified Files: MobyObject.java Log Message: moby-live/Java/src/main/org/biomoby/shared/datatypes MobyObject.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.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/shared/datatypes/MobyObject.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.java 2005/11/06 16:23:50 1.2 @@ -133,7 +133,7 @@ * * @return a jDom - * element that can be easily incorporated into bigger a XML + * element that can be easily incorporated into a bigger XML * document *************************************************************************/ public Element toXML() { From senger at pub.open-bio.org Sun Nov 6 11:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:22:03 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNnpp013657@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/10/27 04:15:23 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31 @@ -1316,28 +1316,50 @@ /************************************************************************* * *************************************************************************/ + public String getRegisterServiceXML (MobyService service) { + return + "" + + "" + service.getCategory() + "" + + "" + service.getName() + "" + + "" + service.getType() + "" + + "" + service.getAuthority() + "" + + "" + service.getSignatureURL() + "" + + "" + service.getURL() + "" + + "" + service.getEmailContact() + "" + + "" + (service.isAuthoritative() ? "1" : "0") + "" + + "" + + "" + + buildPrimaryInputTag (service) + + buildSecondaryInputTag (service) + + buildOutputTag (service) + + ""; + } + + /************************************************************************* + * + *************************************************************************/ public void registerService (MobyService service) throws MobyException, NoSuccessException, PendingCurationException { String result = (String)doCall ("registerService", - new Object[] { - "" + - "" + service.getCategory() + "" + - "" + service.getName() + "" + - "" + service.getType() + "" + - "" + service.getAuthority() + "" + - "" + service.getSignatureURL() + "" + - "" + service.getURL() + "" + - "" + service.getEmailContact() + "" + - "" + (service.isAuthoritative() ? "1" : "0") + "" + - "" + - "" + - buildPrimaryInputTag (service) + - buildSecondaryInputTag (service) + - buildOutputTag (service) + - "" - }); + new Object[] { getRegisterServiceXML (service) }); +// "" + +// "" + service.getCategory() + "" + +// "" + service.getName() + "" + +// "" + service.getType() + "" + +// "" + service.getAuthority() + "" + +// "" + service.getSignatureURL() + "" + +// "" + service.getURL() + "" + +// "" + service.getEmailContact() + "" + +// "" + (service.isAuthoritative() ? "1" : "0") + "" + +// "" + +// "" + +// buildPrimaryInputTag (service) + +// buildSecondaryInputTag (service) + +// buildOutputTag (service) + +// "" +// }); String[] registered = checkRegistration (result, service); service.setId (registered [0]); service.setRDF (registered [1]); From senger at pub.open-bio.org Sun Nov 6 11:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:23:11 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNnjo013619@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv13600/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.47,1.48 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 05:31:34 1.47 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 16:23:49 1.48 @@ -1,5 +1,12 @@ +2005-11-07 Martin Senger + + * Change default data type in MobySecondaryData from STRING to + String. + 2005-11-06 Martin Senger + * Added method getRegisterServiceXML() to CentralIMpl. + * Added test for not to duplicate same namespaces in MobyPrimaryData. From senger at pub.open-bio.org Sun Nov 6 11:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:23:13 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNoFF013723@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/service/dashboard/images Added Files: smallLog.gif smallLog_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallLog.gif,NONE,1.1 smallLog_dis.gif,NONE,1.1 From senger at pub.open-bio.org Sun Nov 6 11:47:10 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:32 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlAmB013890@pub.open-bio.org> senger Sun Nov 6 11:47:10 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/client Modified Files: GraphsServlet.java Log Message: moby-live/Java/src/main/org/biomoby/client GraphsServlet.java,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/10/27 04:15:23 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/06 16:47:10 1.14 @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; -import java.util.Map; import java.util.Properties; import java.util.Vector; From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:35 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBdR013910@pub.open-bio.org> senger Sun Nov 6 11:47:10 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/registry/rdfagent/test Modified Files: RDFAgentTestSuite.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/test RDFAgentTestSuite.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.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/test/RDFAgentTestSuite.java 2005/09/12 18:21:13 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.java 2005/11/06 16:47:10 1.2 @@ -75,7 +75,6 @@ if (connection == null) connection = createConnection(); - String locationOldRDFDoc = ""; // perform the update try { Statement stmt = connection.createStatement(); @@ -303,7 +302,6 @@ public void performInitForTests() { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; println("#### Test 0a ####"); println("Initializing the agent with 0a.rdf"); switchTestRDFDocuments(createRdfDocumentURLString("0a.rdf")); @@ -328,8 +326,6 @@ public void performTest1() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test one ####"); println("Initializing the agent with 1.rdf"); switchTestRDFDocuments(createRdfDocumentURLString("1.rdf")); From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:42 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlB8Z013929@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service Modified Files: BaseService.java Log Message: moby-live/Java/src/main/org/biomoby/service BaseService.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java 2005/09/04 13:45:37 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java 2005/11/06 16:47:11 1.4 @@ -13,7 +13,6 @@ import org.tulsoft.shared.GException; import org.biomoby.shared.MobyException; -import org.biomoby.shared.parser.MobyParser; import org.biomoby.shared.parser.MobyPackage; import org.biomoby.shared.parser.MobyJob; From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:43 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlB4Q014004@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java BuildDataTypeTree.java CommonDataTable.java CommonTree.java Dashboard.java DashboardProperties.java DataTypesBoard.java DataTypesTree.java DebuggingPanel.java JProgressBarWithCancel.java NamespacesBoard.java NamespacesTree.java PrimaryDataTable.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.14,1.15 BuildDataTypeTree.java,1.4,1.5 CommonDataTable.java,1.1,1.2 CommonTree.java,1.13,1.14 Dashboard.java,1.11,1.12 DashboardProperties.java,1.10,1.11 DataTypesBoard.java,1.6,1.7 DataTypesTree.java,1.10,1.11 DebuggingPanel.java,1.1,1.2 JProgressBarWithCancel.java,1.2,1.3 NamespacesBoard.java,1.1,1.2 NamespacesTree.java,1.5,1.6 PrimaryDataTable.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/05 17:51:04 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/06 16:47:11 1.15 @@ -21,22 +21,16 @@ import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JTextField; import javax.swing.JTextArea; -import javax.swing.JComboBox; import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import javax.swing.JComponent; -import javax.swing.SwingConstants; import javax.swing.border.Border; -import javax.swing.border.TitledBorder; import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; import javax.swing.Box; import javax.swing.BoxLayout; -import javax.swing.filechooser.FileFilter; import javax.swing.text.html.HTMLDocument; import java.awt.Component; @@ -45,7 +39,6 @@ import java.awt.Insets; import java.awt.Font; import java.awt.Color; -import java.awt.Dimension; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.ItemListener; @@ -54,7 +47,6 @@ import java.io.File; import java.util.prefs.Preferences; -import java.util.Map; /** * WORK IN PROGRESS.

    =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/10/26 08:05:18 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/06 16:47:11 1.5 @@ -17,13 +17,11 @@ import javax.swing.JTree; import javax.swing.JPanel; -import javax.swing.JTextField; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.Icon; import javax.swing.JPopupMenu; import javax.swing.JOptionPane; -import javax.swing.JMenuItem; import javax.swing.ToolTipManager; import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; @@ -31,10 +29,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreeSelectionModel; import javax.swing.tree.TreePath; -import javax.swing.event.TreeSelectionListener; -import javax.swing.event.TreeSelectionEvent; import javax.swing.SwingUtilities; -import javax.swing.BoxLayout; import java.awt.Component; import java.awt.Font; @@ -48,13 +43,9 @@ import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.border.TitledBorder; -import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; -import javax.swing.border.EtchedBorder; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; -import java.util.HashSet; import java.util.Enumeration; /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.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/service/dashboard/CommonDataTable.java 2005/11/06 16:23:49 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/06 16:47:11 1.2 @@ -8,34 +8,19 @@ package org.biomoby.service.dashboard; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyNamespace; -import org.biomoby.shared.MobyPrimaryData; -import org.biomoby.shared.MobyPrimaryDataSimple; -import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; - import org.tulsoft.tools.gui.SwingUtils; -import javax.swing.JLabel; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JScrollPane; import javax.swing.JTable; -import javax.swing.JList; -import javax.swing.JComboBox; import javax.swing.JComponent; -import javax.swing.ListCellRenderer; -import javax.swing.DefaultComboBoxModel; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; import javax.swing.table.JTableHeader; -import javax.swing.table.DefaultTableCellRenderer; import javax.swing.AbstractCellEditor; -import javax.swing.event.PopupMenuListener; -import javax.swing.event.PopupMenuEvent; import java.awt.Component; import java.awt.event.ActionEvent; @@ -136,7 +121,6 @@ protected JTableHeader createDefaultTableHeader() { return new JTableHeader (columnModel) { public String getToolTipText (MouseEvent e) { - String tip = null; java.awt.Point p = e.getPoint(); int index = columnModel.getColumnIndexAtX (p.x); int realIndex = =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 20:14:49 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/06 16:47:11 1.14 @@ -8,7 +8,6 @@ package org.biomoby.service.dashboard; -import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JTree; @@ -28,7 +27,6 @@ import javax.swing.tree.TreePath; import javax.swing.event.TreeSelectionListener; import javax.swing.event.TreeSelectionEvent; -import javax.swing.SwingUtilities; import java.awt.Component; import java.awt.Font; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/05 17:51:04 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/06 16:47:11 1.12 @@ -33,12 +33,10 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeSupport; import java.util.Vector; import java.util.Enumeration; import java.util.Properties; -import java.util.Hashtable; import java.util.Date; import java.net.URL; import java.text.DateFormat; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 15:21:57 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/06 16:47:11 1.11 @@ -8,11 +8,6 @@ package org.biomoby.service.dashboard; -import javax.swing.JLabel; -import javax.swing.text.html.HTMLDocument; -import javax.swing.Icon; -import javax.swing.JComponent; - /** * A list of names of most/all recognized properties that can be fired * by dashboard panels, and a list of names of Java properties that =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/06 16:23:49 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/06 16:47:11 1.7 @@ -11,7 +11,6 @@ import org.biomoby.shared.MobyDataType; import org.biomoby.shared.event.NotificationEvent; import org.biomoby.shared.event.Notifier; -import org.tulsoft.shared.UUtils; /** * This is a simple graphical widget combining together a tree (a =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:23:49 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:47:11 1.11 @@ -15,14 +15,10 @@ import org.biomoby.service.generator.DataTypesGenerator; import org.tulsoft.shared.UUtils; -import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JProgressBar; -import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; -import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -268,9 +264,6 @@ void addMembers (DefaultMutableTreeNode node, MobyDataType dataType) { MobyRelationship[] rels = dataType.getChildren(); for (int i = 0; i < rels.length; i++) { - String memberName = rels[i].getName(); - String memberType = rels[i].getDataTypeName(); - int memberRel = rels[i].getRelationshipType(); node.add (new DefaultMutableTreeNode (new MemberNode (rels[i]))); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.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/service/dashboard/DebuggingPanel.java 2005/10/27 08:55:48 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/06 16:47:11 1.2 @@ -16,14 +16,11 @@ import javax.swing.JTextField; import javax.swing.Icon; import javax.swing.JComponent; -import javax.swing.text.html.HTMLDocument; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Map; - /** * A debugging panel.

    * =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/JProgressBarWithCancel.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/service/dashboard/JProgressBarWithCancel.java 2005/10/22 01:38:04 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/JProgressBarWithCancel.java 2005/11/06 16:47:11 1.3 @@ -28,9 +28,7 @@ import java.awt.GridBagLayout; import java.awt.GridBagConstraints; -import java.awt.Dimension; import java.awt.Insets; -import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.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/service/dashboard/NamespacesBoard.java 2005/10/28 13:39:09 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/06 16:47:11 1.2 @@ -11,7 +11,6 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.event.NotificationEvent; import org.biomoby.shared.event.Notifier; -import org.tulsoft.shared.UUtils; /** * This is a simple graphical widget combining together a tree (a =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:23:49 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:47:11 1.6 @@ -9,27 +9,14 @@ package org.biomoby.service.dashboard; import org.biomoby.shared.MobyException; -import org.biomoby.shared.Central; import org.biomoby.shared.MobyNamespace; -import org.biomoby.shared.MobyRelationship; -import org.biomoby.service.generator.DataTypesGenerator; import org.tulsoft.shared.UUtils; -import javax.swing.JMenuItem; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JProgressBar; -import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; -import java.awt.event.ActionEvent; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; - import java.util.HashMap; import java.util.HashSet; -import java.util.Enumeration; -import java.util.Vector; /** * A component showing and manipulating a tree of namespaces =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.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/service/dashboard/PrimaryDataTable.java 2005/11/06 16:23:49 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/06 16:47:11 1.2 @@ -13,25 +13,16 @@ import org.biomoby.shared.MobyPrimaryData; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; - -import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JLabel; -import javax.swing.Icon; -import javax.swing.JButton; -import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JList; import javax.swing.JComboBox; -import javax.swing.JComponent; import javax.swing.ListCellRenderer; import javax.swing.DefaultComboBoxModel; import javax.swing.table.AbstractTableModel; -import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; -import javax.swing.table.JTableHeader; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.AbstractCellEditor; import javax.swing.event.PopupMenuListener; @@ -40,9 +31,6 @@ import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; - -import java.util.Vector; /** * A swing JTable that collects definitions of primary data (input or From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBij014048@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared Modified Files: CentralAll.java Log Message: moby-live/Java/src/main/org/biomoby/shared CentralAll.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/CentralAll.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/shared/CentralAll.java 2005/10/22 01:38:04 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/CentralAll.java 2005/11/06 16:47:11 1.3 @@ -6,8 +6,6 @@ package org.biomoby.shared; -import org.biomoby.shared.event.Notifier; - /** * A common interface to the classical features of a MobyRegistry (as * expressed in {@link Central}) and to the cumulated (digested) From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBmP014027@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service/generator Modified Files: DataTypesGenerator.java Generator.java Log Message: moby-live/Java/src/main/org/biomoby/service/generator DataTypesGenerator.java,1.2,1.3 Generator.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.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/service/generator/DataTypesGenerator.java 2005/09/24 17:51:52 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2005/11/06 16:47:11 1.3 @@ -452,8 +452,6 @@ if (isTrue (props.get (GPROP_NOGRAPHS))) return false; - boolean graphCreated = false; - MobyDataType[] subTree = FilterDataTypes.getSubTree (dataType, allDataTypes); if (spaceForImageMap != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/Generator.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/service/generator/Generator.java 2005/09/04 13:45:38 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/Generator.java 2005/11/06 16:47:11 1.3 @@ -11,23 +11,14 @@ import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; import org.tulsoft.tools.external.Executor; -import org.tulsoft.tools.servlets.Html; -import org.tulsoft.tools.servlets.HtmlConstants; import org.biomoby.shared.MobyException; -import org.biomoby.shared.Central; import org.biomoby.shared.CentralAll; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.Utils; -import org.biomoby.shared.parser.MobyTags; import org.biomoby.client.CentralDigestCachedImpl; -import org.biomoby.client.Graphviz; - import java.util.Properties; import java.util.HashMap; -import java.util.Date; import java.util.regex.Pattern; import java.io.File; From senger at pub.open-bio.org Sun Nov 6 11:47:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:45 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlCO5014069@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared/data Modified Files: MobyDataBoolean.java Log Message: moby-live/Java/src/main/org/biomoby/shared/data MobyDataBoolean.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.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/shared/data/MobyDataBoolean.java 2005/08/04 14:05:34 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.java 2005/11/06 16:47:11 1.2 @@ -1,7 +1,6 @@ package org.biomoby.shared.data; import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyNamespace; /** * A class representing a MOBY Boolean primitive. @@ -115,7 +114,6 @@ } public String toXML(){ - MobyNamespace[] ns = getNamespaces(); if(xmlMode == MobyDataInstance.SERVICE_XML_MODE){ return "" + value + ""; } From senger at pub.open-bio.org Sun Nov 6 11:47:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 6 11:44:46 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlCWl014091@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared/event Modified Files: NotificationEvent.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event NotificationEvent.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java 2005/10/28 11:30:37 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java 2005/11/06 16:47:11 1.6 @@ -8,7 +8,6 @@ package org.biomoby.shared.event; -import org.tulsoft.shared.UUtils; import java.util.EventObject; /** From senger at pub.open-bio.org Mon Nov 7 02:03:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 02:02:31 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773oKk016556@pub.open-bio.org> senger Mon Nov 7 02:03:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/service/generator Modified Files: ServicesGenerator.java Log Message: moby-live/Java/src/main/org/biomoby/service/generator ServicesGenerator.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/ServicesGenerator.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/service/generator/ServicesGenerator.java 2005/09/04 13:45:38 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/ServicesGenerator.java 2005/11/07 07:03:50 1.3 @@ -15,10 +15,8 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; import org.biomoby.shared.Utils; import org.biomoby.shared.CentralAll; -import org.biomoby.shared.parser.MobyTags; import org.biomoby.shared.parser.MobyParser; import org.biomoby.shared.datatypes.MapDataTypesIfc; @@ -28,7 +26,6 @@ import org.biomoby.client.Graphviz; import org.tulsoft.tools.servlets.Html; -import org.tulsoft.tools.servlets.HtmlConstants; import java.util.Properties; import java.util.Iterator; @@ -582,8 +579,6 @@ if (isTrue (props.get (GPROP_NOGRAPHS))) return false; - boolean graphCreated = false; - ServicesEdge[] edges = ServiceConnections.build (allDataTypes, allServices); edges = FilterServices.filter (edges, null, new String[] { serviceName }, 1); From senger at pub.open-bio.org Mon Nov 7 02:03:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 02:02:49 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773oDq016575@pub.open-bio.org> senger Mon Nov 7 02:03:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/shared Modified Files: Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared Utils.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/08/26 06:27:04 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/07 07:03:50 1.7 @@ -7,9 +7,6 @@ package org.biomoby.shared; -import org.apache.axis.AxisFault; -import javax.xml.namespace.QName; - import java.util.HashSet; import java.io.PrintWriter; import java.io.BufferedWriter; From senger at pub.open-bio.org Mon Nov 7 02:03:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 02:03:50 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773nCU016457@pub.open-bio.org> senger Mon Nov 7 02:03:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.31,1.32 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32 @@ -1344,22 +1344,6 @@ String result = (String)doCall ("registerService", new Object[] { getRegisterServiceXML (service) }); -// "" + -// "" + service.getCategory() + "" + -// "" + service.getName() + "" + -// "" + service.getType() + "" + -// "" + service.getAuthority() + "" + -// "" + service.getSignatureURL() + "" + -// "" + service.getURL() + "" + -// "" + service.getEmailContact() + "" + -// "" + (service.isAuthoritative() ? "1" : "0") + "" + -// "" + -// "" + -// buildPrimaryInputTag (service) + -// buildSecondaryInputTag (service) + -// buildOutputTag (service) + -// "" -// }); String[] registered = checkRegistration (result, service); service.setId (registered [0]); service.setRDF (registered [1]); @@ -1371,9 +1355,22 @@ fileout.println (registered [1]); fileout.close(); } catch (IOException e) { - throw new MobyException ("Failed to save RDF in '" + fileRDF.getAbsolutePath() + "'. " + - e.toString() + - "\nReturned RDF:\n" + registered [1]); + StringBuffer buf = new StringBuffer (100); + buf.append ("Failed to save RDF in '"); + buf.append (fileRDF.getAbsolutePath() + "'. "); + buf.append (e.toString()); + try { + File tmpFile = File.createTempFile (service.getName() + "-", ".rdf"); + PrintStream fileout = new PrintStream (new FileOutputStream (tmpFile)); + fileout.println (registered [1]); + fileout.close(); + buf.append ("\nReturned RDF file was therefore stored in: "); + buf.append (tmpFile.getAbsolutePath()); + } catch (IOException e2) { + buf.append ("\nEven saving in a temporary file failed: "); + buf.append (e2.toString()); + } + throw new MobyException (buf.toString()); } } } From senger at pub.open-bio.org Mon Nov 7 02:03:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 02:03:52 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773n0W016476@pub.open-bio.org> senger Mon Nov 7 02:03:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/registry/rdfagent/test Modified Files: RDFAgentTestSuite.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/test RDFAgentTestSuite.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.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/test/RDFAgentTestSuite.java 2005/11/06 16:47:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.java 2005/11/07 07:03:49 1.3 @@ -353,8 +353,6 @@ public void performTest2() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test two ####"); println("Adding another simple output DNASequence(myDNASequence) with no namespace."); println("Changing the signature url to point to 2.rdf"); @@ -371,8 +369,6 @@ public void performTest3() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test three ####"); println("Adding another simple input DNASequence(myDNASequence) with no namespace."); println("Changing the signature url to point to 3.rdf"); @@ -389,8 +385,6 @@ public void performTest4() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test four ####"); println("Modified the simple output 'myString' to be called 'myNewString'."); println("Changing the signature url to point to 4.rdf"); @@ -407,8 +401,6 @@ public void performTest5() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test five ####"); println("Modified the simple input 'myDNASequence' to be called 'myNewDNASequence'."); println("Changing the signature url to point to 5.rdf"); @@ -425,8 +417,6 @@ public void performTest6() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test six ####"); println("Modified the simple output 'myDNASequence' contain a namespace EC\nand I removed the namespace from the simple output 'myNewString'."); println("Changing the signature url to point to 6.rdf"); @@ -443,8 +433,6 @@ public void performTest7() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seven ####"); println("Swapped the input 'myNewString' with the output 'myKeyword'."); println("Changing the signature url to point to 7.rdf"); @@ -461,8 +449,6 @@ public void performTest8() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eight ####"); println("removed the simple output 'myKeyword'."); println("Changing the signature url to point to 8.rdf"); @@ -479,8 +465,6 @@ public void performTest9() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test nine ####"); println("Removed the very last simple output 'myDNASequence'."); println("Changing the signature url to point to 9.rdf"); @@ -497,8 +481,6 @@ public void performTest10() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test ten ####"); println("removed the simple input 'myNewDNASequence'."); println("Changing the signature url to point to 10.rdf"); @@ -515,8 +497,6 @@ public void performTest11() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eleven ####"); println("Added a simple output of type BasicGFFSequenceFeature and articlename 'myGFF'."); println("Changing the signature url to point to 11.rdf"); @@ -533,8 +513,6 @@ public void performTest12() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twelve ####"); println("appended a 'blah blah blah' to the description."); println("Changing the signature url to point to 12.rdf"); @@ -551,8 +529,6 @@ public void performTest13() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirteen ####"); println("changed the contact email address to be kawas7@yahoo.com"); println("Changing the signature url to point to 13.rdf"); @@ -569,8 +545,6 @@ public void performTest14() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fourteen ####"); println("Chagned the service type to be analysis."); println("Changing the signature url to point to 14.rdf"); @@ -587,8 +561,6 @@ public void performTest15() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fifteen ####"); println("added a secondary input, called pseudocount of type integer with a\nmin/max of (-)2147483648 and a default value of 9"); println("Changing the signature url to point to 15.rdf"); @@ -605,8 +577,6 @@ public void performTest16() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test sixteen ####"); println("Added a duplicate secondary input as in test 15 called 'second'"); println("Changing the signature url to point to 16.rdf"); @@ -623,8 +593,6 @@ public void performTest17() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen ####"); println("removed the simple output 'myGFF'."); println("Changing the signature url to point to 17.rdf"); @@ -641,8 +609,6 @@ public void performTest17a() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen a ####"); println("Removed the last remaining simple input.\nTHIS SHOULD NOT WORK!"); println("Changing the signature url to point to 17a.rdf"); @@ -659,8 +625,6 @@ public void performTest17b() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen b ####"); println("Changed the pre-existing simple input to be an input of datatype Integer called myInt with no namespace declared."); println("Changing the signature url to point to 17b.rdf"); @@ -677,8 +641,6 @@ public void performTest18() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eighteen ####"); println("removed the secondary input 'pseudocount'. Note that there is an mobyPred:produces element that contains an empty bag."); println("Changing the signature url to point to 18.rdf"); @@ -695,8 +657,6 @@ public void performTest19() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test nineteen ####"); println("Added another secondary input that handles floats."); println("The name is 'expectation_value' and is of type Float.\nNo min/max, but an enumeration of the 8 values(.0001,.01,.001,.1,10,.000001,.00001,1\nand a default of 10.0."); @@ -714,8 +674,6 @@ public void performTest20() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty ####"); println("Added an enum value to expectation value of 101.1."); println("Changing the signature url to point to 20.rdf"); @@ -732,8 +690,6 @@ public void performTest21() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-one ####"); println("changed the default value of expectation_value to be 47.2"); println("Changing the signature url to point to 21.rdf"); @@ -750,8 +706,6 @@ public void performTest22() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-two ####"); println("removed all enums except 101.1 from the secondary input 'expectation_value'"); println("Changing the signature url to point to 22.rdf"); @@ -768,8 +722,6 @@ public void performTest23() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-three ####"); println("added a min value to the secondary input expectation value of .000001"); println("Changing the signature url to point to 23.rdf"); @@ -786,8 +738,6 @@ public void performTest24() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-four ####"); println("added a max value to the secondary input expectation_value of 885858.01."); println("Changing the signature url to point to 24.rdf"); @@ -804,8 +754,6 @@ public void performTest25() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-five ####"); println("removed the max value from the secondary input expectation_value."); println("Changing the signature url to point to 25.rdf"); @@ -822,8 +770,6 @@ public void performTest26() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-six ####"); println("changed the datatype of the secondary input expecation_value to be String."); println("Changing the signature url to point to 26.rdf"); @@ -840,8 +786,6 @@ public void performTest27() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-seven ####"); println("removed the min value from the secondary input 'expectation_value'."); println("Changing the signature url to point to 27.rdf"); @@ -858,8 +802,6 @@ public void performTest28() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-eight ####"); println("removed the secondary input 'expectation_value'"); println("Changing the signature url to point to 28.rdf"); @@ -876,8 +818,6 @@ public void performTest29() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-nine ####"); println("removing the last secondary input 'second'"); println("Changing the signature url to point to 29.rdf"); @@ -894,8 +834,6 @@ public void performTest30() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty ####"); println("Adding a simple output called 'Jim', of type DNASequence, and ns EBI"); println("Changing the signature url to point to 30.rdf"); @@ -912,8 +850,6 @@ public void performTest31() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-one ####"); println("Added an output collection, 'myOutputCollection', containing a simple "); println("Changing the signature url to point to 31.rdf"); @@ -930,8 +866,6 @@ public void performTest32() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-two ####"); println("Added to the output collection, 'myOutputCollection', a simple "); println("Changing the signature url to point to 32.rdf"); @@ -948,8 +882,6 @@ public void performTest33() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-three ####"); println("Modified the simple output DNASequence is now an object, ns = EC and articlename JimIII>"); println("Changing the signature url to point to 33.rdf"); @@ -966,8 +898,6 @@ public void performTest34() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-four ####"); println("Modified the simple output object: added another ns to object EMBL, and added a ns, EC, to 'myNewString' contained in the output collection."); println("Changing the signature url to point to 34.rdf"); @@ -984,8 +914,6 @@ public void performTest35() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-five ####"); println("Modified the output collection: added another ns, EC, to the GO_Term"); println("Changing the signature url to point to 35.rdf"); @@ -1020,8 +948,6 @@ public void performTest37() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-seven ####"); println("Cloned the output collection and placed it as an input. Article Name is myInputCollection."); println("Changing the signature url to point to 37.rdf"); @@ -1038,8 +964,6 @@ public void performTest38() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-eight ####"); println("Removed the output collection 'myOutputCollection'"); println("Changing the signature url to point to 38.rdf"); @@ -1056,8 +980,6 @@ public void performTest39() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-nine ####"); println("Removed the last output collection."); println("Changing the signature url to point to 39.rdf"); @@ -1074,8 +996,6 @@ public void performTest40() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty ####"); println("Removed Go_Term from myInputCollection."); println("Changing the signature url to point to 40.rdf"); @@ -1092,8 +1012,6 @@ public void performTest41() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-one ####"); println("Changed the name of the simple and changed its type (myOldString, Object) in the collection input.\nALso added a new ns EMBL.\nThe simple input 'myNewString' has a new ns EC."); println("Changing the signature url to point to 41.rdf"); @@ -1110,8 +1028,6 @@ public void performTest42() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-two ####"); println("Added a simple to the input collection "); println("Changing the signature url to point to 42.rdf"); @@ -1128,8 +1044,6 @@ public void performTest43a() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-three a####"); println("Cloning the input collection and adding it as input twice with articleName myClonedCollection and no article name."); println("Changing the signature url to point to 43a.rdf"); @@ -1146,8 +1060,6 @@ public void performTest43() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-three ####"); println("Removed myOldString from the input collection. TODO more tests with 43a as starting point"); println("Changing the signature url to point to 43.rdf"); @@ -1164,8 +1076,6 @@ public void performTest44() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-four ####"); println("Removed a ns (EMBL) from the simple in the input collection."); println("Changing the signature url to point to 44.rdf"); @@ -1182,8 +1092,6 @@ public void performTest45() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-five ####"); println("Removed the last remaining ns from the simple in the input collection"); println("Changing the signature url to point to 45.rdf"); @@ -1200,8 +1108,6 @@ public void performTest46() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-six ####"); println("Removed the article name of the simple in the collection."); println("Changing the signature url to point to 46.rdf"); @@ -1218,8 +1124,6 @@ public void performTest47() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-seven ####"); println("Removed the articlename from the input collection."); println("Changing the signature url to point to 47.rdf"); @@ -1236,8 +1140,6 @@ public void performTest48() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-eight ####"); println("Removed the simple input. All that is left is the collection."); println("Changing the signature url to point to 48.rdf"); @@ -1254,8 +1156,6 @@ public void performTest49() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-nine ####"); println("Removed the last remaining input."); println("Changing the signature url to point to 49.rdf"); @@ -1272,8 +1172,6 @@ public void performTest50() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fifty ####"); println("Added an input collection containing a datatype GFF2."); println("Changing the signature url to point to 50.rdf"); From senger at pub.open-bio.org Mon Nov 7 02:07:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 02:04:48 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070707.jA777PBK016646@pub.open-bio.org> senger Mon Nov 7 02:07:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv16628/src/main/org/biomoby/service/dashboard/images Removed Files: smallTrash_gis.gif smallUnregister.gif smallUnregister_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallTrash_gis.gif,1.1,NONE smallUnregister.gif,1.1,NONE smallUnregister_dis.gif,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallTrash_gis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallUnregister.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallUnregister_dis.gif,v: No such file or directory From senger at pub.open-bio.org Mon Nov 7 12:14:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 12:12:09 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511071714.jA7HElJf018916@pub.open-bio.org> senger Mon Nov 7 12:14:46 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv18815/src/main/org/biomoby/service/dashboard/images Added Files: smallFromDoc.gif smallFromDoc_dis.gif smallToDoc.gif smallToDoc_dis.gif smallZoomIn.gif smallZoomIn_dis.gif smallZoomOut.gif smallZoomOut_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallFromDoc.gif,NONE,1.1 smallFromDoc_dis.gif,NONE,1.1 smallToDoc.gif,NONE,1.1 smallToDoc_dis.gif,NONE,1.1 smallZoomIn.gif,NONE,1.1 smallZoomIn_dis.gif,NONE,1.1 smallZoomOut.gif,NONE,1.1 smallZoomOut_dis.gif,NONE,1.1 From kawas at pub.open-bio.org Mon Nov 7 18:59:14 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon Nov 7 18:56:27 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511072359.jA7NxEkH024932@pub.open-bio.org> kawas Mon Nov 7 18:59:14 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv24911/org/biomoby/client/rdf/vocabulary Added Files: ServiceDescriptionPredicates.java Log Message: new service instance predicates. moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary ServiceDescriptionPredicates.java,NONE,1.1 From senger at pub.open-bio.org Mon Nov 7 19:01:44 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 18:58:56 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080001.jA801irH024999@pub.open-bio.org> senger Mon Nov 7 19:01:43 EST 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv24984 Added Files: fetaEngine.jar Log Message: jars-archive/current fetaEngine.jar,NONE,1.1 From kawas at pub.open-bio.org Mon Nov 7 19:02:08 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon Nov 7 18:59:20 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080002.jA80282F025053@pub.open-bio.org> kawas Mon Nov 7 19:02:08 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv25028/org/biomoby/registry/rdfagent/verifier Modified Files: ServiceDescrParser.java Log Message: java 1.4 fix moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier ServiceDescrParser.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/07 22:47:06 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/08 00:02:08 1.11 @@ -261,7 +261,6 @@ while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - System.out.println(":" + s.toString()); StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); StmtIterator outs = r.listProperties(FetaModelRDF.outputParameter); while (ins.hasNext()) { @@ -475,7 +474,7 @@ while (enumerations.hasNext()) { enums+=enumerations.nextStatement().getLiteral().getValue().toString()+","; } - if (enums.contains(",")) + if (enums.indexOf(",") > 0) enums= enums.substring(0, enums.lastIndexOf(",")); else enums = null; From senger at pub.open-bio.org Mon Nov 7 19:06:55 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 19:04:07 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080006.jA806t6b025119@pub.open-bio.org> senger Mon Nov 7 19:06:55 EST 2005 Update of /home/repository/moby/moby-live/Java/xmls In directory pub.open-bio.org:/tmp/cvs-serv25100 Modified Files: libraries.xml Log Message: moby-live/Java/xmls libraries.xml,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/10/12 11:17:59 1.7 +++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/08 00:06:55 1.8 @@ -12,6 +12,7 @@ + @@ -50,6 +51,7 @@ + @@ -111,6 +113,7 @@ + From mwilkinson at pub.open-bio.org Mon Nov 7 19:16:47 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Mon Nov 7 19:14:04 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080016.jA80Gltk025221@pub.open-bio.org> mwilkinson Mon Nov 7 19:16:47 EST 2005 Update of /home/repository/moby/moby-live/Perl In directory pub.open-bio.org:/tmp/cvs-serv25202 Modified Files: MANIFEST Log Message: updating MANIFEST with new debugYourScript filename moby-live/Perl MANIFEST,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MANIFEST,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Perl/MANIFEST 2004/07/28 23:00:09 1.12 +++ /home/repository/moby/moby-live/Perl/MANIFEST 2005/11/08 00:16:47 1.13 @@ -25,7 +25,7 @@ MOBY/Adaptor/moby/queryapi.pm MOBY/Adaptor/moby/queryapi/mysql.pm t/Client-Central.t -scripts/debugYourService +scripts/DebugYourService.pl scripts/MOBY-Central.pl scripts/Services.cgi scripts/testMOBYCentral_v05.pl From senger at pub.open-bio.org Mon Nov 7 19:34:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 19:31:42 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080034.jA80YPVU025286@pub.open-bio.org> senger Mon Nov 7 19:34:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.32,1.33 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33 @@ -1151,8 +1151,7 @@ /************************************************************************* * *************************************************************************/ - public void registerDataType (MobyDataType dataType) - throws MobyException, NoSuccessException, PendingCurationException { + public String getRegisterDataTypeXML (MobyDataType dataType) { // build the ISA tag (expressing hierarchy of data types) String[] names = dataType.getParentNames(); @@ -1184,23 +1183,31 @@ } } + return + "" + + "" + dataType.getName() + "" + + "" + + "" + + "" + new String (buf) + + "" + + "" + new String (buf2) + + "" + + "" + new String (buf3) + + "" + + "" + dataType.getAuthority() + "" + + "" + dataType.getEmailContact() + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ + public void registerDataType (MobyDataType dataType) + throws MobyException, NoSuccessException, PendingCurationException { + String result = (String)doCall ("registerObjectClass", - new Object[] { - "" + - "" + dataType.getName() + "" + - "" + - "" + - "" + new String (buf) + - "" + - "" + new String (buf2) + - "" + - "" + new String (buf3) + - "" + - "" + dataType.getAuthority() + "" + - "" + dataType.getEmailContact() + "" + - "" - }); + new Object[] { getRegisterDataTypeXML (dataType) }); dataType.setId (checkRegistration (result, dataType)[0]); } @@ -1222,8 +1229,7 @@ /************************************************************************* * *************************************************************************/ - public void registerServiceType (MobyServiceType serviceType) - throws MobyException, NoSuccessException, PendingCurationException { + public String getRegisterServiceTypeXML (MobyServiceType serviceType) { // build the ISA tag (expressing hierarchy of service types) String[] names = serviceType.getParentNames(); @@ -1235,35 +1241,30 @@ buf.append ("\n"); } + return + "" + + "" + serviceType.getName() + "" + + "" + serviceType.getEmailContact() + "" + + "" + serviceType.getAuthority() + "" + + "" + + "" + + "" + new String (buf) + + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ + public void registerServiceType (MobyServiceType serviceType) + throws MobyException, NoSuccessException, PendingCurationException { + String result = (String)doCall ("registerServiceType", - new Object[] { - "" + - "" + serviceType.getName() + "" + - "" + serviceType.getEmailContact() + "" + - "" + serviceType.getAuthority() + "" + - "" + - "" + - "" + new String (buf) + - "" + - "" - }); + new Object[] { getRegisterServiceTypeXML (serviceType) }); serviceType.setId (checkRegistration (result, serviceType)[0]); } -// -// NewServiceType -// your_name@contact.address.com -// Your.URI.here -// -// -// -// -// ExistingServiceType -// ExistingServiceType -// -// - /************************************************************************* * *************************************************************************/ @@ -1282,19 +1283,25 @@ /************************************************************************* * *************************************************************************/ + public String getRegisterNamespaceXML (MobyNamespace namespace) { + return + "" + + "" + namespace.getName() + "" + + "" + namespace.getEmailContact() + "" + + "" + namespace.getAuthority() + "" + + "" + + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ public void registerNamespace (MobyNamespace namespace) throws MobyException, NoSuccessException, PendingCurationException { String result = (String)doCall ("registerNamespace", - new Object[] { - "" + - "" + namespace.getName() + "" + - "" + namespace.getEmailContact() + "" + - "" + namespace.getAuthority() + "" + - "" + - "" + - "" - }); + new Object[] { getRegisterNamespaceXML (namespace) }); namespace.setId (checkRegistration (result, namespace)[0]); } From senger at pub.open-bio.org Mon Nov 7 19:34:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 7 19:31:43 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080034.jA80YPjE025317@pub.open-bio.org> senger Mon Nov 7 19:34:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/service/dashboard Modified Files: RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationDataTypeSubPanel.java,1.2,1.3 RegistrationNamespaceSubPanel.java,1.2,1.3 RegistrationServiceTypeSubPanel.java,1.2,1.3 RegistryModel.java,1.14,1.15 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.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/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/08 00:34:25 1.3 @@ -234,8 +234,8 @@ registryModel.registerDataType (dataType); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterDataTypeXML (dataType); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterDataTypeXML (dataType); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.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/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/08 00:34:25 1.3 @@ -207,8 +207,8 @@ registryModel.registerNamespace (namespace); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterNamespaceXML (namespace); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterNamespaceXML (namespace); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.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/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/08 00:34:25 1.3 @@ -221,8 +221,8 @@ registryModel.registerServiceType (serviceType); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterServiceTypeXML (serviceType); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterServiceTypeXML (serviceType); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/07 07:03:49 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/08 00:34:25 1.15 @@ -108,6 +108,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterDataTypeXML (MobyDataType dataType) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterDataTypeXML (dataType); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterDataType (MobyDataType dataType) throws MobyException { initWorker(); @@ -195,6 +204,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterServiceTypeXML (MobyServiceType serviceType) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterServiceTypeXML (serviceType); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); @@ -281,6 +299,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterNamespaceXML (MobyNamespace namespace) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterNamespaceXML (namespace); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterNamespace (MobyNamespace namespace) throws MobyException { initWorker(); From senger at pub.open-bio.org Wed Nov 9 00:29:38 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 00:26:50 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TcB2030374@pub.open-bio.org> senger Wed Nov 9 00:29:38 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.33,1.34 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/09 05:29:38 1.34 @@ -1500,8 +1500,10 @@ /************************************************************************** * *************************************************************************/ - public void setDebug (boolean debug) { - this.debug = debug; + public boolean setDebug (boolean enabled) { + boolean oldMode = debug; + debug = enabled; + return oldMode; } /************************************************************************** From senger at pub.open-bio.org Wed Nov 9 00:29:38 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 00:27:10 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TcEq030355@pub.open-bio.org> senger Wed Nov 9 00:29:38 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv30336/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.48,1.49 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 16:23:49 1.48 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/09 05:29:38 1.49 @@ -1,3 +1,10 @@ +2005-11-08 Martin Senger + + * Added methods getRegister[...]XML() to CentralImpl. + + * Changed return value of setDebug() in Central.java (now ir + return the previous debug mode). + 2005-11-07 Martin Senger * Change default data type in MobySecondaryData from STRING to @@ -5,7 +12,7 @@ 2005-11-06 Martin Senger - * Added method getRegisterServiceXML() to CentralIMpl. + * Added method getRegisterServiceXML() to CentralImpl. * Added test for not to duplicate same namespaces in MobyPrimaryData. From senger at pub.open-bio.org Wed Nov 9 00:29:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 00:27:11 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TdBr030462@pub.open-bio.org> senger Wed Nov 9 00:29:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/shared Modified Files: Central.java Log Message: moby-live/Java/src/main/org/biomoby/shared Central.java,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java 2005/10/27 04:15:23 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java 2005/11/09 05:29:39 1.14 @@ -408,10 +408,14 @@ throws MobyException; /************************************************************************** - * Ask the implementation to create more verbose logs or messages about - * what is going on. The behaviour is completely implementation dependent. + * Ask the implementation to create more verbose logs or messages + * about what is going on. The behaviour is completely + * implementation dependent.

    + * + * @param enabled true if debug mode should be enabled, false otherwise + * @return the previous value of the debug mode *************************************************************************/ - void setDebug (boolean debug); + boolean setDebug (boolean debug); /************************************************************************** * Set whether the server responses should cached or not to speedup From senger at pub.open-bio.org Wed Nov 9 00:29:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 00:27:14 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TdGl030442@pub.open-bio.org> senger Wed Nov 9 00:29:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/service/dashboard/images Added Files: register2.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images register2.gif,NONE,1.1 From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 11:21:22 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWkU032215@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory pub.open-bio.org:/tmp/cvs-serv32177/src/Clients/help Modified Files: CacheRegistryClient_usage.txt Log Message: moby-live/Java/src/Clients/help CacheRegistryClient_usage.txt,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/09/22 16:07:08 1.4 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/09 16:23:32 1.5 @@ -42,6 +42,16 @@ -fill-t ... ditto as -fill but only for service types -fill-n ... ditto as -fill but only for namespaces + -update ... update the current cache with data from the + given Moby registry + (note that this does not influence data from + other Moby registries stored in the same + -cachedir directory) + -update-d ... ditto as -update but only for data types + -update-s ... ditto as -update but only for services + -update-t ... ditto as -update but only for service types + -update-n ... ditto as -update but only for namespaces + -remove ... remove the current cache of the given Moby registry (again it does not influence data from other Moby registries stored in the same @@ -51,7 +61,9 @@ -remove-t ...ditto as -remove but only for service types -remove-n ...ditto as -remove but only for namespaces - -q ... quiet mode + -q ... quiet mode (prints only errors) + (default) ... prints events what is happenning (to a log) + -v ... verbose mode (prints also decorations) [Note: You can also use -argsfile to read arguments from a file. See details in src/Client/help/argsfile.example.] From senger at pub.open-bio.org Wed Nov 9 11:23:33 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 11:21:24 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWHF032305@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/shared/event Modified Files: Notifier.java Added Files: LogListener.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event LogListener.java,NONE,1.1 Notifier.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/10/28 13:39:09 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/09 16:23:32 1.7 @@ -55,7 +55,6 @@ static final int NAMESPACES_UPDATED = 30; static final int AUTHORITIES_UPDATED = 31; - static final int SIGNAL_CANCEL_DATA_TYPES = 1; static final int SIGNAL_CANCEL_SERVICE_TYPES = 2; static final int SIGNAL_CANCEL_SERVICES = 3; From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 11:21:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWiW032196@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv32177/src/Clients Modified Files: CacheRegistryClient.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/10/27 04:15:23 1.5 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/09 16:23:32 1.6 @@ -1,13 +1,17 @@ // CacheRegistryClient.java -// A command-line client dealing with a registry cache. // -// senger@ebi.ac.uk -// November 2004 +// Created: November 2004 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger@gmail.com). // import org.biomoby.shared.*; import org.biomoby.client.*; +import org.biomoby.shared.event.LogListener; +import org.biomoby.shared.event.Notifier; + import org.tulsoft.tools.BaseCmdLine; import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; @@ -26,7 +30,7 @@ * org.biomoby.client.CentralDigestCachedImpl CentralDigestCachedImpl} * - which is a real caching worker.

    * - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ @@ -70,14 +74,17 @@ System.exit (1); } - verbose = !cmd.hasOption ("-q"); - // where is a Moby registry CentralAll worker = new CentralDigestCachedImpl (cmd.getParam ("-e"), cmd.getParam ("-uri"), cacheDir); CentralDigestCachedImpl castWorker = (CentralDigestCachedImpl)worker; + + // how much to show + verbose = cmd.hasOption ("-v"); + if (! cmd.hasOption ("-q")) + ((Notifier)castWorker).addNotificationListener (new LogListener()); if (cmd.hasOption ("-debug")) { worker.setDebug (true); @@ -126,6 +133,26 @@ } // + // update the cache + // + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-d")) { + decorationLn ("Updating data types..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-s")) { + decorationLn ("Updating services..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-t")) { + decorationLn ("Updating service types..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-n")) { + decorationLn ("Updating namespaces..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + } + + // // remove the cache // if (cmd.hasOption ("-remove") || cmd.hasOption ("-remove-d")) { @@ -171,10 +198,10 @@ * Print 'msg' but only if in verbose mode *************************************************************************/ static void decoration (String msg) { - if (verbose) System.out.print (msg); + if (verbose) System.out.print (msg); } static void decorationLn (String msg) { - if (verbose) System.out.println (msg); + if (verbose) System.out.println (msg); } } From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 11:21:28 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWiT032236@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/10/27 04:15:23 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/09 16:23:32 1.12 @@ -23,6 +23,7 @@ import java.io.PrintWriter; import java.util.Iterator; import java.util.Map; +import java.util.HashSet; import java.util.TreeMap; import java.util.Vector; import java.util.Arrays; @@ -51,6 +52,9 @@ extends CentralDigestImpl implements CentralAll { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (CentralDigestCachedImpl.class); + // filename for a list of cached entities protected static final String LIST_FILE = "__L__I__S__T__"; @@ -132,7 +136,7 @@ * was initiated for). Otherwise 'id' indicates which part of the * cache that will be removed.

    * - * @param id should be either null, or one of the fillowing: + * @param id should be either null, or one of the following: * {@link #CACHE_PART_DATATYPES}, {@link #CACHE_PART_SERVICES}, * {@link #CACHE_PART_SERVICETYPES}, and {@link * #CACHE_PART_NAMESPACES}. @@ -156,9 +160,42 @@ } } } catch (MobyException e) { - // TBD: keep this here at least for some time (until we - // have proper logging perhaps) - System.err.println ("Removing cache failed: " + e.getMessage()); + log.error ("Removing cache failed: " + e.getMessage()); + } + } + + /************************************************************************* + * Update the indicated part of the cache. If 'id' is null it + * updates the whole cache (for that Moby registry this instance + * was initiated for).

    + * + * Updates means to fetch a new list of entities, compare it with + * existing entities in the cache (only by name, not by contents), + * fetch the missing ones and remove the redundant ones.

    + * + * @param id should be either null, or one of the following: + * {@link #CACHE_PART_DATATYPES}, {@link #CACHE_PART_SERVICES}, + * {@link #CACHE_PART_SERVICETYPES}, and {@link + * #CACHE_PART_NAMESPACES}. + * + *************************************************************************/ + public void updateCache (String id) + throws MobyException { + if (cacheDir != null) { + initCache(); + if (id == null || id.equals (CACHE_PART_SERVICES)) { + remove (servicesCache, LIST_FILE); + fillServicesCache(); + } else if (id == null || id.equals (CACHE_PART_DATATYPES)) { + remove (dataTypesCache, LIST_FILE); + fillDataTypesCache(); + } else if (id == null || id.equals (CACHE_PART_SERVICETYPES)) { + remove (serviceTypesCache, LIST_FILE); + fillServiceTypesCache(); + } else if (id == null || id.equals (CACHE_PART_NAMESPACES)) { + remove (namespacesCache, LIST_FILE); + fillNamespacesCache(); + } } } @@ -291,6 +328,15 @@ } } + // remove a file from a cache + protected void remove (File cache, String name) { + File file = new File (cache, name); + // do not throw here an exception because a missing file + // can be a legitimate status (e.g. for LIST_FILE when we + // are updating) + file.delete(); + } + /************************************************************************** * Read a cached file *************************************************************************/ @@ -332,34 +378,95 @@ return true; } - /************************************************************************** - * Load data types from a moby registry into local cache. If it is - * interrupted (by a callback signal) it removes what was already - * put into this cache and returns false. Otherwise returns - * true. It raises an exception if it cannot fill the cache (from - * some other reasons). +// /************************************************************************** +// * Load data types from a moby registry into local cache. If it is +// * interrupted (by a callback signal) it removes what was already +// * put into this cache and returns false. Otherwise returns +// * true. It raises an exception if it cannot fill the cache (from +// * some other reasons). +// *************************************************************************/ +// protected boolean fillDataTypesCache() +// throws MobyException { +// try { +// fireEvent (DATA_TYPES_START); +// String typesAsXML = getDataTypeNamesAsXML(); +// store (dataTypesCache, LIST_FILE, typesAsXML); +// Map types = createDataTypeNamesFromXML (typesAsXML); +// fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); +// for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { +// Map.Entry entry = (Map.Entry)it.next(); +// String name = (String)entry.getKey(); +// fireEvent (DATA_TYPE_LOADING, name); +// String xml = getDataTypeAsXML (name); +// store (dataTypesCache, name, xml); +// fireEvent (DATA_TYPE_LOADED, name); +// if (stopDT) { +// removeFromCache (CACHE_PART_DATATYPES); +// return false; +// } +// } +// return true; +// } catch (Exception e) { +// throw new MobyException (formatException (e)); +// } finally { +// fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); +// stopDT = false; +// } +// } + + /************************************************************************** + * Update data types from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE *************************************************************************/ protected boolean fillDataTypesCache() throws MobyException { try { fireEvent (DATA_TYPES_START); String typesAsXML = getDataTypeNamesAsXML(); - store (dataTypesCache, LIST_FILE, typesAsXML); + remove (dataTypesCache, LIST_FILE); Map types = createDataTypeNamesFromXML (typesAsXML); fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = dataTypesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (dataTypesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String name = (String)entry.getKey(); - fireEvent (DATA_TYPE_LOADING, name); - String xml = getDataTypeAsXML (name); - store (dataTypesCache, name, xml); - fireEvent (DATA_TYPE_LOADED, name); - if (stopDT) { - removeFromCache (CACHE_PART_DATATYPES); - return false; + if ( ! currentFiles.contains (name)) { + // missing file: fetch it from a registry + fireEvent (DATA_TYPE_LOADING, name); + String xml = getDataTypeAsXML (name); + store (dataTypesCache, name, xml); + fireEvent (DATA_TYPE_LOADED, name); + if (stopDT) { + return false; + } } + currentFiles.remove (name); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (dataTypesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (dataTypesCache, LIST_FILE, typesAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -397,27 +504,59 @@ } } - // + /************************************************************************** + * Update service types from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE + *************************************************************************/ protected boolean fillServiceTypesCache() throws MobyException { try { fireEvent (SERVICE_TYPES_START); String typesAsXML = getServiceTypesAsXML(); - store (serviceTypesCache, LIST_FILE, typesAsXML); + remove (serviceTypesCache, LIST_FILE); MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = serviceTypesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (serviceTypesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files for (int i = 0 ; i < types.length; i++) { String name = types[i].getName(); - fireEvent (SERVICE_TYPE_LOADING, name); - String xml = getServiceTypeRelationshipsAsXML (name, false); - store (serviceTypesCache, name, xml); - fireEvent (SERVICE_TYPE_LOADED, name); - if (stopST) { - removeFromCache (CACHE_PART_SERVICETYPES); - return false; + if ( ! currentFiles.contains (name)) { + // missing file: fetch it from a registry + fireEvent (SERVICE_TYPE_LOADING, name); + String xml = getServiceTypeRelationshipsAsXML (name, false); + store (serviceTypesCache, name, xml); + fireEvent (SERVICE_TYPE_LOADED, name); + if (stopST) { + log.warn ("Service types cache not fully updated"); + return false; + } } + currentFiles.remove (name); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (serviceTypesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (serviceTypesCache, LIST_FILE, typesAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -426,6 +565,34 @@ } } +// protected boolean fillServiceTypesCache() +// throws MobyException { +// try { +// fireEvent (SERVICE_TYPES_START); +// String typesAsXML = getServiceTypesAsXML(); +// store (serviceTypesCache, LIST_FILE, typesAsXML); +// MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); +// fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); +// for (int i = 0 ; i < types.length; i++) { +// String name = types[i].getName(); +// fireEvent (SERVICE_TYPE_LOADING, name); +// String xml = getServiceTypeRelationshipsAsXML (name, false); +// store (serviceTypesCache, name, xml); +// fireEvent (SERVICE_TYPE_LOADED, name); +// if (stopST) { +// removeFromCache (CACHE_PART_SERVICETYPES); +// return false; +// } +// } +// return true; +// } catch (Exception e) { +// throw new MobyException (formatException (e)); +// } finally { +// fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); +// stopST = false; +// } +// } + // protected boolean fillNamespacesCache() throws MobyException { @@ -458,6 +625,12 @@ // get a list file (with all data type names) String xmlList = getListFile (dataTypesCache); + if (xmlList == null) { + initCache(); + if (! fillDataTypesCache()) + // callback stopped filling + return new TreeMap(); + } return createDataTypeNamesFromXML (xmlList); } } @@ -513,6 +686,12 @@ // get a list file (with all service names) String xmlList = getListFile (servicesCache); + if (xmlList == null) { + initCache(); + if (! fillServicesCache()) + // callback stopped filling + return new TreeMap(); + } return createServiceNamesByAuthorityFromXML (xmlList); } } @@ -568,6 +747,10 @@ // get a list file (with all namespaces) String xmlList = getListFile (namespacesCache); + if (xmlList == null) { + initCache(); + fillNamespacesCache(); + } return createNamespacesFromXML (xmlList); } } @@ -583,12 +766,17 @@ if (isCacheEmpty (serviceTypesCache)) { initCache(); if (! fillServiceTypesCache()) - // callback stopped filling + // a callback stopped filling return new MobyServiceType[] {}; } // get a list file (with all service type names) String xmlList = getListFile (serviceTypesCache); + if (xmlList == null) { + if (! fillServiceTypesCache()) + // a callback stopped filling + return new MobyServiceType[] {}; + } MobyServiceType[] types = createServiceTypesFromXML (xmlList); // add details about relationship to get full service types @@ -606,13 +794,15 @@ } /************************************************************************** - * + * A LIST_FILE is a TOC of a cache object (each cache part has its + * own LIST_FILE). Read it and return it. If it does not exist, + * return null. *************************************************************************/ protected static String getListFile (File cache) throws MobyException { File listFile = new File (cache, LIST_FILE); if (! listFile.exists()) - throw new MobyException ("Corrupted cache '" + cache + "': Missing a LIST file."); + return null; return load (listFile); } From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 9 11:21:29 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWkk032284@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java NOTES RegistrationPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java RegistryPanel.java ServiceTypesBoard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.18,1.19 NOTES,1.20,1.21 RegistrationPanel.java,1.14,1.15 RegistrationServiceTypeSubPanel.java,1.4,1.5 RegistryModel.java,1.16,1.17 RegistryPanel.java,1.20,1.21 ServiceTypesBoard.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 05:29:38 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 16:23:32 1.19 @@ -404,7 +404,7 @@ clearButton.setFocusPainted (false); clearButton.setMargin (new Insets (0,0,0,0)); clearButton.setContentAreaFilled (false); - clearButton.setToolTipText ("Clear text area"); + clearButton.setToolTipText ("Clear " + title.toLowerCase() + " text area"); clearButton.addActionListener (new ActionListener() { public void actionPerformed (ActionEvent e) { area.requestFocusInWindow(); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/07 17:14:46 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/09 16:23:32 1.21 @@ -1,15 +1,14 @@ +* after unregistration, fill the form with just unregistered entity - + so it is easier to update it and register again * better initial dimension of the whole dashboard * too much empty space in the dashboard title... (perhaps to move the icon somewhere else - like a "splash panel") --- -* show/store XML sent to register this service - (a place for using it other time?) - * how to squeeze too long combo boxes into smaller place ? -*introduce perhaps preferred/minimal/maximal sizes into text fields? +* introduce perhaps preferred/minimal/maximal sizes into text fields? * registration: selecting an authority is really propagated to the text fields? (Do for data type registration the same as was done for @@ -130,6 +129,8 @@ * The same, after de-registration * Then make the reg/unreg real... +* log4j.configuration property - works only from Ant... add it to the + cmd-line clients, as well * alltools2: - JTextFieldWithHistory should remember also an empty value ("") =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 05:29:38 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 16:23:32 1.15 @@ -284,7 +284,7 @@ error ("An error occured when trying to register a new entity.\n\n", exception); registerButton.setEnabled (true); - showXMLButton.setEnabled (true); + fromXMLButton.setEnabled (true); maybeDisableVerbose (bag); console.setAppendMode (oldAppendMode); } @@ -299,6 +299,13 @@ throws MobyException { } + /************************************************************************** + * Should be overwritten by sub-panels. + **************************************************************************/ + protected void updateCache() + throws MobyException { + } + /********************************************************************* * ********************************************************************/ @@ -321,6 +328,8 @@ console.setText (registryModel.callRegistry (myMethodName, xmlFile)); console.setText ("\n"); + updateCache(); + } catch (MobyException e) { exception = e; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 16:23:32 1.5 @@ -200,6 +200,7 @@ serviceType.toString() + "\n"); registryModel.registerServiceType (serviceType); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterServiceTypeXML (serviceType); console.setText ("\n" + xml + "\n"); @@ -208,6 +209,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateServiceTypesCache(); + } + + /************************************************************************** * * Customized tree of service types - has different popup menus etc... * @@ -352,6 +363,7 @@ console.setText ("Service type to be unregistered: " + name + "\n"); registryModel.unRegisterServiceType (serviceType); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 05:29:38 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 16:23:32 1.17 @@ -48,6 +48,8 @@ org.apache.commons.logging.LogFactory.getLog (RegistryModel.class); CentralAll worker; + CentralDigestCachedImpl castWorker; + boolean useCache = true; Hashtable dataTypesTable = new Hashtable(); Hashtable serviceTypesTable = new Hashtable(); @@ -262,6 +264,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateServiceTypesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + fireEvent (Notifier.SERVICE_TYPES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadServiceTypesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + fireEvent (Notifier.SERVICE_TYPES_UPDATED, "", null); + } + + /********************************************************************* * Fetch service types (from a cache or from a registry). When done, * signal that service types are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -505,7 +528,7 @@ /********************************************************************* * - * The rest... + * Dealing with local cache. * ********************************************************************/ @@ -521,6 +544,12 @@ /********************************************************************* * + * The rest... + * + ********************************************************************/ + + /********************************************************************* + * ********************************************************************/ protected void initWorker() throws MobyException { @@ -554,6 +583,7 @@ maybeNewCacheDir); ((Notifier)worker).addNotificationListeners (nls); } + castWorker = (CentralDigestCachedImpl)worker; } /************************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/07 07:03:49 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/09 16:23:32 1.21 @@ -12,11 +12,16 @@ import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.JFileChooserWithHistory; +import org.biomoby.shared.MobyException; +import org.biomoby.shared.event.Notifier; +import org.biomoby.client.CentralDigestCachedImpl; + import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.JSplitPane; import javax.swing.JComponent; @@ -40,10 +45,13 @@ public class RegistryPanel extends AbstractPanel { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (RegistryPanel.class); + // names of user preferences keys static final String USE_CACHE = "use-cache"; - // associated model working behind the scenes + // associated model working behind the scene RegistryModel registryModel; // components that are used from more methods @@ -53,6 +61,8 @@ JLabel labelCacheDir; CommonConsole console; + JCheckBox bServices, bDataTypes, bNamespaces, bServiceTypes, bAll; + // shared icons protected static Icon defaultsIcon; protected static Icon reloadIcon; @@ -142,6 +152,37 @@ /************************************************************************** * **************************************************************************/ + private JPanel createCacheDialog (String introText) { + JPanel p = new JPanel (new GridBagLayout()); + JLabel start = new JLabel (introText); + + bServices = createCheckBox ("Services", false, KeyEvent.VK_S, null); + bDataTypes = createCheckBox ("Data types", false, KeyEvent.VK_D, null); + bNamespaces = createCheckBox ("Namespaces", false, KeyEvent.VK_N, null); + bServiceTypes = createCheckBox ("Service types", false, KeyEvent.VK_T, null); + bAll = createCheckBox ("All", false, KeyEvent.VK_A, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + boolean enabled = (e.getStateChange() != ItemEvent.SELECTED); + bServices.setEnabled (enabled); + bDataTypes.setEnabled (enabled); + bNamespaces.setEnabled (enabled); + bServiceTypes.setEnabled (enabled); + } + }); + // put it together + SwingUtils.addComponent (p, start, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bServices, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (p, bDataTypes, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bNamespaces, 0, 3, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bServiceTypes, 0, 4, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bAll, 0, 5, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + return p; + } + + /************************************************************************** + * + **************************************************************************/ public void onDefaults() { registryURL.setText (registryModel.getDefaultRegistryEndpoint()); registryNS.setText (registryModel.getDefaultRegistryNamespace()); @@ -159,10 +200,84 @@ public void onCacheErase() { } + final static String UPDATE_LABEL = + "Update or reload your local cache
    " + + "for the entities selected below.

    " + + + "Update is faster than reload but
    " + + "it may not reflect changes in the
    " + + "contents of the entities.

    " + + + "Reload is slower than update but it
    " + + "guarantees that the full contents
    " + + "of all cached entities is up to date.

    "; + /************************************************************************** * **************************************************************************/ public void onCacheUpdate() { + JPanel p = createCacheDialog (UPDATE_LABEL); + String[] buttons = new String[] { "Update", "Reload", "Cancel"}; + int selected = + JOptionPane.showOptionDialog (null, p, + "Update/Reload local cache", + JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE, + confirmIcon, + buttons, + null); + boolean toReload; + if (selected == 0) + toReload = false; // 'update' selected + else if (selected == 1) + toReload = true; // 'reload' selected + else + return; // cancelled + + boolean all = bAll.isSelected(); + if (all || bServices.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES, toReload); + if (all || bDataTypes.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES, toReload); + if (all || bNamespaces.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES, toReload); + if (all || bServiceTypes.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES, toReload); + } + + /************************************************************************** + * + **************************************************************************/ + private void updateCache (String cachePart, boolean reload) { + final String myCachePart = cachePart; + final boolean myReload = reload; + final SwingWorker worker = new SwingWorker() { + MobyException exception = null; + public Object construct() { + try { + if (myReload) { + registryModel.reloadServiceTypesCache(); + } else { + registryModel.updateServiceTypesCache(); + } + } catch (MobyException e) { + exception = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (log.isDebugEnabled()) + log.debug (myReload ? "Reload of " : "Update of " + myCachePart + " finished"); + if (exception != null) + error ("An error occured when filling/updating the cache.\n\n", + exception); + } + + }; + worker.start(); + } /************************************************************************** @@ -184,8 +299,8 @@ JLabel labelRegistryNS = new JLabel("Namespace (URI)"); registryNS = createText (null, "registryNamespace", DP_REGISTRY_NAMESPACE); JButton reloadAllButton = - createButton (" Reload all ", - "Reload all ontology trees from the Biomoby registry", + createButton (" Reload ", + "Reload fully some or all ontology trees from the Biomoby registry", KeyEvent.VK_R, new ActionListener() { public void actionPerformed (ActionEvent e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/09 16:23:32 1.4 @@ -88,12 +88,14 @@ case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); +// log.info ("RESET initiator: " + initiator + ", this tree: " + tree); if (tree == initiator) channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: initiator = event.getSource(); +// log.info ("UPDATED initiator: " + initiator + ", this tree: " + tree); if (tree != initiator) { // someone else (of this instance) initiated request // for updating service types - so we need to update our From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 03:52:07 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVAE003844@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv3825/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.49,1.50 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/09 05:29:38 1.49 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/10 08:54:31 1.50 @@ -1,3 +1,7 @@ +2005-11-10 Martin Senger + + * Added method getParentName() to MobyServiceType + 2005-11-08 Martin Senger * Added methods getRegister[...]XML() to CentralImpl. From senger at pub.open-bio.org Thu Nov 10 03:54:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 03:52:17 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sW3X004003@pub.open-bio.org> senger Thu Nov 10 03:54:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/shared Modified Files: MobyDataType.java MobyServiceType.java Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyDataType.java,1.11,1.12 MobyServiceType.java,1.4,1.5 Utils.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/10/28 07:58:08 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/11/10 08:54:32 1.12 @@ -154,6 +154,20 @@ return names; } } + + /** + * Return the first parent name (at the moment the only one set + * and used, anyway. This is a convenient method to {@link + * #getParentNames}.

    + * + * @return parent name, or an empty string if there is no parent + * set + */ + public String getParentName() { + String[] names = getParentNames(); + return (names.length == 0 ? "" : names[0]); + } + /** * @see #getParentNames * @param value is a set of parent names (usually just one name, =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java 2005/10/28 11:30:37 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java 2005/11/10 08:54:32 1.5 @@ -83,6 +83,11 @@ description = (value == null ? "" : value); } + public String getParentName() { + String[] names = getParentNames(); + return (names.length == 0 ? "" : names[0]); + } + public String[] getParentNames() { synchronized (parentNames) { String[] names = new String [parentNames.length]; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/07 07:03:50 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/10 08:54:32 1.8 @@ -106,6 +106,25 @@ } /************************************************************************* + * Give back an elapsed time (given in milllis) in a human + * readable form.

    + * + * @param millis is a time interval in milliseconds + * @return formatted, human-readable, time + *************************************************************************/ + public static String ms2Human (long millis) { + StringBuffer buf = new StringBuffer (100); + long seconds = millis / 1000; + long minutes = seconds / 60; + long hours = minutes / 60; + long days = hours / 24; + if (days > 0) + buf.append (days + " days and "); + buf.append ((hours % 24) + ":" + (minutes % 60) + ":" + (seconds % 60) + "." + (millis % 1000)); + return new String (buf); + } + + /************************************************************************* * Return just the last part of the LSID identifier. An example of * an LSID identifier as used by and returned from the Moby * registry is urn:lsid:biomoby.org:objectclass:object. From senger at pub.open-bio.org Thu Nov 10 03:54:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 03:52:19 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sW1J003976@pub.open-bio.org> senger Thu Nov 10 03:54:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java Dashboard.java DashboardProperties.java DataTypesBoard.java NOTES NamespacesBoard.java RegistrationDataTypeSubPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonTree.java,1.14,1.15 Dashboard.java,1.13,1.14 DashboardProperties.java,1.13,1.14 DataTypesBoard.java,1.8,1.9 NOTES,1.21,1.22 NamespacesBoard.java,1.3,1.4 RegistrationDataTypeSubPanel.java,1.4,1.5 RegistrationServiceSubPanel.java,1.3,1.4 RegistrationServiceTypeSubPanel.java,1.5,1.6 RegistryModel.java,1.17,1.18 RegistryPanel.java,1.21,1.22 ServiceTypesBoard.java,1.4,1.5 ServiceTypesTree.java,1.7,1.8 ServicesBoard.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/06 16:47:11 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 08:54:31 1.15 @@ -57,6 +57,7 @@ protected final static String AC_ASORT = "ac-asort"; // some shared constants + final static protected int SORTED_AS_PREVIOUSLY = -1; final static protected int SORTED_BY_NAME = 0; final static protected int SORTED_BY_AUTHORITY = 1; final static protected int SORTED_UNUSUAL = 9; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/07 17:14:46 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 08:54:31 1.14 @@ -116,8 +116,14 @@ JFrame frame = SwingUtils.createMainFrame (getComponent (propertyChannel), getName()); addMenuBar (frame); -// SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); - SwingUtils.showMainFrame (frame, new Dimension (1000, 800)); + + Dimension screenSize = frame.getToolkit().getScreenSize(); + double myWidth = Math.min (screenSize.getWidth(), 1100); + double myHeight = Math.min (screenSize.getHeight(), 900); + Dimension mySize = new Dimension(); + mySize.setSize (myWidth, myHeight); + + SwingUtils.showMainFrame (frame, mySize); } /************************************************************************** @@ -266,7 +272,8 @@ * the bottom of a dashboard). **************************************************************************/ protected StatusBar getStatusBar() { - return new StatusBar ("Status: Work in progress"); + return new StatusBar + ("Dashboard is ready. Fasten your seat belts - it's going to be a bumpy ride."); } class StatusBar extends JLabel implements PropertyChangeListener { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/09 05:29:38 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 08:54:31 1.14 @@ -63,6 +63,7 @@ static final String DP_REG_S_XML_PATH = "dp-reg-s-xml-path"; static final String DP_USE_SIGNATURE = "dp-use-signature"; // type: Boolean static final String DP_USE_AUTHORITATIVE = "dp-use-auth"; // type: Boolean + static final String DP_REG_S_TYPE = "dp-reg-s-type"; static final String DP_REG_VERBOSE = "dp-reg-verbose"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/07 17:14:46 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/10 08:54:31 1.9 @@ -99,7 +99,8 @@ // for updating data types - so we need to update our // own tree - using for that data types included in // this event - tree.update (-1, (MobyDataType[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyDataType[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/09 16:23:32 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 08:54:31 1.22 @@ -1,10 +1,28 @@ +* More testing: + - interrupting loading + - different order of panels + - loading without caching + - changing cache... + +* MAJOR BUG: synchronization problem when starting; revised it! + - perhaps singletons for registry model and for workers there + +* BUG: still sometimes a bug by reloading the cache - + NullPointerException reported in a dialog window - difficult to + reproduce it... but it is somewhere there :-( + +* WARN: How would an authority with characters 'http://' cope as a + cache name? Can it happen? + * after unregistration, fill the form with just unregistered entity - so it is easier to update it and register again -* better initial dimension of the whole dashboard * too much empty space in the dashboard title... (perhaps to move the icon somewhere else - like a "splash panel") +* log warning if the 'notified' is not called from the event-dispatch + queue + --- * how to squeeze too long combo boxes into smaller place ? @@ -19,8 +37,6 @@ * BUG: When 'no-use-chache' then changing sorting also reloads; which is bad I think -* Reload ... does it ignore cache? - TODO generally: --------------- @@ -35,26 +51,19 @@ ? select a part of an error message and highlight it in red? ? HELP (in a Dashboard Menu) + - starting panel/splash screen - helps from panels - About - credits - add dynamically a URL from dashboard.properties... -* change onMethods() to be protected or even private... - ? improve API javadoc of all these Central*Impl ? start to work on/think of the RDF-based cache TODO for cache: --------------- -* poor-man update: keep what's there but add what is not there - (and perhaps delete what should not be there) - but do not - check any age of existing -* getInfo() method -* corresponding changes with command-line clients for cache - implementations -* remove memory-caching from CentralImpl -* graphics by default: yes for datatyeps and no for services +? remove memory-caching from CentralImpl +? graphics by default: yes for datatyeps and no for services General options (available from the menu) --------------- @@ -63,12 +72,6 @@ * language ( => use proper ResourceBundler...) -Registry panel --------------- - -* finish all buttons - - Registration panel ------------------ @@ -123,12 +126,6 @@ - the BuildDataTypeTree is sometimes damaged (after adding a member node); not sure how to reproduce it - ! finish all the caching stuff (separate scrap of paper) - -* After registration, update cache, update list -* The same, after de-registration -* Then make the reg/unreg real... - * log4j.configuration property - works only from Ant... add it to the cmd-line clients, as well =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/10 08:54:31 1.4 @@ -99,7 +99,8 @@ // for updating namespaces - so we need to update our // own tree - using for that namespaces included in // this event - tree.update (-1, (MobyNamespace[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyNamespace[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 08:54:31 1.5 @@ -327,7 +327,10 @@ /********************************************************************* * Called when a tree node is selected, or deselected (in * which case 'node' is null). If a data type name is - * selected, enable few popup menu items, otherwise disable them. + * selected, enable few popup menu items, otherwise disable + * them. Then copy the contents of this data type to a + * console, and additional (if indicated in the + * propertyChannel) to the newly built data type fields. ********************************************************************/ protected void selected (DefaultMutableTreeNode node) { if (node == null) { @@ -366,6 +369,7 @@ dtAuth.setText (dataType.getAuthority()); dtEmail.setText (dataType.getEmailContact()); dtDescArea.setText (dataType.getDescription()); + buildTree.setParent (dataType.getParentName()); } } else if (isAuthority) { if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/09 05:29:38 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 08:54:31 1.4 @@ -59,6 +59,7 @@ // names of user preferences keys static final String USE_SIGNATURE = "use-signature"; static final String USE_AUTHORITATIVE = "use-authoritative"; + static final String REG_S_TYPE = "reg-s-type"; static final String REG_S_FROM_XML = "reg-service-from-xml-file"; // components that are used from more methods @@ -142,7 +143,7 @@ // service type JPanel serviceType = new JPanel (new GridBagLayout()); JLabel labelST = new JLabel ("Service type: "); - sType = new JLabel (""); + sType = new JLabel (getPrefValue (REG_S_TYPE, "")); SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); @@ -585,8 +586,12 @@ protected void selected (DefaultMutableTreeNode node) { if (node == null) return; CommonNode nodeObject = (CommonNode)node.getUserObject(); - if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) - sType.setText (nodeObject.getValue()); + if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) { + String value = nodeObject.getValue(); + sType.setText (value); + setPrefValue (REG_S_TYPE, value); + propertyChannel.put (DP_REG_S_TYPE, value); + } } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 16:23:32 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 08:54:31 1.6 @@ -312,6 +312,7 @@ stAuth.setText (serviceType.getAuthority()); stEmail.setText (serviceType.getEmailContact()); stDescArea.setText (serviceType.getDescription()); + stISA.setText (serviceType.getParentName()); } } else if (isAuthority) { if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 16:23:32 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/10 08:54:31 1.18 @@ -32,9 +32,9 @@ import java.io.IOException; /** - * A real worker that supplies all data to the {@link - * RegistryPanel}. It accesses a Biomoby registry (or a local cache) - * to get data.

    + * A real worker that supplies all data from a Biomoby registry (or + * from a local cache) to various panels, especially to the {@link + * RegistryPanel} and the {@link RegistrationPanel}.

    * * @author Martin Senger * @version $Id$ @@ -47,6 +47,14 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (RegistryModel.class); + // Biomoby parts: reflects the same what from is in + // CentralDigestCachedImpl for cache parts - but here more + // conveniently as integers + public static final int PART_SERVICES = 1; + public static final int PART_DATA_TYPES = 2; + public static final int PART_SERVICE_TYPES = 4; + public static final int PART_NAMESPACES = 8; + CentralAll worker; CentralDigestCachedImpl castWorker; @@ -168,6 +176,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateDataTypesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + fireEvent (Notifier.DATA_TYPES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadDataTypesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + fireEvent (Notifier.DATA_TYPES_UPDATED, "", null); + } + + /********************************************************************* * Fetch data types (from a cache or from a registry). When done, * signal that data types are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -380,6 +409,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateNamespacesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + fireEvent (Notifier.NAMESPACES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadNamespacesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + fireEvent (Notifier.NAMESPACES_UPDATED, "", null); + } + + /********************************************************************* * Fetch namespaces (from a cache or from a registry). When done, * signal that namespaces are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -476,6 +526,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateServicesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + fireEvent (Notifier.AUTHORITIES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadServicesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + fireEvent (Notifier.AUTHORITIES_UPDATED, "", null); + } + + /********************************************************************* * Fetch services (from a cache or from a registry). When done, * signal that services are updated. If an initiator is known (not * null), signal, who asked for it, as well. @@ -544,6 +615,20 @@ /********************************************************************* * + ********************************************************************/ + public String getCacheInfoFormatted() + throws MobyException { + initWorker(); + StringBuffer buf = new StringBuffer (500); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_DATATYPES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_NAMESPACES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES)); + return new String (buf); + } + + /********************************************************************* + * * The rest... * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/09 16:23:32 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/10 08:54:31 1.22 @@ -14,7 +14,6 @@ import org.biomoby.shared.MobyException; import org.biomoby.shared.event.Notifier; -import org.biomoby.client.CentralDigestCachedImpl; import javax.swing.JPanel; import javax.swing.JLabel; @@ -62,6 +61,12 @@ CommonConsole console; JCheckBox bServices, bDataTypes, bNamespaces, bServiceTypes, bAll; + JButton infoButton, updateButton, eraseButton; + + DataTypesBoard dataTypesBoard; + ServiceTypesBoard serviceTypesBoard; + NamespacesBoard namespacesBoard; + ServicesBoard servicesBoard; // shared icons protected static Icon defaultsIcon; @@ -108,25 +113,21 @@ console.setAppendMode (false); // ontology trees - DataTypesBoard dataTypesBoard = - new DataTypesBoard (registryModel, - console, - propertyChannel); + dataTypesBoard = new DataTypesBoard (registryModel, + console, + propertyChannel); dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); - ServiceTypesBoard serviceTypesBoard = - new ServiceTypesBoard (registryModel, - console, - propertyChannel); + serviceTypesBoard = new ServiceTypesBoard (registryModel, + console, + propertyChannel); serviceTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); - NamespacesBoard namespacesBoard = - new NamespacesBoard (registryModel, - console, - propertyChannel); + namespacesBoard = new NamespacesBoard (registryModel, + console, + propertyChannel); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); - ServicesBoard servicesBoard = - new ServicesBoard (registryModel, - console, - propertyChannel); + servicesBoard = new ServicesBoard (registryModel, + console, + propertyChannel); servicesBoard.updateTree (CommonTree.SORTED_BY_NAME); // split it into moving panels @@ -144,9 +145,23 @@ } /************************************************************************** - * + * It updates all lists. Each tree is responsible to reload itself + * in a separate thread. + **************************************************************************/ + protected void onReloadAll() { + dataTypesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + serviceTypesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + namespacesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + servicesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + } + + /************************************************************************** + * Replace text fields that define location of a Biomoby registry + * with a default location. **************************************************************************/ - public void onReloadAll() { + protected void onDefaults() { + registryURL.setText (registryModel.getDefaultRegistryEndpoint()); + registryNS.setText (registryModel.getDefaultRegistryNamespace()); } /************************************************************************** @@ -183,21 +198,53 @@ /************************************************************************** * **************************************************************************/ - public void onDefaults() { - registryURL.setText (registryModel.getDefaultRegistryEndpoint()); - registryNS.setText (registryModel.getDefaultRegistryNamespace()); - } + protected void onCacheInfo() { - /************************************************************************** - * - **************************************************************************/ - public void onCacheInfo() { + final JLabel contents = new JLabel(); + final String[] buttons = new String[] { "Copy to console", "Done"}; + propertyChannel.fire (DP_STATUS_MSG, "Retrieving cach info..."); + infoButton.setEnabled (false); + + final SwingWorker worker = new SwingWorker() { + MobyException exception = null; + String info = null; + public Object construct() { + try { + info = registryModel.getCacheInfoFormatted(); + } catch (MobyException e) { + exception = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (exception == null) + contents.setText ("

    " + info + "
    "); + else + contents.setText ("Sorry, I could not retrieve any info...
    " + + "I think that the problem is actually here:

    " +
    +					  exception.getMessage() +
    +					  "
    "); + if (JOptionPane.showOptionDialog (null, contents, + "Info on local cache", + JOptionPane.YES_NO_OPTION, + JOptionPane.PLAIN_MESSAGE, + confirmIcon, + buttons, + null) == 0) + console.setText (info); + propertyChannel.fire (DP_STATUS_MSG, "Done"); + infoButton.setEnabled (true); + } + }; + worker.start(); } /************************************************************************** * **************************************************************************/ - public void onCacheErase() { + protected void onCacheErase() { } final static String UPDATE_LABEL = @@ -215,7 +262,7 @@ /************************************************************************** * **************************************************************************/ - public void onCacheUpdate() { + protected void onCacheUpdate() { JPanel p = createCacheDialog (UPDATE_LABEL); String[] buttons = new String[] { "Update", "Reload", "Cancel"}; int selected = @@ -234,31 +281,53 @@ else return; // cancelled + // update each cache part in a separate (and concurrent) thread boolean all = bAll.isSelected(); if (all || bServices.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES, toReload); + updateCache (RegistryModel.PART_SERVICES, toReload); if (all || bDataTypes.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES, toReload); + updateCache (RegistryModel.PART_DATA_TYPES, toReload); if (all || bNamespaces.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES, toReload); + updateCache (RegistryModel.PART_NAMESPACES, toReload); if (all || bServiceTypes.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES, toReload); + updateCache (RegistryModel.PART_SERVICE_TYPES, toReload); } /************************************************************************** * **************************************************************************/ - private void updateCache (String cachePart, boolean reload) { - final String myCachePart = cachePart; + private void updateCache (int cachePart, boolean reload) { + final int myCachePart = cachePart; final boolean myReload = reload; final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { try { - if (myReload) { - registryModel.reloadServiceTypesCache(); - } else { - registryModel.updateServiceTypesCache(); + switch (myCachePart) { + case RegistryModel.PART_SERVICES: + if (myReload) + registryModel.reloadServicesCache(); + else + registryModel.updateServicesCache(); + break; + case RegistryModel.PART_DATA_TYPES: + if (myReload) + registryModel.reloadDataTypesCache(); + else + registryModel.updateDataTypesCache(); + break; + case RegistryModel.PART_SERVICE_TYPES: + if (myReload) + registryModel.reloadServiceTypesCache(); + else + registryModel.updateServiceTypesCache(); + break; + case RegistryModel.PART_NAMESPACES: + if (myReload) + registryModel.reloadNamespacesCache(); + else + registryModel.updateNamespacesCache(); + break; } } catch (MobyException e) { exception = e; @@ -269,7 +338,7 @@ // runs on the event-dispatching thread. public void finished() { if (log.isDebugEnabled()) - log.debug (myReload ? "Reload of " : "Update of " + myCachePart + " finished"); + log.debug (myReload ? "Reload of " : "Update of part " + myCachePart + " finished"); if (exception != null) error ("An error occured when filling/updating the cache.\n\n", exception); @@ -286,6 +355,8 @@ protected void onUseCache (boolean enabled) { cacheDir.setEnabled (enabled); labelCacheDir.setEnabled (enabled); + infoButton.setEnabled (enabled); + updateButton.setEnabled (enabled); setPrefValue (USE_CACHE, enabled); propertyChannel.put (DP_USE_CACHE, new Boolean (enabled).toString()); } @@ -299,8 +370,8 @@ JLabel labelRegistryNS = new JLabel("Namespace (URI)"); registryNS = createText (null, "registryNamespace", DP_REGISTRY_NAMESPACE); JButton reloadAllButton = - createButton (" Reload ", - "Reload fully some or all ontology trees from the Biomoby registry", + createButton (" Reload all lists ", + "Reload all ontology trees from a Biomoby registry, or from the cache", KeyEvent.VK_R, new ActionListener() { public void actionPerformed (ActionEvent e) { @@ -353,8 +424,7 @@ DP_CACHE_DIR); cacheDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - onUseCache (usingCache); - JButton infoButton = + infoButton = createButton (" Info ", "Show current information about the local cache", KeyEvent.VK_I, @@ -365,7 +435,7 @@ }); infoButton.setIcon (infoIcon); - JButton updateButton = + updateButton = createButton (" Update ", "Update local cache from Biomoby registry", KeyEvent.VK_U, @@ -375,19 +445,21 @@ } }); updateButton.setIcon (updateIcon); - JButton eraseButton = - createButton (" Erase ", - "Remove everything from the local cache", - KeyEvent.VK_E, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - onCacheErase(); - } - }); - eraseButton.setIcon (eraseIcon); +// eraseButton = +// createButton (" Erase ", +// "Remove everything from the local cache", +// KeyEvent.VK_E, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// onCacheErase(); +// } +// }); +// eraseButton.setIcon (eraseIcon); + JPanel buttonPanel = createButtonPanel (new JButton[] { infoButton, - updateButton, - eraseButton }); + updateButton }); +// eraseButton }); + onUseCache (usingCache); JPanel cLocation = createTitledPanel ("Local cache"); SwingUtils.addComponent (cLocation, useCache, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/09 16:23:32 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/10 08:54:31 1.5 @@ -88,20 +88,19 @@ case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); -// log.info ("RESET initiator: " + initiator + ", this tree: " + tree); if (tree == initiator) channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: initiator = event.getSource(); -// log.info ("UPDATED initiator: " + initiator + ", this tree: " + tree); if (tree != initiator) { // someone else (of this instance) initiated request // for updating service types - so we need to update our // own tree - using for that service types included in // this event - tree.update (-1, (MobyServiceType[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyServiceType[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/07 07:03:49 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/10 08:54:31 1.8 @@ -176,8 +176,9 @@ } /********************************************************************* - * Reload the tree from the Biomoby registry, ignoring (and - * updating) cache. + * Reload the tree from the Biomoby registry (or from the current + * cache). If you want to update also cache, use the cache buttons + * - they will invoke this method also after updating the cache. ********************************************************************/ protected void reload() { update (lastSorted, null); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 08:54:31 1.4 @@ -99,7 +99,8 @@ // for updating services - so we need to update our // own tree - using for that services included in this // event - tree.update (-1, (MobyService[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyService[])event.getDetails()); } break; } From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 03:52:20 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVPI003882@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory pub.open-bio.org:/tmp/cvs-serv3825/src/Clients/help Modified Files: CacheRegistryClient_usage.txt Log Message: moby-live/Java/src/Clients/help CacheRegistryClient_usage.txt,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/09 16:23:32 1.5 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/10 08:54:31 1.6 @@ -19,19 +19,6 @@ (default: http://mobycentral.icapture.ubc.ca/MOBY/Central) where are: - -age ... print date when the cache was created - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty'); - format: dow mon dd hh:mm:ss zzz yyyy - -agediff ... print how old is cache - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty') - -rawage ... print date when the cache was created - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty'); - format: number of milliseconds since the standard base - time known as "the epoch" (January 1, 1970, 00:00:00 GMT) - -fill ... remove the current cache and reread all data from the given Moby registry and cache them (note that this does not influence data from @@ -61,6 +48,12 @@ -remove-t ...ditto as -remove but only for service types -remove-n ...ditto as -remove but only for namespaces + -info ... print info on all part of the cache + -info-d ...ditto as -info but only for data types + -info-s ...ditto as -info but only for services + -info-t ...ditto as -info but only for service types + -info-n ...ditto as -info but only for namespaces + -q ... quiet mode (prints only errors) (default) ... prints events what is happenning (to a log) -v ... verbose mode (prints also decorations) From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 03:52:25 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVLW003863@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv3825/src/Clients Modified Files: CacheRegistryClient.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/09 16:23:32 1.6 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/10 08:54:31 1.7 @@ -91,24 +91,6 @@ } // - // how old is the current cache? - // - if (cmd.hasOption ("-age") || cmd.hasOption ("-rawage") || cmd.hasOption ("-agediff")) { - decorationLn ("Cache age for " + worker.getRegistryEndpoint() + ":"); - long age = castWorker.getCacheAge(); - if (age < 0) - decorationLn ("(cache is empty)"); - else { - if (cmd.hasOption ("-age")) - System.out.println (new Date (age).toString()); - if (cmd.hasOption ("-agediff")) - System.out.println (ms2Human (new Date().getTime() - age)); - if (cmd.hasOption ("-ageraw")) - System.out.println (age); - } - } - - // // [re-]fill the cache // if (cmd.hasOption ("-fill") || cmd.hasOption ("-fill-d")) { @@ -172,6 +154,30 @@ decorationLn ("Cache for namespaces removed."); } + // + // cache info + // + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-d")) { + decorationLn ("Cache for data types..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_DATATYPES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-s")) { + decorationLn ("Cache for service authorities..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-t")) { + decorationLn ("Cache for service types..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-n")) { + decorationLn ("Cache for namespaces..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_NAMESPACES)); + } + } catch (Exception e) { System.err.println ("===ERROR==="); e.printStackTrace(); @@ -180,21 +186,6 @@ } /************************************************************************* - * Give me an elapsed time (given in milllis) in a human readable form. - *************************************************************************/ - public static String ms2Human (long millis) { - StringBuffer buf = new StringBuffer (100); - long seconds = millis / 1000; - long minutes = seconds / 60; - long hours = minutes / 60; - long days = hours / 24; - if (days > 0) - buf.append (days + " days and "); - buf.append ((hours % 24) + ":" + (minutes % 60) + ":" + (seconds % 60) + "." + (millis % 1000)); - return new String (buf); - } - - /************************************************************************* * Print 'msg' but only if in verbose mode *************************************************************************/ static void decoration (String msg) { From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 03:52:26 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVDg003901@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/09 16:23:32 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/10 08:54:31 1.13 @@ -1,7 +1,9 @@ // CentralDigestCachedImpl.java // -// senger@ebi.ac.uk -// September 2004 +// Created: September 2004 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger@gmail.com). // package org.biomoby.client; @@ -13,6 +15,7 @@ import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyServiceType; import org.biomoby.shared.NoSuccessException; +import org.biomoby.shared.Utils; import java.io.BufferedOutputStream; import java.io.BufferedReader; @@ -28,6 +31,8 @@ import java.util.Vector; import java.util.Arrays; import java.util.Comparator; +import java.util.Properties; +import java.util.Date; /** * An implementation of {@link org.biomoby.shared.CentralAll}, @@ -44,7 +49,7 @@ * This class can be used also without caching - just instantiate it * with 'cacheDir' set to null in the constructor.

    * - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ @@ -70,6 +75,16 @@ /** An ID used in {@link #removeFromCache} indicating namespaces part. */ public static final String CACHE_PART_NAMESPACES = "c4"; + // TBD: this will go to cache interface later, probably + // names of properties returned by getCacheInfo() + public static final String CACHE_PROP_NAME = "cache-name"; + public static final String CACHE_PROP_COUNT = "cache-count"; + public static final String CACHE_PROP_OLDEST = "cache-oldest"; + public static final String CACHE_PROP_YOUNGEST = "cache-youngest"; + public static final String CACHE_PROP_SIZE = "cache-size"; + public static final String CACHE_PROP_LOCATION = "cache-loc"; + public static final String CACHE_PROP_REGISTRY_URL = "cache-reg-url"; + // cache location private String cacheDir; // as defined in the constructor protected File dataTypesCache; @@ -193,7 +208,6 @@ remove (serviceTypesCache, LIST_FILE); fillServiceTypesCache(); } else if (id == null || id.equals (CACHE_PART_NAMESPACES)) { - remove (namespacesCache, LIST_FILE); fillNamespacesCache(); } } @@ -378,42 +392,6 @@ return true; } -// /************************************************************************** -// * Load data types from a moby registry into local cache. If it is -// * interrupted (by a callback signal) it removes what was already -// * put into this cache and returns false. Otherwise returns -// * true. It raises an exception if it cannot fill the cache (from -// * some other reasons). -// *************************************************************************/ -// protected boolean fillDataTypesCache() -// throws MobyException { -// try { -// fireEvent (DATA_TYPES_START); -// String typesAsXML = getDataTypeNamesAsXML(); -// store (dataTypesCache, LIST_FILE, typesAsXML); -// Map types = createDataTypeNamesFromXML (typesAsXML); -// fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); -// for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { -// Map.Entry entry = (Map.Entry)it.next(); -// String name = (String)entry.getKey(); -// fireEvent (DATA_TYPE_LOADING, name); -// String xml = getDataTypeAsXML (name); -// store (dataTypesCache, name, xml); -// fireEvent (DATA_TYPE_LOADED, name); -// if (stopDT) { -// removeFromCache (CACHE_PART_DATATYPES); -// return false; -// } -// } -// return true; -// } catch (Exception e) { -// throw new MobyException (formatException (e)); -// } finally { -// fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); -// stopDT = false; -// } -// } - /************************************************************************** * Update data types from a moby registry: * - get a new LIST_FILE (but do not put it into the cache yet) @@ -475,27 +453,59 @@ } } + /************************************************************************** + * Update services from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE + *************************************************************************/ protected boolean fillServicesCache() throws MobyException { try { fireEvent (AUTHORITIES_START); String byAuthorityAsXML = getServiceNamesByAuthorityAsXML(); - store (servicesCache, LIST_FILE, byAuthorityAsXML); + remove (servicesCache, LIST_FILE); Map authorities = createServiceNamesByAuthorityFromXML (byAuthorityAsXML); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = servicesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (servicesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files fireEvent (AUTHORITIES_COUNT, new Integer (authorities.size())); for (Iterator it = authorities.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String authority = (String)entry.getKey(); - fireEvent (AUTHORITY_LOADING, authority); - String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); - store (servicesCache, authority, xml); - fireEvent (AUTHORITY_LOADED, authority); - if (stopS) { - removeFromCache (CACHE_PART_SERVICES); - return false; + if ( ! currentFiles.contains (authority)) { + // missing file: fetch it from a registry + fireEvent (AUTHORITY_LOADING, authority); + String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); + store (servicesCache, authority, xml); + fireEvent (AUTHORITY_LOADED, authority); + if (stopS) { + return false; + } } + currentFiles.remove (authority); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (servicesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (servicesCache, LIST_FILE, byAuthorityAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -565,35 +575,10 @@ } } -// protected boolean fillServiceTypesCache() -// throws MobyException { -// try { -// fireEvent (SERVICE_TYPES_START); -// String typesAsXML = getServiceTypesAsXML(); -// store (serviceTypesCache, LIST_FILE, typesAsXML); -// MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); -// fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); -// for (int i = 0 ; i < types.length; i++) { -// String name = types[i].getName(); -// fireEvent (SERVICE_TYPE_LOADING, name); -// String xml = getServiceTypeRelationshipsAsXML (name, false); -// store (serviceTypesCache, name, xml); -// fireEvent (SERVICE_TYPE_LOADED, name); -// if (stopST) { -// removeFromCache (CACHE_PART_SERVICETYPES); -// return false; -// } -// } -// return true; -// } catch (Exception e) { -// throw new MobyException (formatException (e)); -// } finally { -// fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); -// stopST = false; -// } -// } - - // + /************************************************************************** + * Update namespaces from a moby registry - this easier than with + * other entities: just get a new LIST_FILE. + *************************************************************************/ protected boolean fillNamespacesCache() throws MobyException { try { @@ -901,4 +886,100 @@ } } + /************************************************************************** + * Return as many properties describing the given part of a cache + * as possible. The key used for returned properties are publicly + * available from this class but other may be returned as well.

    + * + * @return properties describing a cache + * @param id is a part of cache to be described, or null if the + * whole cache should be described (this may return different kind + * of properties than for individual cache parts) + **************************************************************************/ + public Properties getCacheInfo (String id) { + Properties result = new Properties(); + result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint()); + result.put (CACHE_PROP_COUNT, new Integer (0)); + if (cacheDir == null) return result; + String realName = null; + try { + File thisPart = null; + if (CACHE_PART_SERVICES.equals (id)) { + thisPart = servicesCache; + realName = "Cache for Services (authorities)"; + } else if (CACHE_PART_DATATYPES.equals (id)) { + thisPart = dataTypesCache; + realName = "Cache for Data Types"; + } else if (CACHE_PART_SERVICETYPES.equals (id)) { + thisPart = serviceTypesCache; + realName = "Cache for Service Types"; + } else if (CACHE_PART_NAMESPACES.equals (id)) { + thisPart = namespacesCache; + realName = "Cache for Namespaces"; + } + if (thisPart == null) return result; + result.put (CACHE_PROP_NAME, realName); + + File[] list = thisPart.listFiles(); + if (list == null) return result; + result.put (CACHE_PROP_LOCATION, thisPart.getAbsolutePath()); + int realCount = 0; + long realSize = 0; + long ageOfYoungest = -1; + long ageOfOldest = Long.MAX_VALUE; + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) { + realCount++; + realSize += list[i].length(); + long age = list[i].lastModified(); + ageOfYoungest = Math.max (ageOfYoungest, age); + ageOfOldest = Math.min (ageOfOldest, age); + } + } + result.put (CACHE_PROP_COUNT, new Integer (realCount)); + result.put (CACHE_PROP_SIZE, new Long (realSize)); + if (ageOfYoungest > 0) + result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest)); + if (ageOfOldest < Long.MAX_VALUE) + result.put (CACHE_PROP_OLDEST, new Long (ageOfOldest)); + + } catch (Exception e) { + log.error ("Getting cache info failed: " + e.toString()); + } + return result; + } + + public String getCacheInfoFormatted (String id) { + Properties props = getCacheInfo (id); + StringBuffer buf = new StringBuffer(); + buf.append (props.getProperty (CACHE_PROP_NAME) + "\n"); + add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL)); + add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); + Object value = props.get (CACHE_PROP_OLDEST); + if (value != null) { + long age = ((Long)value).longValue(); + add (buf, "Oldest entry created", new Date (age)); + add (buf, "Oldest entry has age", Utils.ms2Human (new Date().getTime() - age)); + } + value = props.get (CACHE_PROP_YOUNGEST); + if (value != null) { + long age = ((Long)value).longValue(); + add (buf, "Youngest entry created", new Date (age)); + add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age)); + } + add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); + add (buf, "Location", props.get (CACHE_PROP_LOCATION)); + return new String (buf); + } + + private void add (StringBuffer buf, String name, Object value) { + if (value != null) { + buf.append ("\t"); + buf.append (name); + buf.append ("\t"); + buf.append (value.toString()); + buf.append ("\n"); + } + } + } From senger at pub.open-bio.org Thu Nov 10 09:32:43 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 10 09:29:58 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101432.jAAEWhGc005019@pub.open-bio.org> senger Thu Nov 10 09:32:42 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv4952/src/main/org/biomoby/service/dashboard Modified Files: BuildDataTypeTree.java CommonDataTable.java CommonTree.java Dashboard.java DashboardProperties.java NOTES RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard BuildDataTypeTree.java,1.5,1.6 CommonDataTable.java,1.3,1.4 CommonTree.java,1.15,1.16 Dashboard.java,1.14,1.15 DashboardProperties.java,1.14,1.15 NOTES,1.22,1.23 RegistrationDataTypeSubPanel.java,1.5,1.6 RegistrationNamespaceSubPanel.java,1.4,1.5 RegistrationPanel.java,1.15,1.16 RegistrationServiceSubPanel.java,1.4,1.5 RegistrationServiceTypeSubPanel.java,1.6,1.7 ServicesBoard.java,1.4,1.5 ServicesTree.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/06 16:47:11 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/10 14:32:42 1.6 @@ -152,20 +152,22 @@ // make member nodes richer if (row > 1) { - MemberNode member = (MemberNode)((DefaultMutableTreeNode)value).getUserObject(); - MobyRelationship rel = member.getRelationship(); - cellBorder.setTitle (MobyRelationship.type2str (rel.getRelationshipType())); - dataTypeName.setText (member.getValue()); - articleName.setText (rel.getName()); - if (rel.getRelationshipType() == Central.iHASA) - cellPanel.setBackground (new Color (255, 255, 204)); - else - cellPanel.setBackground (new Color (204, 255, 204)); - return cellPanel; - } else { - return super.getTreeCellRendererComponent (tree, value, selected, - expanded, leaf, row, hasFocus); + Object aNode = ((DefaultMutableTreeNode)value).getUserObject(); + if (aNode instanceof MemberNode) { + MemberNode member = (MemberNode)aNode; + MobyRelationship rel = member.getRelationship(); + cellBorder.setTitle (MobyRelationship.type2str (rel.getRelationshipType())); + dataTypeName.setText (member.getValue()); + articleName.setText (rel.getName()); + if (rel.getRelationshipType() == Central.iHASA) + cellPanel.setBackground (new Color (255, 255, 204)); + else + cellPanel.setBackground (new Color (204, 255, 204)); + return cellPanel; + } } + return super.getTreeCellRendererComponent (tree, value, selected, + expanded, leaf, row, hasFocus); } } @@ -209,6 +211,23 @@ } /********************************************************************* + * + ********************************************************************/ + public void addMember (MobyRelationship child) { + MemberNode newNode = new MemberNode (child); + nameNode.add (new DefaultMutableTreeNode (newNode)); + updateTree(); + } + + /********************************************************************* + * + ********************************************************************/ + public void removeAllChildren() { + nameNode.removeAllChildren(); + updateTree(); + } + + /********************************************************************* * Load all menu icons. ********************************************************************/ protected void loadIcons() { @@ -358,10 +377,16 @@ * Draw/update this tree. ********************************************************************/ protected void updateTree() { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); - tModel.reload(); - propertyChannel.put (DP_REG_DT_TREE, extractFromTree()); - expand(); + + SwingUtilities.invokeLater (new Runnable() { + public void run() { + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + tModel.reload(); + propertyChannel.put (DP_REG_DT_TREE, extractFromTree()); + expand(); + } + }); + } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/10 14:32:42 1.4 @@ -10,6 +10,7 @@ import org.tulsoft.tools.gui.SwingUtils; +import org.biomoby.shared.MobyData; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JScrollPane; @@ -80,6 +81,13 @@ /********************************************************************* * ********************************************************************/ + public void setData (MobyData[] newData) { + tableModel.setData (newData); + } + + /********************************************************************* + * + ********************************************************************/ protected void createItself() { loadIcons(); @@ -212,6 +220,22 @@ abstract public void addEmptyData(); + /************************************************************************** + * Used to fill the table programatically. It clear the whole + * table a put given data there. + **************************************************************************/ + public void setData (MobyData[] newData) { + synchronized (this) { + int rowCount = getRowCount(); + int colCount = getColumnCount(); + for (int i = 0; i < rowCount; i++) + removeRow (i); + for (int i = 0; i < newData.length; i++) + data.addElement (newData[i]); + fireTableDataChanged(); + } + } + public Vector getData() { return data; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 08:54:31 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 14:32:42 1.16 @@ -72,6 +72,8 @@ protected String lastSearchText = ""; protected int lastSorted = SORTED_BY_NAME; + protected PropertyChannel propertyChannel; + // shared icons static protected Icon searchIcon; static protected Icon menuSearchIcon, menuSearchIconDis; @@ -123,6 +125,13 @@ loadIcons(); } + /************************************************************************** + * Keep shared storage of properties updated in various panels. + **************************************************************************/ + public void setPropertyChannel (PropertyChannel propertyChannel) { + this.propertyChannel = propertyChannel; + } + /********************************************************************* * ********************************************************************/ @@ -450,6 +459,7 @@ ********************************************************************/ protected void highlightAndJumpTo (HashSet toBeHighlighted) { + setSelectionPath (null); CommonTreeCellRenderer r = (CommonTreeCellRenderer)getCellRenderer(); r.setToBeHighlighted (toBeHighlighted); collapse (); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 08:54:31 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 14:32:42 1.15 @@ -60,8 +60,8 @@ protected JTabbedPane tabbedPane; protected Color bgcolor; protected DashboardPanel[] panels; - protected PropertyChannel propertyChannel; protected static Properties dashboardProperties; + protected PropertyChannel propertyChannel; static { try { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 08:54:31 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 14:32:42 1.15 @@ -20,7 +20,6 @@ public interface DashboardProperties { // names of properties used in property change events - static final String DP_LOG_MSG = "log-msg"; static final String DP_STATUS_MSG = "status-msg"; static final String DP_SERVICE_NAME = "dp-service-name"; static final String DP_DATATYPE_NAME = "dp-datatype-name"; @@ -37,21 +36,18 @@ static final String DP_REG_DT_AUTH = "dp-reg-dt-auth"; static final String DP_REG_DT_EMAIL = "dp-reg-dt-email"; static final String DP_REG_DT_DESC = "dp-reg-dt-desc"; - static final String DP_REG_DT_COPY_BY_SELECT = "dp-reg-dt-cbs"; // type: Boolean static final String DP_REG_DT_TREE = "dp-reg-dt-tree"; // type: MobyDataType static final String DP_REG_NS_NAME = "dp-reg-ns-name"; static final String DP_REG_NS_AUTH = "dp-reg-ns-auth"; static final String DP_REG_NS_EMAIL = "dp-reg-ns-email"; static final String DP_REG_NS_DESC = "dp-reg-ns-desc"; - static final String DP_REG_NS_COPY_BY_SELECT = "dp-reg-ns-cbs"; // type: Boolean static final String DP_REG_ST_NAME = "dp-reg-st-name"; static final String DP_REG_ST_AUTH = "dp-reg-st-auth"; static final String DP_REG_ST_EMAIL = "dp-reg-st-email"; static final String DP_REG_ST_DESC = "dp-reg-st-desc"; static final String DP_REG_ST_ISA = "dp-reg-st-isa"; - static final String DP_REG_ST_COPY_BY_SELECT = "dp-reg-st-cbs"; // type: Boolean static final String DP_REG_S_NAME = "dp-reg-s-name"; static final String DP_REG_S_AUTH = "dp-reg-s-auth"; @@ -67,6 +63,8 @@ static final String DP_REG_VERBOSE = "dp-reg-verbose"; + static final String DP_S_SELECTED = "dp-s-selected"; // type: MobyService + /** A filename containing Java properties that configure the dashboard. */ static final String DASHBOARD_PROPERTIES_FILE = "dashboard.properties"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 08:54:31 1.22 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 14:32:42 1.23 @@ -1,3 +1,6 @@ +* FWK005 parse may not be called while parsing. + - probably when too many network request together +--- * More testing: - interrupting loading - different order of panels @@ -11,6 +14,8 @@ NullPointerException reported in a dialog window - difficult to reproduce it... but it is somewhere there :-( +* BUG: the BuildDataTree does not paint itself always well + * WARN: How would an authority with characters 'http://' cope as a cache name? Can it happen? @@ -138,3 +143,5 @@ * SwingUtils can be simplified (closeOnExit etc.) - JFileChooserWithHistory - its method getSelectedFile() should reflect also what is entered in the text field; also it can have getText()? + - colors in JComboBox: +http://forum.java.sun.com/thread.jspa?threadID=670356&messageID=3920606 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 08:54:31 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 14:32:42 1.6 @@ -11,6 +11,7 @@ import org.biomoby.shared.Central; import org.biomoby.shared.MobyException; import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; @@ -110,19 +111,17 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_DT, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectDT (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_DT_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, dataTypesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); - SwingUtils.addComponent (board, copyBySelect, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (board, copyBySelect, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); // a tree with a new data type buildTree = new BuildDataTypeTree (propertyChannel); @@ -159,7 +158,6 @@ **************************************************************************/ protected void onCopyBySelectDT (boolean enabled) { setPrefValue (COPY_BY_SELECT_DT, enabled); - propertyChannel.put (DP_REG_DT_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -215,44 +213,6 @@ } } -// /************************************************************************** -// * -// **************************************************************************/ -// public void onRegisterFromXML (File file) { -// final File xmlFile = file; -// dtRegisterButton.setEnabled (false); -// dtFromXMLButton.setEnabled (false); -// dtException = null; -// final SwingWorker worker = new SwingWorker() { -// boolean oldAppendMode; -// StatusBag bag; -// public Object construct() { -// try { -// bag = maybeEnableVerbose(); -// oldAppendMode = console.setAppendMode (true); -// console.setText ("Registering data type from raw XML:\n" + -// "-----------------------------------\n"); -// console.setText (registryModel.callRegistry ("registerDataType", xmlFile)); -// console.setText ("\n"); -// } catch (MobyException e) { -// dtException = e; -// } -// return null; // not used here -// } - -// // runs on the event-dispatching thread. -// public void finished() { -// if (dtException != null) -// error (DATA_TYPE_PROLOGUE, dtException); -// dtRegisterButton.setEnabled (true); -// dtFromXMLButton.setEnabled (true); -// maybeDisableVerbose (bag); -// console.setAppendMode (oldAppendMode); -// } -// }; -// worker.start(); -// } - /************************************************************************** * * Customized tree of data types - has different popup menus... @@ -360,19 +320,23 @@ return dataType; // not used here } - // runs on the event-dispatching thread. + // runs on the event-dispatching thread public void finished() { if (dataType != null) { console.setText (dataType.toString()); - if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { dtName.setText (dataType.getName()); dtAuth.setText (dataType.getAuthority()); dtEmail.setText (dataType.getEmailContact()); dtDescArea.setText (dataType.getDescription()); buildTree.setParent (dataType.getParentName()); + buildTree.removeAllChildren(); + MobyRelationship[] children = dataType.getChildren(); + for (int i = 0; i < children.length; i++) + buildTree.addMember (children[i]); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) dtAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/10 14:32:42 1.5 @@ -100,15 +100,13 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_NS, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectNS (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_NS_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, namespacesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); @@ -145,7 +143,6 @@ **************************************************************************/ protected void onCopyBySelectNS (boolean enabled) { setPrefValue (COPY_BY_SELECT_NS, enabled); - propertyChannel.put (DP_REG_NS_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -269,14 +266,14 @@ public void finished() { if (namespace != null) { console.setText (namespace.toString() + "\n"); - if (propertyChannel.getBoolean (DP_REG_NS_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { nsName.setText (namespace.getName()); nsAuth.setText (namespace.getAuthority()); nsEmail.setText (namespace.getEmailContact()); nsDescArea.setText (namespace.getDescription()); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_NS_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) nsAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 16:23:32 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/10 14:32:42 1.16 @@ -17,6 +17,7 @@ import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JComponent; +import javax.swing.JCheckBox; import javax.swing.JFileChooser; import javax.swing.JButton; @@ -53,6 +54,7 @@ // components that are used from more methods protected CommonConsole console; protected JButton registerButton, showXMLButton, fromXMLButton; + protected JCheckBox copyBySelect; // shared icons protected static Icon menuAddISAIcon, menuAddISAIconDis; @@ -117,7 +119,6 @@ public JComponent getComponent (PropertyChannel propertyChannel) { setPropertyChannel (propertyChannel); registryModel = createRegistryModel(); - if (pComponent != null) return pComponent; // console panel =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 14:32:42 1.5 @@ -33,6 +33,7 @@ import javax.swing.JComponent; import javax.swing.JFileChooser; import javax.swing.Box; +import javax.swing.SwingUtilities; import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; @@ -42,7 +43,8 @@ import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; - +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeEvent; import java.io.File; import java.io.IOException; @@ -54,13 +56,15 @@ */ public class RegistrationServiceSubPanel - extends RegistrationPanel { + extends RegistrationPanel + implements PropertyChangeListener { // names of user preferences keys static final String USE_SIGNATURE = "use-signature"; static final String USE_AUTHORITATIVE = "use-authoritative"; static final String REG_S_TYPE = "reg-s-type"; static final String REG_S_FROM_XML = "reg-service-from-xml-file"; + static final String COPY_BY_SELECT_S = "s-copy-by-select"; // components that are used from more methods JTextFieldWithHistory sName, sAuth, sEmail, sURL, sSigURL; @@ -88,6 +92,7 @@ setPropertyChannel (propertyChannel); registryModel = createRegistryModel(); this.console = console; + this.propertyChannel.addPropertyChangeListener (this); JPanel p = new JPanel (new GridBagLayout()); @@ -147,6 +152,11 @@ SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + // copy-by-select + copyBySelect = + createCheckBox ("Copy here when selected in browser panel", + false, KeyEvent.VK_C, null); + // put together service fields JPanel defs = new JPanel (new GridBagLayout()); SwingUtils.addComponent (defs, labelSName, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); @@ -175,9 +185,10 @@ stBoard.updateTree (CommonTree.SORTED_BY_NAME); JPanel main = createTitledPanel ("New Service"); - SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); - SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); - SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); + SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + SwingUtils.addComponent (main, copyBySelect, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); // sub-panels for input/output data JTabbedPane dataPane = new JTabbedPane(); @@ -227,6 +238,49 @@ } /************************************************************************** + * Here we get notified when somebody somewhere select a service. Used to + * update this service fields - if it is enabled by COPY_BY_SELECT field. + **************************************************************************/ + public void propertyChange (PropertyChangeEvent event) { + if (copyBySelect == null || + ! copyBySelect.isSelected()) return; // copy not expected/allowed + String prop = event.getPropertyName(); + if (prop == null) return; // no interest in non-specific changes + Object obj = event.getNewValue(); + if (obj == null || ! (obj instanceof MobyService)) return; + final MobyService service = (MobyService)obj; + + // finally... + if (DP_S_SELECTED.equals (prop)) { + SwingUtilities.invokeLater (new Runnable() { + public void run() { + onFillService (service); + } + }); + } + } + + /************************************************************************** + * + **************************************************************************/ + protected void onFillService (MobyService service) { + sName.setText (service.getName()); + sAuth.setText (service.getAuthority()); + sEmail.setText (service.getEmailContact()); + sURL.setText (service.getURL()); + sSigURL.setText (service.getSignatureURL()); + sDescArea.setText (service.getDescription()); + useAuth.setEnabled (service.isAuthoritative()); + sType.setText (service.getType()); + String value = service.getPathToRDF(); + if (UUtils.notEmpty (value)) + localRDFFile.getTextField().setText (service.getPathToRDF()); + primInTable.setData (service.getPrimaryInputs()); + primOutTable.setData (service.getPrimaryOutputs()); + secTable.setData (service.getSecondaryInputs()); + } + + /************************************************************************** * **************************************************************************/ protected void onUseRDFSignature (boolean enabled) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 08:54:31 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 14:32:42 1.7 @@ -107,15 +107,13 @@ // allow to copy selected service types to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_ST, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_O, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectST (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_ST_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, serviceTypesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); @@ -152,7 +150,6 @@ **************************************************************************/ protected void onCopyBySelectST (boolean enabled) { setPrefValue (COPY_BY_SELECT_ST, enabled); - propertyChannel.put (DP_REG_ST_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -307,7 +304,7 @@ public void finished() { if (serviceType != null) { console.setText (serviceType.toString() + "\n"); - if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { stName.setText (serviceType.getName()); stAuth.setText (serviceType.getAuthority()); stEmail.setText (serviceType.getEmailContact()); @@ -315,7 +312,7 @@ stISA.setText (serviceType.getParentName()); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) stAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 14:32:42 1.5 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/07 07:03:49 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/10 14:32:42 1.5 @@ -419,8 +419,10 @@ // runs on the event-dispatching thread. public void finished() { - if (service != null) + if (service != null) { + propertyChannel.fire (DashboardProperties.DP_S_SELECTED, service); console.setText (service.toString()); + } } }; worker.start(); From kawas at pub.open-bio.org Thu Nov 10 11:03:02 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Nov 10 11:00:02 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101603.jAAG32oB005624@pub.open-bio.org> kawas Thu Nov 10 11:03:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv5603/org/biomoby/client/rdf/vocabulary Added Files: FetaVocabulary.java Log Message: put all properties and resources used in a file so that we dont have to worry about using the Feta.jar file moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary FetaVocabulary.java,NONE,1.1 From kawas at pub.open-bio.org Thu Nov 10 11:09:07 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Nov 10 11:06:03 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101609.jAAG97H8005730@pub.open-bio.org> kawas Thu Nov 10 11:09:07 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util In directory pub.open-bio.org:/tmp/cvs-serv5705/org/biomoby/registry/rdfagent/util Modified Files: Log.java Log Message: modified the logger so that only one file is created. when the agent ran, a different log file was created for each iteration of the agent and each log file contained its current iteration as well as the future iterations. moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Log.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java 2005/04/16 14:32:47 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java 2005/11/10 16:09:07 1.5 @@ -10,14 +10,18 @@ public class Log { static Logger logger; - + private static boolean isInit = false; public static void start() { - - logger = Logger.getLogger("org.biomoby.registry.rdfagent"); + logger = Logger.getLogger("org.biomoby.registry.rdfagent"); + // following ensures that only one log file is created. + if (isInit) { + return; + } + isInit = true; try { String logFile = Constants.RDFagentHome+Constants.SV_LOGFILE_PATH; - FileHandler fh = new FileHandler(logFile); + FileHandler fh = new FileHandler(logFile, true); fh.setFormatter(new SimpleFormatter()); logger.addHandler(fh); } catch (IOException e) { From kawas at pub.open-bio.org Thu Nov 10 11:09:57 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Nov 10 11:06:53 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101609.jAAG9uUL005760@pub.open-bio.org> kawas Thu Nov 10 11:09:56 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util In directory pub.open-bio.org:/tmp/cvs-serv5735/org/biomoby/registry/rdfagent/util Modified Files: Report.java Log Message: added a clear method that erases the old report moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Report.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java 2005/09/29 20:14:11 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java 2005/11/10 16:09:56 1.9 @@ -26,9 +26,9 @@ public class Report { - static ArrayList mr = null; + private static ArrayList mr = null; - static ArrayList ds = null; + private static ArrayList ds = null; public static void add(String line) { @@ -57,7 +57,7 @@ StringBuffer mes1 = new StringBuffer(); for (int i = 0; i < mr.size(); i++) { - mes1.append(mr.get(i).toString() + "\n"); + mes1.append(mr.get(i).toString() + System.getProperty("line.separator")); } message += mes1; } @@ -66,7 +66,7 @@ StringBuffer mes2 = new StringBuffer(); for (int i = 0; i < ds.size(); i++) { - mes2.append(ds.get(i).toString() + "\n"); + mes2.append(ds.get(i).toString() + System.getProperty("line.separator")); } message += mes2; } @@ -137,6 +137,96 @@ mr = null; } } + + public static void send(String signURL, String email) { + + String message = ""; + + if (mr != null) { + + StringBuffer mes1 = new StringBuffer(); + + for (int i = 0; i < mr.size(); i++) { + mes1.append(mr.get(i).toString() + System.getProperty("line.separator")); + } + message += mes1; + } + if (ds != null) { + + StringBuffer mes2 = new StringBuffer(); + + for (int i = 0; i < ds.size(); i++) { + mes2.append(ds.get(i).toString() + System.getProperty("line.separator")); + } + message += mes2; + } + + if (Constants.MB_MAIL_SERVER != null + || !Constants.MB_MAIL_SERVER.equals("") + || Constants.MB_MAIL_PRGM != null + || !Constants.MB_MAIL_PRGM.equals("")) { + + String to = ""; + to = email; + + if (to.equals("")) { + to = "edward.kawas@gmail.com"; + + } + String subject = "The RDFagent Report"; + Log.info("email message is\n" + message); + if (Constants.MB_MAIL_PRGM != null + || !Constants.MB_MAIL_PRGM.equals("")) + try { + + //String cmd ="echo \"" + message.toString() + "\" | "+ + // Constants.MB_MAIL_PRGM+ " -s 'The RDFagent Report :-(' '" + // + "markw@illuminae.com"+ "'"; + String cmd = "echo \"" + message.toString() + "\" | " + + Constants.MB_MAIL_PRGM + + " -s 'The RDFagent Report :-(' '" + to + "'"; + File file = new File("_script_.sh"); + FileWriter fw = new FileWriter(file); + fw.write(_shellScriptHeader + cmd); + fw.close(); + + Process p = Runtime.getRuntime().exec( + "chmod +x _script_.sh"); + p.waitFor(); + p = Runtime.getRuntime().exec("./_script_.sh"); + InputStream stderr = p.getErrorStream(); + InputStreamReader isr = new InputStreamReader(stderr); + BufferedReader br = new BufferedReader(isr); + String line = null; + while ((line = br.readLine()) != null) { + + } + p.waitFor(); + Log.info("_script_.sh has " + + ((file.delete()) ? "" : "not ") + "been deleted" + + System.getProperty("line.separator") + + "The exit value of the spawned process was : " + + p.exitValue()); + } catch (IOException e) { + e.printStackTrace(); + Log.severe("Could not send message using cmd line mail to " + + to); + Report + .doWrite("Could not send message using cmd line mail to " + + to); + // use this only as a last resort + if (Constants.MB_MAIL_SERVER != null + || !Constants.MB_MAIL_SERVER.equals("")) + Communicator.sendMail(to, subject, message.toString(), + Constants.MB_FROM); + } catch (InterruptedException e) { + e.printStackTrace(); + } + //Communicator.sendMail(to,subject,message.toString(),Constants.MB_FROM); + ds = null; + mr = null; + } + } public static void createFile(String fileName) { try { @@ -197,5 +287,10 @@ private final static String _shellScriptHeader = "#!/bin/sh" + System.getProperty("line.separator"); + public static void clear() { + ds = null; + mr = null; + } + } From kawas at pub.open-bio.org Thu Nov 10 11:11:45 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Nov 10 11:08:41 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101611.jAAGBjn6005838@pub.open-bio.org> kawas Thu Nov 10 11:11:45 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv5813/org/biomoby/registry/rdfagent/verifier Modified Files: Main.java Log Message: added logic to enable the ability to provide a url that contains service descriptions and have the agent populate your registry with them modified the logic of reporting moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Main.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java 2005/08/04 12:58:41 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java 2005/11/10 16:11:45 1.6 @@ -15,115 +15,126 @@ /** * @author Nina Opushneva * - * + * */ public class Main { - public static void main(String[] args) { - StringBuffer failedServices = new StringBuffer(); - Log.start(); - - String report = Constants.RDFagentHome + Constants.SV_REPORT_PATH; - Report.createFile(report); - - Date now = new Date(); - - Report - .doWrite("****************************************************************************************"); - Report.doWrite(" START MOBY RDFAGENT REPORT " - + now.toString()); - Report - .doWrite("****************************************************************************************"); - - Report.add(" RDFAGENT REPORT " + now.toString()); - Report - .add("****************************************************************************************"); - - Hashtable serviceList = new Hashtable(); - String signURL = ""; - Calendar c = Calendar.getInstance(); - - if (args.length == 0) { - - String delfile = Constants.RDFagentHome + Constants.SV_DELFILE_PATH; - Report.createFile(delfile); - - // DataMngr.delServiceSetByURL(signURL); - - String url_path = Constants.RDFagentHome - + Constants.SV_SIGN_URL_PATH; - - String filename = url_path + "_" + c.get(Calendar.DAY_OF_MONTH) - + "_" + c.get(Calendar.MONTH); - Report.createFile(filename); - serviceList = DataMngr.getServices(filename); - /* - * }else if (args[0].equals("list")){ serviceList = - * Communicator.readFromFile(args[1]); - * - * }else if (args[0].equals("sign")){ - */ - } else { - - signURL = args[0]; - serviceList = DataMngr.getServicesByURL(signURL); - } - - Enumeration list = serviceList.keys(); - while (list.hasMoreElements()) { - String ob = list.nextElement().toString(); - String val = serviceList.get(ob).toString(); - signURL = ob; - String servNames = val; - - Model model = Communicator.getServiceRDF(servNames, signURL); - - if (model.isEmpty()) { - Log.info("Model " + signURL + " is empty"); - failedServices.append("__PATTERN__" + signURL); // something unique - // that urls shouldnt - // have - } else { - Report.add(" "); - Report.add("List of the processed services:"); - ServiceDescrParser sdParser = new ServiceDescrParser(model); - sdParser.getValidRDF(servNames, signURL); - - } - exit(failedServices.toString()); - failedServices = new StringBuffer(); - } - // } - if (args.length != 0) { - // TODO this line sends email - //Report.send(signURL); - } - //exit(failedServices.toString()); - } - - public static void exit(String signURL) { - DBConnector.closeConnection(); - - Log.stop(); - Date now = new Date(); - Report.doWrite(" STOP MOBY RDFAGENT REPORT " - + now.toString()); - Report.add(" STOP MOBY RDFAGENT REPORT " - + now.toString()); - - Report - .doWrite("****************************************************************************************"); - - String[] failedURLs = signURL.split("__PATTERN__"); - for (int i = 0; i < failedURLs.length; i++) { - if (!failedURLs[i].equals("")) { - Log - .info("Sending an email to the individual identified by the following signature URL: " - + failedURLs[i]); - Report.send(failedURLs[i]); - } - } + public static void main(String[] args) { + StringBuffer failedServices = new StringBuffer(); + Log.start(); + Date now = new Date(); + Hashtable serviceList = new Hashtable(); + String signURL = ""; + String report = Constants.RDFagentHome + Constants.SV_REPORT_PATH; + Report.createFile(report); + + Calendar c = Calendar.getInstance(); + + if (args.length == 0) { + Report + .doWrite("****************************************************************************************"); + Report.doWrite(" START MOBY RDFAGENT REPORT " + + now.toString()); + Report + .doWrite("****************************************************************************************"); + + Report + .add(" RDFAGENT REPORT " + + now.toString()); + Report + .add("****************************************************************************************"); + String delfile = Constants.RDFagentHome + Constants.SV_DELFILE_PATH; + Report.createFile(delfile); + + // DataMngr.delServiceSetByURL(signURL); + + String url_path = Constants.RDFagentHome + + Constants.SV_SIGN_URL_PATH; + + String filename = url_path + "_" + c.get(Calendar.DAY_OF_MONTH) + + "_" + c.get(Calendar.MONTH); + Report.createFile(filename); + serviceList = DataMngr.getServices(filename); + /* + * }else if (args[0].equals("list")){ serviceList = + * Communicator.readFromFile(args[1]); + * + * }else if (args[0].equals("sign")){ + */ + } else if (args.length == 1){ + signURL = args[0]; + Log.info("Getting services from " + signURL); + // serviceList = DataMngr.getServicesByURL(signURL); + Model model = Communicator.getServiceRDF("", signURL); + Report.clear(); + if (model.isEmpty()) { + Log.info("Model " + signURL + " is empty"); + // not important + } else { + ServiceDescrParser sdParser = new ServiceDescrParser(model); + sdParser.addServicesFromRdfDocument(signURL, Constants.MB_ADMIN_EMAIL); + + } + Report.clear(); + return; + + } else { + Log.severe("Incorrect usage of the agent. Please enter a url where services can be found as a parameter or run the agent without parameters."); + return; + + } + + Enumeration list = serviceList.keys(); + while (list.hasMoreElements()) { + String ob = list.nextElement().toString(); + String val = serviceList.get(ob).toString(); + signURL = ob; + String servNames = val; + + Model model = Communicator.getServiceRDF(servNames, signURL); + + if (model.isEmpty()) { + Log.info("Model " + signURL + " is empty"); + failedServices.append("__PATTERN__" + signURL); // something + // unique + // that urls shouldnt + // have + } else { + Report.add(" "); + Report.add("List of the processed services:"); + ServiceDescrParser sdParser = new ServiceDescrParser(model); + sdParser.getValidRDF(servNames, signURL); + + } + exit(failedServices.toString()); + failedServices = new StringBuffer(); + } + Report.clear(); + } + + public static void exit(String signURL) { + DBConnector.closeConnection(); + + Log.stop(); + Date now = new Date(); + Report.doWrite(" STOP MOBY RDFAGENT REPORT " + + now.toString()); + Report.add(" STOP MOBY RDFAGENT REPORT " + + now.toString()); + + Report + .doWrite("****************************************************************************************"); + + String[] failedURLs = signURL.split("__PATTERN__"); + for (int i = 0; i < failedURLs.length; i++) { + if (!failedURLs[i].equals("")) { + Log + .info("Sending an email to the individual identified by the following signature URL: " + + failedURLs[i]); + Report.send(failedURLs[i]); + } + } - //System.exit(0); - } + // System.exit(0); + } } \ No newline at end of file From kawas at pub.open-bio.org Thu Nov 10 11:12:02 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu Nov 10 11:09:04 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101612.jAAGC2aT005868@pub.open-bio.org> kawas Thu Nov 10 11:12:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv5843/org/biomoby/registry/rdfagent/verifier Modified Files: ServiceDescrParser.java Log Message: some bug fixes moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier ServiceDescrParser.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/08 00:02:08 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/10 16:12:01 1.12 @@ -5,14 +5,12 @@ import java.util.Iterator; import java.util.Vector; +import org.biomoby.client.rdf.vocabulary.FetaVocabulary; import org.biomoby.client.rdf.vocabulary.ServiceDescriptionPredicates; -import org.biomoby.registry.rdfagent.util.Constants; import org.biomoby.registry.rdfagent.util.Log; import org.biomoby.registry.rdfagent.util.Report; import org.biomoby.registry.rdfagent.util.XMLBuilder; -import uk.ac.man.cs.img.fetaEngine.commons.FetaModelRDF; - import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ResIterator; import com.hp.hpl.jena.rdf.model.Resource; @@ -37,7 +35,7 @@ int n = 0; int[] ver = { 0, 0, 0, 0, 0, 0, 0, 0 }; - private String[] vers = { "authority uri", "category","contact email","url","service type","service name","authoritative value","signature url" }; + private String[] vers = { "authority uri", "category","contact email","url","service type","service name","description","authoritative value" }; ServiceDescrParser(Model serviceDescrMd) { @@ -69,7 +67,7 @@ // get the set of RDF with the same signatureURL - ResIterator iter = servDescrMd.listSubjectsWithProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy")); + ResIterator iter = servDescrMd.listSubjectsWithProperty(FetaVocabulary.providedBy); while (iter.hasNext()) { String resource = iter.next().toString(); // an LSID Hashtable servSign = new Hashtable(); @@ -93,8 +91,15 @@ servError += 1; String msg = "A bad Input or Output structure for the service <" + servName + ">. "; - String msg1 = "The service have not processed"; + String msg1 = "The service has not been processed"; Report.doWrite(msg + msg1); + Log.info(msg + msg1); + // added - should tell provider that service wasnt well. + Report.add(msg); + Report.add(msg1); + // send a message to service provider stating that service was removed + Report.send(signURL); + // end added } else { DataMngr.processService(servSign, servInp, servOut, servName, auth_URI, signURL); @@ -140,18 +145,11 @@ deletedServ.addElement(servName); String msg = "The service < " + servName - + " > was not found in the RDF file. The service was deregistered from MOBYCENTRAL Registry"; + + " > was either missing or incorrectly represented in the RDF document. The service was deregistered from MOBYCENTRAL Registry."; Report.doWrite(msg); Report.add(msg); - - if (Constants.MB_MAIL_SERVER != null - || !Constants.MB_MAIL_SERVER.equals("")) { - String to = DataMngr.getContactEmail(signURL); - Communicator.sendMail(to, Constants.SP_SUBJECT, msg, - Constants.MB_FROM); - // send message to the service provider - that service was - // deregistered - } + // send a message to service provider stating that service was removed + Report.send(signURL); } } int del = deletedServ.size(); @@ -180,6 +178,103 @@ } /** + * get a provider's RDF file by signatureURL, and check if every of service + * RDF is valid MOBY + * + * @param signURL - + * the URL of resource (signatureURL) + * + */ + + public void addServicesFromRdfDocument(String signURL, String email) { + String servNames = ""; + String res = ""; + int amount = 0; + int validMoby = 0; + int servError = 0; + Vector resources = new Vector(); // the list of services at given URL + // (including new services) + String auth_URI = ""; + String servName = ""; + Vector deletedServ = new Vector(); // the list of deleted services from + // database + + // get the set of RDF with the same signatureURL + + ResIterator iter = servDescrMd.listSubjectsWithProperty(FetaVocabulary.providedBy); + while (iter.hasNext()) { + Report + .add("****************************************************************************************"); + Report.add(" START MOBY RDFAGENT REPORT "); + Report + .add("****************************************************************************************"); + String resource = iter.next().toString(); // an LSID + Hashtable servSign = new Hashtable(); + amount += 1; + servSign = getServSignature(resource); + + if (!servSign.isEmpty()) { // a valid MOBY RDF + servName = servSign.get("servicename").toString(); + servNames+=servName+","; + auth_URI = servSign.get("authURI").toString(); + resources.addElement(servName); + + Hashtable servInp = new Hashtable(); + servInp = getInput(resource); + Hashtable servOut = new Hashtable(); + servOut = getOutput(resource); + + ver = new int[]{0,0,0,0,0,0,0,0}; + if (servInp.containsValue("error") + | servOut.containsValue("error")) { + servError += 1; + String msg = "A bad Input or Output structure for the service <" + + servName + ">. "; + String msg1 = "The service has not been processed"; + Report.add(msg); + Report.add(msg1); + Report + .add("======================================================================================="); + Report.add(" END MOBY RDFAGENT REPORT "); + Report + .add("======================================================================================="); + Log.info(msg); + Log.info((msg1)); + Report.doWrite(msg); + Report.doWrite(msg1); + Report.send(signURL, email); + } else { + // set the email address to be the admin since it doesnt make sense to swallow services and to make someone else curate them + //servSign.put("contact_email", email); + DataMngr.processService(servSign, servInp, servOut, + servName, auth_URI, signURL); + } + } else { + validMoby += 1; // a not valid MOBY RDF + } + Report.clear(); + } + + String[] result = servNames.split(","); + + Report + .add("----------------------------------------------------------------------------------------"); + Report.add(" "); + Report.add("Expected services for given URL " + result.length); + + Report.add("In fact = " + amount); + Report.add("notValidMoby services or with a bad structure = " + + (servError + validMoby)); + Report.add(" "); + + // Report.add("notValidMoby services or with a bad structure = + // "+(servError+validMoby)); + + Log + .info("======================================================================="); + } + + /** * get service Signature data for the service * * @param resource - @@ -194,6 +289,7 @@ Resource si = servDescrMd.getResource(resource); + Report.clear(); Report .doWrite("----------------------------------------------------------------------------------------"); Report @@ -209,9 +305,9 @@ // hash *should* contain the following keys: // authURI, category, contact_email, url, service_type_uri, servicename, authoritative, signatureURL - if (si.hasProperty(FetaModelRDF.hasServiceType)) { + if (si.hasProperty(FetaVocabulary.hasServiceType)) { ver[4] = 1; // set flag to indicate that we have the property - String serviceType = si.getProperty(FetaModelRDF.hasServiceType).getObject().toString(); + String serviceType = si.getProperty(FetaVocabulary.hasServiceType).getObject().toString(); sign.put("service_type_uri", "urn:lsid:biomoby.org:servicetype:"+serviceType); } @@ -221,8 +317,8 @@ sign.put("category", category); } - if (si.hasProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy"))) { - Resource org = (Resource)si.getProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy")).getObject(); + if (si.hasProperty(FetaVocabulary.providedBy)) { + Resource org = (Resource)si.getProperty(FetaVocabulary.providedBy).getObject(); if (org.hasProperty(DC.publisher)) { ver[0] = 1;// set flag to indicate that we have the property String authorityURI = org.getProperty(DC.publisher).getObject().toString(); @@ -234,35 +330,35 @@ sign.put("contact_email", email); } if (org.hasProperty(ServiceDescriptionPredicates.authoritative)) { - ver[6] = 1;// set flag to indicate that we have the property + ver[7] = 1;// set flag to indicate that we have the property String authoritative = org.getProperty(ServiceDescriptionPredicates.authoritative).getObject().toString(); sign.put("authoritative", ((authoritative.equalsIgnoreCase("true")) ? "authoritative" : "non-authoritative")); } } - - if (si.hasProperty(FetaModelRDF.locationURI)) { + + if (si.hasProperty(FetaVocabulary.locationURI)) { ver[3] = 1; // set flag to indicate that we have the property - String url = si.getProperty(FetaModelRDF.locationURI).getObject().toString(); + String url = si.getProperty(FetaVocabulary.locationURI).getObject().toString(); sign.put("URL", url); } - if (si.hasProperty(FetaModelRDF.hasServiceDescriptionLocation)) { - ver[7] = 1; // set flag to indicate that we have the property - String signatureURL = si.getProperty(FetaModelRDF.hasServiceDescriptionLocation).getObject().toString(); - sign.put("signatureURL", signatureURL); + if (si.hasProperty(FetaVocabulary.hasServiceDescriptionText)) { + ver[6] = 1; // set flag to indicate that we have the property + String description = si.getProperty(FetaVocabulary.hasServiceDescriptionText).getObject().toString(); + sign.put("description", description); } - if (si.hasProperty(FetaModelRDF.hasServiceNameText)) { + if (si.hasProperty(FetaVocabulary.hasServiceNameText)) { ver[5] = 1; // set flag to indicate that we have the property - String name = si.getProperty(FetaModelRDF.hasServiceNameText).getObject().toString(); + String name = si.getProperty(FetaVocabulary.hasServiceNameText).getObject().toString(); sign.put("servicename", name); } // check for the inputs (moby says at least one input/output) - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); - StmtIterator outs = r.listProperties(FetaModelRDF.outputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.inputParameter); + StmtIterator outs = r.listProperties(FetaVocabulary.outputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary <- doesnt count @@ -284,7 +380,7 @@ Report .doWrite("THE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); Report - .add("THE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); + .add("\tTHE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); sign.clear(); break; //TODO should we break? if we dont, wont we know what is wrong completely with our service? } @@ -293,7 +389,7 @@ Report .doWrite("THE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); Report - .add("THE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); + .add("\nTHE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); Log .info("THE RDF IS NOT VALID MOBY RDF - Inputs and Outputs are absent"); sign.clear(); @@ -327,30 +423,30 @@ Hashtable input = new Hashtable(); Resource si = servDescrMd.getResource(resource); - if (si.hasProperty(FetaModelRDF.hasOperation)) + if (si.hasProperty(FetaVocabulary.hasOperation)) try { - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.inputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary - if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("simpleParameter")) { + if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("simpleParameter")) { // we have a simple // make sure that object type and article name exist Hashtable siminp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid simple input found in " + resource +". Missing moby object type."); - Report.add("Invalid simple input found in " + resource +". Missing moby object type."); + Report.add("\tInvalid simple input found in " + resource +". Missing moby object type."); Log.info("Invalid simple input found in " + resource +". Missing moby object type."); simple = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid simple input found in " + resource +". Missing an article name."); - Report.add("Invalid simple input found in " + resource +". Missing an article name."); + Report.add("\tInvalid simple input found in " + resource +". Missing an article name."); Log.info("Invalid simple input found in " + resource +". Missing an article name."); simple = "error"; break; @@ -362,8 +458,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid simple input found in " + resource +". Empty article name."); + Report.add("\tInvalid simple input found in " + resource +". Empty article name."); + Log.info("Invalid simple input found in " + resource +". Empty article name."); + simple = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -385,20 +487,20 @@ if (namespaces != null) siminp.put("namespace_type_uris", namespaces); input.put("siminp"+ sin++, siminp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("collectionParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("collectionParameter")) { // we have a collection // make sure that object type and article name exist Hashtable colinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid collection input found in " + resource +". Missing moby object type."); - Report.add("Invalid collection input found in " + resource +". Missing moby object type."); + Report.add("\tInvalid collection input found in " + resource +". Missing moby object type."); Log.info("Invalid collection input found in " + resource +". Missing moby object type."); collection = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); - Report.add("Invalid collection input found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection input found in " + resource +". Missing an article name."); Log.info("Invalid collection input found in " + resource +". Missing an article name."); collection = "error"; break; @@ -410,8 +512,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection input found in " + resource +". Missing an article name."); + Log.info("Invalid collection input found in " + resource +". Missing an article name."); + collection = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -429,22 +537,23 @@ namespaces = namespaces.substring(0, namespaces.lastIndexOf(",")); } colinp.put("col_articleName",articlename); - colinp.put("namespace_type_uris", namespaces); + if (namespaces != null) + colinp.put("namespace_type_uris", namespaces); colinp.put("object_type_uri", datatype); input.put("colinp"+cin++, colinp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("secondaryParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("secondaryParameter")) { // we have a secondary Hashtable secinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.datatype)) { Report.doWrite("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); - Report.add("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); + Report.add("\tInvalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); Log.info("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); secondary = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid secondary input found in " + resource +". Missing an article name."); - Report.add("Invalid secondary input found in " + resource +". Missing an article name."); + Report.add("\tInvalid secondary input found in " + resource +". Missing an article name."); Log.info("Invalid secondary input found in " + resource +". Missing an article name."); secondary = "error"; break; @@ -454,13 +563,20 @@ if (datatype.indexOf("#") > 0) datatype = datatype.substring(datatype.indexOf("#")+1); // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getLiteral().getValue().toString(); + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getLiteral().getValue().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid secondary input found in " + resource +". Empty article name."); + Report.add("\tInvalid secondary input found in " + resource +". Empty article name."); + Log.info("Invalid secondary input found in " + resource +". Empty article name."); + secondary = "error"; + break; + } String defaultValue = null; String min = null; String max = null; String enums = null; - if (parameter.hasProperty(FetaModelRDF.hasDefaultValue)) { - defaultValue = parameter.getProperty(FetaModelRDF.hasDefaultValue).getLiteral().getValue().toString(); + if (parameter.hasProperty(FetaVocabulary.hasDefaultValue)) { + defaultValue = parameter.getProperty(FetaVocabulary.hasDefaultValue).getLiteral().getValue().toString(); } if (parameter.hasProperty(ServiceDescriptionPredicates.max)) { max = parameter.getProperty(ServiceDescriptionPredicates.max).getLiteral().getValue().toString(); @@ -533,30 +649,30 @@ Hashtable output = new Hashtable(); Resource si = servDescrMd.getResource(resource); - if (si.hasProperty(FetaModelRDF.hasOperation)) + if (si.hasProperty(FetaVocabulary.hasOperation)) try { - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.outputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.outputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary - if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("simpleParameter")) { + if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("simpleParameter")) { // we have a simple // make sure that object type and article name exist Hashtable siminp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid simple output found in " + resource +". Missing moby object type."); - Report.add("Invalid simple output found in " + resource +". Missing moby object type."); + Report.add("\tInvalid simple output found in " + resource +". Missing moby object type."); Log.info("Invalid simple output found in " + resource +". Missing moby object type."); simple = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid simple output found in " + resource +". Missing an article name."); - Report.add("Invalid simple output found in " + resource +". Missing an article name."); + Report.add("\tInvalid simple output found in " + resource +". Missing an article name."); Log.info("Invalid simple output found in " + resource +". Missing an article name."); simple = "error"; break; @@ -568,8 +684,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid simple output found in " + resource +". Empty article name."); + Report.add("\tInvalid simple output found in " + resource +". Empty article name."); + Log.info("Invalid simple output found in " + resource +". Empty article name."); + simple = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -591,21 +713,21 @@ if (namespaces != null) siminp.put("namespace_type_uris", namespaces); output.put("simout"+ so++, siminp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("collectionParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("collectionParameter")) { // we have a collection // make sure that object type and article name exist Hashtable colinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { - Report.doWrite("Invalid collection input found in " + resource +". Missing moby object type."); - Report.add("Invalid collection input found in " + resource +". Missing moby object type."); - Log.info("Invalid collection input found in " + resource +". Missing moby object type."); + Report.doWrite("Invalid collection output found in " + resource +". Missing moby object type."); + Report.add("\tInvalid collection output found in " + resource +". Missing moby object type."); + Log.info("Invalid collection output found in " + resource +". Missing moby object type."); collection = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ - Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); - Report.add("Invalid collection input found in " + resource +". Missing an article name."); - Log.info("Invalid collection input found in " + resource +". Missing an article name."); + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ + Report.doWrite("Invalid collection output found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection output found in " + resource +". Missing an article name."); + Log.info("Invalid collection output found in " + resource +". Missing an article name."); collection = "error"; break; } @@ -616,8 +738,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid collection output found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection output found in " + resource +". Missing an article name."); + Log.info("Invalid collection output found in " + resource +". Missing an article name."); + collection = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -635,7 +763,8 @@ namespaces = namespaces.substring(0, namespaces.lastIndexOf(",")); } colinp.put("col_articleName",articlename); - colinp.put("namespace_type_uris", namespaces); + if (namespaces != null) + colinp.put("namespace_type_uris", namespaces); colinp.put("object_type_uri", datatype); output.put("colout"+ co++, colinp); } else { From senger at pub.open-bio.org Fri Nov 11 03:34:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Nov 11 03:31:40 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110834.jAB8Yd4C008108@pub.open-bio.org> senger Fri Nov 11 03:34:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv8089/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/06 16:23:49 1.4 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/11 08:34:39 1.5 @@ -1,3 +1,4 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel +org.biomoby.service.dashboard.GeneratorPanel #org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Fri Nov 11 03:34:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Nov 11 03:31:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110834.jAB8YdjI008143@pub.open-bio.org> senger Fri Nov 11 03:34:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv8089/src/main/org/biomoby/service/dashboard Modified Files: NOTES PrimaryDataTable.java RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceSubPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,1.23,1.24 PrimaryDataTable.java,1.3,1.4 RegistrationDataTypeSubPanel.java,1.6,1.7 RegistrationNamespaceSubPanel.java,1.5,1.6 RegistrationServiceSubPanel.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 14:32:42 1.23 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/11 08:34:39 1.24 @@ -28,6 +28,11 @@ * log warning if the 'notified' is not called from the event-dispatch queue +* confirmation before registering; separate "load from XML" and + "register" perhaps? - or having actuallt there an editor that allows + to change the XMl and then to click its button "register" + + --- * how to squeeze too long combo boxes into smaller place ? @@ -56,6 +61,7 @@ ? select a part of an error message and highlight it in red? ? HELP (in a Dashboard Menu) + - contextual help ? - starting panel/splash screen - helps from panels - About @@ -145,3 +151,46 @@ what is entered in the text field; also it can have getText()? - colors in JComboBox: http://forum.java.sun.com/thread.jspa?threadID=670356&messageID=3920606 +--- +public static void main(String args[]) +> { +> JComponent jc; +> JFrame f = new JFrame(); +> JPanel background = new JPanel( ), content = new JPanel( ); +> content.setLayout( new BorderLayout( ) ); +> content.add( jc = new JButton("FourthButton"), BorderLayout.WEST ); +> // you can comment lines like jc.setOpaque(false), in order to not see +> the background on the components ;) +> jc.setOpaque( false ); +> content.add( jc = new JButton("SecondButton"), BorderLayout.NORTH ); +> jc.setOpaque( false ); +> content.add( jc = new JButton("ThirdButton"), BorderLayout.SOUTH ); +> jc.setOpaque( false ); +> content.add( jc = new JButton("FivethButton"), BorderLayout.EAST ); +> jc.setOpaque( false ); +> content.setOpaque( false ); +> +> background.setLayout( new BorderLayout( ) ); +> background.add( new JLabel( new ImageIcon("background.gif") ), +> BorderLayout.CENTER ); +> +> f.getRootPane().setGlassPane( content ); +> f.getRootPane().getGlassPane().setVisible( true ); +> f.setContentPane( background ); +> f.setSize( 500, 300 ); +> f.setVisible( true ); +> } + + +problms with registration panel: + - no auto update after reg/unreg srevice, and data type + - after reload old files stayed (21.sep in data types) + - datetime was in cache but cannot make it into tree, why? + +right-click - if nothing selected, it should take what is under te + mouse (selected first), otherwise it is annoying + +serach should be propagated to all (same-kinds) trees in all panels + +wrap automatically text in descriptions fields + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/11 08:34:39 1.4 @@ -256,7 +256,7 @@ "Remove", "Article name", "Data Type", - "In Set", + "Set", "Namespaces" }; columnClasses = new Class[] { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 14:32:42 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/11 08:34:39 1.7 @@ -207,6 +207,7 @@ dataType.toString()); registryModel.registerDataType (dataType); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterDataTypeXML (dataType); console.setText ("\n" + xml + "\n"); @@ -214,6 +215,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateDataTypesCache(); + } + + /************************************************************************** * * Customized tree of data types - has different popup menus... * @@ -404,6 +415,7 @@ console.setText ("Data type to be unregistered: " + dataTypeName + "\n"); registryModel.unRegisterDataType (dataType); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { dtUnregException = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/11 08:34:39 1.6 @@ -182,6 +182,8 @@ namespace.toString()); registryModel.registerNamespace (namespace); console.setText ("\nRegistration successful!\n\n"); + updateCache(); + } else { String xml = registryModel.getRegisterNamespaceXML (namespace); console.setText ("\n" + xml + "\n"); @@ -189,6 +191,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateNamespacesCache(); + } + + /************************************************************************** * * Customized tree of namespaces - has different popup menus etc... * @@ -303,6 +315,7 @@ console.setText ("Namespace to be unregistered: " + name + "\n"); registryModel.unRegisterNamespace (namespace); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/11 08:34:39 1.6 @@ -502,6 +502,7 @@ service.toString()); registryModel.registerService (service); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterServiceXML (service); console.setText ("\n" + xml + "\n"); @@ -582,6 +583,7 @@ service.getName() + "\n"); registryModel.unRegisterService (service); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; @@ -602,6 +604,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateServicesCache(); + } + + /************************************************************************** * * Customized tree of service types - use for service registration * From senger at pub.open-bio.org Fri Nov 11 03:35:58 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Nov 11 03:32:49 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110835.jAB8Zww5008208@pub.open-bio.org> senger Fri Nov 11 03:35:58 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv8193/src/main/org/biomoby/service/dashboard Added Files: AntModel.java GeneratorPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,NONE,1.1 GeneratorPanel.java,NONE,1.1 From senger at pub.open-bio.org Fri Nov 11 03:35:58 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri Nov 11 03:32:50 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110835.jAB8ZwOc008223@pub.open-bio.org> senger Fri Nov 11 03:35:58 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv8193/src/main/org/biomoby/service/dashboard/images Added Files: bricks.gif smallClass.gif smallClass2.gif smallClass2_dis.gif smallClass_dis.gif smallGenJ.gif smallGenJ_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images bricks.gif,NONE,1.1 smallClass.gif,NONE,1.1 smallClass2.gif,NONE,1.1 smallClass2_dis.gif,NONE,1.1 smallClass_dis.gif,NONE,1.1 smallGenJ.gif,NONE,1.1 smallGenJ_dis.gif,NONE,1.1 From gss at pub.open-bio.org Fri Nov 11 15:59:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri Nov 11 15:56:42 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511112059.jABKxt40010331@pub.open-bio.org> gss Fri Nov 11 15:59:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build In directory pub.open-bio.org:/tmp/cvs-serv10306/build Modified Files: .cvsignore Log Message: Added ROOT.war to .cvsignore s-moby/ref-impl/semanticmoby.org/build .cvsignore,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore 2005/09/21 23:07:16 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore 2005/11/11 20:59:55 1.3 @@ -1,2 +1,3 @@ semanticmoby.org.war javadoc +ROOT.war From senger at pub.open-bio.org Sat Nov 12 11:43:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 12 11:40:31 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhlxL013007@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv12988/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.50,1.51 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/10 08:54:31 1.50 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/12 16:43:47 1.51 @@ -1,3 +1,11 @@ +2005-11-12 Martin Senger + + * Changed MobyException to use initCause() and log.debug to better + indicate what happened and where. + + * Fixed CentralImpl: it is not anymore vulnerable to a different + types of results coming back from biomoby registry. + 2005-11-10 Martin Senger * Added method getParentName() to MobyServiceType From senger at pub.open-bio.org Sat Nov 12 11:43:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 12 11:40:37 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhmOT013142@pub.open-bio.org> senger Sat Nov 12 11:43:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/shared Modified Files: MobyException.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyException.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyException.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/shared/MobyException.java 2005/04/20 21:42:09 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyException.java 2005/11/12 16:43:48 1.3 @@ -1,28 +1,34 @@ // MobyException.java // -// senger@ebi.ac.uk -// February 2003 +// Created: February 2003 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger@gmail.com). +// package org.biomoby.shared; +import java.io.StringWriter; +import java.io.PrintWriter; + /** A general exception which can be used as a wrapper * around other exceptions. Using this exception * simplifies the code (but on the other hand it makes it less * "type-safe" - which is usually not a problem when dealing * with exceptions). *

    - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ public class MobyException extends Exception { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (MobyException.class); private static final long serialVersionUID = 3257853190165969203L; - /** @serial - */ - private Throwable theOriginalException = null; + /** @serial */ public MobyException () { super(); } /****************************************************************************** @@ -36,22 +42,36 @@ * It allows access to the original (wrapped) exception and its message. * * @param s message (or reason of) - * @param theOriginalException + * @param e original cause of this exception ******************************************************************************/ - public MobyException (String s, Throwable theOriginalException) { - super (s); - this.theOriginalException = theOriginalException; + public MobyException (String s, Throwable e) { + super (s, e); + if (e != null) { + boolean seriousError = + ( (e instanceof java.lang.NullPointerException) || + (e instanceof java.lang.ClassCastException) || + (e instanceof java.lang.ClassNotFoundException) ); + if (seriousError || log.isDebugEnabled()) { + StringWriter sw = new StringWriter (500); + e.printStackTrace (new PrintWriter (sw)); + if (seriousError) + log.error (sw.toString()); + else + log.debug (sw.toString()); + } + } } /****************************************************************************** * Retrieve the original exception. * + * @deprecated Use instead getCause() directly. + * * @return an original exception which was wrapped by this BiomonyException, or * null if there was no original exception involved ******************************************************************************/ public Throwable getOriginalException() { - return theOriginalException; + return getCause(); } } - From senger at pub.open-bio.org Sat Nov 12 11:43:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 12 11:40:43 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhlvU013035@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java CentralDigestImpl.java CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.13,1.14 CentralDigestImpl.java,1.9,1.10 CentralImpl.java,1.34,1.35 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/10 08:54:31 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/12 16:43:47 1.14 @@ -446,7 +446,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); stopDT = false; @@ -459,7 +459,10 @@ * if failed do nothing (except reporting it) * - remove LIST_FILE * - compare contents of new LIST_FILE with file names in the cache - * and remove them, or fetched missing ones + * and remove them, or fetched missing ones; + * in order to compare properly you need to read individual files + * and look if they really contain all services mentioned in the + * LIST_FILE * if success add there new LIST_FILE *************************************************************************/ protected boolean fillServicesCache() @@ -485,7 +488,31 @@ for (Iterator it = authorities.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String authority = (String)entry.getKey(); - if ( ! currentFiles.contains (authority)) { + if (currentFiles.contains (authority)) { + MobyService[] servs = + extractServices (load (new File (servicesCache, authority))); + // compare names in 'services' (those are services we have in cache) + // with names in 'entry' (those are the ones we should have) + boolean theyAreEqual = true; + HashSet currentServices = new HashSet (servs.length); + for (int i = 0; i < servs.length; i++) + currentServices.add (servs[i].getName()); + String[] newServices = (String[])entry.getValue(); + for (int i = 0; i < newServices.length; i++) { + if (currentServices.contains (newServices[i])) { + currentServices.remove (newServices[i]); + } else { + theyAreEqual = false; + break; + } + } + if (currentServices.size() > 0) + theyAreEqual = false; + if (! theyAreEqual) + currentFiles.remove (authority); + } + + if (! currentFiles.contains (authority)) { // missing file: fetch it from a registry fireEvent (AUTHORITY_LOADING, authority); String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); @@ -494,8 +521,9 @@ if (stopS) { return false; } + } else { + currentFiles.remove (authority); } - currentFiles.remove (authority); } // remove files that are not any more needed @@ -507,7 +535,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopS ? AUTHORITIES_CANCELLED : AUTHORITIES_END); stopS = false; @@ -568,7 +596,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); stopST = false; @@ -587,7 +615,7 @@ store (namespacesCache, LIST_FILE, xml); return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (NAMESPACES_END); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2005/10/28 07:58:08 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2005/11/12 16:43:47 1.10 @@ -99,7 +99,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); stopDT = false; @@ -135,7 +135,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopST ? SERVICE_TYPES_CANCELLED : SERVICE_TYPES_END); stopST = false; @@ -188,7 +188,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopS ? AUTHORITIES_CANCELLED : AUTHORITIES_END); stopS = false; @@ -199,7 +199,8 @@ * Do more for NullPointerException... *************************************************************************/ protected String formatException (Exception e) { - if (e instanceof java.lang.NullPointerException) { + if ( (e instanceof java.lang.NullPointerException) || + (e instanceof java.lang.ClassCastException) ) { StringBuffer buf = new StringBuffer(); buf.append (e.toString()); buf.append (DGUtils.stackTraceToString (e)); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/09 05:29:38 1.34 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/12 16:43:47 1.35 @@ -191,18 +191,18 @@ System.err.println (result + "\n"); System.err.println ("------------\n"); - return result; + return resultToString (result); } else { - return call.invoke (uri, method, parameters); + return resultToString (call.invoke (uri, method, parameters)); } } catch (AxisFault e) { throw new MobyException (AxisUtils.formatFault (e, endpoint.toString(), - (call == null ? null : call.getOperationName()))); + (call == null ? null : call.getOperationName())), e); } catch (Exception e) { - throw new MobyException (e.toString()); + throw new MobyException (e.toString(), e); // e.printStackTrace(); } } @@ -1467,7 +1467,7 @@ false) + "" }; - return (String) doCall ("findService", query); + return (String)doCall ("findService", query); } /************************************************************************** @@ -1480,6 +1480,14 @@ result = doCall (methodName, new Object[] { }); else result = doCall (methodName, new Object[] { inputXML }); + return (String)result; + } + + /************************************************************************** + * + *************************************************************************/ + protected static String resultToString (Object result) + throws MobyException { if (result == null) throw new MobyException ("Returned result is null."); if (result instanceof String) From senger at pub.open-bio.org Sat Nov 12 11:43:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 12 11:41:03 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhmO0013119@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java CommonTree.java DataTypesBoard.java DataTypesTree.java NOTES NamespacesBoard.java NamespacesTree.java PropertyChannel.java RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.19,1.20 CommonTree.java,1.16,1.17 DataTypesBoard.java,1.9,1.10 DataTypesTree.java,1.11,1.12 NOTES,1.24,1.25 NamespacesBoard.java,1.4,1.5 NamespacesTree.java,1.6,1.7 PropertyChannel.java,1.6,1.7 RegistrationDataTypeSubPanel.java,1.7,1.8 RegistrationNamespaceSubPanel.java,1.6,1.7 RegistrationServiceSubPanel.java,1.6,1.7 RegistrationServiceTypeSubPanel.java,1.7,1.8 RegistryPanel.java,1.22,1.23 ServiceTypesBoard.java,1.5,1.6 ServiceTypesTree.java,1.8,1.9 ServicesBoard.java,1.5,1.6 ServicesTree.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 16:23:32 1.19 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/12 16:43:47 1.20 @@ -371,6 +371,8 @@ else area.setText (initValue); area.setCaretPosition (0); + area.setLineWrap (true); + area.setWrapStyleWord (true); if (eventName != null) { final String eName = eventName; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 14:32:42 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/12 16:43:47 1.17 @@ -9,6 +9,7 @@ package org.biomoby.service.dashboard; import org.tulsoft.tools.gui.SwingUtils; +import org.tulsoft.shared.PrefsUtils; import javax.swing.JTree; import javax.swing.JLabel; @@ -67,9 +68,13 @@ final static protected int SORTED_BY_INPUT_DATA = 12; final static protected int SORTED_BY_OUTPUT_DATA = 13; + final static protected String PREF_KEY_SEARCH = "searchKey"; + // tree components protected JPopupMenu popup; - protected String lastSearchText = ""; + protected static String + lastSearchText = PrefsUtils.getNode (Dashboard.class).get (PREF_KEY_SEARCH, ""); + protected int lastSorted = SORTED_BY_NAME; protected PropertyChannel propertyChannel; @@ -449,11 +454,13 @@ searchIcon, null, lastSearchText); - if (result != null) + if (result != null) { lastSearchText = result; + PrefsUtils.getNode (Dashboard.class).put (PREF_KEY_SEARCH, lastSearchText); + } return result; } - + /********************************************************************* * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/10 08:54:31 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/12 16:43:47 1.10 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.DATA_TYPE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.DATA_TYPE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.DATA_TYPES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.DATA_TYPES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:47:11 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/12 16:43:47 1.12 @@ -145,7 +145,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (DATA_TYPES_ACCESS_ERROR, updateException); if (dataTypes != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/11 08:34:39 1.24 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/12 16:43:47 1.25 @@ -1,3 +1,15 @@ +* Add Throwable.initCause() etc. into exception handling + +* Add Alt-x for quick changing panels + +* Why are not services sorted by name, the first time they appear in + Registry browser? + +* BUG: sort services tree by service types: parts of the tree are + empty (big gaps) + +* move various exceptions from being global to the swing workers + * FWK005 parse may not be called while parsing. - probably when too many network request together --- @@ -140,6 +152,8 @@ * log4j.configuration property - works only from Ant... add it to the cmd-line clients, as well +* use NDC (with log4j) when I understand it... (?) + * alltools2: - JTextFieldWithHistory should remember also an empty value ("") - combo box history is not updated if exit happened while focus is still in the text field @@ -183,14 +197,10 @@ problms with registration panel: - - no auto update after reg/unreg srevice, and data type - after reload old files stayed (21.sep in data types) - datetime was in cache but cannot make it into tree, why? right-click - if nothing selected, it should take what is under te mouse (selected first), otherwise it is annoying -serach should be propagated to all (same-kinds) trees in all panels - -wrap automatically text in descriptions fields =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/12 16:43:47 1.5 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.NAMESPACE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.NAMESPACE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.NAMESPACES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.NAMESPACES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:47:11 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/12 16:43:47 1.7 @@ -104,7 +104,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (NAMESPACES_ACCESS_ERROR, updateException); if (namespaces != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/10/28 11:30:37 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/12 16:43:47 1.7 @@ -8,6 +8,7 @@ package org.biomoby.service.dashboard; +import org.biomoby.shared.Utils; import org.tulsoft.shared.UUtils; import java.beans.PropertyChangeListener; @@ -188,9 +189,9 @@ if (source != null) { buf.append ("["); if (source instanceof DashboardPanel) - buf.append ( ((DashboardPanel)source).getName() ); + buf.append ( Utils.simpleClassName (((DashboardPanel)source).getName()) ); else - buf.append (source.getClass().getName()); + buf.append ( Utils.simpleClassName (source.getClass().getName()) ); buf.append ("] "); } buf.append (key); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/11 08:34:39 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/12 16:43:47 1.8 @@ -112,7 +112,7 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_DT, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, + createCheckBox ("Fill new Data Type when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectDT (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/11 08:34:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/12 16:43:47 1.7 @@ -101,7 +101,7 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_NS, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, + createCheckBox ("Fill new Namespace when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectNS (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/11 08:34:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/12 16:43:47 1.7 @@ -154,7 +154,7 @@ // copy-by-select copyBySelect = - createCheckBox ("Copy here when selected in browser panel", + createCheckBox ("Fill new Service when selected in browser panel", false, KeyEvent.VK_C, null); // put together service fields =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 14:32:42 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/12 16:43:47 1.8 @@ -108,7 +108,7 @@ // allow to copy selected service types to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_ST, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_O, + createCheckBox ("Fill new Service Type when selected", usingCopyBySelect, KeyEvent.VK_O, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectST (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/10 08:54:31 1.22 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/12 16:43:47 1.23 @@ -202,7 +202,7 @@ final JLabel contents = new JLabel(); final String[] buttons = new String[] { "Copy to console", "Done"}; - propertyChannel.fire (DP_STATUS_MSG, "Retrieving cach info..."); + propertyChannel.fire (DP_STATUS_MSG, "Retrieving cache info..."); infoButton.setEnabled (false); final SwingWorker worker = new SwingWorker() { @@ -338,7 +338,7 @@ // runs on the event-dispatching thread. public void finished() { if (log.isDebugEnabled()) - log.debug (myReload ? "Reload of " : "Update of part " + myCachePart + " finished"); + log.debug ( (myReload ? "Reload of " : "Update of part ") + myCachePart + " finished"); if (exception != null) error ("An error occured when filling/updating the cache.\n\n", exception); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/10 08:54:31 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/12 16:43:47 1.6 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.SERVICE_TYPE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.SERVICE_TYPE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/10 08:54:31 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/12 16:43:47 1.9 @@ -104,7 +104,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (SERVICE_TYPES_ACCESS_ERROR, updateException); if (serviceTypes != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/12 16:43:47 1.6 @@ -80,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.AUTHORITY_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.AUTHORITY_LOADED: addToProgressBar(); @@ -90,7 +90,7 @@ case Notifier.AUTHORITIES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.AUTHORITIES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/12 16:43:47 1.6 @@ -146,7 +146,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (SERVICES_ACCESS_ERROR, updateException); if (services != null) { From senger at pub.open-bio.org Sat Nov 12 12:27:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 12 12:24:21 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121727.jACHRdDP013336@pub.open-bio.org> senger Sat Nov 12 12:27:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv13317/src/main/org/biomoby/service/dashboard Modified Files: Dashboard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard Dashboard.java,1.15,1.16 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 14:32:42 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/12 17:27:39 1.16 @@ -119,7 +119,7 @@ Dimension screenSize = frame.getToolkit().getScreenSize(); double myWidth = Math.min (screenSize.getWidth(), 1100); - double myHeight = Math.min (screenSize.getHeight(), 900); + double myHeight = Math.min (screenSize.getHeight() - 25, 900); Dimension mySize = new Dimension(); mySize.setSize (myWidth, myHeight); @@ -218,6 +218,8 @@ tabbedPane.addTab (name, panels[i].getIcon(), panels[i].getComponent (propertyChannel)); + if (i < 10) + tabbedPane.setMnemonicAt (i, (0x30 + i + 1)); } StatusBar statusBar = getStatusBar(); propertyChannel.addPropertyChangeListener (statusBar); From gss at pub.open-bio.org Sun Nov 13 00:18:57 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Sun Nov 13 00:15:41 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511130518.jAD5Iv33014613@pub.open-bio.org> gss Sun Nov 13 00:18:57 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images In directory pub.open-bio.org:/tmp/cvs-serv14576/WebRoot/images Modified Files: nsf.gif tigr.gif ncgr.gif cshl.gif Log Message: Updated logos for cshl, ncgr, nsf, and tigr s-moby/ref-impl/semanticmoby.org/WebRoot/images nsf.gif,1.1,1.2 tigr.gif,1.1,1.2 ncgr.gif,1.1,1.2 cshl.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif: diff failed From gss at pub.open-bio.org Sun Nov 13 00:43:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Sun Nov 13 00:39:52 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511130543.jAD5h0Pa014701@pub.open-bio.org> gss Sun Nov 13 00:43:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images In directory pub.open-bio.org:/tmp/cvs-serv14660/WebRoot/images Modified Files: iwis.gif iris.gif lis.gif tigr-gi.gif dragondb.gif Log Message: Added transparency s-moby/ref-impl/semanticmoby.org/WebRoot/images iwis.gif,1.1,1.2 iris.gif,1.1,1.2 lis.gif,1.1,1.2 tigr-gi.gif,1.1,1.2 dragondb.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif: diff failed From senger at pub.open-bio.org Mon Nov 14 22:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 14 22:23:30 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpxY029936@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv29860/src/main/org/biomoby/client Modified Files: BaseClient.java Log Message: moby-live/Java/src/main/org/biomoby/client BaseClient.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java 2005/10/22 01:38:04 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java 2005/11/15 03:25:51 1.4 @@ -170,7 +170,7 @@ throw new MobyException ("Service endpoint '" + serviceEndpoint + "' is not a valid URL."); } catch (GException e) { - throw new MobyException (e.getMessage()); + throw new MobyException (e.getMessage(), e); } } From senger at pub.open-bio.org Mon Nov 14 22:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 14 22:23:42 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpAW029897@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv29860/src/config Modified Files: run-any-client Log Message: moby-live/Java/src/config run-any-client,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/09/18 08:46:25 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/15 03:25:51 1.5 @@ -15,5 +15,6 @@ CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH "$@" From senger at pub.open-bio.org Mon Nov 14 22:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 14 22:23:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpZo029879@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv29860 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.39,1.40 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- /home/repository/moby/moby-live/Java/build.xml 2005/10/28 07:58:08 1.39 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/15 03:25:50 1.40 @@ -99,11 +99,11 @@ - - --> + - - + - From senger at pub.open-bio.org Wed Nov 16 03:39:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 16 03:37:29 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dnin002079@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/shared/parser Modified Files: MobyJob.java Log Message: moby-live/Java/src/main/org/biomoby/shared/parser MobyJob.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/MobyJob.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/shared/parser/MobyJob.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/MobyJob.java 2005/11/16 08:39:48 1.2 @@ -413,10 +413,6 @@ *

  • If it fails, try to find an unnamed Simple data element * matching just the data type.

    * - *

  • If it fails, and if here given 'name' is empty, try to - * find any Simple data element matching the data type. (I am - * not sure that this rule is what we want...)

    - * *

  • Return null.

    * * From senger at pub.open-bio.org Wed Nov 16 03:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 16 03:37:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dm7S002060@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/shared/event Modified Files: Notifier.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event Notifier.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/09 16:23:32 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/16 08:39:48 1.8 @@ -109,9 +109,9 @@ * Call the notifier and signal that it can stop loading data (or * whatever it is doing).

    * - * @param signal identify what to stop doing (some usual values of - * this signal are defined elsewhere in this interface with names - * starting by SIGNAL_) + * @param callbackSignal identify what to stop doing (some usual + * values of this signal are defined elsewhere in this interface + * with names starting by SIGNAL_) ********************************************************************/ void callback (int callbackSignal); From senger at pub.open-bio.org Wed Nov 16 03:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 16 03:37:38 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dmQk001998@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv1965/src/Clients Added Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,NONE,1.1 From senger at pub.open-bio.org Wed Nov 16 03:40:53 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 16 03:37:42 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160840.jAG8eru4002138@pub.open-bio.org> senger Wed Nov 16 03:40:53 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv2123/src/Clients Added Files: TestAuth.java Log Message: moby-live/Java/src/Clients TestAuth.java,NONE,1.1 From senger at pub.open-bio.org Wed Nov 16 03:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed Nov 16 03:37:58 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dmsk002022@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java PropertyChannel.java Added Files: ExitSecurityManager.java SimpleAnt.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard ExitSecurityManager.java,NONE,1.1 SimpleAnt.java,NONE,1.1 GeneratorPanel.java,1.2,1.3 PropertyChannel.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.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/service/dashboard/GeneratorPanel.java 2005/11/15 03:25:51 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/16 08:39:48 1.3 @@ -224,7 +224,7 @@ JPanel jMoby = createTitledPanel ("jMoby"); File currentDir = new File (System.getProperty ("user.dir")); - JLabel labelJMoby = new JLabel ("Directory with a local copy of jMoby"); + JLabel labelJMoby = new JLabel ("Directory with jMoby"); jmobyDir = createFileSelector ("Select directory with jMoby", "Select", currentDir.getAbsolutePath(), @@ -235,28 +235,28 @@ SwingUtils.addComponent (jMoby, labelJMoby, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (jMoby, jmobyDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); - // panel with output dirs - JPanel outputs = createTitledPanel ("Output locations"); +// // panel with output dirs +// JPanel outputs = createTitledPanel ("Output locations"); - JLabel labelOutput = new JLabel ("Output directory for generated code"); - outputDir = createFileSelector ("Select directory for generated code", - "Select", - new File (currentDir, "generated").getAbsolutePath(), - "generatedDirectory", - null); - outputDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - JLabel labelJavadoc = new JLabel ("Output directory for javadoc API"); - javadocDir = createFileSelector ("Select directory for generated javadoc", - "Select", - new File (currentDir, "docs/APIservices").getAbsolutePath(), - "apiDirectory", - null); - javadocDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - - SwingUtils.addComponent (outputs, labelOutput, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent (outputs, outputDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); - SwingUtils.addComponent (outputs, labelJavadoc, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent (outputs, javadocDir, 0, 3, 1, 1, HORI, NWEST, 1.0, 0.0); +// JLabel labelOutput = new JLabel ("Output directory for generated code"); +// outputDir = createFileSelector ("Select directory for generated code", +// "Select", +// new File (currentDir, "generated").getAbsolutePath(), +// "generatedDirectory", +// null); +// outputDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); +// JLabel labelJavadoc = new JLabel ("Output directory for javadoc API"); +// javadocDir = createFileSelector ("Select directory for generated javadoc", +// "Select", +// new File (currentDir, "docs/APIservices").getAbsolutePath(), +// "apiDirectory", +// null); +// javadocDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); + +// SwingUtils.addComponent (outputs, labelOutput, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (outputs, outputDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); +// SwingUtils.addComponent (outputs, labelJavadoc, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (outputs, javadocDir, 0, 3, 1, 1, HORI, NWEST, 1.0, 0.0); // all-in-one button bothButton = @@ -293,7 +293,7 @@ // put all together SwingUtils.addComponent (pComponent, split, 0, 0, 1, 7, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (pComponent, jMoby, 1, 0, 2, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent (pComponent, outputs, 1, 1, 2, 1, HORI, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (pComponent, outputs, 1, 1, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, options, 1, 2, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, flavours, 1, 3, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, genData, 1, 4, 1, 1, HORI, NWEST, 0.0, 0.0); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/12 16:43:47 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/16 08:39:48 1.8 @@ -35,7 +35,7 @@ * can register and deregister PropertyChangeListeners, and it can * fire an event to them on behave of other objects. The other objects * either identify themselves (see method {@link - * #fire(Object,String,Object}), or use this channel for firing + * #fire(Object,String,Object)}), or use this channel for firing * anonymous messages (see method {@link #fire(String,Object)}) - in * which case the message source will be this class.

    * From fgibbons at pub.open-bio.org Wed Nov 16 09:51:49 2005 From: fgibbons at pub.open-bio.org (Frank Gibbons) Date: Wed Nov 16 09:48:07 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511161451.jAGEpnjX003352@pub.open-bio.org> fgibbons Wed Nov 16 09:51:48 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY In directory pub.open-bio.org:/tmp/cvs-serv3327 Modified Files: CommonSubs.pm Log Message: - Ooops! EXPORT_OK contained 'collectionResponse' when it should have had 'complexResponse' moby-live/Perl/MOBY CommonSubs.pm,1.70,1.71 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/09/30 23:23:13 1.70 +++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/11/16 14:51:48 1.71 @@ -206,7 +206,7 @@ );# complexResponse is *not* here, but is in @EXPORT_OK -our @EXPORT_OK = ("collectionResponse", @{$EXPORT_TAGS{'all'}}); +our @EXPORT_OK = ("complexResponse", @{$EXPORT_TAGS{'all'}}); =head2 genericServiceInputParser From senger at pub.open-bio.org Thu Nov 17 08:04:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 17 08:00:37 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511171304.jAHD4PG8011061@pub.open-bio.org> senger Thu Nov 17 08:04:24 EST 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv11046 Added Files: commons-io-1.0.jar Log Message: jars-archive/current commons-io-1.0.jar,NONE,1.1 From gss at pub.open-bio.org Fri Nov 18 13:28:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri Nov 18 13:24:47 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511181828.jAIISgZS022541@pub.open-bio.org> gss Fri Nov 18 13:28:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv22515/src/org/semanticmoby/ref/servlets/dev Modified Files: RepositoryPrintServlet.java Log Message: Accept format parameter; print N3 by default s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev RepositoryPrintServlet.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java 2005/10/09 01:11:21 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java 2005/11/18 18:28:42 1.4 @@ -18,29 +18,37 @@ PrintWriter out = response.getWriter(); StorageManager manager = new StorageManager(); - + + String format = "N3"; + Model model = null; + try { - - Model model = manager.openDBModel(); + model = manager.openDBModel(); if (model.isEmpty()) { - out.println("The repository is empty"); } else { - - StmtIterator it = model.listStatements(); - - while (it.hasNext()) { - - out.println(it.nextStatement()); + String fmt = request.getParameter("format"); + if ("rdf".equalsIgnoreCase(fmt)) { + format = "RDF/XML-ABBREV"; + } else if ("nt".equalsIgnoreCase(fmt)) { + format = "N-TRIPLES"; } + model.write(out, format); } model.close(); } catch (StorageException e) { - e.printStackTrace(); throw new ServletException(e); + } finally { + if (model != null) { + try { + model.close(); + } catch (Throwable t) { + t.printStackTrace(); + } + } } } } From senger at pub.open-bio.org Sat Nov 19 06:11:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 06:07:11 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191111.jAJBBCHE024767@pub.open-bio.org> senger Sat Nov 19 06:11:12 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory pub.open-bio.org:/tmp/cvs-serv24749/help Log Message: Directory /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help added to the repository moby-live/Java/src/main/org/biomoby/service/dashboard/help - New directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/directory,v: No such file or directory From senger at pub.open-bio.org Sat Nov 19 13:33:00 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:32:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX0gu025499@pub.open-bio.org> senger Sat Nov 19 13:33:00 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv25480 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.41,1.42 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/16 08:39:48 1.41 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/19 18:33:00 1.42 @@ -232,6 +232,7 @@ + From senger at pub.open-bio.org Sat Nov 19 13:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:34:02 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2n0025650@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/service/dashboard/images Added Files: registration.gif smallHelp.gif smallHelp_dis.gif smallPref.gif smallPref_dis.gif smallSelect.gif smallSelect_dis.gif Removed Files: registration.png Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images registration.gif,NONE,1.1 smallHelp.gif,NONE,1.1 smallHelp_dis.gif,NONE,1.1 smallPref.gif,NONE,1.1 smallPref_dis.gif,NONE,1.1 smallSelect.gif,NONE,1.1 smallSelect_dis.gif,NONE,1.1 registration.png,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/registration.png,v: No such file or directory From senger at pub.open-bio.org Sat Nov 19 13:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:34:04 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2wT025695@pub.open-bio.org> senger Sat Nov 19 13:33:02 EST 2005 Update of /home/repository/moby/moby-live/Java/xmls In directory pub.open-bio.org:/tmp/cvs-serv25480/xmls Modified Files: libraries.xml Log Message: moby-live/Java/xmls libraries.xml,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/08 00:06:55 1.8 +++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/19 18:33:02 1.9 @@ -21,6 +21,7 @@ + @@ -60,6 +61,7 @@ + @@ -124,6 +126,7 @@ + From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:34:07 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX17j025634@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/service/dashboard/help Added Files: Dashboard.html GeneratorPanel.html RegistrationPanel.html RegistryPanel.html Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/help Dashboard.html,NONE,1.1 GeneratorPanel.html,NONE,1.1 RegistrationPanel.html,NONE,1.1 RegistryPanel.html,NONE,1.1 From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:34:08 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1OV025554@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard/org/biomoby/service/dashboard Added Files: dashboard.txt project.txt Log Message: moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,NONE,1.1 project.txt,NONE,1.1 From senger at pub.open-bio.org Sat Nov 19 13:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:34:11 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2dG025671@pub.open-bio.org> senger Sat Nov 19 13:33:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/shared Modified Files: Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared Utils.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/10 08:54:32 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/19 18:33:01 1.9 @@ -7,6 +7,9 @@ package org.biomoby.shared; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; + import java.util.HashSet; import java.io.PrintWriter; import java.io.BufferedWriter; @@ -16,7 +19,11 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; - +import java.io.OutputStreamWriter; +import java.io.ByteArrayOutputStream; +import java.nio.charset.Charset; +import java.net.URL; +import java.net.MalformedURLException; /** * This is a set of several utility methods which may be useful for @@ -144,17 +151,21 @@ /************************************************************************* * Find the resource with the given 'filename', read it and return - * it. A resource is some data (images, audio, text, etc) that can be - * accessed by class code in a way that is independent of the location - * of the code, typicallt such resource file sits anywhere on the CLASSPATH.

    + * it. A resource is some data (images, audio, text, etc) that can + * be accessed by class code in a way that is independent of the + * location of the code, typically such resource file sits + * anywhere on the CLASSPATH.

    * * @param filename of a resource is a '/'-separated path name that * identifies the resource + * * @param resourceOwner is any object whose class loader is used * to find and get the resource; typically one would put here * "this" when calling this method + * * @return contents of the resource, or null if the resource could * not be found + * * @throws MobyException if resource was found but an error * occured during its reading (IO problem, memory problem etc.) *************************************************************************/ @@ -193,9 +204,114 @@ } /************************************************************************* + * Work in progress.

    + * + * Slightly richer version of {@link + * #readResource(String,Object)}. It reads the resource using + * platform default encoding (which may be not what you + * want... something to be done better (TBD).

    + * + * @return contents of the resource, or null if the resource could + * not be found + * + * @throws IOException if resource was found but an error + * occured during its reading (IO problem, memory problem etc.) + *************************************************************************/ + public static String readResource (String path, Class c) + throws IOException { + + // path can be empty + if (path == null) return null; + + // seems that we are going to read something - so prepare a + // default encoding + String encoding = new OutputStreamWriter (new ByteArrayOutputStream()).getEncoding(); + // for 1.5: +// String encoding = Charset.defaultCharset().name(); + + // path can be absolute... + File file = new File (path); + if (file.isAbsolute()) + return FileUtils.readFileToString (file, encoding); + + // ...or consider it a resource and load it as a resource of + // the given class + InputStream is = null; + if (c != null) { + is = c.getClassLoader().getResourceAsStream (path); + if (is != null) + return IOUtils.toString (is, encoding); + + // ...or extend the path by the package name of the given + // class + String className = c.getName(); + int pkgEndIndex = className.lastIndexOf ('.'); + if (pkgEndIndex > 0) { + String packageName = className.substring (0, pkgEndIndex); + String newPath = packageName.replace ('.', '/') + "/" + path; + is = c.getClassLoader().getResourceAsStream (newPath); + if (is != null) + return IOUtils.toString (is, encoding); + } + } + + // ...or (finally) try some general class loader + is = Thread.currentThread().getContextClassLoader().getResourceAsStream (path); + if (is != null) + return IOUtils.toString (is, encoding); + + // sorry, I cannot do more + return null; + } + + /************************************************************************* + * Work in progress.

    + * + * Similar to {@link #readResource(String,Class)} but return just + * an URL of a resource, not the resource itself.

    + * + * @return URL of the resource, or null if the resource could not + * be found + *************************************************************************/ + public static URL getResourceURL (String path, Class c) { + + // path can be empty + if (path == null) return null; + + // path can be absolute... + File file = new File (path); + if (file.isAbsolute()) { + try { + return file.toURI().toURL(); + } catch (MalformedURLException e) { + return null; + } + } + + // ...or consider it a resource of the given class + URL url = null; + if (c != null) { + url = c.getClassLoader().getResource (path); + if (url != null) return url; + + // ...or extend the path by the package name of the given class + String className = c.getName(); + int pkgEndIndex = className.lastIndexOf ('.'); + if (pkgEndIndex > 0) { + String packageName = className.substring (0, pkgEndIndex); + String newPath = packageName.replace ('.', '/') + "/" + path; + url = c.getClassLoader().getResource (newPath); + if (url != null) return url; + } + } + + // ...or (finally) try some general class loader + return Thread.currentThread().getContextClassLoader().getResource (path); + } + + /************************************************************************* * Return just the last part of a Java class name (after the last - * dot). It is useful for displaying purposes (and when data do - * not have article names).

    + * dot). It is useful for displaying purposes.

    * * @param className whose last part is being looked for * @return the last part of 'className', or the whole 'className' if it does From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:49:26 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1xR025518@pub.open-bio.org> senger Sat Nov 19 13:33:00 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard Modified Files: dashboard.properties Log Message: moby-live/Java/src/config/dashboard dashboard.properties,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties 2005/10/28 07:58:08 1.2 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties 2005/11/19 18:33:00 1.3 @@ -30,4 +30,23 @@ # --- a name or a number of color that will be used to paint the # background of the dasboard header and its status bar at the bottom + dashboard.bgcolor = aliceblue + +# --- short description what a dashboard can do generally; usually it +# is more convenient to put the description in a file and to use the +# alternative property name; this text is treated as an HTML text + +#dashboard.description = +dashboard.description.file = org/biomoby/service/dashboard/dashboard.txt + +# --- short description of a project that uses this dashboard; usually +# it is more convenient to put the description in a file and to use +# the alternative property name; this text is treated as an HTML text + +#project.description = +project.description.file = org/biomoby/service/dashboard/project.txt + +# --- contact person, possibly with an email address +# (note that this text is not treated as HTML document) +dashboard.contact = Martin Senger From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat Nov 19 13:49:30 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1F7025538@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/11 08:34:39 1.5 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/19 18:33:01 1.6 @@ -1,4 +1,4 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel org.biomoby.service.dashboard.GeneratorPanel -#org.biomoby.service.dashboard.DebuggingPanel +org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:02 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpfl005036@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv4966/docs/images Modified Files: stylesheet.css Log Message: moby-live/Java/docs/images stylesheet.css,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/images/stylesheet.css,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/docs/images/stylesheet.css 2005/09/20 07:30:09 1.5 +++ /home/repository/moby/moby-live/Java/docs/images/stylesheet.css 2005/11/20 12:30:50 1.6 @@ -63,6 +63,10 @@ margin: 1em; } +.update { + background-color:#ccffcd; + } + pre.code { border: ridge; padding: 5px; background-color:#FFFF99; From senger at pub.open-bio.org Sun Nov 20 07:30:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:21 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUooY004993@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv4966 Modified Files: .cvsignore.template build-dev.bat build.bat Log Message: moby-live/Java .cvsignore.template,1.3,1.4 build-dev.bat,1.4,1.5 build.bat,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/.cvsignore.template,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/.cvsignore.template 2005/08/31 00:48:39 1.3 +++ /home/repository/moby/moby-live/Java/.cvsignore.template 2005/11/20 12:30:50 1.4 @@ -3,3 +3,4 @@ .classpath build build.properties +log4j.properties =================================================================== RCS file: /home/repository/moby/moby-live/Java/build-dev.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/build-dev.bat 2005/05/19 10:56:05 1.4 +++ /home/repository/moby/moby-live/Java/build-dev.bat 2005/11/20 12:30:50 1.5 @@ -1,38 +1,38 @@ -@echo off -REM $Id$ - -REM See comments in build-dev.sh. -REM ALSO: I do not understand Windows and do not develop on this platform. -REM Therefore, any improvements of this script are welcome. -REM Please do not hesitate and contact Martin Senger . - -REM Set-up JAVA_HOME -REM ---------------- - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=.\lib\ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set CP=%JAVA_HOME%\lib\tools.jar;%CP% - -REM Call Ant to do the building -REM --------------------------- -set JAVA=%JAVA_HOME%\bin\java -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end - - +@echo off +REM $Id$ + +REM See comments in build-dev.sh. +REM ALSO: I do not understand Windows and do not develop on this platform. +REM Therefore, any improvements of this script are welcome. +REM Please do not hesitate and contact Martin Senger . + +REM Set-up JAVA_HOME +REM ---------------- + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=.\lib\ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set CP=%JAVA_HOME%\lib\tools.jar;%CP% + +REM Call Ant to do the building +REM --------------------------- +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/build.bat 2005/05/19 10:56:05 1.4 +++ /home/repository/moby/moby-live/Java/build.bat 2005/11/20 12:30:50 1.5 @@ -1,38 +1,38 @@ -@echo off -REM $Id$ - -REM See comments in build.sh. -REM ALSO: I do not understand Windows and do not develop on this platform. -REM Therefore, any improvements of this script are welcome. -REM Please do not hesitate and contact Martin Senger . - -REM Set-up JAVA_HOME -REM ---------------- -REM Example: set JAVA_HOME=\development\jdk - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=.\lib\ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set CP=%JAVA_HOME%\lib\tools.jar;%CP% - -REM Call Ant to do the building -REM --------------------------- -set JAVA=%JAVA_HOME%\bin\java -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main -buildfile build.xml gather -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end +@echo off +REM $Id$ + +REM See comments in build.sh. +REM ALSO: I do not understand Windows and do not develop on this platform. +REM Therefore, any improvements of this script are welcome. +REM Please do not hesitate and contact Martin Senger . + +REM Set-up JAVA_HOME +REM ---------------- +REM Example: set JAVA_HOME=\development\jdk + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=.\lib\ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set CP=%JAVA_HOME%\lib\tools.jar;%CP% + +REM Call Ant to do the building +REM --------------------------- +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main -buildfile build.xml gather +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:23 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqTr005298@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema Modified Files: MElement.java Log Message: moby-live/Java/src/main/org/biomoby/shared/schema MElement.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.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/shared/schema/MElement.java 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.java 2005/11/20 12:30:52 1.2 @@ -1,173 +1,173 @@ -/* - * Created on Jun 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.biomoby.shared.schema; - -import java.util.Vector; - -/** - * @author Eddie - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class MElement { - // enumeration of types - /** - * A moby:String primitive type - */ - public static String STRING = "String"; - /** - * A moby:Integer primitive type - */ - public static String INTEGER = "Integer"; - /** - * A moby:Float primitive type - */ - public static String FLOAT = "Float"; - /** - * A moby:DateTime primitive type - */ - public static String DATA_TIME = "DataTime"; - - /** - * A moby data type that is not a primitive. - */ - public static String NON_PRIMITIVE = "NonPrimitiveType"; - - private String name = ""; - private String articleName = ""; - private Vector hasaMElements = new Vector(); - private Vector hasMElements = new Vector();; - private String description = ""; - private String type = ""; - - /** - * Default constructor. Name, etc need to be set. - */ - public MElement() { - } - - public MElement(String name) { - this.name = name; - } - - public MElement(String name, String articleName) { - this.name = name; - this.articleName = articleName; - } - - public String getArticleName() - { - return this.articleName; - } - public MElement(String name, String articleName, String description) { - this.name = name; - this.articleName = articleName; - this.description = description; - } - - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - /** - * @return Returns the type. - */ - public String getType() { - return type; - } - /** - * @param type The type to set. - */ - public void setType(String type) { - this.type = type; - } - /** - * @return Returns the hasaMElements. - */ - public Vector getHasaMElements() { - return hasaMElements; - } - /** - * @return Returns the hasMElements. - */ - public Vector getHasMElements() { - return hasMElements; - } - - public boolean addHasMElement(MElement element) { - return hasMElements.add(element); - } - - public boolean addHasaMElement(MElement element) { - return hasaMElements.add(element); - } - - public static boolean isPrimitive(String object) { - if (object.equals(MElement.STRING)) - return true; - if (object.equals(MElement.INTEGER)) - return true; - if (object.equals(MElement.FLOAT)) - return true; - if (object.equals(MElement.DATA_TIME)) - return true; - return false; - } - - /**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to - /*store MElement and articleNames;*/ - public int hashCode() - { - return this.name.hashCode(); - } - - - - public boolean equals(Object obj) - { - if(obj==null) - { - return false; - } - - if(obj instanceof MElement) - { - MElement mk=(MElement)obj; - - return (this.name).equalsIgnoreCase(mk.name); - } - return false; - } - - - public String toString() { - return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n"; -} -} - +/* + * Created on Jun 17, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.biomoby.shared.schema; + +import java.util.Vector; + +/** + * @author Eddie + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class MElement { + // enumeration of types + /** + * A moby:String primitive type + */ + public static String STRING = "String"; + /** + * A moby:Integer primitive type + */ + public static String INTEGER = "Integer"; + /** + * A moby:Float primitive type + */ + public static String FLOAT = "Float"; + /** + * A moby:DateTime primitive type + */ + public static String DATA_TIME = "DataTime"; + + /** + * A moby data type that is not a primitive. + */ + public static String NON_PRIMITIVE = "NonPrimitiveType"; + + private String name = ""; + private String articleName = ""; + private Vector hasaMElements = new Vector(); + private Vector hasMElements = new Vector();; + private String description = ""; + private String type = ""; + + /** + * Default constructor. Name, etc need to be set. + */ + public MElement() { + } + + public MElement(String name) { + this.name = name; + } + + public MElement(String name, String articleName) { + this.name = name; + this.articleName = articleName; + } + + public String getArticleName() + { + return this.articleName; + } + public MElement(String name, String articleName, String description) { + this.name = name; + this.articleName = articleName; + this.description = description; + } + + + /** + * @return Returns the description. + */ + public String getDescription() { + return description; + } + /** + * @param description The description to set. + */ + public void setDescription(String description) { + this.description = description; + } + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + /** + * @param name The name to set. + */ + public void setName(String name) { + this.name = name; + } + /** + * @return Returns the type. + */ + public String getType() { + return type; + } + /** + * @param type The type to set. + */ + public void setType(String type) { + this.type = type; + } + /** + * @return Returns the hasaMElements. + */ + public Vector getHasaMElements() { + return hasaMElements; + } + /** + * @return Returns the hasMElements. + */ + public Vector getHasMElements() { + return hasMElements; + } + + public boolean addHasMElement(MElement element) { + return hasMElements.add(element); + } + + public boolean addHasaMElement(MElement element) { + return hasaMElements.add(element); + } + + public static boolean isPrimitive(String object) { + if (object.equals(MElement.STRING)) + return true; + if (object.equals(MElement.INTEGER)) + return true; + if (object.equals(MElement.FLOAT)) + return true; + if (object.equals(MElement.DATA_TIME)) + return true; + return false; + } + + /**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to + /*store MElement and articleNames;*/ + public int hashCode() + { + return this.name.hashCode(); + } + + + + public boolean equals(Object obj) + { + if(obj==null) + { + return false; + } + + if(obj instanceof MElement) + { + MElement mk=(MElement)obj; + + return (this.name).equalsIgnoreCase(mk.name); + } + return false; + } + + + public String toString() { + return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n"; +} +} + From senger at pub.open-bio.org Sun Nov 20 07:30:53 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:27 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqlt005398@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/webapps In directory pub.open-bio.org:/tmp/cvs-serv4966/src/webapps Modified Files: deploy.bat Log Message: moby-live/Java/src/webapps deploy.bat,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/webapps/deploy.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/webapps/deploy.bat 2005/09/22 07:55:44 1.1 +++ /home/repository/moby/moby-live/Java/src/webapps/deploy.bat 2005/11/20 12:30:52 1.2 @@ -1,33 +1,33 @@ -@echo off -REM $Id$ - -REM Set-up JAVA_HOME -REM ---------------- - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" - -REM Call Ant -REM -------- -set "JAVA=%JAVA_HOME%\bin\java" -%JAVA% -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end - - +@echo off +REM $Id$ + +REM Set-up JAVA_HOME +REM ---------------- + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" + +REM Call Ant +REM -------- +set "JAVA=%JAVA_HOME%\bin\java" +%JAVA% -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end + + From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:29 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqsv005334@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema/example Modified Files: BasicGFFSequenceFeature.xml DNASequence.xml DnaSequenceHolderxsd.xml Object.xml String.xml Log Message: moby-live/Java/src/main/org/biomoby/shared/schema/example BasicGFFSequenceFeature.xml,1.1,1.2 DNASequence.xml,1.1,1.2 DnaSequenceHolderxsd.xml,1.1,1.2 Object.xml,1.1,1.2 String.xml,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/BasicGFFSequenceFeature.xml,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/shared/schema/example/BasicGFFSequenceFeature.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/BasicGFFSequenceFeature.xml 2005/11/20 12:30:52 1.2 @@ -1,27 +1,27 @@ - - - - - adf - aaaa - arrr - aaaaaa - wwww - gggg - 112 - 113 - - 3.14159E0 - - - aaa - aaasss - - - asss - aaat - - - - - + + + + + adf + aaaa + arrr + aaaaaa + wwww + gggg + 112 + 113 + + 3.14159E0 + + + aaa + aaasss + + + asss + aaat + + + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DNASequence.xml,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/shared/schema/example/DNASequence.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DNASequence.xml 2005/11/20 12:30:52 1.2 @@ -6,4 +6,4 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DnaSequenceHolderxsd.xml,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/shared/schema/example/DnaSequenceHolderxsd.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DnaSequenceHolderxsd.xml 2005/11/20 12:30:52 1.2 @@ -1,41 +1,41 @@ - - - - Generating a XML Schema for the Moby object DnaSequenceHolder. Fri Aug 12 10:25:26 PDT 2005. Eddie and Lixin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Generating a XML Schema for the Moby object DnaSequenceHolder. Fri Aug 12 10:25:26 PDT 2005. Eddie and Lixin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/Object.xml,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/shared/schema/example/Object.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/Object.xml 2005/11/20 12:30:52 1.2 @@ -1,3 +1,3 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/String.xml,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/shared/schema/example/String.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/String.xml 2005/11/20 12:30:52 1.2 @@ -1,3 +1,3 @@ this is string - + From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:31 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUq4V005376@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/support In directory pub.open-bio.org:/tmp/cvs-serv4966/src/support Modified Files: run-any-client.bat run-cache-client.bat run-cmdline-client.bat run-digest-client.bat run-graphs-client.bat run-testing-central.bat Log Message: moby-live/Java/src/support run-any-client.bat,1.1,1.2 run-cache-client.bat,1.1,1.2 run-cmdline-client.bat,1.1,1.2 run-digest-client.bat,1.1,1.2 run-graphs-client.bat,1.1,1.2 run-testing-central.bat,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-any-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-any-client.bat 2003/11/08 00:27:24 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-any-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ -@echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat 2004/12/05 22:28:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ -@echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat 2003/09/25 02:35:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ -@echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat 2004/12/05 22:28:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ -@echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat 2003/11/08 00:27:24 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ -@echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat 2003/09/25 02:35:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ -@echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:34 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUprg005190@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/registry/rdfagent/verifier Modified Files: InpOut.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier InpOut.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/InpOut.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/verifier/InpOut.java 2004/10/28 17:55:43 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/InpOut.java 2005/11/20 12:30:51 1.2 @@ -1,61 +1,61 @@ -package org.biomoby.registry.rdfagent.verifier; - -/** - * @author Nina Opushneva - * - * This class represents the model data for an input or output. - * It is a value-object and has fine-grained getter and setter - * methods. - */ - -public class InpOut { - - - String objectTypeURI; - String namespaceTypeUris; - String articleName; - int serviceInstanceId; - - public InpOut() { - } - - public InpOut( String objectTypeURI, String namespaceTypeUris, String articleName, int serviceInstanceId) { - - this.serviceInstanceId = serviceInstanceId; - this.objectTypeURI = objectTypeURI; - this.namespaceTypeUris = namespaceTypeUris; - this.articleName = articleName; - - } - - public String getObjectTypeURI() { - return objectTypeURI; - } - public void setObjectTypeURI(String objectTypeURI) { - this.objectTypeURI = objectTypeURI; - } - - public String getNamespaceTypeUris() { - return namespaceTypeUris; - } - - public void setNamespaceTypeUris(String namespaceTypeUris) { - this.namespaceTypeUris = namespaceTypeUris; - } - - public String getArticleName() { - return articleName; - } - - public void setArticleName(String articleName) { - this.articleName = articleName; - } - - public int getserviceInstanceId() { - return serviceInstanceId; - } - - public void setserviceInstanceId(int serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } -} +package org.biomoby.registry.rdfagent.verifier; + +/** + * @author Nina Opushneva + * + * This class represents the model data for an input or output. + * It is a value-object and has fine-grained getter and setter + * methods. + */ + +public class InpOut { + + + String objectTypeURI; + String namespaceTypeUris; + String articleName; + int serviceInstanceId; + + public InpOut() { + } + + public InpOut( String objectTypeURI, String namespaceTypeUris, String articleName, int serviceInstanceId) { + + this.serviceInstanceId = serviceInstanceId; + this.objectTypeURI = objectTypeURI; + this.namespaceTypeUris = namespaceTypeUris; + this.articleName = articleName; + + } + + public String getObjectTypeURI() { + return objectTypeURI; + } + public void setObjectTypeURI(String objectTypeURI) { + this.objectTypeURI = objectTypeURI; + } + + public String getNamespaceTypeUris() { + return namespaceTypeUris; + } + + public void setNamespaceTypeUris(String namespaceTypeUris) { + this.namespaceTypeUris = namespaceTypeUris; + } + + public String getArticleName() { + return articleName; + } + + public void setArticleName(String articleName) { + this.articleName = articleName; + } + + public int getserviceInstanceId() { + return serviceInstanceId; + } + + public void setserviceInstanceId(int serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } +} From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:36 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpC8005171@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/client Modified Files: BaseCmdLineClient.java CentralDigestCachedImpl.java CentralImpl.java GraphsServlet.java ServicesEdge.java Log Message: moby-live/Java/src/main/org/biomoby/client BaseCmdLineClient.java,1.4,1.5 CentralDigestCachedImpl.java,1.14,1.15 CentralImpl.java,1.35,1.36 GraphsServlet.java,1.14,1.15 ServicesEdge.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java 2005/10/12 11:36:59 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java 2005/11/20 12:30:51 1.5 @@ -297,12 +297,12 @@ } } - protected MobyObject createInstance (MobyObject obj) + protected MobyObject createInstance (MobyObject mobj) throws MobyException { try { - return (MobyObject)obj.getClass().newInstance(); + return (MobyObject)mobj.getClass().newInstance(); } catch (Exception e) { - throw new MobyException ("Cannot instantiate data type '" + obj.getClass().getName() + "'."); + throw new MobyException ("Cannot instantiate data type '" + mobj.getClass().getName() + "'."); } } @@ -351,14 +351,14 @@ /************************************************************************** * *************************************************************************/ - protected boolean createChildren (MobyObject obj) + protected boolean createChildren (MobyObject mobj) throws MobyException { boolean someChildrenCreated = false; try { HashMap methodsAndArticleNames = new HashMap(); HashMap methodsAndChildTypes = new HashMap(); HashMap methodNamesAndHowManyTimes = new HashMap(); - Class myClass = obj.getClass(); + Class myClass = mobj.getClass(); Field[] fields = myClass.getFields(); for (int i = 0; i < fields.length; i++) { String fieldName = fields[i].getName(); @@ -392,20 +392,20 @@ Class childType = (Class)entry.getValue(); int count = ( ((Integer)methodNamesAndHowManyTimes.get (method.getName())).intValue() ); while (count-- > 0) { - if (createOneChild (obj, method, childType, (String)methodsAndArticleNames.get (method))) + if (createOneChild (mobj, method, childType, (String)methodsAndArticleNames.get (method))) someChildrenCreated = true; } } } else { // this is a leaf that does not have any children... - if (obj.isPrimitiveType()) { + if (mobj.isPrimitiveType()) { // ...if it is a primitive type, we may ignore it if there is no more values - return setPrimitiveValue (obj, articleName); + return setPrimitiveValue (mobj, articleName); } else { // ...if it is an Object leaf, we always keep it // but id and namespaces are here like values for // primitives so filltem - setIdAndNamespace (obj); + setIdAndNamespace (mobj); return true; } } @@ -422,12 +422,12 @@ /************************************************************************** * *************************************************************************/ - boolean createOneChild (MobyObject parent, Method setMethod, Class childType, String articleName) + boolean createOneChild (MobyObject parent, Method setMethod, Class childType, String artName) throws MobyException { try { MobyObject child = createInstance (childType); if (child.isPrimitiveType()) { - if (setPrimitiveValue (child, articleName)) { + if (setPrimitiveValue (child, artName)) { setMethod.invoke (parent, new Object[] { child }); return true; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/12 16:43:47 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15 @@ -215,7 +215,7 @@ /** - * Create a cache directory from 'cacheDir' and 'registryId' if it + * Create a cache directory from 'cacheDirectory' and 'registryId' if it * does not exist yet. Make sure that it is writable. Return a * File representing created directory. * @@ -223,11 +223,11 @@ * cache is going to be created for. If null, an endpoint of a * default Moby registry is used. */ - protected File createCacheDir (String cacheDir, String registryId) + protected File createCacheDir (String cacheDirectory, String registryId) throws MobyException { if (registryId == null || registryId.equals ("")) registryId = CentralImpl.DEFAULT_ENDPOINT; - File cache = new File (cacheDir + fileSeparator + clean (registryId)); + File cache = new File (cacheDirectory + fileSeparator + clean (registryId)); try { if (! cache.exists()) if (! cache.mkdirs()) @@ -246,11 +246,13 @@ * Remove cache and all (but given in 'subCacheDirNames') its * subdirectories. */ - protected void removeCacheDir (String cacheDir, String registryId, String[] subCacheDirNames) + protected void removeCacheDir (String cacheDirectory, + String registryId, + String[] subCacheDirNames) throws MobyException { if (registryId == null || registryId.equals ("")) registryId = CentralImpl.DEFAULT_ENDPOINT; - File cache = new File (cacheDir + fileSeparator + clean (registryId)); + File cache = new File (cacheDirectory + fileSeparator + clean (registryId)); try { if (! cache.exists()) return; if (! cache.isDirectory()) @@ -263,7 +265,8 @@ for (int f = 0; f < files.length; f++) { if (files[f].isDirectory()) throw new MobyException ("Found a directory '" + files[f].getAbsolutePath() + "' where no directory should be"); - files[f].delete(); + if (! files[f].delete()) + log.error ("Can't delete file '" + files[f] + "'."); } cacheSubDir.delete(); } @@ -673,7 +676,8 @@ if (ignored (list[i])) continue; v.addElement (createDataTypeFromXML (load (list[i]), "-dummy-")); } catch (NoSuccessException e) { - System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); + log.error (MSG_CACHE_BAD_FILE (list[i], e)); + //System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); } } MobyDataType[] result = new MobyDataType [v.size()]; @@ -736,7 +740,7 @@ v.addElement (servs[j]); } } catch (MobyException e) { - System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); + log.error (MSG_CACHE_BAD_FILE (list[i], e)); } } MobyService[] result = new MobyService [v.size()]; @@ -799,6 +803,7 @@ try { types[i].setParentNames (createServiceTypeRelationshipsFromXML (load (file))); } catch (MobyException e) { + log.error (MSG_CACHE_BAD_FILE (file, e)); System.err.println (MSG_CACHE_BAD_FILE (file, e)); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/12 16:43:47 1.35 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/20 12:30:51 1.36 @@ -154,7 +154,7 @@ dbf.setNamespaceAware(true); docBuilder = dbf.newDocumentBuilder(); } catch (Exception e) { - throw new MobyException ("Could not configure an XML parser: " + e); + throw new MobyException ("Could not configure an XML parser: " + e, e); } cache = new Hashtable(); @@ -241,7 +241,7 @@ try { document=docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } Element root = document.getDocumentElement(); @@ -465,12 +465,13 @@ *************************************************************************/ public MobyService[] extractServices (String xml) throws MobyException { - +// if (xmk == null) +// throw new MobyException () Document document = null; try { document = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Service"); @@ -677,7 +678,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceName"); @@ -723,7 +724,7 @@ try { document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); } catch (Exception e) { - throw new MobyException (e.toString()); + throw new MobyException (e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceName"); @@ -774,7 +775,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceProvider"); @@ -832,7 +833,8 @@ Document document = null; try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e); + } NodeList list = document.getElementsByTagName ("serviceType"); if (list == null || list.getLength() == 0) @@ -888,7 +890,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getDocumentElement().getElementsByTagName ("Namespace"); @@ -960,7 +962,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Object"); @@ -1027,7 +1029,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream (xmlSource.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("retrieveObjectDefinition"); @@ -1135,7 +1137,7 @@ // parse returned XML Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} Element service = document.getDocumentElement(); Node wsdl = service.getFirstChild(); @@ -1555,7 +1557,7 @@ Vector v = new Vector(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { @@ -1611,7 +1613,7 @@ Map results = new HashMap(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); @@ -1668,7 +1670,7 @@ Vector v = new Vector(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); @@ -1732,7 +1734,7 @@ try { document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Resource"); @@ -1771,7 +1773,7 @@ try { return url.openStream(); } catch (java.io.IOException e2) { - throw new MobyException (e2.toString()); + throw new MobyException (e2.toString(), e2); } } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/06 16:47:10 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/20 12:30:51 1.15 @@ -1759,11 +1759,11 @@ * cached files starting from CACHE_DIR directory, otherwise we * store them inside this servlet context on the 'contextPath'. ********************************************************************/ - protected SimpleFileCache initCache (ServletContext context, + protected SimpleFileCache initCache (ServletContext sContext, String contextPath) { String cacheDir = (String)initParams.get (CACHE_DIR); if (UUtils.isEmpty (cacheDir)) { - return new ServletFileCache (context, contextPath); + return new ServletFileCache (sContext, contextPath); } else { String cacheURL = (String)initParams.get (CACHE_URL); return new FileCache (cacheDir, cacheURL); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java 2005/07/19 12:39:59 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java 2005/11/20 12:30:51 1.7 @@ -219,9 +219,9 @@ /************************************************************************* * Checks if the given connection type is known. *************************************************************************/ - private boolean checkConnectionType (int connectionType) { - return (connectionType >= MIN_CONNECTION_TYPE && - connectionType <= MAX_CONNECTION_TYPE); + private boolean checkConnectionType (int conType) { + return (conType >= MIN_CONNECTION_TYPE && + conType <= MAX_CONNECTION_TYPE); } } From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:39 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpPB005131@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv4966/src/config Modified Files: RDFagent_config.xml run-any-client.bat run-cache-client.bat run-cmdline-client.bat run-dashboard run-dashboard.bat run-digest-client.bat run-generator.bat run-graphs-client.bat run-moby-parser.bat run-service.bat run-testing-central.bat Log Message: moby-live/Java/src/config RDFagent_config.xml,1.1,1.2 run-any-client.bat,1.5,1.6 run-cache-client.bat,1.3,1.4 run-cmdline-client.bat,1.4,1.5 run-dashboard,1.2,1.3 run-dashboard.bat,1.3,1.4 run-digest-client.bat,1.3,1.4 run-generator.bat,1.3,1.4 run-graphs-client.bat,1.3,1.4 run-moby-parser.bat,1.3,1.4 run-service.bat,1.3,1.4 run-testing-central.bat,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml 2004/10/28 17:54:02 1.1 +++ /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml 2005/11/20 12:30:51 1.2 @@ -1,32 +1,33 @@ - + - - - mwilkinson@mrl.ubc.ca - RDFagent warning - - mail.cbr.nrc.ca - - - rdf_agent@cbr.nrc.ca - - - RDFagent warning - Connect was refused with HTTP code - - - - com.mysql.jdbc.Driver - jdbc:mysql://localhost/mobycentral - mobycentral - moby - moby - 3306 - - /RDFagent.log - /RDFagent_report - /RDFagent_delServices - /RDFagent_signURLlist - 3 - + + + mwilkinson@mrl.ubc.ca + RDFagent warning + + mail.cbr.nrc.ca + + + rdf_agent@cbr.nrc.ca + + + RDFagent warning + Connect was refused with HTTP code + + + + com.mysql.jdbc.Driver + jdbc:mysql://localhost/mobycentral + mobycentral + moby + moby + 3306 + + /RDFagent.log + /RDFagent_report + /RDFagent_delServices + /RDFagent_signURLlist + 3 + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/09/21 05:26:18 1.5 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/20 12:30:51 1.6 @@ -1,13 +1,14 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% - -java -classpath "%CP%" %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% + +java -classpath "%CP%" %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" CacheRegistryClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat 2005/09/21 05:26:18 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat 2005/11/20 12:30:51 1.5 @@ -7,4 +7,4 @@ set CP=build\classes;%CP% set CP=build\Clients;%CP% -java -classpath "%CP%" MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +java -classpath "%CP%" MobyCmdLineClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/09/21 06:13:28 1.2 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/20 12:30:51 1.3 @@ -14,5 +14,6 @@ CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/09/21 06:13:28 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/20 12:30:51 1.4 @@ -1,14 +1,15 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% -set CP=build\lib\dashboard-config.jar;%CP% - -java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% +set CP=build\lib\dashboard-config.jar;%CP% + +java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" MobyDigestClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-generator.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-generator.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-generator.bat 2005/11/20 12:30:51 1.4 @@ -1,12 +1,12 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% - -java -classpath "%CP%" MosesGenerators %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% + +java -classpath "%CP%" MosesGenerators %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" MobyGraphs %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat 2005/11/20 12:30:51 1.4 @@ -1,11 +1,11 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% - -java -classpath "%CP%" TestingMobyParser %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% + +java -classpath "%CP%" TestingMobyParser %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-service.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-service.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-service.bat 2005/11/20 12:30:51 1.4 @@ -1,13 +1,13 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% - -java -classpath "%CP%" org.biomoby.client.BaseCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% + +java -classpath "%CP%" org.biomoby.client.BaseCmdLineClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ -@echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 +@echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" TestingCentral %* From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:45 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUp0g005060@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv4966/src/Clients Modified Files: CacheRegistryClient.java TestAntWorker.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.7,1.8 TestAntWorker.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/10 08:54:31 1.7 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/20 12:30:51 1.8 @@ -16,8 +16,6 @@ import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; -import java.util.*; - /** * This is a command-line client creating (and removing) a cache of a * Moby registry. It allows to store locally (in a file system) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/16 08:39:48 1.1 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 12:30:51 1.2 @@ -12,16 +12,13 @@ import org.tulsoft.tools.gui.SwingUtils; -import org.apache.tools.ant.DefaultLogger; import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.ExitException; import org.apache.tools.ant.NoBannerLogger; import javax.swing.JFrame; import javax.swing.SwingUtilities; -import java.awt.Dimension; import java.util.Properties; import java.io.PrintStream; import java.io.OutputStream; From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:48 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqB9005279@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/service/dashboard Modified Files: CommonBoard.java CommonDataTable.java CommonTree.java Dashboard.java DataTypesBoard.java DataTypesTree.java DebuggingPanel.java GeneratorPanel.java NamespacesBoard.java NamespacesTree.java PrimaryDataTable.java PropertyChannel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonBoard.java,1.6,1.7 CommonDataTable.java,1.4,1.5 CommonTree.java,1.18,1.19 Dashboard.java,1.17,1.18 DataTypesBoard.java,1.10,1.11 DataTypesTree.java,1.12,1.13 DebuggingPanel.java,1.3,1.4 GeneratorPanel.java,1.4,1.5 NamespacesBoard.java,1.5,1.6 NamespacesTree.java,1.7,1.8 PrimaryDataTable.java,1.4,1.5 PropertyChannel.java,1.8,1.9 RegistryPanel.java,1.24,1.25 ServiceTypesBoard.java,1.6,1.7 ServiceTypesTree.java,1.9,1.10 ServicesBoard.java,1.6,1.7 ServicesTree.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java 2005/11/07 17:14:46 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java 2005/11/20 12:30:51 1.7 @@ -42,8 +42,8 @@ extends JPanel implements NotificationListener { - private static org.apache.commons.logging.Log log = - org.apache.commons.logging.LogFactory.getLog (CommonBoard.class); +// private static org.apache.commons.logging.Log log = +// org.apache.commons.logging.LogFactory.getLog (CommonBoard.class); protected RegistryModel model; protected PropertyChannel channel; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/10 14:32:42 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/20 12:30:51 1.5 @@ -227,7 +227,6 @@ public void setData (MobyData[] newData) { synchronized (this) { int rowCount = getRowCount(); - int colCount = getColumnCount(); for (int i = 0; i < rowCount; i++) removeRow (i); for (int i = 0; i < newData.length; i++) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/19 18:33:01 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/20 12:30:51 1.19 @@ -156,17 +156,17 @@ public Component getTreeCellRendererComponent (JTree tree, java.lang.Object value, - boolean selected, + boolean isSelected, boolean expanded, boolean leaf, int row, - boolean hasFocus) { + boolean hasAFocus) { // // I will reuse the default rendering done by my parent, // except the change of an icon (for naming contexts) // - Component c = super.getTreeCellRendererComponent (tree, value, selected, - expanded, leaf, row, hasFocus); + Component c = super.getTreeCellRendererComponent (tree, value, isSelected, + expanded, leaf, row, hasAFocus); // add a tool-tip for the root node if (row == 0) { setToolTipText ("Right-click will show other options"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/19 18:33:01 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/20 12:30:51 1.18 @@ -143,6 +143,7 @@ * creates the GUI - but does not show it yet. **************************************************************************/ public Dashboard() { + log.debug ("----------------------- new dashboard start ------------------------"); loadIcons(); loadPanels(); propertyChannel = new PropertyChannel(); @@ -251,13 +252,10 @@ getName()); addMenuBar (frame); - Dimension screenSize = frame.getToolkit().getScreenSize(); - double myWidth = Math.min (screenSize.getWidth(), 1100); - double myHeight = Math.min (screenSize.getHeight() - 25, 900); - Dimension mySize = new Dimension(); - mySize.setSize (myWidth, myHeight); - - SwingUtils.showMainFrame (frame, mySize); + Dimension screenSize = frame.getToolkit().getScreenSize(); + int width = screenSize.width * 4 / 5; + int height = screenSize.height * 5 / 6; + SwingUtils.showMainFrame (frame, width, height); } /************************************************************************** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/12 16:43:47 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/20 12:30:51 1.11 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.DATA_TYPES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_DATA_TYPES); insertProgressBar(); break; case Notifier.DATA_TYPES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.DATA_TYPES_END: case Notifier.DATA_TYPES_CANCELLED: case Notifier.DATA_TYPES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.DATA_TYPES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // some other instance of this class initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/12 16:43:47 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/20 12:30:51 1.13 @@ -49,11 +49,9 @@ RegistryModel registryModel; CommonConsole console; - MobyDataType[] dataTypes = null; boolean showBadGuys = false; boolean showMembers = false; JCheckBoxMenuItem deprecatedBox; - MobyException updateException = null; final static String DATA_TYPES_ACCESS_ERROR = "An error happened when accessing a list of available data types.\n\n" @@ -110,33 +108,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyDataType[] newDataTypes = (newData == null ? null : (MobyDataType[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyDataType[] dataTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newDataTypes); // get data types (unless you already have them) if (newDataTypes == null) { - log.debug ("Asking registry model to update"); dataTypes = registryModel.getDataTypes (source); } else { dataTypes = newDataTypes; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (dataTypes, MobyDataType.getAuthorityComparator()); - else - java.util.Arrays.sort (dataTypes); - } catch (MobyException e) { updateException = e; } @@ -165,7 +158,10 @@ worker.start(); } - void onUpdateDataTree (MobyDataType[] dataTypes) { + void onUpdateDataTree (MobyDataType[] theDataTypes) { + MobyDataType[] dataTypes = copy (theDataTypes); + java.util.Arrays.sort (dataTypes); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -199,8 +195,11 @@ } - void onUpdateDataTreeByAuth (MobyDataType[] dataTypes) { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + void onUpdateDataTreeByAuth (MobyDataType[] theDataTypes) { + MobyDataType[] dataTypes = copy (theDataTypes); + java.util.Arrays.sort (dataTypes, MobyDataType.getAuthorityComparator()); + + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist HashMap nodes = new HashMap (dataTypes.length); @@ -268,6 +267,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyDataType[] copy (MobyDataType[] s) { + synchronized (s) { + MobyDataType[] result = new MobyDataType [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/19 18:33:01 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/20 12:30:51 1.4 @@ -14,7 +14,6 @@ import javax.swing.JLabel; import javax.swing.JButton; import javax.swing.JTextField; -import javax.swing.Icon; import javax.swing.JComponent; import java.awt.GridBagLayout; @@ -42,8 +41,8 @@ /************************************************************************** * **************************************************************************/ - public JComponent getComponent (PropertyChannel propertyChannel) { - setPropertyChannel (propertyChannel); + public JComponent getComponent (PropertyChannel newPropertyChannel) { + setPropertyChannel (newPropertyChannel); JPanel p = new JPanel (new GridBagLayout(), true); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/19 18:33:01 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/20 12:30:51 1.5 @@ -9,11 +9,9 @@ package org.biomoby.service.dashboard; import org.tulsoft.tools.gui.SwingUtils; -import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.JFileChooserWithHistory; import org.biomoby.shared.MobyException; -import org.biomoby.shared.event.Notifier; import javax.swing.JPanel; import javax.swing.JLabel; @@ -23,7 +21,6 @@ import javax.swing.JRadioButton; import javax.swing.ButtonGroup; import javax.swing.JCheckBox; -import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.JSplitPane; import javax.swing.JComponent; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/12 16:43:47 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/20 12:30:51 1.6 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.NAMESPACES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_NAMESPACES); insertProgressBar(); break; case Notifier.NAMESPACES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.NAMESPACES_END: case Notifier.NAMESPACES_CANCELLED: case Notifier.NAMESPACES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.NAMESPACES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/12 16:43:47 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/20 12:30:51 1.8 @@ -36,9 +36,6 @@ RegistryModel registryModel; CommonConsole console; - MobyNamespace[] namespaces = null; - MobyException updateException = null; - final static String NAMESPACES_ACCESS_ERROR = "An error happened when accessing a list of available namespaces.\n\n" + ACCESS_ERROR_INTRO; @@ -69,33 +66,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyNamespace[] newNamespaces = (newData == null ? null : (MobyNamespace[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyNamespace[] namespaces = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newNamespaces); // get namespaces (unless you already have them) if (newNamespaces == null) { - log.debug ("Asking registry model to update"); namespaces = registryModel.getNamespaces (source); } else { namespaces = newNamespaces; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (namespaces, MobyNamespace.getAuthorityComparator()); - else - java.util.Arrays.sort (namespaces); - } catch (MobyException e) { updateException = e; } @@ -119,7 +111,10 @@ worker.start(); } - void onUpdateNamespacesTree (MobyNamespace[] namespaces) { + void onUpdateNamespacesTree (MobyNamespace[] theNamespaces) { + MobyNamespace[] namespaces = copy (theNamespaces); + java.util.Arrays.sort (namespaces); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -131,7 +126,10 @@ } - void onUpdateNamespacesTreeByAuth (MobyNamespace[] namespaces) { + void onUpdateNamespacesTreeByAuth (MobyNamespace[] theNamespaces) { + MobyNamespace[] namespaces = copy (theNamespaces); + java.util.Arrays.sort (namespaces, MobyNamespace.getAuthorityComparator()); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -158,6 +156,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyNamespace[] copy (MobyNamespace[] s) { + synchronized (s) { + MobyNamespace[] result = new MobyNamespace [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/11 08:34:39 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/20 12:30:51 1.5 @@ -165,15 +165,15 @@ return null; } - public Component getTableCellEditorComponent (JTable table, + public Component getTableCellEditorComponent (JTable aTable, Object value, boolean isSelected, - int row, int col) { + int aRow, int aCol) { // remember (used when a namespace is being deleted) - this.table = table; - this.row = row; - this.col = col; + this.table = aTable; + this.row = aRow; + this.col = aCol; // fill combo box with the current namespaces if (value == null) { @@ -288,9 +288,9 @@ return ""; } - private String getDataTypeName (MobyPrimaryData data) { - if (data == null) return ""; - MobyDataType dataType = data.getDataType(); + private String getDataTypeName (MobyPrimaryData theData) { + if (theData == null) return ""; + MobyDataType dataType = theData.getDataType(); if (dataType == null) return ""; String name = dataType.getName(); return (name == null ? "" : name); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/16 08:39:48 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/20 12:30:51 1.9 @@ -185,6 +185,8 @@ ********************************************************************/ protected void logDebug (Object source, String key, Object value) { + if (DashboardProperties.DP_STATUS_MSG.equals (key)) + return; StringBuffer buf = new StringBuffer (100); if (source != null) { buf.append ("["); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/19 18:33:01 1.24 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/20 12:30:51 1.25 @@ -13,7 +13,6 @@ import org.tulsoft.tools.gui.JFileChooserWithHistory; import org.biomoby.shared.MobyException; -import org.biomoby.shared.event.Notifier; import javax.swing.JPanel; import javax.swing.JLabel; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/20 12:30:51 1.7 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.SERVICE_TYPES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_SERVICE_TYPES); insertProgressBar(); break; case Notifier.SERVICE_TYPES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.SERVICE_TYPES_END: case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/12 16:43:47 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/20 12:30:51 1.10 @@ -36,9 +36,6 @@ RegistryModel registryModel; CommonConsole console; - MobyServiceType[] serviceTypes = null; - MobyException updateException = null; - final static String SERVICE_TYPES_ACCESS_ERROR = "An error happened when accessing a list of available service types.\n\n" + ACCESS_ERROR_INTRO; @@ -69,33 +66,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyServiceType[] newServiceTypes = (newData == null ? null : (MobyServiceType[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyServiceType[] serviceTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newServiceTypes); // get service types (unless you already have them) if (newServiceTypes == null) { - log.debug ("Asking registry model to update"); serviceTypes = registryModel.getServiceTypes (source); } else { serviceTypes = newServiceTypes; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (serviceTypes, MobyServiceType.getAuthorityComparator()); - else - java.util.Arrays.sort (serviceTypes); - } catch (MobyException e) { updateException = e; } @@ -119,7 +111,10 @@ worker.start(); } - void onUpdateServiceTypesTree (MobyServiceType[] serviceTypes) { + void onUpdateServiceTypesTree (MobyServiceType[] theServiceTypes) { + MobyServiceType[] serviceTypes = copy (theServiceTypes); + java.util.Arrays.sort (serviceTypes); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -148,7 +143,10 @@ } - void onUpdateServiceTypesTreeByAuth (MobyServiceType[] serviceTypes) { + void onUpdateServiceTypesTreeByAuth (MobyServiceType[] theServiceTypes) { + MobyServiceType[] serviceTypes = copy (theServiceTypes); + java.util.Arrays.sort (serviceTypes, MobyServiceType.getAuthorityComparator()); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -175,6 +173,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyServiceType[] copy (MobyServiceType[] s) { + synchronized (s) { + MobyServiceType[] result = new MobyServiceType [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry (or from the current * cache). If you want to update also cache, use the cache buttons * - they will invoke this method also after updating the cache. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/20 12:30:51 1.7 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.AUTHORITIES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_SERVICES); insertProgressBar(); break; case Notifier.AUTHORITIES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.AUTHORITIES_END: case Notifier.AUTHORITIES_CANCELLED: case Notifier.AUTHORITIES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.AUTHORITIES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/20 12:30:51 1.7 @@ -51,11 +51,6 @@ RegistryModel registryModel; CommonConsole console; - MobyService[] services = null; - MobyServiceType[] serviceTypes = null; - MobyDataType[] dataTypes = null; - MobyException updateException = null; - final static String SERVICES_ACCESS_ERROR = "An error happened when accessing a list of available services.\n\n" + ACCESS_ERROR_INTRO; @@ -104,33 +99,30 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyService[] newServices = (newData == null ? null : (MobyService[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyService[] services = null; + MobyServiceType[] serviceTypes = null; + MobyDataType[] dataTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newServices); // get services (unless you already have them) if (newServices == null) { - log.debug ("Asking registry model to update"); services = registryModel.getServices (source); } else { services = newServices; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (services, MobyService.getAuthorityComparator()); - else - java.util.Arrays.sort (services); - // ...and perhaps add some other types if (sorted == SORTED_BY_SERVICE_TYPE) serviceTypes = registryModel.getServiceTypes (source); @@ -169,7 +161,10 @@ worker.start(); } - void onUpdateServicesTree (MobyService[] services) { + void onUpdateServicesTree (MobyService[] theServices) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -194,8 +189,11 @@ } - void onUpdateServicesTreeByAuth (MobyService[] services) { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + void onUpdateServicesTreeByAuth (MobyService[] theServices) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services, MobyService.getAuthorityComparator()); + + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist HashMap nodes = new HashMap (services.length); @@ -220,8 +218,11 @@ tModel.reload(); } - void onUpdateServicesTreeByType (MobyService[] services, + void onUpdateServicesTreeByType (MobyService[] theServices, MobyServiceType[] serviceTypes) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -283,9 +284,12 @@ tModel.reload(); } - void onUpdateServicesTreeByData (MobyService[] services, + void onUpdateServicesTreeByData (MobyService[] theServices, MobyDataType[] dataTypes, int whatData) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -361,6 +365,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyService[] copy (MobyService[] s) { + synchronized (s) { + MobyService[] result = new MobyService [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ From senger at pub.open-bio.org Sun Nov 20 07:30:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 07:31:51 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUoil005016@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv4966/docs Modified Files: EclipseAndJMoby.html WindowsAndJMoby.html Log Message: moby-live/Java/docs EclipseAndJMoby.html,1.6,1.7 WindowsAndJMoby.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2005/09/21 07:56:55 1.6 +++ /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2005/11/20 12:30:50 1.7 @@ -29,7 +29,7 @@ Because it was painful (I have yet to find a good reference guide for Eclipse) I would like to share my experiences here. Please feel free to add there yours, or correct my observations. Also, there are "more -ways to do" things in Eclipse (but not as many as in Perl ) so the steps described below may not represent the only way, and I do not claim that are the most efficient - but TGT (The Good Thing) is that they work.

    @@ -144,9 +144,7 @@

    Create a new project

    File -> New -> Project. Select Java -> Java Project. I could not find what is the -difference between selecting Java Project and Java -> -Java project. I always used the latter one.

    +class="step">Java -> Java Project.

    Type a project name (I use jMoby), check Create project from existing source, and type the @@ -188,17 +186,11 @@ We are doing this step now, before telling Eclipse where the libraries are (because we first need to have them in order to show them to -Eclipse, don't we?). But Eclipse already found some 3rd-party -libraries in jMoby and listed them in our project. These are, however, -from the included Ant, and we do not need them on the CLASSPATH when -we execute our programs. So remove them (before they mixed together -with the real 3rd-party libraries that we are going to add in a -minute): Right-click on the project name: (jMoby) --> Properties -> Java Build Path. Select tab Libraries, and remove from there everything except -JRE System Library.

    +Eclipse, don't we?). Eclipse already found some 3rd-party libraries in +jMoby and listed them in our project. These are from the included Ant +(they were not needed for jMoby programs until recently).

    -Then, it's time for our real libraries. Open an Ant view by Window -> Show View -> Ant. Then right-click and select Add Buildfiles. Select build.xml from jMoby. You can Hide @@ -377,7 +369,7 @@

    Martin Senger
    -Last modified: Wed Sep 21 15:07:18 2005 +Last modified: Sun Nov 20 19:53:57 2005
    =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html 2005/09/21 07:56:55 1.1 +++ /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html 2005/11/20 12:30:50 1.2 @@ -139,6 +139,26 @@

    Too many command-line parameters

    +Update (November 2005): +
    + +I found that Windows actually understand a similar construct as UNIX +does: %* which is substituted with all arguments from the +command line: + +
    +@echo off
    +java Program %*
    +
    + +Therefore, this section would not be needed. But, as stated below, to +have a way how to use often used subset of command-line arguments from +a file is useful on its own, so I keep this section here.

    + +

    +End of Update

    + + I still know only how to pass maximum nine parameters to a Windows batch script (does anybody knows how to pass more?): @@ -240,7 +260,7 @@

    Martin Senger
    -Last modified: Wed Sep 21 16:47:24 2005 +Last modified: Sun Nov 20 20:05:06 2005
    From mwilkinson at pub.open-bio.org Sun Nov 20 10:45:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun Nov 20 10:41:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201545.jAKFjaCs005829@pub.open-bio.org> mwilkinson Sun Nov 20 10:45:35 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby In directory pub.open-bio.org:/tmp/cvs-serv5810/MOBY/Adaptor/moby Modified Files: queryapi.pm Log Message: added lsid retrieval to adaptor for getServiceNames call moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/08/31 22:28:22 1.30 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/11/20 15:45:35 1.31 @@ -50,12 +50,12 @@ =head2 new Title : new - Usage : my $MOBY = MOBY::Client::Central->new(Registries => \%regrefs) + Usage : my $MOBY = MOBY::Client::Central->new(%args) Function : connect to one or more MOBY-Central registries for searching Returns : MOBY::Client::Central object - Args : Registries - optional. - Notes : Each registry must have a different + Args : + Notes : =cut @@ -223,7 +223,7 @@ Title : driver Usage : my $un = $API->driver($arg) - Function : get/set string name of driver module (e.g. DBD::mySQL) + Function : get/set string name of DSI driver module (e.g. DBI:mySQL) Returns : String (driver) Args : String (driver) - optional. @@ -340,7 +340,6 @@ =cut - sub delete_collection_input{ die "delete_collection_input not implemented in adaptor\n"; } @@ -412,6 +411,7 @@ # # simple_output table functions # + =head2 query_simple_input Title : query_simple_input @@ -467,7 +467,6 @@ =cut - sub delete_simple_input{ die "delete_simple_input not implemented in adaptor\n"; } From mwilkinson at pub.open-bio.org Sun Nov 20 10:45:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun Nov 20 10:41:49 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201545.jAKFjaq1005848@pub.open-bio.org> mwilkinson Sun Nov 20 10:45:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi In directory pub.open-bio.org:/tmp/cvs-serv5810/MOBY/Adaptor/moby/queryapi Modified Files: mysql.pm Log Message: added lsid retrieval to adaptor for getServiceNames call moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.74,1.75 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/09/22 16:23:13 1.74 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/11/20 15:45:35 1.75 @@ -1260,7 +1260,7 @@ sub get_service_names{ my ($self, %args) = @_; my $dbh = $self->dbh; - my $statement = "select authority_uri, servicename from authority as a, service_instance as s where s.authority_id = a.authority_id"; + my $statement = "select authority_uri, servicename, lsid from authority as a, service_instance as s where s.authority_id = a.authority_id"; my @bindvalues = (); my $result = do_query($dbh, $statement, @bindvalues); From mwilkinson at pub.open-bio.org Sun Nov 20 11:05:05 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun Nov 20 11:00:56 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201605.jAKG55Ee005989@pub.open-bio.org> mwilkinson Sun Nov 20 11:05:05 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv5966/t Modified Files: Client-Central.t Client-Service.t Log Message: added lsid retrieval test for getServiceNames to teh test harness, also trying to figure out why client::service is failing tests moby-live/Perl/t Client-Central.t,1.42,1.43 Client-Service.t,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/09/16 16:36:39 1.42 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/20 16:05:05 1.43 @@ -475,6 +475,13 @@ ok(grep(/mysecondservice/, @serviceNames), "'mysecondservice' not found") or diag("retrieveServiceNames didn't return mysecondservice"); +$r = $C->retrieveServiceNames(as_lsid=>1); +isa_ok($r, "HASH", "Service Names Hash") or diag("retrieveServiceNames as lsid didn't return a hashref") ; +isa_ok($r->{$RegSmpl{authURI}}, 'ARRAY') or diag("retrieveServiceNames as lsid didn't return a hasref of arrayrefs"); +my @serviceNamesLSID = @{$r->{$RegSmpl{authURI}}}; +ok(grep(/urn\:lsid/, @serviceNamesLSID), "'myfirstservice' lsid not found") + or diag("retrieveServiceNames as LSID didn't return LSIDs"); + $r = $C->deregisterService( serviceName => $RegSmpl{serviceName}, authURI => $RegSmpl{authURI} ); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/09/16 16:38:47 1.5 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:05:05 1.6 @@ -37,7 +37,9 @@ my ($s, $r) = $C->findService( authURI => 'www.illuminae.com', name => 'getDragonLocusAlleles' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); +ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); my $wsdl = $C->retrieveService($$s[0]); +ok($wsdl =~ /WSDL/) or diag("retrieveService didn't return a WSDL file"); $service = MOBY::Client::Service->new (service => $wsdl); isa_ok($service, "MOBY::Client::Service") or diag("Expected new to return MOBY::Client::Service"); From mwilkinson at pub.open-bio.org Sun Nov 20 11:13:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun Nov 20 11:09:13 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201613.jAKGDNOt006068@pub.open-bio.org> mwilkinson Sun Nov 20 11:13:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv6049/MOBY/Client Modified Files: Central.pm Log Message: figured out why perl client code wasn't returning LSIDs moby-live/Perl/MOBY/Client Central.pm,1.126,1.127 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v retrieving revision 1.126 retrieving revision 1.127 diff -u -r1.126 -r1.127 --- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/09/27 16:21:04 1.126 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/20 16:13:23 1.127 @@ -1302,7 +1302,7 @@ =cut sub retrieveServiceNames { - my ($self, %args) = shift; + my ($self, %args) = @_; my $reg = $args{registry}; my $aslsid = $args{as_lsid}; From mwilkinson at pub.open-bio.org Sun Nov 20 11:15:30 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun Nov 20 11:11:19 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201615.jAKGFUuH006134@pub.open-bio.org> mwilkinson Sun Nov 20 11:15:30 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv6115/t Modified Files: Client-Service.t Log Message: fixed test for client::service moby-live/Perl/t Client-Service.t,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:05:05 1.6 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:15:30 1.7 @@ -34,7 +34,7 @@ # Find a service at MOBY Central, try to create a local instance. my $C = MOBY::Client::Central->new(); -my ($s, $r) = $C->findService( authURI => 'www.illuminae.com', +my ($s, $r) = $C->findService( authURI => 'bioinfo.icapture.ubc.ca', name => 'getDragonLocusAlleles' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); From senger at pub.open-bio.org Sun Nov 20 12:38:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 12:34:34 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201738.jAKHcdpb006330@pub.open-bio.org> senger Sun Nov 20 12:38:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv6311/src/Clients Modified Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 12:30:51 1.2 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 17:38:39 1.3 @@ -1,4 +1,4 @@ -// TestArnWorker.java +// TestAntWorker.java // // Created: November 2005 // From senger at pub.open-bio.org Sun Nov 20 12:38:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 12:34:35 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201738.jAKHce4b006349@pub.open-bio.org> senger Sun Nov 20 12:38:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv6311/src/config Modified Files: log4j.properties Log Message: moby-live/Java/src/config log4j.properties,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/log4j.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/10/28 07:58:53 1.1 +++ /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/20 17:38:39 1.2 @@ -19,15 +19,20 @@ # $Id$ # ------------------------------------------------------------ -# Set root logger level to INFO and its only appender to A1. +# create A1 logger and set its severity level: +# -------------------------------------------- +##log4j.rootLogger=DEBUG, A1 log4j.rootLogger=INFO, A1 -# A1 is set to be a ConsoleAppender. +# set properties for A1 logger: +# ----------------------------- log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. +#log4j.appender.A1=org.apache.log4j.FileAppender +log4j.appender.A1.file=./jMoby-debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{1} %x - %m%n +# the rest: +# --------- # Ignore less significant messages from the third-party packages log4j.logger.org.apache.axis=WARN From senger at pub.open-bio.org Sun Nov 20 12:43:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun Nov 20 12:38:51 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201743.jAKHh2x5006534@pub.open-bio.org> senger Sun Nov 20 12:43:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/doc-files In directory pub.open-bio.org:/tmp/cvs-serv6519/src/main/org/biomoby/service/dashboard/doc-files Added Files: moby-dashboard-1.jpg moby-dashboard-2.jpg Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/doc-files moby-dashboard-1.jpg,NONE,1.1 moby-dashboard-2.jpg,NONE,1.1 From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 21 12:13:28 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRDo009791@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv9749/docs Modified Files: ChangeLog Moses-deploy.html Log Message: moby-live/Java/docs ChangeLog,1.51,1.52 Moses-deploy.html,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/12 16:43:47 1.51 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/21 17:17:27 1.52 @@ -1,3 +1,8 @@ +2005-11-22 Martin Senger + + * Fixed getting XML parsers in CentralImpl.java in order to be + thread-safe. + 2005-11-12 Martin Senger * Changed MobyException to use initCause() and log.debug to better =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/Moses-deploy.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2005/09/22 16:07:08 1.2 +++ /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2005/11/21 17:17:27 1.3 @@ -306,7 +306,7 @@
    -./build-dev.sh deploy-services
    +./build-dev.sh undeploy-services
     
    @@ -419,7 +419,7 @@
    Martin Senger
    -Last modified: Thu Sep 22 18:24:09 2005 +Last modified: Mon Nov 21 23:55:46 2005
    From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 21 12:13:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRlP009768@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv9749 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.42,1.43 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/19 18:33:00 1.42 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/21 17:17:27 1.43 @@ -102,6 +102,9 @@ + + + + + From senger at pub.open-bio.org Mon Nov 21 12:17:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 21 12:13:38 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHSfQ009868@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv9749/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.36,1.37 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/20 12:30:51 1.36 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/21 17:17:27 1.37 @@ -24,6 +24,8 @@ import org.tulsoft.tools.soap.axis.AxisUtils; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -94,7 +96,6 @@ private URL endpoint; private String uri; - private javax.xml.parsers.DocumentBuilder docBuilder; protected boolean debug = false; /** Default location (endpoint) of a Moby registry. */ @@ -103,6 +104,20 @@ /** Default namespace used by the contacted Moby registry. */ public static final String DEFAULT_NAMESPACE = "http://mobycentral.icapture.ubc.ca/MOBY/Central"; + /** + * Thread local that gives each thread its own + * DocumentBuilderFactory (since it is not thread-safe). Code taken + * from Apache's JaxpUtils. + */ + public static ThreadLocal DOCUMENT_BUILDER_FACTORIES = new ThreadLocal() { + protected synchronized Object initialValue() { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware (true); + return dbf; + } + }; + + /************************************************************************* * Default constructor. It connects to a default Moby registry * (as defined in {@link #DEFAULT_ENDPOINT}) using a default namespace @@ -147,21 +162,27 @@ } this.uri = namespace; - // This method should work on almost all platforms to get an XML parser instance - try { - javax.xml.parsers.DocumentBuilderFactory dbf = - javax.xml.parsers.DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - docBuilder = dbf.newDocumentBuilder(); - } catch (Exception e) { - throw new MobyException ("Could not configure an XML parser: " + e, e); - } - cache = new Hashtable(); useCache = true; } /************************************************************************* + * Loads a DOM Document from an InputStream. Uses thread-safe + * mechanism. + *************************************************************************/ + public static Document loadDocument (InputStream input) + throws MobyException { + try { + DocumentBuilderFactory dbf + = (DocumentBuilderFactory)DOCUMENT_BUILDER_FACTORIES.get(); + DocumentBuilder db = dbf.newDocumentBuilder(); + return (db.parse (input)); + } catch (Exception e) { + throw new MobyException ("Problem with reading XML input: " + e.toString(), e); + } + } + + /************************************************************************* * Call 'method' with 'parameters' and return its result. *************************************************************************/ protected Object doCall (String method, Object[] parameters) @@ -237,12 +258,7 @@ String id = "", success = "0", message = "", rdf = ""; // parse returned XML - Document document = null; - try { - document=docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } + Document document = loadDocument (new ByteArrayInputStream (xml.getBytes())); Element root = document.getDocumentElement(); NodeList children = root.getChildNodes(); @@ -465,15 +481,8 @@ *************************************************************************/ public MobyService[] extractServices (String xml) throws MobyException { -// if (xmk == null) -// throw new MobyException () - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } + Document document = loadDocument (new ByteArrayInputStream (xml.getBytes())); NodeList list = document.getElementsByTagName ("Service"); MobyService[] results = new MobyService [list.getLength()]; for (int i = 0; i < list.getLength(); i++) { @@ -671,16 +680,9 @@ String result = (String)doCall ("retrieveServiceNames", new Object[] {}); - // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceName"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -720,13 +722,7 @@ // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); - } catch (Exception e) { - throw new MobyException (e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceName"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -771,13 +767,7 @@ new Object[] {}); // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceProvider"); String[] results = new String [list.getLength()]; for (int i = 0; i < list.getLength(); i++) @@ -830,12 +820,7 @@ throws MobyException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceType"); if (list == null || list.getLength() == 0) return new MobyServiceType[] {}; @@ -886,13 +871,7 @@ throws MobyException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getDocumentElement().getElementsByTagName ("Namespace"); if (list == null || list.getLength() == 0) { return new MobyNamespace[] {}; @@ -958,13 +937,7 @@ // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Object"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -1025,13 +998,7 @@ throws MobyException, NoSuccessException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream (xmlSource.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (xmlSource.getBytes())); NodeList list = document.getElementsByTagName ("retrieveObjectDefinition"); if (list == null || list.getLength() == 0) throw new NoSuccessException ("Data Type name was not found.", @@ -1135,10 +1102,7 @@ }); // parse returned XML - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); Element service = document.getDocumentElement(); Node wsdl = service.getFirstChild(); if (wsdl == null) @@ -1555,10 +1519,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -1611,10 +1572,7 @@ // parse returned XML Map results = new HashMap(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { @@ -1668,10 +1626,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); // it should always be just one element in this list @@ -1730,13 +1685,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try { - document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Resource"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 21 12:13:40 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRKX009811@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv9749/src/Clients Modified Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 17:38:39 1.3 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/21 17:17:27 1.4 @@ -12,6 +12,7 @@ import org.tulsoft.tools.gui.SwingUtils; +import org.apache.tools.ant.Project; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.ExitException; import org.apache.tools.ant.NoBannerLogger; @@ -41,11 +42,11 @@ Properties props = new Properties(); SimpleAnt ant = new SimpleAnt(); -// DefaultLogger logger = new DefaultLogger(); NoBannerLogger logger = new NoBannerLogger(); logger.setOutputPrintStream (new PrintStream (new ConsoleStream (false))); logger.setErrorPrintStream (new PrintStream (new ConsoleStream (false))); ant.addBuildListener (logger); +// ant.setMsgOutputLevel (Project.MSG_VERBOSE); ant.startAnt (args, props); } From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 21 12:13:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRGN009848@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv9749/src/config Modified Files: log4j.properties run-any-client run-any-client.bat run-dashboard run-dashboard.bat Log Message: moby-live/Java/src/config log4j.properties,1.2,1.3 run-any-client,1.5,1.6 run-any-client.bat,1.6,1.7 run-dashboard,1.3,1.4 run-dashboard.bat,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/log4j.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/20 17:38:39 1.2 +++ /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/21 17:17:27 1.3 @@ -28,7 +28,7 @@ # ----------------------------- log4j.appender.A1=org.apache.log4j.ConsoleAppender #log4j.appender.A1=org.apache.log4j.FileAppender -log4j.appender.A1.file=./jMoby-debug.log +#log4j.appender.A1.file=./jMoby-debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{1} %x - %m%n =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/15 03:25:51 1.5 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/21 17:17:27 1.6 @@ -14,6 +14,7 @@ CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/20 12:30:51 1.6 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/21 17:17:27 1.7 @@ -5,6 +5,7 @@ set CP= for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" set CP=build\classes;%CP% set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/20 12:30:51 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/21 17:17:27 1.4 @@ -5,6 +5,19 @@ # $Id$ # ---------------------------------------------------- +# --- setup JAVA_HOME +if [ -z "$JAVA_HOME" ] ; then + JAVA=`which java` + if [ -z "$JAVA" ] ; then + echo "Cannot find JAVA. Please set your PATH." + exit 1 + else + JAVA_BIN=`dirname $JAVA` + JAVA_HOME=$JAVA_BIN/.. + export JAVA_HOME + fi +fi + PROJECT_HOME=@PROJECT_HOME@ CLASSPATH=${PROJECT_HOME}/build/classes @@ -15,5 +28,7 @@ CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH -exec java -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" +JAVA=$JAVA_HOME/bin/java +exec $JAVA -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/20 12:30:51 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/21 17:17:27 1.5 @@ -1,10 +1,20 @@ @echo off +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + set "PROJECT_HOME=@PROJECT_HOME@" cd "%PROJECT_HOME%" set CP= for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" set CP=build\classes;%CP% set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% @@ -12,4 +22,7 @@ set CP=build\others\samples;%CP% set CP=build\lib\dashboard-config.jar;%CP% -java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* + +:end From senger at pub.open-bio.org Mon Nov 21 12:46:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon Nov 21 12:41:51 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211746.jALHk4YK010085@pub.open-bio.org> senger Mon Nov 21 12:46:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv10066/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.15,1.16 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/21 17:46:04 1.16 @@ -607,7 +607,7 @@ } /************************************************************************** - * Update namespaces from a moby registry - this easier than with + * Update namespaces from a moby registry - this is easier than with * other entities: just get a new LIST_FILE. *************************************************************************/ protected boolean fillNamespacesCache() @@ -933,6 +933,7 @@ Properties result = new Properties(); result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint()); result.put (CACHE_PROP_COUNT, new Integer (0)); + result.put (CACHE_PROP_SIZE, new Long (0)); if (cacheDir == null) return result; String realName = null; try { @@ -969,8 +970,10 @@ ageOfOldest = Math.min (ageOfOldest, age); } } - result.put (CACHE_PROP_COUNT, new Integer (realCount)); - result.put (CACHE_PROP_SIZE, new Long (realSize)); + if (! CACHE_PART_NAMESPACES.equals (id)) { + result.put (CACHE_PROP_COUNT, new Integer (realCount)); + result.put (CACHE_PROP_SIZE, new Long (realSize)); + } if (ageOfYoungest > 0) result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest)); if (ageOfOldest < Long.MAX_VALUE) @@ -987,7 +990,8 @@ StringBuffer buf = new StringBuffer(); buf.append (props.getProperty (CACHE_PROP_NAME) + "\n"); add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL)); - add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); + if ( ((Integer)props.get (CACHE_PROP_COUNT)).intValue() > 0 ) + add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); Object value = props.get (CACHE_PROP_OLDEST); if (value != null) { long age = ((Long)value).longValue(); @@ -1000,7 +1004,8 @@ add (buf, "Youngest entry created", new Date (age)); add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age)); } - add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); + if ( ((Long)props.get (CACHE_PROP_SIZE)).longValue() > 0 ) + add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); add (buf, "Location", props.get (CACHE_PROP_LOCATION)); return new String (buf); } From senger at pub.open-bio.org Tue Nov 22 13:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue Nov 22 12:59:16 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SQS013418@pub.open-bio.org> senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv13384/src/Clients Added Files: TestLog.java Log Message: moby-live/Java/src/Clients TestLog.java,NONE,1.1 From senger at pub.open-bio.org Tue Nov 22 13:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue Nov 22 12:59:27 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SGE013403@pub.open-bio.org> senger Tue Nov 22 13:03:27 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv13384 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.43,1.44 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/21 17:17:27 1.43 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/22 18:03:27 1.44 @@ -1530,7 +1530,7 @@ - + senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv13384/src/config Modified Files: run-any-client run-any-client.bat run-cache-client run-dashboard run-service Log Message: moby-live/Java/src/config run-any-client,1.6,1.7 run-any-client.bat,1.7,1.8 run-cache-client,1.1,1.2 run-dashboard,1.4,1.5 run-service,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/21 17:17:27 1.6 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/22 18:03:28 1.7 @@ -9,13 +9,13 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH -CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH exec java -cp $CLASSPATH "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/21 17:17:27 1.7 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/22 18:03:28 1.8 @@ -6,10 +6,10 @@ for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" -set CP=build\classes;%CP% -set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% set CP=build\others\skeletons;%CP% set CP=build\others\samples;%CP% +set CP=build\classes;%CP% +set CP=build\Clients;%CP% java -classpath "%CP%" %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cache-client,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/run-cache-client 2004/11/14 16:12:50 1.1 +++ /home/repository/moby/moby-live/Java/src/config/run-cache-client 2005/11/22 18:03:28 1.2 @@ -10,8 +10,8 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'` +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH CacheRegistryClient "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/21 17:17:27 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/22 18:03:28 1.5 @@ -20,15 +20,15 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH JAVA=$JAVA_HOME/bin/java exec $JAVA -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-service,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/run-service 2005/08/26 06:27:03 1.1 +++ /home/repository/moby/moby-live/Java/src/config/run-service 2005/11/22 18:03:28 1.2 @@ -10,11 +10,11 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'` CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH exec java -cp $CLASSPATH org.biomoby.client.BaseCmdLineClient "$@" From senger at pub.open-bio.org Tue Nov 22 13:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue Nov 22 13:00:30 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SiU013550@pub.open-bio.org> senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv13384/src/main/org/biomoby/service/dashboard/images Added Files: smallDeploy.gif smallDeploy_dis.gif smallUnDeploy.gif smallUnDeploy_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallDeploy.gif,NONE,1.1 smallDeploy_dis.gif,NONE,1.1 smallUnDeploy.gif,NONE,1.1 smallUnDeploy_dis.gif,NONE,1.1 From mwilkinson at pub.open-bio.org Tue Nov 22 15:05:01 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue Nov 22 15:00:44 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222005.jAMK51xA013984@pub.open-bio.org> mwilkinson Tue Nov 22 15:05:01 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv13959/t Modified Files: Client-Central.t Client-Service.t Log Message: modified the test suite so that it connects to whatever MOBY Central is set as the default in the environment. The test suite will function on a registry that is empty *except for the bootstrap object ontology*. It also works under Windows using nmake test. moby-live/Perl/t Client-Central.t,1.43,1.44 Client-Service.t,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/20 16:05:05 1.43 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/22 20:05:00 1.44 @@ -14,9 +14,36 @@ use Test::More 'no_plan'; #skip_all => "Turn off for development"; # See perldoc Test::More for details use strict; use Data::Dumper; + +print STDERR <new( - Registries => { # URL/URI should be specific, not just "localhost" - mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl', - URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'} - } - ); + my $C = MOBY::Client::Central->new(); my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); $r = $C->deregisterService( serviceName => 'myfirstservice', authURI => 'test.suite.com' ); @@ -46,15 +68,19 @@ }; # Can we connect to the registry? -my $C = MOBY::Client::Central->new( - Registries => { # URL/URI should be specific, not just "localhost" - mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl', - URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'} - } - ); +my $C = MOBY::Client::Central->new(); isa_ok( $C, 'MOBY::Client::Central',"Connected to test MOBY Central") or die("Cannot Connect to MOBY Central... cannot continue?"); +print STDERR <Registries->{mobycentral}->{URL},"\n\n\n"; + + ############ ENFORCE REGISTRY API ############### # First, mandatory methods for all registries. =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:15:30 1.7 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/22 20:05:00 1.8 @@ -22,7 +22,15 @@ BEGIN { use_ok('MOBY::Client::Service') }; END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterService( serviceName => 'myfirstservice', + authURI => 'test.suite.com' ); }; @@ -34,8 +42,25 @@ # Find a service at MOBY Central, try to create a local instance. my $C = MOBY::Client::Central->new(); -my ($s, $r) = $C->findService( authURI => 'bioinfo.icapture.ubc.ca', - name => 'getDragonLocusAlleles' ); +my %RegSmpl = ( serviceName => "myfirstservice", + serviceType => "Retrieval", + authURI => "test.suite.com", + contactEmail => 'your@mail.address', + description => "this is my first service", + category => "moby", + URL => "http://illuminae/cgi-bin/service.pl", + input => [ + ['articleName1', [Object => []]], # Simple + ], + output => [ + ['articleName2', [String => []]], # Simple + ], + ); + +# Service name can't start with numeric +my $r = $C->registerService( %RegSmpl ); +my ($s, $err) = $C->findService( authURI => 'test.suite.com', + name => 'myfirstservice' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); my $wsdl = $C->retrieveService($$s[0]); From mwilkinson at pub.open-bio.org Tue Nov 22 16:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue Nov 22 16:28:59 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNbe014235@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv14216/MOBY/Client Modified Files: OntologyServer.pm Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/MOBY/Client OntologyServer.pm,1.14,1.15 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm 2005/09/27 00:01:24 1.14 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm 2005/11/22 21:33:23 1.15 @@ -124,6 +124,7 @@ $self->{$attrname} = $self->_default_for( $attrname ); } } + $self->host($ENV{MOBY_ONTOLOGYSERVER}) if ($ENV{MOBY_ONTOLOGYSERVER}); return undef unless $self->host; return $self; } From mwilkinson at pub.open-bio.org Tue Nov 22 16:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue Nov 22 16:29:05 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNvK014254@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/scripts In directory pub.open-bio.org:/tmp/cvs-serv14216/scripts Modified Files: OntologyServer.cgi Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/scripts OntologyServer.cgi,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi 2005/09/27 00:01:24 1.5 +++ /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi 2005/11/22 21:33:23 1.6 @@ -1,7 +1,6 @@ -#!/usr/bin/perl -w +#!perl -w use CGI qw/:standard/; -use lib "/usr/local/apache/cgi-bin/MOBY05"; use MOBY::OntologyServer; use strict; From mwilkinson at pub.open-bio.org Tue Nov 22 16:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue Nov 22 16:29:06 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNtr014278@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv14216/t Modified Files: Client-OntologyServer.t CommonSubs.t Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/t Client-OntologyServer.t,1.5,1.6 CommonSubs.t,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t 2005/09/27 00:06:24 1.5 +++ /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t 2005/11/22 21:33:23 1.6 @@ -15,11 +15,50 @@ use Test::More 'no_plan'; #skip_all => "Skipped for development"; #'no_plan'; # perldoc Test::More for details use strict; use MOBY::Client::OntologyServer; -#Is the client-code even installed? -BEGIN { use_ok('MOBY::Client::OntologyServer') }; - +use MOBY::Client::Central; +BEGIN { use_ok('MOBY::Client::OntologyServer'); + # initialize with a couple of useless things that we can guarantee to find + my $C = MOBY::Client::Central->new(); + + my %Namespace = ( namespaceType => 'Rub1', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your@address.here' + ); + my $r = $C->registerNamespace( %Namespace ); + %Namespace = ( namespaceType => 'Rub2', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your@address.here' + ); + $r = $C->registerNamespace( %Namespace ); + my %ServiceType = ( serviceType => "Rub1", + description => "a human-readable description of the service", + contactEmail => 'your@email.address', + authURI => "test.suite.com", + Relationships => { ISA => ['Service'] } + ); + $r = $C->registerServiceType( %ServiceType ); + %ServiceType = ( serviceType => "Rub2", + description => "a human-readable description of the service", + contactEmail => 'your@email.address', + authURI => "test.suite.com", + Relationships => { ISA => ['Service'] } + ); + $r = $C->registerServiceType( %ServiceType );}; + END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterNamespace( namespaceType => 'Rub1' ); + $r = $C->deregisterNamespace( namespaceType => 'Rub2' ); + $r = $C->deregisterServiceType( serviceType => 'Rub2' ); + $r = $C->deregisterServiceType( serviceType => 'Rub2' ); }; @@ -28,6 +67,29 @@ objectExists serviceExists namespaceExists /); my $os = MOBY::Client::OntologyServer->new(); + +print STDERR <host,"\n\n\n"; + + foreach (@autoload) {eval{$os->$_};} # Call all AUTOLOAD methods, to create them. can_ok("MOBY::Client::OntologyServer", @API) or diag("OntologyServer doesn't implement full API"); @@ -47,14 +109,9 @@ # Start fresh.... $os = MOBY::Client::OntologyServer->new(); -################ CHECK THAT VALID STUFF RETURNS CORRECTLY ########## -# -# It would really be better not to have literal lists of valid namespaces here, -# Can we pull the entire list of valid namespaces in programmatically from somewhere, -# and check them all here? Ditto for Objects, Service-types -# + my ($success, $msg, $existingURI); -my @check_ns = qw/SGD NCBI_gi GO FB PMID/; # These seem pretty solid +my @check_ns = qw/Rub1 Rub2/; # These seem pretty solid foreach (@check_ns) { ($success, $msg, $existingURI) = $os->namespaceExists( term => $_); is($success, 1) @@ -70,10 +127,7 @@ or diag("Object '$_' reported erroneously as non-existent."); } -my @check_servicetype = qw/Alignment Analysis Conversion Edit -NCBI_Blast Parsing SetIntersection SetOperation SetUnion -Retrieval Registration Resolution -StructuralPrediction/; # Service types don't change much, but who knows.... +my @check_servicetype = qw/Rub1 Rub2/; # Service types don't change much, but who knows.... foreach (@check_servicetype) { ($success, $msg, $existingURI) = $os->serviceExists(term => $_); is($success, 1) =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/CommonSubs.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/t/CommonSubs.t 2005/09/21 19:08:28 1.3 +++ /home/repository/moby/moby-live/Perl/t/CommonSubs.t 2005/11/22 21:33:23 1.4 @@ -21,10 +21,38 @@ use XML::LibXML; use MOBY::MobyXMLConstants; +use MOBY::Client::Central; +BEGIN { use_ok('MOBY::Client::OntologyServer'); + # initialize with a couple of useless things that we can guarantee to find + my $C = MOBY::Client::Central->new(); + + my %Namespace = ( namespaceType => 'Rub1', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your@address.here' + ); + my $r = $C->registerNamespace( %Namespace ); + %Namespace = ( namespaceType => 'Rub2', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your@address.here' + ); + $r = $C->registerNamespace( %Namespace ); +}; + END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterNamespace( namespaceType => 'Rub1' ); + $r = $C->deregisterNamespace( namespaceType => 'Rub2' ); }; + my @must_implement = qw/ collectionResponse complexResponse @@ -150,7 +178,7 @@ # be returned; other articlenames will generate a 'undef' response, so that the number of inputs # matches the number of outputs. -my @NS = ("NCBI_gi", "SGD"); +my @NS = ("Rub1", "Rub2"); my $articles = [ XML_maker(""), XML_maker(""), XML_maker("") @@ -177,7 +205,7 @@ or diag("Wrong number of Simple Articles IDs returned " . "(expected zero for bogus namespace)"); -is(scalar getSimpleArticleIDs('SGD_LOCUS', $articles), scalar @{$articles}) +is(scalar getSimpleArticleIDs('Rub1', $articles), scalar @{$articles}) or diag("Wrong number of Simple Articles IDs returned " . "(expected zero for valid but unused namespace)"); @@ -300,7 +328,7 @@ } } # Check that bona-fide namespaces are valid, regardless of position in the list of valid namespaces -my @ns = ('SGD', 'SGD_LOCUS'); +my @ns = ('Rub1', 'Rub2'); foreach (@ns) { ok (validateThisNamespace($_, @ns), "Validate namespace") or diag("Namespace ($_) not in list of namespaces"); From senger at pub.open-bio.org Tue Nov 22 21:48:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue Nov 22 21:44:19 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511230248.jAN2me8U014961@pub.open-bio.org> senger Tue Nov 22 21:48:40 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv14926/src/main/org/biomoby/service/dashboard Modified Files: AntModel.java DashboardProperties.java DeploymentTable.java GeneratorPanel.java NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,1.4,1.5 DashboardProperties.java,1.20,1.21 DeploymentTable.java,1.1,1.2 GeneratorPanel.java,1.8,1.9 NOTES,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2005/11/22 18:03:28 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2005/11/23 02:48:40 1.5 @@ -27,6 +27,8 @@ import java.util.Vector; import java.util.Enumeration; import java.util.Properties; +import java.util.Map; +import java.util.Iterator; import java.io.File; /** @@ -212,35 +214,17 @@ public void mosesDeploy() throws MobyException { -// boolean toGenerate = propertyChannel.getBoolean (DP_USE_DT_GEN, true); -// boolean toCompile = propertyChannel.getBoolean (DP_USE_DT_COMP, true); -// boolean toJavadoc = propertyChannel.getBoolean (DP_USE_DT_DOC, true); -// boolean toJar = propertyChannel.getBoolean (DP_USE_DT_JAR, true); - -// // build a set of properties for Ant -// Properties props = new Properties(); -// addRegistryProps (props); -// addGeneratorProps (props); - -// // build a set of Ant targets -// Vector v = new Vector(); -// if (toGenerate && toCompile && toJavadoc && toJar) { -// v.addElement ("moses-datatypes"); -// } else { -// if (toGenerate) -// v.addElement ("generate-datatypes"); -// if (toJavadoc) -// v.addElement ("moses-docs"); -// if (toJar) -// v.addElement ("jar-datatypes"); -// if (toCompile && ! toJavadoc && ! toJar) -// v.addElement ("moses-compile"); -// } -// String[] targets = new String [v.size()]; -// v.copyInto (targets); + // build a set of properties for Ant + Properties props = new Properties(); + addDeploymentProps (props); + add (props, "users.lib.dir", DP_USER_JARS); + add (props, "wsdd.template", DP_WSDD_TEMPL); -// // run it... -// runAnt (targets, props); + // run it... + if (propertyChannel.getBoolean (DP_LOCAL_DEPLOY, true)) + runAnt (new String[] { "deploy-services" }, props); + else + runAnt (new String[] { "deploy-remote" }, props); } /********************************************************************* @@ -248,6 +232,14 @@ ********************************************************************/ public void mosesUndeploy() throws MobyException { + + // build a set of properties for Ant + Properties props = new Properties(); + addDeploymentProps (props); + + // run it... + if (propertyChannel.getBoolean (DP_LOCAL_DEPLOY, true)) + runAnt (new String[] { "undeploy-services" }, props); } /********************************************************************* @@ -394,6 +386,26 @@ } /********************************************************************* + * Add properties shared by deployment and undeployment... + ********************************************************************/ + protected void addDeploymentProps (Properties props) { + add (props, "catalina.home", DP_TOMCAT_HOME); + add (props, "axis.relative.path", DP_AXIS_IN_TOMCAT); + add (props, "tomcat.host", DP_HOSTNAME); + add (props, "tomcat.port", DP_PORT); + add (props, "axis.admin.url", DP_AXIS_ADMIN); + + Map services = (Map)propertyChannel.get (DP_DEPL_SERVICES); + if (services == null) return; + for (Iterator it = services.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = (Map.Entry)it.next(); + String serviceName = (String)entry.getKey(); + String className = (String)entry.getValue(); + props.put ("service." + serviceName, className); + } + } + + /********************************************************************* * Take a property 'channelPropName' from the property channel, * and if it is not empty, add it to 'props' under the name * 'antPropName'. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/22 18:03:28 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/23 02:48:40 1.21 @@ -46,6 +46,7 @@ static final String DP_SEL_SERVICES = "selectedServices"; // type: Vector with service/authority name static final String DP_SEL_AUTHORITIES = "selectedAuthorities"; // type: Vector with authority name + static final String DP_DEPL_SERVICES = "servicesToDeploy"; // type: Map with serviceName => className static final String DP_LOCAL_DEPLOY = "use-local-deploy"; static final String DP_TOMCAT_HOME = "tomcatHome"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DeploymentTable.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/service/dashboard/DeploymentTable.java 2005/11/22 18:03:28 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DeploymentTable.java 2005/11/23 02:48:40 1.2 @@ -12,6 +12,8 @@ import javax.swing.table.TableColumn; import java.util.Enumeration; import java.util.Vector; +import java.util.Map; +import java.util.HashMap; /** * A swing JTable that collects names of services that are going to be @@ -39,13 +41,28 @@ } /********************************************************************* - * + * Add data representing one row to this table. ********************************************************************/ public void addData (String serviceName, String className) { ((DeploymentTableModel)tableModel).addData (serviceName, className); } /********************************************************************* + * Return all data currently available in the table. The keys are + * service names, the values are class names (representing classes + * that will implement these services). + ********************************************************************/ + public Map getData() { + Vector v = tableModel.getData(); + Map result = new HashMap (v.size() + 1); + for (Enumeration en = v.elements(); en.hasMoreElements(); ) { + TableDataBag bag = (TableDataBag)en.nextElement(); + result.put (bag.serviceName, bag.className); + } + return result; + } + + /********************************************************************* * Ignored. ********************************************************************/ public void setData (org.biomoby.shared.MobyData[] newData) { } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/22 18:03:28 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 02:48:40 1.9 @@ -50,6 +50,8 @@ import java.io.ByteArrayOutputStream; import java.util.Enumeration; import java.util.Vector; +import java.util.Map; +import java.util.Iterator; /** * A panel allowing to generate Java code for new services using the @@ -90,6 +92,19 @@ "You can also select one or more authorities\n" + "(then code for all their services will be made).\n\n"; + protected static final String NODEPL_ERROR = + "Sorry, you need first to select some services\n" + + "which you wish to be deployed (or undeployed).\n\n" + + + "You can select several (or even many) of them\n" + + "by using CTRL and SHIFT when selecting them.\n" + + "You can also select one or more authorities\n" + + "(it will add all their services to the list).\n\n"; + + protected static final String NOIMPL_ERROR = + "Sorry, each service that is going to be deployed\n" + + "needs to have assigned a class that implements it.\n\n"; + // associated models working behind the scene AntModel antModel; RegistryModel registryModel; @@ -109,6 +124,7 @@ JTextFieldWithHistory pattern; DeploymentTable dTable; JCheckBox copyBySelect; + JRadioButton locally; // shared icons protected static Icon genDTIcon, genDTIconDis; @@ -172,22 +188,20 @@ antModel.setErrorStream (new ConsoleStream (console, true)); antModel.setMsgOutputLevel (AntModel.MSG_INFO); - // service tree panel + // three major parts JPanel selection = getServicesSelectionPanel(); - - // code generators panel JPanel generators = getGeneratorsPanel(); + JPanel deployment = getDeploymentPanel(); - // deployment panel - JPanel deploy = getDeploymentPanel(); + JPanel fields = new JPanel (new GridBagLayout()); + SwingUtils.addComponent (fields, generators, 0, 0, 1, 1, HORI, NWEST, 0.0, 0.0); + SwingUtils.addComponent (fields, deployment, 1, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); // split it into moving panels - JSplitPane split = vSplit (selection, console, 0.5); - - // put all together - SwingUtils.addComponent (pComponent, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); - SwingUtils.addComponent (pComponent, generators, 1, 0, 1, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent (pComponent, deploy, 2, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + JSplitPane split = hSplit (vSplit (selection, + console, 0.5), + fields, 0.5); + SwingUtils.addComponent (pComponent, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); return pComponent; } @@ -422,12 +436,12 @@ boolean deployLocally = getPrefValue (DP_LOCAL_DEPLOY, true); propertyChannel.put (DP_LOCAL_DEPLOY, new Boolean (deployLocally).toString()); - JRadioButton locally = new JRadioButton ("On local machine", deployLocally); + locally = new JRadioButton ("On local machine", deployLocally); locally.setActionCommand ("true"); locally.addActionListener (deployListener); - JRadioButton remotely = new JRadioButton ("On remote machine", deployLocally); - locally.setActionCommand ("false"); - locally.addActionListener (deployListener); + JRadioButton remotely = new JRadioButton ("On remote machine", ! deployLocally); + remotely.setActionCommand ("false"); + remotely.addActionListener (deployListener); ButtonGroup group = new ButtonGroup(); group.add (locally); @@ -537,7 +551,6 @@ }); deployButton.setIcon (deployIcon); deployButton.setDisabledIcon (deployIconDis); - deployButton.setEnabled (false); // temporarily undeployButton = createButton (" Undeploy ", @@ -551,9 +564,9 @@ }); undeployButton.setIcon (undeployIcon); undeployButton.setDisabledIcon (undeployIconDis); + undeployButton.setEnabled (locally.isSelected()); undeployButton.setEnabled (false); // temporarily - // put all together Component glue2 = Box.createHorizontalGlue(); SwingUtils.addComponent (p, pDeploy, 0, 0, 3, 1, HORI, NWEST, 0.0, 0.0); @@ -566,12 +579,17 @@ return p; } - // + // this is used both for 'locally' and 'remotelly' radio buttons; + // 'locally' button has an action command "true" and 'remotely' + // button has an action command "false" private ActionListener deployListener = new ActionListener() { public void actionPerformed (ActionEvent e) { String local = e.getActionCommand(); - setPrefValue (DP_LOCAL_DEPLOY, UUtils.is (local)); + boolean isLocal = UUtils.is (local); + setPrefValue (DP_LOCAL_DEPLOY, isLocal); propertyChannel.put (DP_LOCAL_DEPLOY, local); + undeployButton.setEnabled (isLocal); + undeployButton.setEnabled (false); // temporarily } }; @@ -815,6 +833,19 @@ * Deploy services... **************************************************************************/ protected void onDeploy() { + if (! onCheckData()) return; + Map data = dTable.getData(); + for (Iterator it = data.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = (Map.Entry)it.next(); + String className = (String)entry.getValue(); + if (UUtils.isEmpty (className)) { + String msg = NOIMPL_ERROR.replaceAll ("\\\\n", "
    "); + error ("" + msg); + return; + } + } + + // ...and let Ant to deploy it final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { @@ -847,6 +878,7 @@ * Undeploy services... **************************************************************************/ protected void onUndeploy() { + if (! onCheckData()) return; final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { @@ -876,6 +908,22 @@ } /************************************************************************** + * Get data from a deployment table; check if there are some + * (report error if not) and put them in the property + * channel. Return accordingly. + **************************************************************************/ + protected boolean onCheckData() { + Map data = dTable.getData(); + if (data.size() == 0) { + String msg = NODEPL_ERROR.replaceAll ("\\\\n", "
    "); + error ("" + msg); + return false; + } + propertyChannel.put (DP_DEPL_SERVICES, data); + return true; + } + + /************************************************************************** * Disable/enable Ant-processing buttons... **************************************************************************/ protected void setEnabledAntButtons (boolean enabled) { @@ -884,8 +932,8 @@ bothButton.setEnabled (enabled); dtclsButton.setEnabled (enabled); sclsButton.setEnabled (enabled); -// deployButton.setEnabled (enabled); -// undeployButton.setEnabled (enabled); + deployButton.setEnabled (enabled); +// undeployButton.setEnabled (enabled && locally.isSelected()); // temporarily } /************************************************************************** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/22 18:03:28 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 02:48:40 1.31 @@ -25,13 +25,18 @@ * BUG: the BuildDataTree does not paint itself always well +* Not yet ready: Undeploy: too many messages... + Should be done: --------------- * right-click - if nothing selected, it should take what is under the mouse (selected first), otherwise it is annoying +* Implement ConsoleStream better + * documentation (both pages and help documents) + - also to start Moses/Dashboard FAQs (with Eddie's one to start) * More testing: - interrupting loading @@ -51,6 +56,8 @@ * more attention for the various encodings +* current registry in the window title... "Connected to..." + Later: ------ * WARN: How would an authority with characters 'http://' cope as a From senger at pub.open-bio.org Tue Nov 22 22:14:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue Nov 22 22:10:40 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511230314.jAN3El2a015083@pub.open-bio.org> senger Tue Nov 22 22:14:46 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv15060/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard GeneratorPanel.java,1.9,1.10 NOTES,1.31,1.32 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 02:48:40 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 03:14:46 1.10 @@ -458,7 +458,8 @@ String initValue = null; String os = System.getProperty ("os.name"); if (os.startsWith ("Windows")) - initValue = "c:\\Program Files\\Apache Software Foundation\\Tomcat 5.5"; + initValue = null; +// initValue = "c:\\Program Files\\Apache Software Foundation\\Tomcat 5.5"; else if (os.startsWith ("Mac")) initValue = null; else =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 02:48:40 1.31 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 03:14:46 1.32 @@ -50,12 +50,8 @@ * starting panel/splash screen -* add deployment panel to code generator - * base client panel (services testing panel) -* more attention for the various encodings - * current registry in the window title... "Connected to..." Later: @@ -77,6 +73,8 @@ * manage/export/import user preferences +* more attention for the various encodings + ? some of the notification stuff can inherit from property change stuff ? move help system to Java Help; more contextual help From mwilkinson at pub.open-bio.org Wed Nov 23 15:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Nov 23 15:54:08 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaKU017570@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv17528/MOBY/Client Modified Files: Central.pm Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/MOBY/Client Central.pm,1.127,1.128 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v retrieving revision 1.127 retrieving revision 1.128 diff -u -r1.127 -r1.128 --- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/20 16:13:23 1.127 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/23 20:58:36 1.128 @@ -1709,10 +1709,13 @@ Usage : $def = $MOBY->Relationships(%args) Function : traverse and return the relationships in the ontology - Returns : hashref of $hash{relationship_type}=\@lsids + Returns : hashref of + FOR SERVICES: + $hash{'isa'}=[{lsid => $lsid, term => 'termy'},...] + FOR OBJECTS: + $hash{relationship_type}=[{lsid => $lsid, articleName => 'thingy', term => 'termy'},...] Args : EITHER serviceType => $term_or_lsid OR objectType => $term_or_lsid - Relationships => \@relationship_types (optional, 'all' if parameter is missing) Registry => $registry_name (optional) expandRelationships => [1/0] (optional) @@ -1769,6 +1772,7 @@ return &_relationshipsPayload($payload); } + sub _relationshipsPayload { my ($payload) = @_; return undef unless $payload; @@ -1779,23 +1783,32 @@ my $x = $doc->getElementsByTagName("Relationship"); my $no_relationships = $x->size(); for ( my $n = 1 ; $n <= $no_relationships ; ++$n ) { - my $relationshipType = - $x->get_node($n)->getAttributeNode('relationshipType') - ; # may or may not have a name + my $relationshipType = $x->get_node($n)->getAttributeNode('relationshipType'); # may or may not have a name if ($relationshipType) { $relationshipType = $relationshipType->getValue(); - } - else { - return - "FAILED! must include a relationshipType in every relationship\n"; + } else { + return "FAILED! must include a relationshipType in every relationship\n"; } my @child = $x->get_node($n)->childNodes; - foreach (@child) { - next unless $_->nodeType == ELEMENT_NODE; - my @child2 = $_->childNodes; - foreach (@child2) { - next unless $_->nodeType == TEXT_NODE; - push @{ $relationships{$relationshipType} }, $_->toString; + foreach my $child(@child) { + my ($lsid, $article, $term) = ("", "", ""); + next unless $child->nodeType == ELEMENT_NODE; + my $lsidattr = $child->getAttributeNode('lsid'); # may or may not have a name + if ($lsidattr) { + $lsid = $lsidattr->getValue(); + } + my $ARTattr = $child->getAttributeNode('articleName'); # may or may not have a name + if ($ARTattr) { + $article = $ARTattr->getValue(); + } + my %info; + $info{lsid} = $lsid; + ($info{articleName} = $article) if $article; + my @child2 = $child->childNodes; + foreach my $child2(@child2) { + next unless $child2->nodeType == TEXT_NODE; + $info{term} = $child2->toString; + push @{ $relationships{$relationshipType} }, \%info; } } } From mwilkinson at pub.open-bio.org Wed Nov 23 15:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Nov 23 15:54:13 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaG7017590@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv17528/t Modified Files: Client-Central.t Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/t Client-Central.t,1.44,1.45 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/22 20:05:00 1.44 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/23 20:58:36 1.45 @@ -51,20 +51,20 @@ # Reconnect to MOBY Central here, since other connections # will have gone out of scope by the time we get to this END block. # Also can't use %Obj, - my $C = MOBY::Client::Central->new(); - my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); - $r = $C->deregisterService( serviceName => 'myfirstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => '1myfirstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'my]firstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'myf_irstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'mysecondservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); - $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); +# my $C = MOBY::Client::Central->new(); +# my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); +# $r = $C->deregisterService( serviceName => 'myfirstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => '1myfirstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'my]firstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'myf_irstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'mysecondservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); +# $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); }; # Can we connect to the registry? @@ -183,19 +183,22 @@ $r = $C->Relationships(objectType => $Obj{objectType}); isa_ok($r, "HASH", "Relationship types hash") - or diag("Relationships didn't return a hashref for object types") ; + or diag("Object Relationships didn't return a hashref for object types") ; isa_ok( $r->{'isa'}, 'ARRAY') - or diag("Relationships didn't return a hash of arrayrefs"); -is(shift @{$r->{'isa'}}, "Object") - or diag("Relationships(objectType) doesn't have the right parentage."); + or diag("Object Relationships didn't return a hash of arrayrefs"); +isa_ok($r->{'isa'}->[0], "HASH") + or diag("Object Relationships didn't return a hash of arrayrefs of hasrefs"); +is($r->{'isa'}->[0]->{term}, "Object") + or diag("Object Relationships(objectType) doesn't have the right parentage."); $r = $C->Relationships(serviceType => $ServiceType{serviceType}); isa_ok($r, "HASH", "Relationship types hash") - or diag("Relationships didn't return a hashref for service types") ; -#print STDERR "\n\n\nkeys ",(keys %rel), "\n\n\n"; + or diag("Service Relationships didn't return a hashref for service types") ; isa_ok($r->{'isa'}, 'ARRAY') - or diag("Relationships didn't return a hash of arrayrefs for services"); -is(shift @{$r->{'isa'}}, + or diag("Service Relationships didn't return a hash of arrayrefs for services"); +isa_ok($r->{'isa'}->[0], "HASH") + or diag("Service Relationships didn't return a hash of arrayrefs of hasrefs"); +is($r->{'isa'}->[0]->{term}, $ServiceType{Relationships}->{ISA}->[0]) or diag("Relationships (serviceType) doesn't have the right parentage."); From mwilkinson at pub.open-bio.org Wed Nov 23 15:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Nov 23 15:54:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaqj017551@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY In directory pub.open-bio.org:/tmp/cvs-serv17528/MOBY Modified Files: Central.pm OntologyServer.pm Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/MOBY Central.pm,1.222,1.223 OntologyServer.pm,1.88,1.89 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v retrieving revision 1.222 retrieving revision 1.223 diff -u -r1.222 -r1.223 --- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/09/29 14:47:39 1.222 +++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/11/23 20:58:36 1.223 @@ -484,7 +484,8 @@ (@ISAlist = @{$relationships->{$isa}}) if ($relationships->{$isa}) ; # for each of the inherited parents, check their articleNames foreach my $ISA(@ISAlist){ # $ISA = [lsid, articleName] (but articleName shuld be null anyway in this case) - my $what_it_is = shift @$ISA; + my $what_it_is = $ISA->{lsid}; + # my $articleName = $ISA->{articleName} map {($x=1) if ($what_it_is eq $_)} @primitive_lsids; # test primitives against this one } return $x; # return flag state @@ -2892,8 +2893,8 @@ outputXML : - ExistingServiceType - ExistingServiceType + ExistingObjectType + ExistingObjectType .... @@ -2983,12 +2984,12 @@ $response .= "\n"; foreach my $lsid_article ( @lsids_articles ) { - my ($lsid, $articleName) = @$lsid_article; - # ugh... I have to cheat here because the term is not returned from the Ontology Server - # one day we may have to fix this... - $lsid =~ /urn\:lsid\:[^\:]+\:[^\:]+\:([^\:]+)/; # get the term portion of the LSID - $term = $1; - $response .= "<${ontology}Type lsid='$lsid'>$term\n"; + my $lsid = $lsid_article->{lsid}; + my $term = $lsid_article->{term}; + my $articleName = $lsid_article->{articleName}; + $response .= "<${ontology}Type lsid='$lsid' "; + $response .= "articleName='$articleName'" if $articleName; + $response .= ">$term\n"; } $response .= "\n"; } =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/09/30 23:14:12 1.88 +++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/11/23 20:58:36 1.89 @@ -223,6 +223,94 @@ } } +=head2 objectInfo + +=cut + +sub objectInfo{ + my ( $self, %args ) = @_; + + $CONFIG ||= MOBY::Config->new; # exported by Config.pm + my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyobject' ); + + my $term = $args{term}; + $term =~ s/^moby://; # if the term is namespaced, then remove that + my $sth; + return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'object' ); + return (0, undef, undef) unless $term; + + my $result; + + $result = $adaptor->query_object(type => $term); + my $row = shift(@$result); + #my $lsid = $row->{object_lsid}; + #my $type = $row->{object_type}; + #my $desc = $row->{description}; + #my $auth = $row->{authority}; + #my $email = $row->{contact_email}; + # + if ($row->{object_lsid}) + { # if it is in there, then it has been discovered regardless of being foreign or not + return $row; + } elsif ( _isForeignLSID($term) ) { # if not in our ontology, but is a foreign LSID, then pass it back verbatim + return {object_lsid => $term, + object_type => $term, + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } else { # under all other circumstances (i.e. not a term, or a non-existent biomoby LSID) then fail + return {object_lsid => "", + object_type => "", + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } +} + + +=head2 serviceInfo + +=cut + +sub serviceInfo{ + my ( $self, %args ) = @_; + + $CONFIG ||= MOBY::Config->new; # exported by Config.pm + my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyservice' ); + + my $term = $args{term}; + $term =~ s/^moby://; # if the term is namespaced, then remove that + my $sth; + return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'service' ); + return (0, undef, undef) unless $term; + + my $result; + + $result = $adaptor->query_service(type => $term); + my $row = shift(@$result); + + if ($row->{service_lsid}) + { # if it is in there, then it has been discovered regardless of being foreign or not + return $row; + } elsif ( _isForeignLSID($term) ) { # if not in our ontology, but is a foreign LSID, then pass it back verbatim + return {service_lsid => $term, + service_type => $term, + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } else { # under all other circumstances (i.e. not a term, or a non-existent biomoby LSID) then fail + return {service_lsid => "", + service_type => "", + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } +} + sub _isMOBYLSID { my ($lsid) = @_; return 1 if $lsid =~ /^urn\:lsid\:biomoby.org/; @@ -536,7 +624,7 @@ (@ISAlist = @{$relationships->{$isa}}) if ($relationships->{$isa}) ; # for each of the inherited parents, check their articleNames foreach my $ISA(@ISAlist){ # $ISA = [lsid, articleName] (but articleName shuld be null anyway in this case) - my $what_it_is = shift @$ISA; + my $what_it_is = $ISA->{lsid}; # check the hasa relationships for common articleName $foundCommonArticleNameFlag += _compareArticleNames(OS => $OS, type => $what_it_is, relationship => $hasalsid, targetArticleName => $articleName); # check the has relationships for common articleName @@ -564,7 +652,7 @@ if ($contents->{$content}){ my @CONTENTlist = @{$contents->{$content}}; foreach my $CONTAINED(@CONTENTlist){ - $foundCommonArticleNameFlag = 1 if ($CONTAINED->[1] eq $targetArticleName); #->[1] is the articleName field + $foundCommonArticleNameFlag = 1 if ($CONTAINED->{articleName} eq $targetArticleName); #->[1] is the articleName field } } } @@ -1111,11 +1199,11 @@ return \%result; } -=head2 Relationships +=head2 RelationshipsDEPRECATED =cut -sub Relationships { +sub RelationshipsDEPRECATED { # this entire subroutine assumes that there is NOT multiple parenting!! my ( $self, %args ) = @_; @@ -1167,6 +1255,69 @@ return \%results; #results(relationship} = [[lsid1,articleNmae], [lsid2, articleName], [lsid3, articleName]] } + +=head2 Relationships + +=cut + +sub Relationships { + + # this entire subroutine assumes that there is NOT multiple parenting!! + my ( $self, %args ) = @_; + my $ontology = $args{ontology} ? $args{ontology} : $self->ontology; + my $term = $args{term}; + my $relationship = $args{relationship}; + my $direction = $args{direction} ? $args{direction} : 'root'; + my $expand = $args{expand} ? 1 : 0; + return + unless ( $ontology + && $term + && ( ( $ontology eq 'service' ) || ( $ontology eq 'object' ) ) ); + + # convert $term into an LSID if it isn't already + if ( $ontology eq 'service' ) { + $term = $self->getServiceURI($term); + $relationship ||="isa"; + my $OS = MOBY::OntologyServer->new(ontology => 'relationship'); + $relationship = $OS->getRelationshipURI("service", $relationship); + } elsif ( $ontology eq 'object' ) { + $term = $self->getObjectURI($term); + $relationship ||="isa"; + my $OS = MOBY::OntologyServer->new(ontology => 'relationship'); + $relationship = $OS->getRelationshipURI("object", $relationship); + } + my %results; + while ( ( $term ne 'urn:lsid:biomoby.org:objectclass:Object' ) + && ( $term ne 'urn:lsid:biomoby.org:servicetype:Service' ) ) + { + my $defs = $self->_doRelationshipsQuery( $ontology, $term, + $relationship, $direction ); + return {[]} unless $defs; # somethig has gone terribly wrong! + my $lsid; + my $rel; + my $articleName; + foreach ( @{$defs} ) { + $lsid = $_->[0]; + $rel = $_->[1]; + $articleName = $_->[2]; + $articleName ||=""; + if ($ontology eq 'object'){ + my $info = $self->objectInfo(term => $lsid); # we need to get the term name, and that doesn't come from here + my $term = $info->{object_type}; + push @{ $results{$rel} }, {lsid => $lsid, articleName => $articleName, term => $term}; + } else { + my $info = $self->serviceInfo(term => $lsid); # we need to get the term name, and that doesn't come from here + my $term = $info->{service_type}; + push @{ $results{$rel} }, {lsid => $lsid, term => $term}; + } + } + last unless ($expand); + last unless ( $direction eq "root" ); # if we aren't going to root, then be careful or we'll loop infnitely + $term = $lsid; # this entire subroutine assumes that there is NOT multiple parenting... + } + return \%results; +} + sub _doRelationshipsQuery { my ( $self, $ontology, $term, $relationship, $direction ) = @_; $CONFIG ||= MOBY::Config->new; # exported by Config.pm @@ -1260,7 +1411,8 @@ #${$lsids}{relationshiptype}=[lsid, lsid, lsid]; foreach my $lsid_article ( @{ $lsids->{$relationship} } ) { # go through the related terms - my ($lsid, $article) = @{$lsid_article}; + my $lsid = $lsid_article->{lsid}, + my $article = $lsid_article->{articleName}; $debug && _LOG("found $lsid as relationship"); next if ( defined $IDS{$lsid} ) From mwilkinson at pub.open-bio.org Wed Nov 23 16:01:05 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed Nov 23 15:56:36 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232101.jANL15LI017666@pub.open-bio.org> mwilkinson Wed Nov 23 16:01:05 EST 2005 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API In directory pub.open-bio.org:/tmp/cvs-serv17645/MOBY-S_API Modified Files: XMLPayloads.html Log Message: updated documentation for new Relationships output moby-live/Docs/MOBY-S_API XMLPayloads.html,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html 2005/10/24 17:31:57 1.4 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html 2005/11/23 21:01:05 1.5 @@ -415,7 +415,7 @@ <Relationships> <Relationship relationshipType="RelationshipOntologyTerm1" lsid='urn:lsid:authority.uri:namespace:id'> - [ <objecctType lsid='...'>OntologyTerm</objectType> | + [ <objecctType lsid='...' articleName='foo'>OntologyTerm</objectType> | <serviceType lsid='...'>OntologyTerm</serviceType> ] ... </Relationship> From gss at pub.open-bio.org Wed Nov 23 18:53:03 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:48:35 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232353.jANNr3Ul018009@pub.open-bio.org> gss Wed Nov 23 18:53:03 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv17984/src/org/semanticmoby/vocabulary Modified Files: MOBY.java Log Message: Removed keyword property; added metadata property s-moby/ref-impl/core/src/org/semanticmoby/vocabulary MOBY.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/03 22:31:42 1.5 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/23 23:53:03 1.6 @@ -59,14 +59,10 @@ public static final Property lastModifiedDate = property(getURI(), "lastModifiedDate"); - public static final Property Property = - property(getURI(), "Property"); - - public static final Property keyword = - property(getURI(), "keyword"); + public static final Property metadata = + property(getURI(), "metadata"); public static String getURI() { - return "http://www.semanticmoby.org/ontologies/core/"; } From gss at pub.open-bio.org Wed Nov 23 18:53:38 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:49:07 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232353.jANNrc1m018045@pub.open-bio.org> gss Wed Nov 23 18:53:38 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/util In directory pub.open-bio.org:/tmp/cvs-serv18024/WebRoot/ontologies/util Added Files: N3Serialization Serialization RDFXMLSerialization Log Message: Converted from N3 s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/util N3Serialization,NONE,1.1 Serialization,NONE,1.1 RDFXMLSerialization,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:54:45 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:50:14 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232354.jANNsjeI018115@pub.open-bio.org> gss Wed Nov 23 18:54:44 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies In directory pub.open-bio.org:/tmp/cvs-serv18063/WebRoot/examples/ontologies Removed Files: GreetingResource ProxyResource.n3 FASTASequence index.html GeneSymbol CerealGrainSearchResource GeneDetails.n3 FASTASequence.n3 GreetingResource.n3 ElegansSearchResource BlastResource.n3 ArabidopsisSearchResource.n3 ArabidopsisSearchResource GeneSymbol.n3 PubSearchResource DrosophilaSearchResource.n3 PubSearchResource.n3 geneName ElegansSearchResource.n3 BlastResource greeting.n3 geneName.n3 GeneDetails DrosophilaSearchResource SacchromycesSearchResource.n3 greeting ProxyResource sequenceText.n3 CerealGrainSearchResource.n3 SacchromycesSearchResource sequenceText Log Message: These classes were here only to provide keywords; that functionality is now replaced with the moby:metadata Pull model s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies GreetingResource,1.1,NONE ProxyResource.n3,1.1,NONE FASTASequence,1.1,NONE index.html,1.2,NONE GeneSymbol,1.1,NONE CerealGrainSearchResource,1.1,NONE GeneDetails.n3,1.1,NONE FASTASequence.n3,1.1,NONE GreetingResource.n3,1.1,NONE ElegansSearchResource,1.1,NONE BlastResource.n3,1.1,NONE ArabidopsisSearchResource.n3,1.1,NONE ArabidopsisSearchResource,1.1,NONE GeneSymbol.n3,1.1,NONE PubSearchResource,1.1,NONE DrosophilaSearchResource.n3,1.1,NONE PubSearchResource.n3,1.1,NONE geneName,1.1,NONE ElegansSearchResource.n3,1.1,NONE BlastResource,1.1,NONE greeting.n3,1.1,NONE geneName.n3,1.1,NONE GeneDetails,1.1,NONE DrosophilaSearchResource,1.1,NONE SacchromycesSearchResource.n3,1.1,NONE greeting,1.1,NONE ProxyResource,1.1,NONE sequenceText.n3,1.1,NONE CerealGrainSearchResource.n3,1.1,NONE SacchromycesSearchResource,1.1,NONE sequenceText,1.1,NONE rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GreetingResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ProxyResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/FASTASequence,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/index.html,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneSymbol,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/CerealGrainSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneDetails.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/FASTASequence.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GreetingResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ElegansSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/BlastResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ArabidopsisSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ArabidopsisSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneSymbol.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/PubSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/DrosophilaSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/PubSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/geneName,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ElegansSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/BlastResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/greeting.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/geneName.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneDetails,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/DrosophilaSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/SacchromycesSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/greeting,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ProxyResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/sequenceText.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/CerealGrainSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/SacchromycesSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/sequenceText,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 18:55:26 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:50:57 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232355.jANNtQUG018195@pub.open-bio.org> gss Wed Nov 23 18:55:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core In directory pub.open-bio.org:/tmp/cvs-serv18130/WebRoot/ontologies/core Modified Files: outputURI oneLineDescription index.html operatesOn Subject.n3 name.n3 name oneLineDescription.n3 Subject Added Files: inputURI aboutURI metadata.n3 aboutURI.n3 inputURI.n3 outputURI.n3 metadata Removed Files: resourceAboutURI.n3 subjectProperty.n3 Service keyword subjectProperty Service.n3 resourceAboutURI keyword.n3 Log Message: Misc cleanup of ontology elements s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core inputURI,NONE,1.1 aboutURI,NONE,1.1 metadata.n3,NONE,1.1 aboutURI.n3,NONE,1.1 inputURI.n3,NONE,1.1 outputURI.n3,NONE,1.1 metadata,NONE,1.1 outputURI,1.1,1.2 oneLineDescription,1.2,1.3 index.html,1.2,1.3 operatesOn,1.3,1.4 Subject.n3,1.1,1.2 name.n3,1.2,1.3 name,1.2,1.3 oneLineDescription.n3,1.2,1.3 Subject,1.1,1.2 resourceAboutURI.n3,1.1,NONE subjectProperty.n3,1.1,NONE Service,1.1,NONE keyword,1.1,NONE subjectProperty,1.1,NONE Service.n3,1.1,NONE resourceAboutURI,1.1,NONE keyword.n3,1.1,NONE =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI 2005/11/23 23:55:25 1.2 @@ -1,12 +1,12 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription 2005/11/23 23:55:25 1.3 @@ -1,12 +1,12 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html 2005/11/23 23:55:25 1.3 @@ -27,9 +27,9 @@
  • =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/03 22:37:29 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/23 23:55:25 1.4 @@ -4,33 +4,33 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > + + + + + + + + - + + + + + - + - + - - - - - - - - - - - - - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3 2005/11/23 23:55:25 1.2 @@ -10,9 +10,4 @@ a owl:Restriction ; owl:onProperty moby:mapsTo ; owl:minCardinality "1"^^xsd:nonNegativeInteger - ] ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty moby:subjectProperty ; - owl:minCardinality "1"^^xsd:nonNegativeInteger - ] . + ] . \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3 2005/11/23 23:55:25 1.3 @@ -9,7 +9,7 @@ rdfs:domain [ rdfs:subClassOf [ a owl:Class ; - owl:unionOf (moby:Service moby:Subject moby:Object) + owl:unionOf (moby:Resource moby:Subject moby:Object) ] ]; rdfs:range xsd:string . \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name 2005/11/23 23:55:25 1.3 @@ -9,23 +9,23 @@ - - + + + + + + + - + + + + - - - - - - - - - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3 2005/11/23 23:55:25 1.3 @@ -6,5 +6,5 @@ moby:oneLineDescription a owl:DatatypeProperty ; - rdfs:domain moby:Service ; + rdfs:domain moby:Resource ; rdfs:range xsd:string . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject 2005/11/23 23:55:25 1.2 @@ -1,22 +1,16 @@ - - 1 - - - + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + 1 - - + \ No newline at end of file rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/resourceAboutURI.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/subjectProperty.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/keyword,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/subjectProperty,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/Service.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/resourceAboutURI,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/keyword.n3,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 18:55:45 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:51:17 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232355.jANNtjUI018233@pub.open-bio.org> gss Wed Nov 23 18:55:45 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies In directory pub.open-bio.org:/tmp/cvs-serv18208/WebRoot/ontologies Modified Files: index.html Log Message: Fixed a typo s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies index.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html 2004/07/15 20:27:16 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html 2005/11/23 23:55:44 1.2 @@ -20,11 +20,11 @@ - + - +
    - - Technical Overview - - - An overview of how to use VPIN-compliant OWL graphs to search for - resources that match a query graph -
    Advertising Resources @@ -52,7 +41,7 @@ - A set of Developer tools to convert and validate OWL graphs + Developer tools to convert OWL graphs
    - - - + + + @@ -51,12 +51,12 @@ - - - - - - + + + + + + @@ -66,12 +66,6 @@ - - - - - -
    ServiceN3RDF/XML
    ResourceN3RDF/XML
    Graph N3 RDF/XML
    oneLineDescription N3 RDF/XML
    resourceAboutURIN3RDF/XML
    keywordN3RDF/XML
    aboutURIN3RDF/XML
    metadataN3RDF/XML
    operatesOn N3 RDF/XML
    mapsTo N3 RDF/XML
    subjectPropertyN3RDF/XML
    objectPropertyN3RDF/XML
    GroupDescription
    Corecore Core classes and properties, which, taken together, form the backbone "canonical" structure of Semantic MOBY graphs.
    Utilityutil Utility classes and properties
    From gss at pub.open-bio.org Wed Nov 23 18:56:36 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:52:05 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232356.jANNuavs018267@pub.open-bio.org> gss Wed Nov 23 18:56:36 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies In directory pub.open-bio.org:/tmp/cvs-serv18246/WebRoot/examples/proxies Added Files: ncbi-megablast-metadata.txt gramene-query-metadata.txt sgd-quicksearch-metadata.txt wormbase-query-metadata.txt flybase-genequery-metadata.txt tair-seqviewer-metadata.txt tair-mapviewer-metadata.txt pubmed-metadata.txt Log Message: Added files containing keywords to replace ontology elements that were only there to provide keywords s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies ncbi-megablast-metadata.txt,NONE,1.1 gramene-query-metadata.txt,NONE,1.1 sgd-quicksearch-metadata.txt,NONE,1.1 wormbase-query-metadata.txt,NONE,1.1 flybase-genequery-metadata.txt,NONE,1.1 tair-seqviewer-metadata.txt,NONE,1.1 tair-mapviewer-metadata.txt,NONE,1.1 pubmed-metadata.txt,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:57:02 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:52:38 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNv2Q9018357@pub.open-bio.org> gss Wed Nov 23 18:57:02 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies In directory pub.open-bio.org:/tmp/cvs-serv18272/WebRoot/examples/proxies Modified Files: wormbase-query tair-seqviewer flybase-genequery ncbi-megablast.n3 gramene-query.n3 sgd-quicksearch.n3 tair-seqviewer.n3 tair-mapviewer tair-mapviewer.n3 pubmed ncbi-megablast sgd-quicksearch pubmed.n3 gramene-query wormbase-query.n3 flybase-genequery.n3 Log Message: Updated to remove keyword properties, add metadata properties s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies wormbase-query,1.5,1.6 tair-seqviewer,1.6,1.7 flybase-genequery,1.5,1.6 ncbi-megablast.n3,1.5,1.6 gramene-query.n3,1.5,1.6 sgd-quicksearch.n3,1.6,1.7 tair-seqviewer.n3,1.6,1.7 tair-mapviewer,1.5,1.6 tair-mapviewer.n3,1.5,1.6 pubmed,1.5,1.6 ncbi-megablast,1.5,1.6 sgd-quicksearch,1.6,1.7 pubmed.n3,1.5,1.6 gramene-query,1.5,1.6 wormbase-query.n3,1.5,1.6 flybase-genequery.n3,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - - - - - + - + - - WormBase Query C. elegans database query at wormbase.org http://www.wormbase.org/ - + http://www.semanticmoby.org/examples/proxies/wormbase-query-metadata.txt + + + + + - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer 2005/11/23 23:57:02 1.7 @@ -1,29 +1,27 @@ - + + - + - + - - TAIR Sequence Viewer Arabidopsis Sequence Viewer resource provided by TAIR http://www.arabidopsis.org/servlets/sv - + http://www.semanticmoby.org/examples/proxies/tair-seqviewer-metadata.txt + - - - + + - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@ - - - FlyBase Gene Query - http://flybase.bio.indiana.edu/genes/fbgquery.hform FlyBase gene query form at flybase.bio.indiana.edu + http://flybase.bio.indiana.edu/genes/fbgquery.hform + http://www.semanticmoby.org/examples/proxies/flybase-genequery-metadata.txt + - + + - + - - + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:ncbi-megablast - a moby:Resource, exterms:ProxyResource, exterms:BlastResource ; + a moby:Resource, ; moby:name "NCBI Mega BLAST" ; moby:oneLineDescription "NCBI MegaBlast resource provided by NCBI" ; moby:inputURI "http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/ncbi-megablast-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:gramene-query - a moby:Resource, exterms:ProxyResource, exterms:CerealGrainSearchResource ; + a moby:Resource ; moby:name "Gramene Query" ; moby:oneLineDescription "Cereal grains database query at gramene.org" ; moby:inputURI "http://www.gramene.org/" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/gramene-query-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3 2005/11/23 23:57:02 1.7 @@ -1,22 +1,22 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:sgd-quicksearch - a moby:Resource, exterms:ProxyResource, exterms:SacchromycesSearchResource ; + a moby:Resource ; moby:name "SGD Quick Search" ; moby:oneLineDescription "Saccharomyces cerevisiae quick search" ; moby:inputURI "http://db.yeastgenome.org/cgi-bin/search/quickSearch" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/sgd-quicksearch-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ - a moby:Subject, exterms:GeneSymbol ; + a moby:Subject ; moby:mapsTo [ - a moby:Object, exterms:GeneDetails + a moby:Object ] ] ] . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3 2005/11/23 23:57:02 1.7 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:tair-seqviewer - a moby:Resource, exterms:ProxyResource, exterms:ArabidopsisSearchResource ; + a moby:Resource ; moby:name "TAIR Sequence Viewer" ; moby:oneLineDescription "Arabidopsis Sequence Viewer resource provided by TAIR" ; moby:inputURI "http://www.arabidopsis.org/servlets/sv" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/tair-seqviewer-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@ - - TAIR Map Viewer Arabidopsis Map Viewer resource provided by TAIR http://www.arabidopsis.org/servlets/mapper + http://www.semanticmoby.org/examples/proxies/tair-mapviewer-metadata.txt - - - - + + + + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:tair-mapviewer - a moby:Resource, exterms:ProxyResource, exterms:ArabidopsisSearchResource ; + a moby:Resource ; moby:name "TAIR Map Viewer" ; moby:oneLineDescription "Arabidopsis Map Viewer resource provided by TAIR" ; moby:inputURI "http://www.arabidopsis.org/servlets/mapper" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/tair-mapviewer-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@
    - - - - - PubMed Entrez PubMed resource provided by NCBI http://www.ncbi.nlm.nih.gov/entrez/query.fcgi? + http://www.semanticmoby.org/examples/proxies/pubmed-metadata.txt - \ No newline at end of file + + + + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - - + + - - + - + + - NCBI Mega BLAST - - http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2 - + NCBI Mega BLAST NCBI MegaBlast resource provided by NCBI - + http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2 + http://www.semanticmoby.org/examples/proxies/ncbi-megablast-metadata.txt + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch 2005/11/23 23:57:02 1.7 @@ -1,6 +1,5 @@ - - - - - - - - - - - SGD Quick Search Saccharomyces cerevisiae quick search http://db.yeastgenome.org/cgi-bin/search/quickSearch + http://www.semanticmoby.org/examples/proxies/sgd-quicksearch-metadata.txt + + + + + + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:pubmed - a moby:Resource, exterms:ProxyResource, exterms:PubSearchResource ; + a moby:Resource ; moby:name "PubMed" ; moby:oneLineDescription "Entrez PubMed resource provided by NCBI" ; moby:inputURI "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/pubmed-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - + + + + + + - - + - Gramene Query + Gramene Query + Cereal grains database query at gramene.org http://www.gramene.org/ - - + http://www.semanticmoby.org/examples/proxies/gramene-query-metadata.txt - Cereal grains database query at gramene.org - - - - - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:wormbase-query - a moby:Resource, exterms:ProxyResource, exterms:ElegansSearchResource ; + a moby:Resource ; moby:name "WormBase Query" ; moby:oneLineDescription "C. elegans database query at wormbase.org" ; moby:inputURI "http://www.wormbase.org/" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/wormbase-query-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3 2005/11/23 23:57:02 1.7 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . -@prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:flybase-genequery - a moby:Resource, exterms:ProxyResource, exterms:DrosophilaSearchResource ; + a moby:Resource ; moby:name "FlyBase Gene Query" ; moby:oneLineDescription "FlyBase gene query form at flybase.bio.indiana.edu" ; moby:inputURI "http://flybase.bio.indiana.edu/genes/fbgquery.hform" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/flybase-genequery-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Wed Nov 23 18:57:21 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:52:51 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNvL46018391@pub.open-bio.org> gss Wed Nov 23 18:57:21 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv18370/WebRoot/examples/hello Added Files: metadata.txt Log Message: Added files containing keywords to replace ontology elements that were only there to provide keywords s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello metadata.txt,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:57:31 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:53:02 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNvVFW018425@pub.open-bio.org> gss Wed Nov 23 18:57:31 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv18396/WebRoot/examples/hello Modified Files: hello-world.rdf hello-world.n3 Log Message: Updated to remove keyword properties, add metadata properties s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello hello-world.rdf,1.6,1.7 hello-world.n3,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/03 22:37:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/23 23:57:31 1.7 @@ -6,25 +6,25 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - - - - VPIN Hello World resource Simple example of a VPIN resource http://www.semanticmoby.org/examples/hello-world http://www.semanticmoby.org/examples/display-hello-world - + http://www.semanticmoby.org/examples/hello/metadata.txt + - - + + - + - + + + + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/03 22:37:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/23 23:57:31 1.7 @@ -7,11 +7,12 @@ @prefix xsd: . ex:hello-world - a moby:Resource, exterms:GreetingResource ; + a moby:Resource ; moby:name "VPIN Hello World resource" ; moby:oneLineDescription "Simple example of a VPIN resource" ; moby:aboutURI "http://www.semanticmoby.org/examples/hello-world" ; moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world" ; + moby:metadata "http://www.semanticmoby.org/examples/hello/metadata.txt" ; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Wed Nov 23 18:58:15 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:53:45 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232358.jANNwF5n018463@pub.open-bio.org> gss Wed Nov 23 18:58:15 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv18438/WebRoot/developer Modified Files: dev-tools.jsp Log Message: Fixed a typo; removed unused forms s-moby/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.jsp,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/17 02:53:03 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/23 23:58:15 1.7 @@ -13,7 +13,7 @@ Convert a Graph to a Different Format -
    + Paste a graph, select its input format, and press "Convert Graph" to convert to the other format @@ -48,61 +48,6 @@
    -
    - -

    - List All Statements in the S-MOBY Metadata Repository -

    - -
    - - - -
    - -
    - -

    - Validate an OWL Graph using Jena -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see what type of - OWL the graph represents - - - -
    -
    - - - -
    - -
    - -

    - Validate an OWL Graph for MOBY Canonical Form -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see if it is MOBY - canonical form - - - -
    -
    - - - -
    - -
    - <%@ include file="/footer.jsp" %> From gss at pub.open-bio.org Wed Nov 23 18:58:48 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:54:18 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232358.jANNwml4018499@pub.open-bio.org> gss Wed Nov 23 18:58:48 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv18476/src/org/semanticmoby/ref/tools Removed Files: KeywordFinder.java KeywordList.java Log Message: Functionality supplanted by MetadataRetriever class s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordFinder.java,1.10,NONE KeywordList.java,1.7,NONE rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/RCS/KeywordFinder.java,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/RCS/KeywordList.java,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 18:59:09 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:54:38 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232359.jANNx9ol018533@pub.open-bio.org> gss Wed Nov 23 18:59:09 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv18512/src/org/semanticmoby/ref/tools Added Files: MetadataRetriever.java Log Message: Helper class for Pull model of keyword registration s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools MetadataRetriever.java,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:59:37 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:55:07 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232359.jANNxbsw018571@pub.open-bio.org> gss Wed Nov 23 18:59:37 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv18546/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java Log Message: Use the new MetadataRetriever to find keywords to register s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/15 22:34:08 1.10 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/23 23:59:36 1.11 @@ -12,6 +12,7 @@ import org.semanticmoby.vocabulary.*; import java.sql.Connection; +import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.*; @@ -93,14 +94,11 @@ Statement stmt = it.nextStatement(); Resource subject = stmt.getSubject(); - String subjectURI = subject.getURI(); - - if (subject.isAnon() || - ( - (subjectURI != null) && - subjectURI.startsWith(uriString) - )) { + String subjectURI = subject.getURI(); + if ((subject.isAnon()) || + ((subjectURI != null) && + (subjectURI.startsWith(uriString)))) { dbModel.add(stmt); } } @@ -117,9 +115,14 @@ // Add keywords associated with the resource // - KeywordFinder finder = new KeywordFinder(resource); - addKeywords(resource.getResource().getURI(), finder.getKeywords(), - dbModel); + MetadataRetriever retriever = new MetadataRetriever( + resource.getJenaModel(), 10000); + + Set words = retriever.getKeywords(); + + if (! words.isEmpty()) { + addKeywords(words, uriString, dbModel); + } // Commit the transaction on the database model // @@ -141,71 +144,65 @@ } } - - private void addKeywords(String resourceURI, KeywordList list, Model model) + private void addKeywords(Set keywords, String resourceURI, Model model) throws StorageException { - + + PreparedStatement stmt = null; + try { - ModelRDB dbModel = (ModelRDB) model; - Connection conn = dbModel.getConnection().getConnection(); + ModelRDB dbModel = (ModelRDB) model; + Connection conn = dbModel.getConnection().getConnection(); - java.sql.Statement sql = conn.createStatement(); - - doAddKeywords(resourceURI, list.getResourceKeywords(), "P", sql); - doAddKeywords(resourceURI, list.getSubjectKeywords(), "S", sql); - doAddKeywords(resourceURI, list.getObjectKeywords(), "O", sql); + stmt = conn.prepareStatement( + "INSERT INTO MOBY_KEYWORD " + + " (keyword, resource_uri, applies_to) " + + "VALUES ( ?, ?, '' )"); + + for (Iterator it = keywords.iterator(); it.hasNext();) { + String keyword = (String) it.next(); + stmt.setString(1, keyword); + stmt.setString(2, resourceURI); + stmt.execute(); + } + } catch (Throwable t) { - t.printStackTrace(); throw new StorageException(t); + } finally { + if (stmt != null) { + try { + stmt.close(); + } catch (Throwable t) {} + } } } - - private void doAddKeywords(String resourceURI, Iterator it, - String appliesTo, java.sql.Statement sql) - throws SQLException { - - while (it.hasNext()) { - - String keyword = it.next().toString(); - - StringBuffer sb = new StringBuffer(); - - sb.append("INSERT INTO MOBY_KEYWORD\n"); - sb.append(" (keyword, resource_uri, applies_to)\n"); - sb.append("values ('"); - sb.append(keyword.toLowerCase().trim()); - sb.append("', '"); - sb.append(resourceURI); - sb.append("', '"); - sb.append(appliesTo); - sb.append("')"); - - String queryString = sb.toString(); - - sql.execute(queryString); - } - } - - private void removeKeywords(String resourceURI, Model model) throws StorageException { - + + PreparedStatement stmt = null; + try { - ModelRDB dbModel = (ModelRDB) model; - Connection conn = dbModel.getConnection().getConnection(); - - java.sql.Statement sql = conn.createStatement(); + ModelRDB dbModel = (ModelRDB) model; + Connection conn = dbModel.getConnection().getConnection(); - sql.execute("DELETE FROM MOBY_KEYWORD WHERE resource_uri = '" + - resourceURI + "'"); + stmt = conn.prepareStatement( + "DELETE FROM MOBY_KEYWORD WHERE resource_uri = '?'"); + + stmt.setString(1, resourceURI); + stmt.execute(); + } catch (Throwable t) { - t.printStackTrace(); throw new StorageException(t); + } finally { + if (stmt != null) { + try { + stmt.close(); + } catch (Throwable t) {} + } } } From gss at pub.open-bio.org Wed Nov 23 19:00:05 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed Nov 23 18:55:33 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511240000.jAO005j8018610@pub.open-bio.org> gss Wed Nov 23 19:00:05 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv18589/src/org/semanticmoby/ref/tools/db Added Files: ClearDB.java Log Message: Utility class to clear a database of Jena statements and MOBY keywords s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db ClearDB.java,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 05:42:08 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 05:37:37 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241042.jAOAg8We020249@pub.open-bio.org> senger Thu Nov 24 05:42:07 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/panels In directory pub.open-bio.org:/tmp/cvs-serv20231/panels Log Message: Directory /home/repository/moby/moby-live/Java/docs/panels added to the repository moby-live/Java/docs/panels - New directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/directory,v: No such file or directory From senger at pub.open-bio.org Thu Nov 24 08:51:30 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:47:00 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpUHa020603@pub.open-bio.org> senger Thu Nov 24 08:51:30 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv20584 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.44,1.45 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/22 18:03:27 1.44 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/24 13:51:30 1.45 @@ -38,6 +38,7 @@ + @@ -290,6 +291,8 @@ 'excludepackagenames' below (use comma-separated list, wildcard allowed). Consider also to add new 'group' elements (below) for new packages. --> + + @@ -337,6 +340,10 @@ + + + + From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:47:39 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVEu020622@pub.open-bio.org> senger Thu Nov 24 08:51:30 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv20584/docs Modified Files: index.html Added Files: Dashboard-NOTES.txt Dashboard.html Log Message: moby-live/Java/docs Dashboard-NOTES.txt,NONE,1.1 Dashboard.html,NONE,1.1 index.html,1.16,1.17 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/index.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/docs/index.html 2005/10/18 20:15:37 1.16 +++ /home/repository/moby/moby-live/Java/docs/index.html 2005/11/24 13:51:30 1.17 @@ -44,9 +44,9 @@
  • How to use jMoby @@ -54,7 +54,8 @@
  • How to develop with jMoby
      -
    • MoSeS - Moby Services Support +
    • MoSeS - Moby Services Support +
    • Biomoby Dashboard
    • The Twelve Commandments for jMoby developers (and some good advice)
    • Directories and packages names explained
    • Available APIs @@ -92,7 +93,7 @@
      Martin Senger
      -Last modified: Tue Oct 18 22:04:57 2005 +Last modified: Thu Nov 24 16:19:09 2005
      From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:47:40 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpV2C020639@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv20584/docs/images Added Files: MosesGeneratorPanel-small.jpg MosesGeneratorPanel.jpg RegistrationPanel-small.jpg RegistrationPanel.jpg RegistryBrowserPanel-small.jpg RegistryBrowserPanel.jpg updated.gif Log Message: moby-live/Java/docs/images MosesGeneratorPanel-small.jpg,NONE,1.1 MosesGeneratorPanel.jpg,NONE,1.1 RegistrationPanel-small.jpg,NONE,1.1 RegistrationPanel.jpg,NONE,1.1 RegistryBrowserPanel-small.jpg,NONE,1.1 RegistryBrowserPanel.jpg,NONE,1.1 updated.gif,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:47:43 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVYn020677@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv20584/src/Clients Modified Files: TestAuth.java Log Message: moby-live/Java/src/Clients TestAuth.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java 2005/11/16 08:40:53 1.1 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java 2005/11/24 13:51:31 1.2 @@ -11,7 +11,7 @@ // Access the page try { // Create a URL for the desired page - URL url = new URL ("http://localhost/~senger/secure/a.tmp"); + URL url = new URL ("http://localhost:9999/~senger/secure/a.tmp"); // Read all the text returned by the server BufferedReader in = new BufferedReader (new InputStreamReader (url.openStream())); From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:47:45 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVW5020720@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20584/src/main/org/biomoby/service/dashboard Modified Files: RegistrationPanel.java Removed Files: NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationPanel.java,1.17,1.18 NOTES,1.32,NONE =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/19 18:33:01 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/24 13:51:31 1.18 @@ -161,7 +161,7 @@ * **************************************************************************/ public String getName() { - return "Biomoby Registration"; + return "Registration"; } /************************************************************************** rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RCS/NOTES,v: No such file or directory From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:47:47 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVmY020698@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20584/src/config/dashboard/org/biomoby/service/dashboard Modified Files: dashboard.txt Log Message: moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt 2005/11/19 18:33:01 1.1 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt 2005/11/24 13:51:31 1.2 @@ -1,8 +1,8 @@ -Dasboard is a Graphical User Interface helping Biomoby service +Dashboard is a Graphical User Interface helping Biomoby service providers to develop and deploy their Biomoby services. However, because of its extensibility, it may contain also panels that are useful even for pure Biomoby end-users when they wish to call Biomoby -services).

      +services.

      Support for Java developing for Biomoby is available at http://biomoby.org/moby-live/Java/docs/. From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:48:06 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVlP020658@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/panels In directory pub.open-bio.org:/tmp/cvs-serv20584/docs/panels Added Files: .cvsignore.template Log Message: moby-live/Java/docs/panels .cvsignore.template,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 08:52:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu Nov 24 08:48:24 2005 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241352.jAODql25020788@pub.open-bio.org> senger Thu Nov 24 08:52:47 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv20773/docs/images Added Files: GCP-dashboard-smaller.jpg GCP-dashboard.jpg bug.gif Log Message: moby-live/Java/docs/images GCP-dashboard-smaller.jpg,NONE,1.1 GCP-dashboard.jpg,NONE,1.1 bug.gif,NONE,1.1 From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCnf009588@pub.open-bio.org> gss Tue Nov 1 11:28:11 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/tools Modified Files: InvocationBroker.java KeywordFinder.java KeywordList.java URIInvestigator.java KeywordQuery.java DiscoveryQuery.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.5,1.6 KeywordFinder.java,1.6,1.7 KeywordList.java,1.3,1.4 URIInvestigator.java,1.6,1.7 KeywordQuery.java,1.6,1.7 DiscoveryQuery.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/10/09 01:11:21 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/01 16:28:11 1.6 @@ -9,8 +9,6 @@ import org.semanticmoby.http.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.vocabulary.MOBY; import java.io.*; @@ -23,7 +21,7 @@ /** * This class is used to invoke and display the results of Semantic - * MOBY services. + * MOBY resources. */ public class InvocationBroker { @@ -54,49 +52,49 @@ this.response = response; } - private String rdfxmlString(MOBYService service) { + private String rdfxmlString(MOBYResource resource) { StringWriter writer = new StringWriter(); - service.getJenaModel().write(writer); + resource.getJenaModel().write(writer); return writer.toString(); } - private String n3String(MOBYService service) { + private String n3String(MOBYResource resource) { StringWriter writer = new StringWriter(); - service.getJenaModel().write(writer, "N3"); + resource.getJenaModel().write(writer, "N3"); return writer.toString(); } /** - * Handle a request to invoke a service at a given URI. - * If the service requires inputs, and the service has + * Handle a request to invoke a resource at a given URI. + * If the resource requires inputs, and the resource has * a valid inputURI property, redirect to the URI that is - * the value of the property. If the service requires input + * the value of the property. If the resource requires input * and has no inputURI property, then build a simple input * GUI from scratch. *

      - * If the service doesn't require any inputs, then do an HTTP - * POST to the service URI, passing the graph as a parameter. + * If the resource doesn't require any inputs, then do an HTTP + * POST to the resource URI, passing the graph as a parameter. */ - public void invokeURI(String serviceURI) { + public void invokeURI(String resourceURI) { - // Try to retrieve and parse a service graph from the URI; + // Try to retrieve and parse a resource graph from the URI; // on failure, print a message and return. // - MOBYService service = null; + MOBYResource resource = null; try { Model model = ModelFactory.createDefaultModel(); - model.read(serviceURI); + model.read(resourceURI); Parser parser = new Parser(model); - service = parser.parseService(); + resource = parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); @@ -104,18 +102,18 @@ return; } - if (requiresInputs(service)) { + if (requiresInputs(resource)) { - // Since the service requires input, either redirect to its + // Since the resource requires input, either redirect to its // inputURI (if it has one) or build a simple GUI for it. // try { - String inputURI = getInputURI(service); + String inputURI = getInputURI(resource); if (inputURI == null) { - buildInputGUI(service); + buildInputGUI(resource); } else { // Do an HTTP HEAD request to find out if the @@ -131,24 +129,24 @@ response.sendRedirect(inputURI); } else { - buildInputGUI(service); + buildInputGUI(resource); } } } catch (Throwable t) { t.printStackTrace(); - buildInputGUI(service); + buildInputGUI(resource); } } else // No input required { try { - // Invoke the service + // Invoke the resource // - HTTPRequest rqst = HTTPRequest.newPostRequest(service.getURI()); + HTTPRequest rqst = HTTPRequest.newPostRequest(resource.getURI()); rqst.addParameter(MOBY.GRAPH_PARAMETER_NAME, - rdfxmlString(service)); + rdfxmlString(resource)); HTTPResponse resp = rqst.send(); @@ -165,16 +163,16 @@ model.read(resp.getBodyAsStream(), ""); Parser parser = new Parser(model); - MOBYService resultsService = parser.parseService(); + MOBYResource resultsResource = parser.parseResource(); - String outputURI = getOutputURI(resultsService); + String outputURI = getOutputURI(resultsResource); if (outputURI == null) { // No output URI was specified, so build a generic // display of the results // - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } else { // There is an output URI. Conceptually, what we want @@ -193,7 +191,7 @@ // rqst = HTTPRequest.newPostRequest(outputURI); - String graphString = rdfxmlString(resultsService); + String graphString = rdfxmlString(resultsResource); rqst.addParameter(MOBY.GRAPH_PARAMETER_NAME, graphString); resp = rqst.send(); @@ -210,12 +208,12 @@ // The output URI returned a status other than // 200 OK, so fall back to a default output GUI // - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } } catch (Throwable t) { t.printStackTrace(); - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } } } else { @@ -252,13 +250,13 @@ } - private String getInputURI(MOBYService service) { + private String getInputURI(MOBYResource resource) { try { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Statement stmt = - model.getProperty(service.getResource(), MOBY.inputURI); + model.getProperty(resource.getResource(), MOBY.inputURI); if (stmt != null) { @@ -276,13 +274,13 @@ } - private String getOutputURI(MOBYService service) { + private String getOutputURI(MOBYResource resource) { try { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Statement stmt = - model.getProperty(service.getResource(), MOBY.outputURI); + model.getProperty(resource.getResource(), MOBY.outputURI); return stmt.getString(); } catch (Throwable t) { @@ -294,30 +292,30 @@ } - public void buildInputGUI(MOBYService service) { + public void buildInputGUI(MOBYResource resource) { // error message } - public void buildOutputGUI(MOBYService service) + public void buildOutputGUI(MOBYResource resource) throws IOException, ServletException { HttpSession session = request.getSession(true); session.setAttribute("n3Graph", - n3String(service).replaceAll("<", "<") + n3String(resource).replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """)); session.setAttribute("rdfxmlGraph", - rdfxmlString(service).replaceAll("<", "<") + rdfxmlString(resource).replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """)); redirectToPage("/jsp/display.jsp"); } - private boolean requiresInputs(MOBYService service) { + private boolean requiresInputs(MOBYResource resource) { - return getInputURI(service) != null; + return getInputURI(resource) != null; } } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/01 16:28:11 1.7 @@ -6,8 +6,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.vocabulary.MOBY; import java.util.*; @@ -16,15 +14,15 @@ public class KeywordFinder { /** - * The MOBY service for which to find keywords + * The MOBY resource for which to find keywords */ - private MOBYService service; + private MOBYResource resource; /** - * The underlying Jena model on which the MOBY service + * The underlying Jena model on which the MOBY resource * is based */ - private Model serviceModel; + private Model resourceModel; /** * A keyword list object to hold the keywords that are @@ -33,17 +31,17 @@ private KeywordList keywords = null; /** - * Construct an instance for the given service and model + * Construct an instance for the given resource and model */ - public KeywordFinder(MOBYService service) { + public KeywordFinder(MOBYResource resource) { - this.service = service; - this.serviceModel = service.getJenaModel(); + this.resource = resource; + this.resourceModel = resource.getJenaModel(); } /** * Retrieve, if necessary, and return the keywords associated - * with the service. + * with the resource. */ public KeywordList getKeywords() throws Exception { @@ -58,20 +56,20 @@ /** - * Collect keywords for the service + * Collect keywords for the resource */ - private void collectKeywords() { // Add keywords from classes that the service is asserted to + private void collectKeywords() { // Add keywords from classes that the resource is asserted to - // be an instance of (i.e. service rdf:type ) + // be an instance of (i.e. resource rdf:type ) // - Resource res = service.getResource(); + Resource res = resource.getResource(); - keywords.addServiceKeywords(getKeywordsFor(res)); + keywords.addResourceKeywords(getKeywordsFor(res)); // Add keywords from subjects and objects of each // operatesOn subgraph // - for (Iterator it = service.getOperatesOn(); it.hasNext();) { + for (Iterator it = resource.getOperatesOn(); it.hasNext();) { MOBYGraphNode node = (MOBYGraphNode) it.next(); @@ -176,7 +174,7 @@ // Iterate over the resource's rdf:type properties // StmtIterator it = - serviceModel.listStatements(res, RDF.type, (RDFNode) null); + resourceModel.listStatements(res, RDF.type, (RDFNode) null); while (it.hasNext()) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/10/09 01:11:21 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/01 16:28:11 1.4 @@ -7,25 +7,25 @@ public class KeywordList { - private Set serviceKeywords = new HashSet(); + private Set resourceKeywords = new HashSet(); private Set subjectKeywords = new HashSet(); private Set objectKeywords = new HashSet(); - public void addServiceKeyword(String keyword) { + public void addResourceKeyword(String keyword) { - serviceKeywords.add(keyword); + resourceKeywords.add(keyword); } - public void addServiceKeywords(List keywords) { + public void addResourceKeywords(List keywords) { - serviceKeywords.addAll(keywords); + resourceKeywords.addAll(keywords); } - public Iterator getServiceKeywords() { + public Iterator getResourceKeywords() { - return serviceKeywords.iterator(); + return resourceKeywords.iterator(); } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/01 16:28:11 1.7 @@ -9,8 +9,6 @@ import org.semanticmoby.http.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.*; @@ -46,15 +44,15 @@ * The URL that is to be investigated for possible inclusion in the * metadata repository. */ - private String serviceURL; + private String resourceURL; /** * Create an instance for investingating the given resource URL * @param resourceURL the URL to investigate */ - private URIInvestigator(String serviceURL) { + private URIInvestigator(String resourceURL) { - this.serviceURL = serviceURL; + this.resourceURL = resourceURL; } /** @@ -64,19 +62,19 @@ * investigated, then this call is a NO-OP. * @param resourceURL the URL to investigate */ - public synchronized static void investigate(String serviceURL) { + public synchronized static void investigate(String resourceURL) { synchronized (instances) { - if (instances.get(serviceURL) != null) { + if (instances.get(resourceURL) != null) { - syncLog.warn("Already investigating " + serviceURL); + syncLog.warn("Already investigating " + resourceURL); return; } - URIInvestigator investigator = new URIInvestigator(serviceURL); - instances.put(serviceURL, investigator); + URIInvestigator investigator = new URIInvestigator(resourceURL); + instances.put(resourceURL, investigator); investigator.start(); } } @@ -121,7 +119,7 @@ // synchronized (instances) { - instances.remove(serviceURL); + instances.remove(resourceURL); } } } @@ -152,13 +150,13 @@ try { - lastModifiedDate = manager.getLastModifiedDate(serviceURL); + lastModifiedDate = manager.getLastModifiedDate(resourceURL); alreadyRegistered = (lastModifiedDate != null); } catch (StorageException e) { e.printStackTrace(); syncLog.error("Couldn't check for last modified date of resource URL " + - serviceURL, e); + resourceURL, e); e.printStackTrace(); return; @@ -166,7 +164,7 @@ // Helper class for making the HTTP GET call // - HTTPRequest request = HTTPRequest.newGetRequest(serviceURL); + HTTPRequest request = HTTPRequest.newGetRequest(resourceURL); // If there was a last modified date, then request that the graph only // be sent if it has been modified since that date @@ -190,7 +188,7 @@ } catch (HTTPException e) { e.printStackTrace(); - syncLog.warn("Couldn't reach suggested resource " + serviceURL); + syncLog.warn("Couldn't reach suggested resource " + resourceURL); return; } @@ -202,7 +200,7 @@ // The resource has not been modified since it was // registered, so there is nothing to do but log a message. // - syncLog.info("IN-SYNC : " + serviceURL); + syncLog.info("IN-SYNC : " + resourceURL); break; @@ -214,10 +212,10 @@ if (alreadyRegistered) { deregisterResource(manager, true); - syncLog.info("ALREADY REGISTERED : " + serviceURL); + syncLog.info("ALREADY REGISTERED : " + resourceURL); } else { - syncLog.info("IGNORED : " + serviceURL + " doesn't exist"); + syncLog.info("IGNORED : " + resourceURL + " doesn't exist"); } break; @@ -245,7 +243,7 @@ // e.printStackTrace(); syncLog.warn("Unable to get Last-Modified date for " + - serviceURL + "; using current date"); + resourceURL + "; using current date"); lastModifiedDate = new Date(); } catch (Throwable t) { @@ -254,7 +252,7 @@ // t.printStackTrace(); syncLog.warn("Unparsable Last-Modified date " + "(\"" + - dateString + "\") for " + serviceURL + + dateString + "\") for " + resourceURL + "; ignoring"); } @@ -270,48 +268,48 @@ } catch (HTTPException e) { e.printStackTrace(); - syncLog.error("Couldn't retrieve graph from " + serviceURL); + syncLog.error("Couldn't retrieve graph from " + resourceURL); return; } - MOBYService service = null; + MOBYResource resource = null; try { Parser parser = Parser.forInputStream(in, Parser.LANGUAGE_RDF_XML); - service = parser.parseService(); + resource = parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); System.err.println("Parse error: " + t); } - if (service == null) { + if (resource == null) { // De-register the resource, printing a removal message if - // a service couldn't be parsed - deregisterResource(manager, service == null); - syncLog.error("Couldn't parse a resource from graph at " + serviceURL); + // a resource couldn't be parsed + deregisterResource(manager, resource == null); + syncLog.error("Couldn't parse a resource from graph at " + resourceURL); - // If a service was parsed, then register it + // If a resource was parsed, then register it } else { try { - manager.registerResource(service, lastModifiedDate); + manager.registerResource(resource, lastModifiedDate); // Log a message about successfully registering the graph: // syncLog.info(( alreadyRegistered ? "UPDATED : " : "ADDED : " - ) + serviceURL); + ) + resourceURL); } catch (Exception e) { e.printStackTrace(); - syncLog.error("Error storing graph for " + serviceURL, e); + syncLog.error("Error storing graph for " + resourceURL, e); } } @@ -322,7 +320,7 @@ // Log a message about the failed attempt to contact the URL // syncLog.error("Status " + status + " received while trying " + - "to contact resource " + serviceURL); + "to contact resource " + resourceURL); break; } @@ -333,16 +331,16 @@ try { - manager.deregisterResource(serviceURL); + manager.deregisterResource(resourceURL); if (removing) { - syncLog.info("REMOVED : " + serviceURL); + syncLog.info("REMOVED : " + resourceURL); } } catch (StorageException e) { e.printStackTrace(); - syncLog.error("Unable to de-register resource " + serviceURL, e); + syncLog.error("Unable to de-register resource " + resourceURL, e); } } } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java 2005/11/01 16:28:11 1.7 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.Util; @@ -50,7 +48,7 @@ while (rs.next()) { String uri = rs.getString("resource_uri"); - MOBYService resource = serviceAt(uri, model); + MOBYResource resource = resourceAt(uri, model); if (resource != null) { @@ -75,7 +73,7 @@ } - private MOBYService serviceAt(String uri, Model model) { + private MOBYResource resourceAt(String uri, Model model) { Model resourceModel = ModelFactory.createDefaultModel(); Resource resource = resourceModel.createResource(uri); @@ -86,7 +84,7 @@ Parser parser = new Parser(resourceModel); - return parser.parseService(); + return parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/01 16:28:11 1.7 @@ -10,8 +10,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.Util; @@ -53,7 +51,7 @@ /** * The graph that serves as a template for resources that match. */ - private MOBYService queryResource; + private MOBYResource queryResource; /** * Flag indicating which statements should be returned: URI_ONLY, @@ -79,25 +77,25 @@ * @param statementsToReturn which statements should be returned: URI_ONLY, * QUERY_STMTS_ONLY, or ALL_STMTS (use the static constants on this class). */ - private DiscoveryQuery(MOBYService queryResource, int statementsToReturn) { + private DiscoveryQuery(MOBYResource queryResource, int statementsToReturn) { this.queryResource = queryResource; this.statementsToReturn = statementsToReturn; } - public static DiscoveryQuery newMinimalStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newMinimalStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, MINIMAL_STMTS); } - public static DiscoveryQuery newQueryStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newQueryStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, QUERY_STMTS); } - public static DiscoveryQuery newReachableStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newReachableStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, REACHABLE_STMTS); } @@ -114,7 +112,7 @@ } - public MOBYServiceSet findMatchingGraphs() { + public MOBYResourceSet findMatchingGraphs() { init(); @@ -123,7 +121,7 @@ try { Model queryModel = - ((MOBYService) queryResource).getJenaModel(); + ((MOBYResource) queryResource).getJenaModel(); String queryString = buildQueryString(queryModel); StorageManager manager = new StorageManager(); dbModel = manager.openDBModel(); @@ -142,14 +140,14 @@ results.close(); - MOBYServiceSet returnSet = new MOBYServiceSet(); + MOBYResourceSet returnSet = new MOBYResourceSet(); for (Iterator it = matching.iterator(); it.hasNext();) { Object next = it.next(); - MOBYService mp = + MOBYResource mp = buildGraphModel(dbModel, queryModel, (ResultBinding) next); - returnSet.addService(mp); + returnSet.addResource(mp); } return returnSet; @@ -273,7 +271,7 @@ * @param binding bindings for variables * @return */ - private MOBYService buildGraphModel(Model dbModel, Model queryModel, + private MOBYResource buildGraphModel(Model dbModel, Model queryModel, ResultBinding binding) throws NonCanonicalException { @@ -313,7 +311,7 @@ // Parser parser = new Parser(adjusted); - return parser.parseService(); + return parser.parseResource(); } @@ -361,7 +359,7 @@ try { Statement resourceTypeStmt = - original.listStatements(null, RDF.type, MOBY.Service) + original.listStatements(null, RDF.type, MOBY.Resource) .nextStatement(); minimal.add(resourceTypeStmt); @@ -433,7 +431,7 @@ try { Statement resourceTypeStmt = - original.listStatements(null, RDF.type, MOBY.Service) + original.listStatements(null, RDF.type, MOBY.Resource) .nextStatement(); Resource subject = resourceTypeStmt.getSubject(); Util.addReachableStmts(dbModel, reachable, subject, subject.getURI()); From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCc0009634@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java DBConnection.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.6,1.7 DBConnection.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/01 16:28:12 1.7 @@ -60,16 +60,16 @@ * are in the resource graph's namespace will be stored in the global repository, * and all statements from the resource graph are stored in a separate model * that has as its name the fully expanded URI of the resource. - * @param service the resource to store + * @param resource the resource to store * @param lastModifiedDate when the graph was last modified * @throws StorageException if unable to access the database */ - public void registerResource(MOBYService service, Date lastModifiedDate) + public void registerResource(MOBYResource resource, Date lastModifiedDate) throws StorageException { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Model dbModel = null; - String uriString = service.getResource().getURI(); + String uriString = resource.getResource().getURI(); Resource uri = model.createResource(uriString); try { @@ -119,8 +119,8 @@ // Add keywords associated with the resource // - KeywordFinder finder = new KeywordFinder(service); - addKeywords(service.getResource().getURI(), finder.getKeywords(), + KeywordFinder finder = new KeywordFinder(resource); + addKeywords(resource.getResource().getURI(), finder.getKeywords(), dbModel); // Commit the transaction on the database model @@ -154,7 +154,7 @@ java.sql.Statement sql = conn.createStatement(); - doAddKeywords(resourceURI, list.getServiceKeywords(), "P", sql); + doAddKeywords(resourceURI, list.getResourceKeywords(), "P", sql); doAddKeywords(resourceURI, list.getSubjectKeywords(), "S", sql); doAddKeywords(resourceURI, list.getObjectKeywords(), "O", sql); } catch (Throwable t) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/10/09 01:11:22 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/01 16:28:12 1.2 @@ -57,17 +57,11 @@ * for this application. */ public DBConnection() { - - this.propsFileName = propsFileName; - this.logFileName = logFileName; - try { - startLog(); loadDBProperties(); connect(); } catch (Exception e) { - System.err.println(); e.printStackTrace(); } From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCxZ009677@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/.settings In directory pub.open-bio.org:/tmp/cvs-serv9543/.settings Added Files: org.eclipse.jdt.core.prefs org.eclipse.jdt.ui.prefs Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/.settings org.eclipse.jdt.core.prefs,NONE,1.1 org.eclipse.jdt.ui.prefs,NONE,1.1 From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCDk009661@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets Modified Files: DiscoveryServlet.java KeywordSearchServlet.java ResultsDisplayServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets DiscoveryServlet.java,1.5,1.6 KeywordSearchServlet.java,1.7,1.8 ResultsDisplayServlet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/10/28 04:12:26 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/01 16:28:12 1.6 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.*; import org.semanticmoby.servlet.*; @@ -50,9 +48,9 @@ ParamReader.getParameter("query-graph", request); // Parse the query graph into a MOBYGraph object - Parser parser = + Parser parser = Parser.forString(graphString, Parser.LANGUAGE_RDF_XML); - MOBYService service = parser.parseService(); + MOBYResource resource = parser.parseResource(); // Find which statements the user wishes to have returned String statements = @@ -66,17 +64,14 @@ DiscoveryQuery q = null; if (statements.equalsIgnoreCase("minimal")) { - - q = DiscoveryQuery.newMinimalStmtsQuery(service); + q = DiscoveryQuery.newMinimalStmtsQuery(resource); } else if (statements.equalsIgnoreCase("query")) { - - q = DiscoveryQuery.newQueryStmtsQuery(service); + q = DiscoveryQuery.newQueryStmtsQuery(resource); } else { - - q = DiscoveryQuery.newReachableStmtsQuery(service); + q = DiscoveryQuery.newReachableStmtsQuery(resource); } - MOBYServiceSet matching = q.findMatchingGraphs(); + MOBYResourceSet matching = q.findMatchingGraphs(); if ((matching == null) || (matching.size() == 0)) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/10/28 04:12:26 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/01 16:28:12 1.8 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.tools.*; import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.ref.tools.db.DBConnection; @@ -87,7 +85,7 @@ String uri = result.getString(1); row.add(uri); - MOBYService resource = resourceAt(uri, model); + MOBYResource resource = resourceAt(uri, model); String name = resource.getName(); row.add(name); @@ -194,7 +192,7 @@ } - private MOBYService resourceAt(String uri, Model model) { + private MOBYResource resourceAt(String uri, Model model) { Model resourceModel = ModelFactory.createDefaultModel(); Resource resource = resourceModel.createResource(uri); @@ -205,7 +203,7 @@ Parser parser = new Parser(resourceModel); - return parser.parseService(); + return parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java 2005/11/01 16:28:12 1.5 @@ -1,8 +1,7 @@ package org.semanticmoby.ref.servlets; -import org.semanticmoby.graph.MOBYService; - -import org.semanticmoby.parser.Parser; +import org.semanticmoby.graph.MOBYResource; +import org.semanticmoby.graph.Parser; import org.semanticmoby.ref.tools.*; @@ -26,15 +25,15 @@ // Read the invocation graph from the MOBY.GRAPH_PARAMETER_NAME // parameter and parse it into a MOBYGraph object // - String graphString = + String graphString = ParamReader.getParameter(MOBY.GRAPH_PARAMETER_NAME, request); - Parser parser = + Parser parser = Parser.forString(graphString, Parser.LANGUAGE_RDF_XML); - MOBYService service = parser.parseService(); + MOBYResource resource = parser.parseResource(); InvocationBroker broker = new InvocationBroker(this, request, response); - broker.buildOutputGUI(service); + broker.buildOutputGUI(resource); } catch (Throwable t) { t.printStackTrace(); From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCaU009699@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets/example Modified Files: HelloWorldServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example HelloWorldServlet.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/10/28 04:12:27 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/01 16:28:12 1.6 @@ -32,11 +32,11 @@ } - protected void handleRequest(MOBYService service) { + protected void handleRequest(MOBYResource resource) { try { - MOBYGraph graph = (MOBYGraph) service.getOperatesOn().next(); + MOBYGraph graph = (MOBYGraph) resource.getOperatesOn().next(); MOBYSubject subject = (MOBYSubject) graph.getHasMapping(); From gss at pub.open-bio.org Tue Nov 1 11:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCGF009610@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets/dev Modified Files: MOBYGraphValidationServlet.java ResourceListServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev MOBYGraphValidationServlet.java,1.4,1.5 ResourceListServlet.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java 2005/11/01 16:28:12 1.5 @@ -4,9 +4,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.NonCanonicalException; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.servlets.BaseServlet; import org.semanticmoby.servlet.*; @@ -35,7 +32,7 @@ baseModel.read(reader, null); Parser parser = new Parser(baseModel); - parser.parseService(); + parser.parseResource(); out.println("Model is canonical"); } catch (ParameterException e) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/10/28 04:12:26 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/01 16:28:12 1.2 @@ -29,7 +29,7 @@ Model dbModel = manager.openDBModel(); int count = 0; StmtIterator it = - dbModel.listStatements(null, RDF.type, MOBY.Service); + dbModel.listStatements(null, RDF.type, MOBY.Resource); while (it.hasNext()) { From gss at pub.open-bio.org Tue Nov 1 19:29:07 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 19:29:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020029.jA20T7iY011446@pub.open-bio.org> gss Tue Nov 1 19:29:07 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv11421/src/org/semanticmoby/graph Modified Files: Parser.java Log Message: (adf) Added comments about things we might want to resolve later s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/10/31 17:23:27 1.1 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2 @@ -268,6 +268,8 @@ // Since the resource is a MOBY Graph, it should have exactly one // hasMapping property that leads to its mapping subgraph. // + // TODO: adf wonders if the constraint that there is exactly one + // hasMapping property is necessary Statement hasMappingStmt = model.listStatements(res, MOBY.hasMapping, (RDFNode) null).nextStatement(); @@ -275,7 +277,7 @@ return new MOBYGraph(model, typeStmt, hasMappingStmt, parseHasMapping(hasMappingObject)); - } else { + } else if (isDataStructure(res)) { // Throw an exception if it is also a graph // if (isGraph(res)) { @@ -304,6 +306,10 @@ // of the collection depends on the type of the passed resource // return collectionFor(res, subgraphs); + } else { + throw new NonCanonicalException( + "A resource was found to be neither a Graph " + + "nor Data Structure", model); } } From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6u2012212@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv12193/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.45,1.46 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/10/27 04:15:23 1.45 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/02 06:39:05 1.46 @@ -1,3 +1,9 @@ +2005-11-02 Martin Senger + + * Changed method equals() in MobyService. + + * Add Comparator interface/implementation to MobyService. + 2005-10-26 Martin Senger * Add Comparator interface/implementtaion to MobyServiceType. From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d66H012252@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java DataTypesTree.java NamespacesTree.java RegistryModel.java RegistryPanel.java ServiceTypesTree.java Added Files: ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard ServicesBoard.java,NONE,1.1 ServicesTree.java,NONE,1.1 CommonTree.java,1.9,1.10 DataTypesTree.java,1.6,1.7 NamespacesTree.java,1.1,1.2 RegistryModel.java,1.11,1.12 RegistryPanel.java,1.15,1.16 ServiceTypesTree.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/10/28 11:30:37 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/02 06:39:06 1.10 @@ -55,14 +55,23 @@ protected final static String AC_EXPAND = "ac-expand"; protected final static String AC_COLLAPSE = "ac-collapse"; protected final static String AC_RELOAD = "ac-reload"; + protected final static String AC_NSORT = "ac-nsort"; + protected final static String AC_ASORT = "ac-asort"; // some shared constants - final static protected int SORTED_BY_NAME = 0; - final static protected int SORTED_BY_AUTHORITY = 1; + final static protected int SORTED_BY_NAME = 0; + final static protected int SORTED_BY_AUTHORITY = 1; + final static protected int SORTED_UNUSUAL = 9; + // all higher numbers indicates an unusual sorting order that we + // will not keep in case of reloading + final static protected int SORTED_BY_SERVICE_TYPE = 11; + final static protected int SORTED_BY_INPUT_DATA = 12; + final static protected int SORTED_BY_OUTPUT_DATA = 13; // tree components protected JPopupMenu popup; protected String lastSearchText = ""; + protected int lastSorted = SORTED_BY_NAME; // shared icons static protected Icon searchIcon; @@ -70,6 +79,11 @@ static protected Icon menuExpandIcon, menuExpandIconDis; static protected Icon menuCollapseIcon, menuCollapseIconDis; static protected Icon menuReloadIcon, menuReloadIconDis; + static protected Icon smallNIcon, smallNIconDis; + static protected Icon smallAIcon, smallAIconDis; + static protected Icon smallTIcon, smallTIconDis; + static protected Icon smallIIcon, smallIIconDis; + static protected Icon smallOIcon, smallOIconDis; protected String rootNode; @@ -212,6 +226,22 @@ if (menuReloadIconDis == null) menuReloadIconDis = SwingUtils.createIcon ("images/smallReload_dis.gif", Dashboard.class); + + if (smallNIcon == null) smallNIcon = loadIcon ("images/smallN.gif"); + if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallN_dis.gif"); + if (smallAIcon == null) smallAIcon = loadIcon ("images/smallA.gif"); + if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallA_dis.gif"); + if (smallTIcon == null) smallTIcon = loadIcon ("images/smallT.gif"); + if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallT_dis.gif"); + if (smallIIcon == null) smallIIcon = loadIcon ("images/smallI.gif"); + if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); + if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); + if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + } + + // + private Icon loadIcon (String path) { + return SwingUtils.createIcon (path, Dashboard.class); } /********************************************************************* @@ -312,6 +342,25 @@ } /********************************************************************* + * Adding sorting items to the popup menu. + ********************************************************************/ + protected void addSortingItems() { + popup.addSeparator(); + popup.add + (createMenuItem (new AbstractAction ("Sort by names") { + public void actionPerformed (ActionEvent e) { + update (lastSorted = SORTED_BY_NAME, null); + } + }, AC_NSORT, smallNIcon, smallNIconDis)); + popup.add + (createMenuItem (new AbstractAction ("Sort by authorities") { + public void actionPerformed (ActionEvent e) { + update (lastSorted = SORTED_BY_AUTHORITY, null); + } + }, AC_ASORT, smallAIcon, smallAIconDis)); + } + + /********************************************************************* * Collapse all nodes, starting from the root.

      ********************************************************************/ protected void collapse() { @@ -389,7 +438,8 @@ Enumeration en = root.depthFirstEnumeration(); while (en.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)en.nextElement(); - if (toBeHighlighted.contains (node.getUserObject().toString())) { +// if (toBeHighlighted.contains (node.getUserObject().toString())) { + if (toBeHighlighted.contains ( ((CommonNode)node.getUserObject()).getValue())) { makeVisible (new TreePath (tModel.getPathToRoot (node))); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/10/28 11:30:37 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/02 06:39:06 1.7 @@ -46,8 +46,6 @@ org.apache.commons.logging.LogFactory.getLog (DataTypesTree.class); // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; protected final static String AC_HASA = "ac-hasa"; protected final static String AC_DEPR = "ac-depr"; @@ -56,7 +54,6 @@ CommonConsole console; MobyDataType[] dataTypes = null; - int lastSorted = SORTED_BY_NAME; boolean showBadGuys = false; boolean showMembers = false; JCheckBoxMenuItem deprecatedBox; @@ -83,21 +80,7 @@ ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - deprecatedBox.setEnabled (true); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - deprecatedBox.setEnabled (false); - } - }, AC_ASORT)); + addSortingItems(); popup.addSeparator(); JCheckBoxMenuItem showBox = new JCheckBoxMenuItem ("Show HAS/HASA members"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.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/service/dashboard/NamespacesTree.java 2005/10/28 13:39:09 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/02 06:39:06 1.2 @@ -45,16 +45,11 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (NamespacesTree.class); - // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; - // remembered from constructor RegistryModel registryModel; CommonConsole console; MobyNamespace[] namespaces = null; - int lastSorted = SORTED_BY_NAME; MobyException updateException = null; final static String NAMESPACES_ACCESS_ERROR = @@ -73,24 +68,11 @@ } /********************************************************************* - * Adding data types tree specific menu items to a - * right-click-popup. + * ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - } - }, AC_ASORT)); + addSortingItems(); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/10/28 13:39:09 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/02 06:39:06 1.12 @@ -13,6 +13,7 @@ import org.biomoby.shared.NoSuccessException; import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyServiceType; +import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.CentralAll; import org.biomoby.client.CentralDigestCachedImpl; @@ -46,6 +47,7 @@ Hashtable dataTypesTable = new Hashtable(); Hashtable serviceTypesTable = new Hashtable(); Hashtable namespacesTable = new Hashtable(); + Hashtable servicesTable = new Hashtable(); private static final String MSG_REG_PENDING_CURATION = "Registration reports 'Pending curation'...\n" + @@ -183,13 +185,13 @@ public void registerServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); - try { - worker.registerServiceType (serviceType); - } catch (PendingCurationException e) { - throw new MobyException (MSG_REG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.registerServiceType (serviceType); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -198,13 +200,13 @@ public void unRegisterServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); - try { - worker.unregisterServiceType (serviceType); - } catch (PendingCurationException e) { - throw new MobyException (MSG_UNREG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.unregisterServiceType (serviceType); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -269,13 +271,13 @@ public void registerNamespace (MobyNamespace namespace) throws MobyException { initWorker(); - try { - worker.registerNamespace (namespace); - } catch (PendingCurationException e) { - throw new MobyException (MSG_REG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.registerNamespace (namespace); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -284,13 +286,13 @@ public void unRegisterNamespace (MobyNamespace namespace) throws MobyException { initWorker(); - try { - worker.unregisterNamespace (namespace); - } catch (PendingCurationException e) { - throw new MobyException (MSG_UNREG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.unregisterNamespace (namespace); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -345,6 +347,94 @@ /********************************************************************* * + * Dealing with Moby Services. + * + ********************************************************************/ + + + /********************************************************************* + * + ********************************************************************/ + public void registerService (MobyService service) + throws MobyException { + initWorker(); +// try { +// worker.registerService (service); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } + } + + /********************************************************************* + * + ********************************************************************/ + public void unRegisterService (MobyService service) + throws MobyException { + initWorker(); +// try { +// worker.unregisterService (service); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } + } + + /********************************************************************* + * Fetch services (from a cache or from a registry). When done, + * signal that services are updated. If an initiator is known (not + * null), signal, who asked for it, as well. + ********************************************************************/ + public synchronized MobyService[] getServices (Object initiator) + throws MobyException { + initWorker(); + if (initiator != null) + fireEvent (initiator, AUTHORITIES_RESET, "", null); + MobyService[] services = worker.getServices(); + servicesTable = new Hashtable(); + for (int i = 0; i < services.length; i++) + servicesTable.put (services[i].getUniqueName(), + services[i]); + if (initiator != null) + fireEvent (initiator, AUTHORITIES_UPDATED, "", services); + return services; + } + + /********************************************************************* + * + ********************************************************************/ + public MobyService getService (String combinedServiceName) + throws MobyException { + if (combinedServiceName == null) + return null; + MobyService[] services = getServices (null); + return (MobyService)servicesTable.get (combinedServiceName); + } + + /********************************************************************* + * Return a HashSet filled with names of services that have + * somewhere given 'searchText'. Add case-insensitivity to the + * regular expression in 'searchText'. + ********************************************************************/ + public HashSet findInServices (String searchText) + throws MobyException { + HashSet found = new HashSet(); + MobyService[] services = getServices (null); + if (! searchText.startsWith ("(?i)")) + searchText = "(?i)" + searchText; + Pattern pattern = Pattern.compile (searchText); + for (int i = 0; i < services.length; i++) { + if (pattern.matcher (services[i].toString()).find()) + found.add (services[i].getUniqueName()); + } + return found; + } + + + /********************************************************************* + * * The rest... * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/10/28 13:39:09 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/02 06:39:06 1.16 @@ -119,7 +119,6 @@ console.setAppendMode (false); // ontology trees - ServicesTree servicesTree = new ServicesTree(); DataTypesBoard dataTypesBoard = new DataTypesBoard (registryModel, console, @@ -135,9 +134,15 @@ console, propertyChannel); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); + ServicesBoard servicesBoard = + new ServicesBoard (registryModel, + console, + propertyChannel); + servicesBoard.updateTree (CommonTree.SORTED_BY_NAME); + // split it into moving panels JSplitPane split1 = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, - servicesTree.scrollable(), + servicesBoard, dataTypesBoard); split1.setResizeWeight (0.5); split1.setContinuousLayout (true); @@ -318,35 +323,6 @@ /************************************************************************** * **************************************************************************/ - class ServicesTree extends CommonTree { - public ServicesTree() { - super ("Services"); - } - } - - - /************************************************************************** - * - **************************************************************************/ - class ServiceTypesTree extends CommonTree { - public ServiceTypesTree() { - super ("Service Types"); - } - } - - - /************************************************************************** - * - **************************************************************************/ - class NamespacesTree extends CommonTree { - public NamespacesTree() { - super ("Namespaces"); - } - } - - /************************************************************************** - * - **************************************************************************/ public String getName() { return "Registry Browser"; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.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/service/dashboard/ServiceTypesTree.java 2005/10/28 13:39:09 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/02 06:39:06 1.3 @@ -46,16 +46,11 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (ServiceTypesTree.class); - // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; - // remembered from constructor RegistryModel registryModel; CommonConsole console; MobyServiceType[] serviceTypes = null; - int lastSorted = SORTED_BY_NAME; MobyException updateException = null; final static String SERVICE_TYPES_ACCESS_ERROR = @@ -74,24 +69,11 @@ } /********************************************************************* - * Adding data types tree specific menu items to a - * right-click-popup. + * ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - } - }, AC_ASORT)); + addSortingItems(); } /********************************************************************* From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6sl012267@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/service/dashboard/images Added Files: smallA.gif smallA_dis.gif smallI.gif smallI_dis.gif smallN.gif smallN_dis.gif smallO.gif smallO_dis.gif smallT.gif smallT_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallA.gif,NONE,1.1 smallA_dis.gif,NONE,1.1 smallI.gif,NONE,1.1 smallI_dis.gif,NONE,1.1 smallN.gif,NONE,1.1 smallN_dis.gif,NONE,1.1 smallO.gif,NONE,1.1 smallO_dis.gif,NONE,1.1 smallT.gif,NONE,1.1 smallT_dis.gif,NONE,1.1 From senger at pub.open-bio.org Wed Nov 2 01:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6QY012291@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java MobyService.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.3,1.4 MobyService.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/09/22 16:07:09 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/02 06:39:06 1.4 @@ -78,6 +78,15 @@ return true; } + public MobyDataType getDataType() { + synchronized (elements) { + if (elements.size() > 0) + return ((MobyPrimaryDataSimple)elements.firstElement()).getDataType(); + else + return null; + } + } + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/09/22 16:07:09 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/02 06:39:06 1.8 @@ -9,6 +9,7 @@ import org.tulsoft.shared.UUtils; +import java.util.Comparator; import java.util.Enumeration; import java.util.Vector; @@ -24,7 +25,8 @@ * @version $Id$ */ -public class MobyService { +public class MobyService + implements Comparable { /** * A dummy name used for MobyService instances that do not have @@ -57,6 +59,18 @@ protected Vector primaryOutputs = new Vector(); /************************************************************************** + * Implementing Comparable interface. + *************************************************************************/ + public int compareTo (Object obj) { + return getUniqueName().compareToIgnoreCase ( ((MobyService)obj).getUniqueName() ); + } + + public boolean equals (Object obj) { + if (obj == null) return false; + return getUniqueName().equals ( ((MobyService)obj).getUniqueName() ); + } + + /************************************************************************** * Default constructor. *************************************************************************/ public MobyService() { @@ -299,9 +313,10 @@ } } + // some historical reasons for this method... public boolean equals (MobyService anotherOne) { - if (anotherOne == null) return false; - return this.name.equals (anotherOne.getName()); + if (anotherOne == null) return false; + return equals ((Object)anotherOne); } public String toString() { @@ -336,8 +351,32 @@ return new String (buf); } + /************************************************************************** + * It combines this service name and its authority name. It is + * used also in {@link #equals} and {@link #compareTo} methods.

      + * + * TBD: The authority should be checked that it does not contain + * character sequence 'space followed by a left parenthesis'. + *************************************************************************/ public String toShortString() { return name + " (" + authority + ")"; } + /************************************************************************** + * Create a comparator for case-insensitive sorting of services by + * their authorities. + *************************************************************************/ + public static Comparator getAuthorityComparator() { + return new Comparator() { + public int compare (Object o1, Object o2) { + String a1 = ((MobyService)o1).getAuthority(); + String a2 = ((MobyService)o2).getAuthority(); + int compared = (a1).compareToIgnoreCase ((String)a2); + if (compared == 0) + return ( ((MobyService)o1).getName().compareToIgnoreCase ( ((MobyService)o2).getName() ) ); + else + return compared; + } + }; + } } From senger at pub.open-bio.org Thu Nov 3 03:38:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 3 Nov 2005 03:38:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511030838.jA38ceGL018463@pub.open-bio.org> senger Thu Nov 3 03:38:40 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv18397/src/main/org/biomoby/service/dashboard/images Added Files: smallRegister.gif smallRegister_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallRegister.gif,NONE,1.1 smallRegister_dis.gif,NONE,1.1 From senger at pub.open-bio.org Thu Nov 3 10:21:57 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 3 Nov 2005 10:21:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031521.jA3FLvns020067@pub.open-bio.org> senger Thu Nov 3 10:21:57 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv20017/src/main/org/biomoby/shared Modified Files: MobyService.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyService.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/02 06:39:06 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/03 15:21:57 1.9 @@ -16,7 +16,7 @@ /** * A container representing a service. But do not be too excited - * this is not a real service but only its definition as it appears in - * the BioMoby regustry.

      + * the BioMoby registry.

      * * This container is used mainly to register a new service in a * Moby registry, and to find registered services later.

      From senger at pub.open-bio.org Thu Nov 3 10:21:57 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 3 Nov 2005 10:21:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031521.jA3FLvqQ020048@pub.open-bio.org> senger Thu Nov 3 10:21:57 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20017/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java DashboardProperties.java NOTES RegistrationPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.12,1.13 DashboardProperties.java,1.9,1.10 NOTES,1.15,1.16 RegistrationPanel.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 08:38:39 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 15:21:57 1.13 @@ -94,6 +94,8 @@ // re-use "style" components protected static final Insets BREATH_TOP = new Insets (10,0,0,0); + protected static final Insets BREATH_TOP_LEFT = new Insets (10,10,0,0); + protected static final Insets BREATH_LEFT = new Insets (0,10,0,0); protected static final Font MSG_AREA_FONT = new Font ("Courier", Font.PLAIN, 10); protected static final Font TITLE_FONT = new Font ("Serif", Font.BOLD, 20); protected static final Color TITLE_FGCOLOR = new Color (12, 55, 241); @@ -213,7 +215,8 @@ JCheckBox box = new JCheckBox (label, isSelected); if (mnemonic > 0) box.setMnemonic (mnemonic); - box.addItemListener (listener); + if (listener != null) + box.addItemListener (listener); box.setFocusPainted (false); return box; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 08:38:39 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 15:21:57 1.10 @@ -58,6 +58,16 @@ static final String DP_REG_ST_ISA = "dp-reg-st-isa"; static final String DP_REG_ST_COPY_BY_SELECT = "dp-reg-st-cbs"; // type: Boolean + static final String DP_REG_S_NAME = "dp-reg-s-name"; + static final String DP_REG_S_AUTH = "dp-reg-s-auth"; + static final String DP_REG_S_EMAIL = "dp-reg-s-email"; + static final String DP_REG_S_DESC = "dp-reg-s-desc"; + static final String DP_REG_S_URL = "dp-reg-s-url"; + static final String DP_REG_S_RDF_URL = "dp-reg-s-rdf-url"; + static final String DP_REG_S_RDF_PATH = "dp-reg-s-rdf-path"; + static final String DP_USE_SIGNATURE = "dp-use-signature"; // type: Boolean + static final String DP_USE_AUTHORITATIVE = "dp-use-auth"; // type: Boolean + /** A filename containing Java properties that configure the dashboard. */ static final String DASHBOARD_PROPERTIES_FILE = "dashboard.properties"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 08:38:39 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 15:21:57 1.16 @@ -1,3 +1,8 @@ +* show/store XML sent to register this service + (a place for using it other time?) + +* how to squeeze too long combo boxes into smaller place ? + * registration: selecting an authority is really propagated to the text fields? (Do for data type registration the same as was done for Namespace registration.) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 08:38:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 15:21:57 1.7 @@ -13,6 +13,7 @@ import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyServiceType; +import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; @@ -73,7 +74,8 @@ static final String COPY_BY_SELECT_NS = "ns-copy-by-select"; static final String COPY_BY_SELECT_ST = "st-copy-by-select"; static final String COPY_BY_SELECT_DT = "dt-copy-by-select"; - static final String COPY_BY_SELECT_S = "s-copy-by-select"; + static final String USE_SIGNATURE = "use-signature"; + static final String USE_AUTHORITATIVE = "use-authoritative"; // associated model working behind the scenes RegistryModel registryModel; @@ -86,14 +88,18 @@ JButton sRegisterButton; CommonConsole console; - JTextFieldWithHistory dtName, nsName, stName; - JTextFieldWithHistory dtAuth, nsAuth, stAuth; - JTextFieldWithHistory dtEmail, nsEmail, stEmail; - JTextArea dtDescArea, nsDescArea, stDescArea; + JTextFieldWithHistory dtName, nsName, stName, sName; + JTextFieldWithHistory dtAuth, nsAuth, stAuth, sAuth; + JTextFieldWithHistory dtEmail, nsEmail, stEmail, sEmail; + JTextArea dtDescArea, nsDescArea, stDescArea, sDescArea; JLabel stISA; + JLabel sType, labelSigURL, labelRDFPath; + JTextFieldWithHistory sURL, sSigURL; + JFileChooserWithHistory localRDFFile; + JCheckBox useAuth; - MobyException dtException, nsException, stException; - MobyException dtUnregException, nsUnregException, stUnregException; + MobyException dtException, nsException, stException, sException; + MobyException dtUnregException, nsUnregException, stUnregException, sUnregException; // shared icons protected static Icon menuAddISAIcon, menuAddISAIconDis; @@ -126,6 +132,12 @@ final static String SERVICE_TYPE_UNREG_PROLOGUE = "An error occured when trying to unregister a service type.\n\n"; + final static String SERVICE_PROLOGUE = + "An error occured when trying to register a new service.\n\n"; + + final static String SERVICE_UNREG_PROLOGUE = + "An error occured when trying to unregister a service.\n\n"; + /********************************************************************* * Default constructor. ********************************************************************/ @@ -306,11 +318,173 @@ protected JPanel getServiceRegistration() { JPanel p = new JPanel (new GridBagLayout()); - SwingUtils.addComponent (p, new JLabel ("Not Yet Implemented"), 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + + // text fields to define new service + JLabel labelSName = new JLabel ("Service name"); + sName = createText (null, "serviceName", DP_REG_S_NAME); + JLabel labelSAuth = new JLabel ("Authority"); + sAuth = createText (null, "serviceAuth", DP_REG_S_AUTH); + JLabel labelSEmail = new JLabel ("Contact email"); + sEmail = createText (null, "serviceEmail", DP_REG_S_EMAIL); + JLabel labelSURL = new JLabel ("Service endpoint - URL"); + sURL = createText (null, "serviceURL", DP_REG_S_URL); + boolean usingAuth = getPrefValue (USE_AUTHORITATIVE, true); + useAuth = + createCheckBox ("authoritative", usingAuth, KeyEvent.VK_A, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + onAuth (e.getStateChange() == ItemEvent.SELECTED); + } + }); + onAuth (usingAuth); + + // group of fields for RDF signature + labelSigURL = new JLabel ("RDF endpoint - signature URL"); + sSigURL = createText (null, "signatureURL", DP_REG_S_RDF_URL); + labelRDFPath = new JLabel ("Where to store RDF document"); + String defValue = + System.getProperty ("java.io.tmpdir") + + System.getProperty ("file.separator") + + "service.rdf"; + localRDFFile = createFileSelector ("File name for RDF service signature", + "Select", + defValue, + "localRDFFile", + DP_REG_S_RDF_PATH); + boolean usingSignature = getPrefValue (USE_SIGNATURE, false); + JCheckBox useSignature = + createCheckBox ("Use RDF signature", usingSignature, KeyEvent.VK_R, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + onUseRDFSignature (e.getStateChange() == ItemEvent.SELECTED); + } + }); + onUseRDFSignature (usingSignature); + + JPanel pRDF = createTitledPanel ("Service RDF Signature"); + SwingUtils.addComponent (pRDF, useSignature, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (pRDF, labelSigURL, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (pRDF, sSigURL, 0, 2, 1, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (pRDF, labelRDFPath, 0, 3, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (pRDF, localRDFFile, 0, 4, 1, 1, HORI, NWEST, 1.0, 0.0); + + // service type + JPanel serviceType = new JPanel (new GridBagLayout()); + JLabel labelST = new JLabel ("Service type: "); + sType = new JLabel (""); + SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + + // put together service fields + JPanel defs = new JPanel (new GridBagLayout()); + SwingUtils.addComponent (defs, labelSName, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sName, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, useAuth, 1, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_LEFT); + SwingUtils.addComponent (defs, labelSAuth, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sAuth, 0, 3, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, labelSEmail, 0, 4, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sEmail, 0, 5, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, labelSURL, 0, 6, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sURL, 0, 7, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, pRDF, 0, 8, 2, 1, HORI, NWEST, 1.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (defs, serviceType, 0, 9, 2, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + + // description + sDescArea = new JTextArea(); + JPanel sDesc = createCustomTextArea ("Description", null, "serviceDesc", DP_REG_S_DESC, + sDescArea); + + // a tree with all service types + ServiceTypesBoard stBoard = + new ServiceTypesBoard (registryModel, + console, + propertyChannel, + new CustomServiceTypesTree2 (registryModel, console)); + stBoard.updateTree (CommonTree.SORTED_BY_NAME); + + JPanel main = createTitledPanel ("New Service"); + SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); + SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + + // sub-panels for input/output data + JTabbedPane dataPane = new JTabbedPane(); + dataPane.addTab ("Primary Inputs", getPrimaryInputs()); + dataPane.addTab ("Secondary Inputs", getSecondaryInputs()); + dataPane.addTab ("Outputs", getOutputs()); + + // split data defs and service fields + JSplitPane split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, + main, + dataPane); + split.setResizeWeight (0.3); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + + // registration button + sRegisterButton = + createButton (" Register Service ", + "Register a new service in a Biomoby registry", + KeyEvent.VK_S, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + onRegisterService(); + } + }); + sRegisterButton.setIcon (registerIcon); + sRegisterButton.setDisabledIcon (registerIconDis); + + // put it together + SwingUtils.addComponent (p, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, sRegisterButton, 0, 1, 1, 1, NONE, CENTER, 0.0, 0.0); return p; } /************************************************************************** + * + **************************************************************************/ + protected void onUseRDFSignature (boolean enabled) { + sSigURL.setEnabled (enabled); + labelSigURL.setEnabled (enabled); + localRDFFile.setEnabled (enabled); + labelRDFPath.setEnabled (enabled); + setPrefValue (USE_SIGNATURE, enabled); + propertyChannel.put (DP_USE_SIGNATURE, new Boolean (enabled).toString()); + } + + /************************************************************************** + * + **************************************************************************/ + protected void onAuth (boolean enabled) { + setPrefValue (USE_AUTHORITATIVE, enabled); + propertyChannel.put (DP_USE_AUTHORITATIVE, new Boolean (enabled).toString()); + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getPrimaryInputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getSecondaryInputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getOutputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** * Panel to register a namespace and a service type. **************************************************************************/ protected JPanel getOtherRegistration() { @@ -728,6 +902,75 @@ /************************************************************************** * **************************************************************************/ + public void onRegisterService() { + sRegisterButton.setEnabled (false); + sException = null; + final SwingWorker worker = new SwingWorker() { + public Object construct() { + try { + String value = sName.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Service name is still missing. Please fill it first."); + return null; + } + MobyService service = new MobyService (value); + + value = sAuth.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have an authority.\n" + + "Please fill it."); + return null; + } + service.setAuthority (value); + + value = sEmail.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have a contact person.\n" + + "Please fill in an email address."); + return null; + } + service.setEmailContact (value); + + value = sDescArea.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have a description.\n" + + "Please fill in the most detailed one."); + return null; + } + service.setDescription (value); + + value = sType.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must belong to an existing service type.\n" + + "Please select a type from available service types."); + return null; + } + service.setType (value); + + console.setText ("Service to be registered:\n" + + "-------------------------\n" + service.toString()); + registryModel.registerService (service); + console.setText ("\nRegistration successful!\n\n"); + + } catch (MobyException e) { + sException = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (sException != null) + error (SERVICE_PROLOGUE, sException); + sRegisterButton.setEnabled (true); + } + }; + worker.start(); + } + + /************************************************************************** + * + **************************************************************************/ public String getName() { return "Biomoby Registration"; } @@ -1235,4 +1478,48 @@ } + + /************************************************************************** + * + * Customized tree of service types - use for service registration + * + **************************************************************************/ + protected class CustomServiceTypesTree2 + extends ServiceTypesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomServiceTypesTree2 (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected service type to the service fields. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) + sType.setText (nodeObject.getValue()); + } + } } From mwilkinson at pub.open-bio.org Thu Nov 3 11:39:42 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Thu, 3 Nov 2005 11:39:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031639.jA3Gdgsn021261@pub.open-bio.org> mwilkinson Thu Nov 3 11:39:42 EST 2005 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory pub.open-bio.org:/tmp/cvs-serv21242 Modified Files: ConstructingYourService.html Log Message: fixed a URL typo and added a link to the register service tutorial moby-live/Docs/MOBY-S_API/Perl ConstructingYourService.html,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html 2005/09/28 00:24:26 1.3 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html 2005/11/03 16:39:42 1.4 @@ -27,7 +27,7 @@

    • Does an appropriate service type term already exist in the Service Ontology? You need to register your new service type in +href="RegisterServiceType.html">register your new service type in the MOBY-S service ontology.
    • Do the namespaces that you are going to use in your objects @@ -39,7 +39,7 @@
    If all object types, service types, and namespaces already exist in -the ontology then you are ready to set up your service. +the ontology then you are ready to set up your service. Once you have finished setting it up following the guidelines below, you will then need to Register your service for it to become visible on the MOBY Central registry. In Perl, MOBY-S services are currently limited to SOAP over HTTP; the name of the method call (i.e. the SOAP Action header) is the same as @@ -340,5 +340,9 @@ return ($dbh); } + + +When you have finished writing your service, test it (link coming soon!) and then Register it. - \ No newline at end of file + + From gss at pub.open-bio.org Thu Nov 3 17:31:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:31:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MV0aK022160@pub.open-bio.org> gss Thu Nov 3 17:31:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv22135/src/org/semanticmoby/graph Modified Files: MOBYResource.java Log Message: Added inputURI, outputURI s-moby/ref-impl/core/src/org/semanticmoby/graph MOBYResource.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/10/31 17:24:54 1.4 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/11/03 22:31:00 1.5 @@ -24,18 +24,30 @@ private Statement nameStmt; /** - * A one line description of the provider; stored in the + * A one line description of the resource; stored in the * MOBY.oneLineDescription property */ private Statement oneLineDescriptionStmt; /** * A URI at which more information can be retrieved about the - * provider; stored in the MOBY.moreInfoURI property + * resource; stored in the MOBY.moreInfoURI property */ private Statement aboutURIStmt; /** + * A URI that can be accessed to get a page for an end user to fill in + * information for this resource; stored in the MOBY.inputURI property + */ + private Statement inputURIStmt; + + /** + * A URI that can be accessed to display this resource; stored in the + * MOBY.outputURI property + */ + private Statement outputURIStmt; + + /** * The MOBYGraphNode objects that this Resource operates on (instances of * either MOBYCollection or MOBYGraph), each keyed by the statement that * links this resource's URI to it via a hasMapping property @@ -92,13 +104,21 @@ * Constructor for creating an instance from existing RDF statements, as * is the case when parsing an existing model. */ - MOBYResource(Model jenaModel, Statement definingStmt, - Statement nameStmt, Statement oneLineDescriptionStmt, - Statement aboutURIStmt, Map operatesOnGraphs) { + MOBYResource(Model jenaModel, + Statement definingStmt, + Statement nameStmt, + Statement oneLineDescriptionStmt, + Statement aboutURIStmt, + Statement inputURIStmt, + Statement outputURIStmt, + Map operatesOnGraphs) { super(jenaModel, definingStmt); + this.nameStmt = nameStmt; this.oneLineDescriptionStmt = oneLineDescriptionStmt; this.aboutURIStmt = aboutURIStmt; + this.inputURIStmt = inputURIStmt; + this.outputURIStmt = outputURIStmt; for (Iterator it = operatesOnGraphs.keySet().iterator(); it.hasNext();) { Statement operatesOnStmt = (Statement) it.next(); @@ -191,7 +211,9 @@ * Return a descriptive name for the provider. */ public String getName() { - return (nameStmt == null) ? "" : nameStmt.getObject().toString(); + return (nameStmt == null) + ? null + : nameStmt.getObject().toString(); } /** @@ -199,7 +221,7 @@ */ public String getOneLineDescription() { return (oneLineDescriptionStmt == null) - ? "" + ? null : oneLineDescriptionStmt.getObject().toString(); } @@ -209,11 +231,30 @@ */ public String getAboutURI() { return (aboutURIStmt == null) - ? "" + ? null : aboutURIStmt.getObject().toString(); } /** + * Return a URI that can be accessed to get a page for an end user + * to fill in information for this resource + */ + public String getInputURI() { + return (inputURIStmt == null) + ? null + : inputURIStmt.getObject().toString(); + } + + /** + * Return a URI that can be accessed to display this resource + */ + public String getOutputURI() { + return (outputURIStmt == null) + ? null + : outputURIStmt.getObject().toString(); + } + + /** * Serialize the underlying model as RDF/XML to the given output stream */ public void serialize(OutputStream out) { From gss at pub.open-bio.org Thu Nov 3 17:31:18 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:31:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MVIOi022198@pub.open-bio.org> gss Thu Nov 3 17:31:18 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv22173/src/org/semanticmoby/graph Modified Files: Parser.java Log Message: Parse inputURI and outputURI s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/03 22:31:18 1.3 @@ -198,7 +198,6 @@ // exception if any are missing // Statement nameStmt = model.getProperty(headResource, MOBY.name); - if (nameStmt == null) { throw new NonCanonicalException("Missing " + MOBY.name + " property", model); @@ -206,18 +205,16 @@ Statement oneLineDescriptionStmt = model.getProperty(headResource, MOBY.oneLineDescription); - if (oneLineDescriptionStmt == null) { throw new NonCanonicalException("Missing " + MOBY.oneLineDescription + " property", model); } + // Consider aboutURI, inputURI, and outputURI to be optional + // Statement aboutURIStmt = model.getProperty(headResource, MOBY.aboutURI); - - if (aboutURIStmt == null) { - throw new NonCanonicalException("Missing " + MOBY.aboutURI + - " property", model); - } + Statement inputURIStmt = model.getProperty(headResource, MOBY.inputURI); + Statement outputURIStmt = model.getProperty(headResource, MOBY.outputURI); // A resource can have multiple operatesOn properties, each of // which leads to a subgraph. Parse each of these subgraphs. @@ -236,8 +233,14 @@ // Create and return a new Resource object using the resource URI, name, // oneLineDescription, aboutURI, and collection of operatesOn subgraphs // - return new MOBYResource(model, typeStmt, nameStmt, - oneLineDescriptionStmt, aboutURIStmt, operatesOn); + return new MOBYResource(model, + typeStmt, + nameStmt, + oneLineDescriptionStmt, + aboutURIStmt, + inputURIStmt, + outputURIStmt, + operatesOn); } /** From gss at pub.open-bio.org Thu Nov 3 17:31:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:31:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MVgOi022236@pub.open-bio.org> gss Thu Nov 3 17:31:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv22211/src/org/semanticmoby/vocabulary Modified Files: MOBY.java Log Message: Added inputURI and outputURI; formatting s-moby/ref-impl/core/src/org/semanticmoby/vocabulary MOBY.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/10/27 22:22:09 1.4 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/03 22:31:42 1.5 @@ -19,30 +19,50 @@ * value is a serialized RDF/XML graph. */ public final static String GRAPH_PARAMETER_NAME = "graph"; - public static final Resource Resource = resource(getURI(), "Resource"); - public static final Resource Graph = resource(getURI(), "Graph"); - public static final Resource Subject = resource(getURI(), "Subject"); - public static final Resource Object = resource(getURI(), "Object"); - public static final Property name = property(getURI(), "name"); + + public static final Resource Resource = + resource(getURI(), "Resource"); + + public static final Resource Graph = + resource(getURI(), "Graph"); + + public static final Resource Subject = + resource(getURI(), "Subject"); + + public static final Resource Object = + resource(getURI(), "Object"); + + public static final Property name = + property(getURI(), "name"); + public static final Property oneLineDescription = property(getURI(), "oneLineDescription"); - public static final Property aboutURI = + + public static final Property aboutURI = property(getURI(), "aboutURI"); - public static final Property inputURI = + + public static final Property inputURI = property(getURI(), "inputURI"); - public static final Property outputURI = + + public static final Property outputURI = property(getURI(), "outputURI"); - public static final Property operatesOn = + + public static final Property operatesOn = property(getURI(), "operatesOn"); - public static final Property hasMapping = + + public static final Property hasMapping = property(getURI(), "hasMapping"); - public static final Property mapsTo = + + public static final Property mapsTo = property(getURI(), "mapsTo"); + public static final Property lastModifiedDate = property(getURI(), "lastModifiedDate"); - public static final Property Property = + + public static final Property Property = property(getURI(), "Property"); - public static final Property keyword = + + public static final Property keyword = property(getURI(), "keyword"); public static String getURI() { @@ -50,15 +70,11 @@ return "http://www.semanticmoby.org/ontologies/core/"; } - public static String getNsPrefix() { - return "moby"; } - public static void addNsPrefix(Model model) { - model.setNsPrefix(getNsPrefix(), getURI()); } } From gss at pub.open-bio.org Thu Nov 3 17:32:25 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:32:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032232.jA3MWPcH022274@pub.open-bio.org> gss Thu Nov 3 17:32:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22249/src/org/semanticmoby/ref/servlets Modified Files: BaseServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets BaseServlet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java 2005/11/03 22:32:25 1.5 @@ -4,12 +4,8 @@ import org.semanticmoby.ref.tools.*; -import org.semanticmoby.servlet.*; - import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:32:38 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:32:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032232.jA3MWc6x022312@pub.open-bio.org> gss Thu Nov 3 17:32:38 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22287/src/org/semanticmoby/ref/servlets Modified Files: DiscoveryServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets DiscoveryServlet.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/03 03:22:54 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/03 22:32:38 1.8 @@ -1,8 +1,5 @@ package org.semanticmoby.ref.servlets; -import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.rdql.*; - import org.semanticmoby.graph.*; import org.semanticmoby.ref.tools.*; @@ -11,8 +8,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:33:05 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MX5Z9022350@pub.open-bio.org> gss Thu Nov 3 17:33:05 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22325/src/org/semanticmoby/ref/servlets Modified Files: KeywordSearchServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets KeywordSearchServlet.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/03 03:22:54 1.9 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/03 22:33:05 1.10 @@ -5,14 +5,11 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.ref.tools.*; import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.ref.tools.db.DBConnection; import org.semanticmoby.tools.Util; -import org.semanticmoby.vocabulary.MOBY; - import java.io.*; import java.sql.*; @@ -54,7 +51,7 @@ sessionData = (SessionData) request.getSession().getAttribute("sessionData"); - DBConnection db = new DBConnection(); + DBConnection db = new DBConnection(getServletContext().getRealPath("/")); StorageManager mgr = new StorageManager(); ModelRDB model = (ModelRDB) mgr.openDBModel(); @@ -84,11 +81,8 @@ String uri = result.getString(1); row.add(uri); - System.out.println(" ##### 1 #####"); MOBYResource resource = resourceAt(uri, model); - System.out.println(" ##### 2 #####"); String name = resource.getName(); - System.out.println(" ##### 3 #####"); row.add(name); String description = resource.getOneLineDescription(); From gss at pub.open-bio.org Thu Nov 3 17:33:24 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:24 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXONi022388@pub.open-bio.org> gss Thu Nov 3 17:33:24 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22363/src/org/semanticmoby/ref/servlets Modified Files: ResourceInvestigationServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets ResourceInvestigationServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java 2005/11/03 03:22:54 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java 2005/11/03 22:33:23 1.3 @@ -2,17 +2,10 @@ import org.apache.commons.logging.*; -import org.semanticmoby.graph.*; - import org.semanticmoby.ref.tools.*; -import org.semanticmoby.ref.tools.db.*; - -import org.semanticmoby.servlet.*; import java.io.*; -import java.util.logging.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:33:34 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:34 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXYbl022426@pub.open-bio.org> gss Thu Nov 3 17:33:34 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22401/src/org/semanticmoby/ref/servlets Modified Files: SqlQueryServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets SqlQueryServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java 2005/10/28 04:12:26 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java 2005/11/03 22:33:34 1.3 @@ -1,17 +1,7 @@ package org.semanticmoby.ref.servlets; -import org.semanticmoby.graph.*; - -import org.semanticmoby.ref.tools.*; - -import org.semanticmoby.vocabulary.MOBY; - import java.io.*; -import java.sql.*; - -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:33:47 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXlOr022464@pub.open-bio.org> gss Thu Nov 3 17:33:47 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv22439/src/org/semanticmoby/ref/servlets/dev Modified Files: ResourceListServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev ResourceListServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/01 16:28:12 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/03 22:33:47 1.3 @@ -10,8 +10,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 17:34:14 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:34:14 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032234.jA3MYExg022502@pub.open-bio.org> gss Thu Nov 3 17:34:14 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example In directory pub.open-bio.org:/tmp/cvs-serv22477/src/org/semanticmoby/ref/servlets/example Modified Files: HelloWorldServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example HelloWorldServlet.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/01 16:28:12 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/03 22:34:14 1.7 @@ -2,18 +2,12 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.ref.servlets.*; - import org.semanticmoby.servlet.*; import java.io.*; -import java.util.*; - -import javax.servlet.*; import javax.servlet.http.*; - public class HelloWorldServlet extends AbstractMobyServlet { /** From gss at pub.open-bio.org Thu Nov 3 17:34:31 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:34:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032234.jA3MYVcT022540@pub.open-bio.org> gss Thu Nov 3 17:34:31 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22515/src/org/semanticmoby/ref/tools Modified Files: DiscoveryQuery.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools DiscoveryQuery.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/03 22:34:31 1.8 @@ -5,7 +5,6 @@ import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.rdql.*; import com.hp.hpl.jena.shared.*; -import com.hp.hpl.jena.util.iterator.*; import com.hp.hpl.jena.vocabulary.RDF; import org.semanticmoby.graph.*; @@ -16,10 +15,6 @@ import org.semanticmoby.vocabulary.*; -import java.io.*; - -import java.text.*; - import java.util.*; From gss at pub.open-bio.org Thu Nov 3 17:35:07 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZ7sl022580@pub.open-bio.org> gss Thu Nov 3 17:35:07 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22555/src/org/semanticmoby/ref/tools Modified Files: InvocationBroker.java Log Message: Use getInputURI and getOutputURI on Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/01 16:28:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/03 22:35:07 1.7 @@ -1,7 +1,6 @@ package org.semanticmoby.ref.tools; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; import org.apache.commons.httpclient.*; @@ -13,8 +12,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; @@ -109,7 +106,7 @@ // try { - String inputURI = getInputURI(resource); + String inputURI = resource.getInputURI(); if (inputURI == null) { @@ -165,7 +162,7 @@ Parser parser = new Parser(model); MOBYResource resultsResource = parser.parseResource(); - String outputURI = getOutputURI(resultsResource); + String outputURI = resultsResource.getOutputURI(); if (outputURI == null) { @@ -249,49 +246,6 @@ dispatcher.forward(request, response); } - - private String getInputURI(MOBYResource resource) { - - try { - - Model model = resource.getJenaModel(); - Statement stmt = - model.getProperty(resource.getResource(), MOBY.inputURI); - - if (stmt != null) { - - return stmt.getString(); - } else { - - return null; - } - } catch (Throwable t) { - - t.printStackTrace(); - - return null; - } - } - - - private String getOutputURI(MOBYResource resource) { - - try { - - Model model = resource.getJenaModel(); - Statement stmt = - model.getProperty(resource.getResource(), MOBY.outputURI); - - return stmt.getString(); - } catch (Throwable t) { - - t.printStackTrace(); - - return null; - } - } - - public void buildInputGUI(MOBYResource resource) { // error message @@ -316,6 +270,6 @@ private boolean requiresInputs(MOBYResource resource) { - return getInputURI(resource) != null; + return resource.getInputURI() != null; } } From gss at pub.open-bio.org Thu Nov 3 17:35:19 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:19 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZJ4n022618@pub.open-bio.org> gss Thu Nov 3 17:35:19 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22593/src/org/semanticmoby/ref/tools Modified Files: KeywordFinder.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordFinder.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/03 22:35:19 1.8 @@ -1,7 +1,6 @@ package org.semanticmoby.ref.tools; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; import com.hp.hpl.jena.vocabulary.*; import org.semanticmoby.graph.*; From gss at pub.open-bio.org Thu Nov 3 17:35:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZgSh022656@pub.open-bio.org> gss Thu Nov 3 17:35:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22631/src/org/semanticmoby/ref/tools Modified Files: KeywordList.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordList.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/01 16:28:11 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/03 22:35:42 1.5 @@ -1,10 +1,7 @@ package org.semanticmoby.ref.tools; -import com.hp.hpl.jena.rdf.model.*; - import java.util.*; - public class KeywordList { private Set resourceKeywords = new HashSet(); From gss at pub.open-bio.org Thu Nov 3 17:35:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZtoc022694@pub.open-bio.org> gss Thu Nov 3 17:35:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22669/src/org/semanticmoby/ref/tools Modified Files: URIInvestigator.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools URIInvestigator.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/03 22:35:55 1.8 @@ -1,7 +1,5 @@ package org.semanticmoby.ref.tools; -import com.hp.hpl.jena.rdf.model.Model; - import org.apache.commons.httpclient.util.*; import org.apache.commons.logging.*; From gss at pub.open-bio.org Thu Nov 3 17:36:25 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:36:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MaPCh022732@pub.open-bio.org> gss Thu Nov 3 17:36:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv22707/src/org/semanticmoby/ref/tools/db Modified Files: DBConnection.java Log Message: Removed unused imports; use path relative to web root s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db DBConnection.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/01 16:28:12 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/03 22:36:25 1.3 @@ -1,18 +1,11 @@ package org.semanticmoby.ref.tools.db; -import java.awt.*; -import java.awt.event.*; - import java.io.*; import java.sql.*; import java.util.*; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.event.*; - /** * @@ -20,13 +13,14 @@ */ public class DBConnection { + private static String webrootPath; public static final int INSERT = 0; public static final int UPDATE = 1; public static final int DELETE = 2; public static final int OTHER = 3; public static String propsFileName = - "../webapps/ROOT/WEB-INF/smoby.properties"; - public static String logFileName = "../logs/smoby.dblog"; + "/WEB-INF/smoby.properties"; + public static String logFileName = "/WEB-INF/smoby.dblog"; public static String dbUserId = "postgres"; public static String dbPassword = "postgres"; public static String dbRepositoryName = "smoby-dev"; @@ -56,7 +50,8 @@ * @param logFileName The name (including path) of the log file to create * for this application. */ - public DBConnection() { + public DBConnection(String webroot) { + webrootPath = webroot; try { startLog(); loadDBProperties(); @@ -123,7 +118,7 @@ try { - File logFile = new File(logFileName); + File logFile = new File(webrootPath + File.separator + logFileName); if (logFile.exists()) { @@ -145,13 +140,13 @@ void loadDBProperties() { try { - + String propsFilePath = webrootPath + File.separator + propsFileName; logMsg(" "); - logMsg("loading database properties from " + propsFileName + + logMsg("loading database properties from " + propsFilePath + " ..."); dbProps = new Properties(); - dbProps.load(new FileInputStream(propsFileName)); + dbProps.load(new FileInputStream(propsFilePath)); if (dbProps.getProperty("DB_USER_ID") != null) { @@ -224,6 +219,7 @@ */ public static void saveDBProperties() { + String propFilePath = webrootPath + File.separator + propsFileName; try { String header = "# Semantic Moby Database Properties"; @@ -241,7 +237,7 @@ dbProps.setProperty("DB_URL", dbUrl); logMsg(" DB_URL = " + dbUrl + "\n"); - dbProps.store(new FileOutputStream(propsFileName), header); + dbProps.store(new FileOutputStream(propFilePath), header); logMsg("finished"); logMsg(" "); From gss at pub.open-bio.org Thu Nov 3 17:36:40 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:36:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MaeVG022770@pub.open-bio.org> gss Thu Nov 3 17:36:39 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv22745/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/01 16:28:12 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/03 22:36:39 1.8 @@ -2,8 +2,6 @@ import com.hp.hpl.jena.db.*; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; -import com.hp.hpl.jena.vocabulary.*; import org.semanticmoby.graph.*; From gss at pub.open-bio.org Thu Nov 3 17:36:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:36:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MatZl022808@pub.open-bio.org> gss Thu Nov 3 17:36:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example In directory pub.open-bio.org:/tmp/cvs-serv22783/src/org/semanticmoby/ref/vocabulary/example Modified Files: Hello.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example Hello.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java 2005/10/28 04:12:27 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java 2005/11/03 22:36:55 1.4 @@ -1,6 +1,5 @@ package org.semanticmoby.ref.vocabulary.example; -import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*; import org.semanticmoby.vocabulary.*; From gss at pub.open-bio.org Thu Nov 3 17:37:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:37:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032237.jA3MbCmX022842@pub.open-bio.org> gss Thu Nov 3 17:37:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv22813/WebRoot/examples/hello Modified Files: hello-world.rdf hello-world.n3 Log Message: Changed outputURI s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello hello-world.rdf,1.5,1.6 hello-world.n3,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/10/28 04:08:39 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/03 22:37:11 1.6 @@ -11,10 +11,11 @@ - + VPIN Hello World resource Simple example of a VPIN resource + http://www.semanticmoby.org/examples/hello-world http://www.semanticmoby.org/examples/display-hello-world =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/10/28 04:08:39 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/03 22:37:11 1.6 @@ -10,7 +10,8 @@ a moby:Resource, exterms:GreetingResource ; moby:name "VPIN Hello World resource" ; moby:oneLineDescription "Simple example of a VPIN resource" ; - moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world-results" ; + moby:aboutURI "http://www.semanticmoby.org/examples/hello-world" ; + moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world" ; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Thu Nov 3 17:37:30 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:37:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032237.jA3MbU6m022884@pub.open-bio.org> gss Thu Nov 3 17:37:29 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core In directory pub.open-bio.org:/tmp/cvs-serv22847/WebRoot/ontologies/core Modified Files: operatesOn.n3 Resource Resource.n3 operatesOn Log Message: Ontology changes s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core operatesOn.n3,1.2,1.3 Resource,1.1,1.2 Resource.n3,1.1,1.2 operatesOn,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3 2005/11/03 22:37:29 1.3 @@ -6,5 +6,8 @@ moby:operatesOn a owl:ObjectProperty ; - rdfs:domain moby:Service ; - rdfs:range moby:Graph . + rdfs:domain moby:Resource ; + rdfs:range [ + a owl:Class ; + owl:unionOf (moby:Graph rdf:List rdf:Bag rdf:Seq rdf:Alt) + ] . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource 2005/11/03 22:37:29 1.2 @@ -9,7 +9,7 @@ 1 - + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3 2005/11/03 22:37:29 1.2 @@ -4,7 +4,7 @@ @prefix rdf: . @prefix owl: . -moby:Service +moby:Resource a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/03 22:37:29 1.3 @@ -1,12 +1,36 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file From gss at pub.open-bio.org Fri Nov 4 12:45:06 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 4 Nov 2005 12:45:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511041745.jA4Hj6rG027213@pub.open-bio.org> gss Fri Nov 4 12:45:06 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet In directory pub.open-bio.org:/tmp/cvs-serv27186/src/org/semanticmoby/servlet Modified Files: AbstractMobyServlet.java Log Message: When responding to GET or POST, set content type of response to application/RDF+XML s-moby/ref-impl/core/src/org/semanticmoby/servlet AbstractMobyServlet.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java 2005/10/31 17:24:54 1.5 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java 2005/11/04 17:45:06 1.6 @@ -37,6 +37,7 @@ // Write everything from the reader to the writer // + response.setContentType("application/rdf+xml"); PrintWriter writer = response.getWriter(); String line; @@ -76,13 +77,11 @@ protected BufferedReader getFileReader(String fileName) { try { - - return new BufferedReader(new InputStreamReader(getServletContext() - .getResourceAsStream(fileName))); + return new BufferedReader( + new InputStreamReader( + getServletContext().getResourceAsStream(fileName))); } catch (Throwable t) { - t.printStackTrace(); - return null; } } @@ -134,6 +133,7 @@ // Send the graph back in response // + response.setContentType("application/rdf+xml"); resource.serialize(out); } catch (Throwable t) { From gss at pub.open-bio.org Fri Nov 4 19:46:33 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 4 Nov 2005 19:46:33 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511050046.jA50kXCX028368@pub.open-bio.org> gss Fri Nov 4 19:46:33 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv28343/WebRoot/developer Modified Files: dev-tools.jsp Log Message: Fixed URIs s-moby/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.jsp,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/04 20:39:40 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/05 00:46:33 1.4 @@ -13,7 +13,7 @@ Convert a Graph to a Different Format -
    + Paste a graph, select its input format, and press "Convert Graph" to convert to the other format @@ -48,61 +48,6 @@
    -
    - -

    - List All Statements in the S-MOBY Metadata Repository -

    - -
    - - - -
    - -
    - -

    - Validate an OWL Graph using Jena -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see what type of - OWL the graph represents - - - -
    -
    - - - -
    - -
    - -

    - Validate an OWL Graph for MOBY Canonical Form -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see if it is MOBY - canonical form - - - -
    -
    - - - -
    - -
    - <%@ include file="/footer.jsp" %> From gss at pub.open-bio.org Fri Nov 4 19:47:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 4 Nov 2005 19:47:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511050047.jA50l08r028398@pub.open-bio.org> gss Fri Nov 4 19:47:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv28373/WebRoot/developer Modified Files: index.jsp Log Message: Changed wording to omit validation s-moby/ref-impl/semanticmoby.org/WebRoot/developer index.jsp,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp 2005/11/04 20:39:40 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp 2005/11/05 00:47:00 1.6 @@ -13,17 +13,6 @@ - - - - From senger at pub.open-bio.org Sat Nov 5 12:51:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 12:51:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp4ib001464@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/service/dashboard/images Added Files: magentaDiamond.gif smallAddData.gif smallAddData_dis.gif smallDone.gif smallEdit.gif smallEdit_dis.gif smallInfo.gif smallPage.gif smallPageStar.gif smallTrash.gif smallTrash_gis.gif smallTree.gif small_yellow.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images magentaDiamond.gif,NONE,1.1 smallAddData.gif,NONE,1.1 smallAddData_dis.gif,NONE,1.1 smallDone.gif,NONE,1.1 smallEdit.gif,NONE,1.1 smallEdit_dis.gif,NONE,1.1 smallInfo.gif,NONE,1.1 smallPage.gif,NONE,1.1 smallPageStar.gif,NONE,1.1 smallTrash.gif,NONE,1.1 smallTrash_gis.gif,NONE,1.1 smallTree.gif,NONE,1.1 small_yellow.gif,NONE,1.1 From senger at pub.open-bio.org Sat Nov 5 12:51:05 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 12:51:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp5FN001483@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/02 06:39:06 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/05 17:51:04 1.5 @@ -87,6 +87,13 @@ } } + public void setDataType (MobyDataType dataType) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).setDataType (dataType); + } + } + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: From senger at pub.open-bio.org Sat Nov 5 12:51:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 12:51:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp4LY001449@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java CommonTree.java Dashboard.java DataTypesTree.java NOTES NamespacesTree.java RegistrationPanel.java RegistryPanel.java ServiceTypesTree.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.13,1.14 CommonTree.java,1.11,1.12 Dashboard.java,1.10,1.11 DataTypesTree.java,1.8,1.9 NOTES,1.16,1.17 NamespacesTree.java,1.3,1.4 RegistrationPanel.java,1.7,1.8 RegistryPanel.java,1.16,1.17 ServiceTypesTree.java,1.4,1.5 ServicesTree.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 15:21:57 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/05 17:51:04 1.14 @@ -17,6 +17,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.JSplitPane; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -406,6 +407,32 @@ } /********************************************************************* + * Split two components horizontaly with given weight. Add some + * common style. + ********************************************************************/ + protected JSplitPane hSplit (Component a, Component b, double weight) { + JSplitPane split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, + a, b); + split.setResizeWeight (0.5); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + return split; + } + + /********************************************************************* + * Split two components vertically with given weight. Add some + * common style. + ********************************************************************/ + protected JSplitPane vSplit (Component a, Component b, double weight) { + JSplitPane split = new JSplitPane (JSplitPane.VERTICAL_SPLIT, + a, b); + split.setResizeWeight (0.5); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + return split; + } + + /********************************************************************* * ********************************************************************/ protected String getPrefValue (String key, =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/03 08:38:39 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 17:51:04 1.12 @@ -84,6 +84,7 @@ static protected Icon smallTIcon, smallTIconDis; static protected Icon smallIIcon, smallIIconDis; static protected Icon smallOIcon, smallOIconDis; + static protected Icon sLeafIcon, stLeafIcon, dtLeafIcon, nsLeafIcon; protected String rootNode; @@ -123,11 +124,18 @@ loadIcons(); } - // + /********************************************************************* + * + ********************************************************************/ class CommonTreeCellRenderer extends DefaultTreeCellRenderer { HashSet toBeHighlighted; + Icon leafImage; + + public void setLeafIcon (Icon icon) { + leafImage = icon; + } public void setToBeHighlighted (HashSet toBeHighlighted) { this.toBeHighlighted = toBeHighlighted; @@ -160,9 +168,9 @@ setText (rootNode); } - // TBD: whale icon? -// if (leaf) -// ((JLabel)c).setIcon (icons [COMPUTER]); + // some icons + if (leaf) + ((JLabel)c).setIcon (leafImage); // do highlight @@ -176,6 +184,14 @@ } /********************************************************************* + * + ********************************************************************/ + public void setLeafIcon (Icon icon) { + CommonTreeCellRenderer r = (CommonTreeCellRenderer)getCellRenderer(); + r.setLeafIcon (icon); + } + + /********************************************************************* * Put this tree in a scrollable pane. ********************************************************************/ public JScrollPane scrollable() { @@ -237,6 +253,11 @@ if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + + if (nsLeafIcon == null) nsLeafIcon = loadIcon ("images/small_yellow.gif"); + if (stLeafIcon == null) stLeafIcon = loadIcon ("images/magentaDiamond.gif"); + if (sLeafIcon == null) sLeafIcon = loadIcon ("images/console.gif"); + if (dtLeafIcon == null) dtLeafIcon = loadIcon ("images/smallPage.gif"); } // =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/10/28 11:30:37 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/05 17:51:04 1.11 @@ -23,10 +23,12 @@ import javax.swing.text.html.HTMLDocument; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; +import javax.swing.SwingUtilities; import java.awt.GridBagLayout; import java.awt.Font; import java.awt.Color; +import java.awt.Insets; import java.awt.Dimension; import java.beans.PropertyChangeListener; @@ -115,7 +117,15 @@ JFrame frame = SwingUtils.createMainFrame (getComponent (propertyChannel), getName()); addMenuBar (frame); - SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); +// SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); + SwingUtils.showMainFrame (frame, new Dimension (1000, 800)); + } + + /************************************************************************** + * + **************************************************************************/ + public Dimension getPreferredSize() { + return new Dimension (800, 640); } /************************************************************************** @@ -211,9 +221,10 @@ ProgressView.monitor.destroy(); // put it all together + Insets BREATH = new Insets (5,5,5,5); SwingUtils.addComponent (p, header, 0, 0, 1, 1, AbstractPanel.HORI, AbstractPanel.NWEST, 1.0, 0.0); SwingUtils.addComponent (p, tabbedPane, 0, 1, 1, 1, AbstractPanel.BOTH, AbstractPanel.NWEST, 1.0, 1.0); - SwingUtils.addComponent (p, statusBar, 0, 2, 1, 1, AbstractPanel.HORI, AbstractPanel.WEST, 1.0, 0.0); + SwingUtils.addComponent (p, statusBar, 0, 2, 1, 1, AbstractPanel.HORI, AbstractPanel.WEST, 1.0, 0.0, BREATH); return p; } @@ -261,6 +272,7 @@ class StatusBar extends JLabel implements PropertyChangeListener { DateFormat df = DateFormat.getTimeInstance(); + Icon myIcon; public StatusBar (String text) { super (text); } @@ -272,6 +284,11 @@ if (prop.equalsIgnoreCase (DP_STATUS_MSG)) setText ("[" + df.format (new Date()) + "] " + value.toString()); } + public Icon getIcon() { + if (myIcon == null) + myIcon = SwingUtils.createIcon ("images/smallDone.gif", Dashboard.class); + return myIcon; + } } /************************************************************************** @@ -302,7 +319,13 @@ public static void main (String[] args) { if (args.length > 0 && args[0].equals ("-nop")) Dashboard.useLoadMonitor = false; - new Dashboard().show(); + + // schedule a job for the event-dispatching thread + SwingUtilities.invokeLater (new Runnable() { + public void run() { + new Dashboard().show(); + } + }); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/03 08:38:39 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/05 17:51:04 1.9 @@ -72,6 +72,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Data Types Menu"); + setLeafIcon (dtLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 15:21:57 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/05 17:51:04 1.17 @@ -1,3 +1,8 @@ +* better initial dimension of the whole dashboard +* too much empty space in the dashboard title... + (perhaps to move the icon somewhere else - like a "splash panel") + +--- * show/store XML sent to register this service (a place for using it other time?) @@ -125,8 +130,6 @@ * Icons: - better icon for AddHAS (with a small star) ? small icons to buttons - ? graphics to trees - - small icon to the status bar * alltools2: - JTextFieldWithHistory should remember also an empty value ("") @@ -134,4 +137,4 @@ ? use FileSystemView in file choosers * BUG: not sure why so many (repeated) changes from the actionlistener in JFieldTextWithHistory - + * SwingUtils can be simplified (closeOnExit etc.) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/03 08:38:39 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/05 17:51:04 1.4 @@ -65,6 +65,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Namespaces Menu"); + setLeafIcon (nsLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 15:21:57 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 17:51:04 1.8 @@ -17,6 +17,10 @@ import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; +import org.biomoby.shared.MobyData; +import org.biomoby.shared.MobyPrimaryDataSimple; +import org.biomoby.shared.MobyPrimaryDataSet; +import org.biomoby.shared.MobySecondaryData; import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; @@ -33,17 +37,32 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JComboBox; import javax.swing.JPopupMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.AbstractAction; import javax.swing.JComponent; +import javax.swing.DefaultListModel; +import javax.swing.DefaultComboBoxModel; +import javax.swing.DefaultCellEditor; import javax.swing.text.html.HTMLDocument; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableCellRenderer; +import javax.swing.table.TableCellEditor; +import javax.swing.table.TableColumn; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.AbstractCellEditor; +import javax.swing.BorderFactory; +import javax.swing.border.Border; import java.awt.GridBagLayout; import java.awt.Font; +import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -98,6 +117,9 @@ JFileChooserWithHistory localRDFFile; JCheckBox useAuth; + JTable table; + PrimaryDataTableModel tableModel; + MobyException dtException, nsException, stException, sException; MobyException dtUnregException, nsUnregException, stUnregException, sUnregException; @@ -107,6 +129,9 @@ protected static Icon menuAddHASIcon, menuAddHASIconDis; protected static Icon menuUnregisterIcon, menuUnregisterIconDis; protected static Icon registerIcon, registerIconDis; + protected static Icon addDataIcon, addDataIconDis; + protected static Icon editDataIcon, editDataIconDis; + protected static Icon deleteDataIcon, trashIcon; // some texts final static String DATA_TYPE_PROLOGUE = @@ -174,6 +199,20 @@ registerIcon = loadIcon ("images/smallRegister.gif"); if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); + + if (addDataIcon == null) + addDataIcon = loadIcon ("images/smallAddData.gif"); + if (addDataIconDis == null) + addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); + + if (editDataIcon == null) + editDataIcon = loadIcon ("images/smallEdit.gif"); + if (editDataIconDis == null) + editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); + + if (deleteDataIcon == null) deleteDataIcon = loadIcon ("images/smallRemove.gif"); + if (trashIcon == null) trashIcon = loadIcon ("images/smallTrash.gif"); + } /************************************************************************** @@ -464,10 +503,351 @@ * **************************************************************************/ protected JPanel getPrimaryInputs() { - JPanel p = new JPanel (new GridBagLayout()); + + JPanel p = createTitledPanel (""); + + tableModel = new PrimaryDataTableModel(); + table = new JTable (tableModel); + + // set renderers for buttons column + TableColumn buttonColumn = + table.getColumnModel().getColumn (PrimaryDataTableModel.COL_BUTTON); + if (trashIcon != null) + buttonColumn.setMaxWidth (trashIcon.getIconWidth() + 15); + buttonColumn.setCellRenderer (new ButtonRenderer()); + buttonColumn.setCellEditor (new ButtonEditor()); + buttonColumn.setHeaderRenderer (new TableCellRenderer() { + public Component getTableCellRendererComponent + (JTable table, Object value, boolean isSelected, + boolean hasFocus, int row, int column) { + return (JComponent)value; + } + }); + JButton headerButton = new JButton ("", trashIcon); + headerButton.setToolTipText ("Click in this column to remove data from this service"); + buttonColumn.setHeaderValue (headerButton); + + // set renderers for namespaces column + TableColumn nsColumn = + table.getColumnModel().getColumn (PrimaryDataTableModel.COL_NAMESPACE); + nsColumn.setCellRenderer (new NamespaceRenderer()); + nsColumn.setCellEditor (new NamespaceEditor()); + + JScrollPane tablePane = new JScrollPane (table); + + // an add button + JButton addButton = + createButton (" Add new data ", + "Add new data to the service definition", + KeyEvent.VK_A, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + onAddData(); + } + }); + addButton.setIcon (addDataIcon); + addButton.setDisabledIcon (addDataIconDis); + + // a tree with all already existing data types + DataTypesBoard dataTypesBoard = + new DataTypesBoard (registryModel, + console, + propertyChannel, + new CustomDataTypesSimplestTree (registryModel, console)); + dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); + + // a tree with all already existing namespaces + NamespacesBoard namespacesBoard = + new NamespacesBoard (registryModel, + console, + propertyChannel, + new CustomNamespacesSimplestTree (registryModel, console)); + namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); + + // split the trees + JSplitPane split = hSplit (dataTypesBoard, namespacesBoard, 0.5); + + // put it together + SwingUtils.addComponent (p, addButton, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, tablePane, 0, 1, 1, 1, BOTH, NWEST, 1.0, 0.3, BREATH_TOP); + SwingUtils.addComponent (p, split, 0, 2, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); return p; } + + private Vector data = new Vector(); + + /************************************************************************** + * + **************************************************************************/ + protected void onAddData() { + data.addElement (new MobyPrimaryDataSimple ("")); + + int rowCount = tableModel.getRowCount(); + tableModel.fireTableRowsInserted (rowCount-1, rowCount-1); + } + + /************************************************************************** + * + **************************************************************************/ + class DeleteRowButton extends JButton { + int rowToDelete = -1; + public DeleteRowButton() { + super(); + setText (""); + setIcon (deleteDataIcon); + setToolTipText ("Remove this data from this service"); + setFocusPainted (false); + addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + if (rowToDelete >= 0) { + tableModel.removeRow (rowToDelete); + } + } + }); + } + public void setRowToDelete (int row) { + rowToDelete = row; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ButtonRenderer extends DeleteRowButton + implements TableCellRenderer { + public ButtonRenderer() { + setOpaque (true); + } + public Component getTableCellRendererComponent (JTable table, + Object value, + boolean isSelected, + boolean hasFocus, + int row, int column) { + return this; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ButtonEditor extends AbstractCellEditor + implements TableCellEditor { + public Object getCellEditorValue() { + return null; + } + public Component getTableCellEditorComponent (JTable table, + Object value, + boolean isSelected, + int row, int column) { + DeleteRowButton button = new DeleteRowButton(); + button.setRowToDelete (row); + return button; + } + } + + /************************************************************************** + * + **************************************************************************/ + class NamespaceRenderer extends DefaultTableCellRenderer { + + public NamespaceRenderer() { + setOpaque (true); + } + protected void setValue (Object value) { + if (value == null) { + setText (""); + return; + } + MobyPrimaryDataSimple simple = null; + if (value instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)value; + } else if (value instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + MobyNamespace[] nss = simple.getNamespaces(); + if (nss.length == 0) + setText (""); + else if (nss.length == 1) + setText (nss[0].getName()); + else + setText (nss.length + " chosen"); + } + } + } + + /************************************************************************** + * + **************************************************************************/ + class NamespaceEditor extends AbstractCellEditor + implements TableCellEditor { + DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); + + public Object getCellEditorValue() { + return null; + } + + public Component getTableCellEditorComponent (JTable table, + Object value, + boolean isSelected, + int row, int column) { + + JComboBox comboBox = new JComboBox (comboModel); + comboBox.setOpaque (true); + + MobyPrimaryDataSimple simple = null; + if (value instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)value; + } else if (value instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + MobyNamespace[] nss = simple.getNamespaces(); + comboModel.removeAllElements(); + for (int i = 0; i < nss.length; i++) { + comboModel.addElement (nss[i].getName()); + } + } + return comboBox; + } + } + + /************************************************************************** + * + **************************************************************************/ + class PrimaryDataTableModel extends AbstractTableModel { + public final static int COL_BUTTON = 0; + public final static int COL_ARTICLE = 1; + public final static int COL_DATATYPE = 2; + public final static int COL_IN_SET = 3; + public final static int COL_NAMESPACE = 4; + + private String[] columnNames = new String[] { + "Remove", + "Article name", + "Data Type", + "In Set", + "Namespaces" }; + + private Class[] columnClasses = new Class[] { + Integer.class, + String.class, + String.class, + Boolean.class, + MobyData.class }; + + public int getColumnCount() { + return columnNames.length; + } + + public int getRowCount() { + return data.size(); + } + + public String getColumnName (int col) { + return columnNames [col]; + } + + public Class getColumnClass (int col) { + return columnClasses [col]; + } + + private String getDataTypeName (MobyData data) { + if (data == null) return ""; + MobyDataType dataType = null; + if (data instanceof MobyPrimaryDataSimple) + dataType = ((MobyPrimaryDataSimple)data).getDataType(); + else if (data instanceof MobyPrimaryDataSet) + dataType = ((MobyPrimaryDataSet)data).getDataType(); + if (dataType == null) return ""; + String name = dataType.getName(); + return (name == null ? "" : name); + } + + private void setDataTypeName (MobyData data, String name) { + if (data == null) return; + MobyDataType dataType = new MobyDataType (name); + if (data instanceof MobyPrimaryDataSimple) + ((MobyPrimaryDataSimple)data).setDataType (dataType); + else if (data instanceof MobyPrimaryDataSet) + ((MobyPrimaryDataSet)data).setDataType (dataType); + } + + public Object getValueAt (int row, int col) { + try { + MobyData d = (MobyData)data.elementAt (row); + switch (col) { + case COL_BUTTON: return new Integer (row); + case COL_ARTICLE: return d.getName(); + case COL_DATATYPE: return getDataTypeName (d); + case COL_IN_SET: return new Boolean (d instanceof MobyPrimaryDataSet); + case COL_NAMESPACE: return d; + } + } catch (Exception e) { } + return ""; + } + + public void setValueAt (Object value, int row, int col) { + // TBD: I do not know why this method is called after a + // last row has been deleted - so the 'row' is actually + // out of bounds; but if other than last row is deleted + // things work fine... (that's why i put here try{} but I + // am not happy about it + try { + MobyData d = (MobyData)data.elementAt (row); + switch (col) { + case COL_ARTICLE: + d.setName (value.toString()); + break; + case COL_DATATYPE: + setDataTypeName (d, value.toString()); + break; + case COL_IN_SET: + if ( ((Boolean)value).booleanValue() ) { + // change data to a collection (if necessary) + if (d instanceof MobyPrimaryDataSimple) { + MobyPrimaryDataSet set = new MobyPrimaryDataSet (d.getName()); + set.addElement ((MobyPrimaryDataSimple)d); + synchronized (data) { + data.removeElementAt (row); + data.insertElementAt (set, row); + } + } + } else { + // change data to a simple (if necessary) + if (d instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = + ((MobyPrimaryDataSet)d).getElements(); + if (simples.length > 0) { + simples[0].setName (d.getName()); + synchronized (data) { + data.removeElementAt (row); + data.insertElementAt (simples[0], row); + } + } + } + } + break; + } + fireTableCellUpdated (row, col); + } catch (Exception e) { } + } + + public void removeRow (int row) { + data.removeElementAt (row); + fireTableRowsDeleted (row, row); + } + + public boolean isCellEditable (int row, int col) { + return (col != COL_DATATYPE); + } + } + /************************************************************************** * **************************************************************************/ @@ -1522,4 +1902,123 @@ sType.setText (nodeObject.getValue()); } } + + + /************************************************************************** + * + * Customized tree of data types - use for service registration + * + **************************************************************************/ + protected class CustomDataTypesSimplestTree + extends DataTypesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomDataTypesSimplestTree (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeFromPopups (AC_HASA); + removeFromPopups (AC_DEPR); + removeSeparatorAfter (AC_ASORT); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected data type to the data table. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_DATA_TYPE) { + int[] rows = table.getSelectedRows(); + for (int i = 0; i < rows.length; i++) { + String value = nodeObject.getValue(); + table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); + Object article = table.getValueAt (rows[i],PrimaryDataTableModel.COL_ARTICLE); + if (article == null || UUtils.isEmpty (article.toString())) + table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_ARTICLE); + } + } + } + } + + /************************************************************************** + * + * Customized tree of namespaces - use for service registration + * + **************************************************************************/ + protected class CustomNamespacesSimplestTree + extends NamespacesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomNamespacesSimplestTree (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected namespace to the data table. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_NAMESPACE) { + int[] rows = table.getSelectedRows(); + for (int i = 0; i < rows.length; i++) { + String value = nodeObject.getValue(); +// table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); + Object data = table.getValueAt (rows[i],PrimaryDataTableModel.COL_NAMESPACE); + MobyPrimaryDataSimple simple = null; + if (data instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)data; + } else if (data instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)data).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + simple.addNamespace (new MobyNamespace (value)); + tableModel.fireTableCellUpdated (rows[i], PrimaryDataTableModel.COL_NAMESPACE); + } + } + } + } + } + } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/02 06:39:06 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 17:51:04 1.17 @@ -81,6 +81,9 @@ JLabel labelCacheDir; CommonConsole console; + // shared icons + protected static Icon infoIcon, infoIconDis; + /********************************************************************* * Default constructor. ********************************************************************/ @@ -88,6 +91,14 @@ super(); } + /********************************************************************* + * Load shared icons. + ********************************************************************/ + protected void loadIcons() { + super.loadIcons(); + if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + } + /************************************************************************** * **************************************************************************/ @@ -289,6 +300,8 @@ onCacheInfo(); } }); +// infoButton.setIcon (infoIcon); + JButton updateButton = createButton (" Update ", "Update local cache from Biomoby registry", =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/03 08:38:39 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/05 17:51:04 1.5 @@ -66,6 +66,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Service Types Menu"); + setLeafIcon (stLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.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/service/dashboard/ServicesTree.java 2005/11/02 06:39:06 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/05 17:51:04 1.2 @@ -75,6 +75,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Services Menu"); + setLeafIcon (sLeafIcon); } /********************************************************************* From senger at pub.open-bio.org Sat Nov 5 15:14:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 15:14:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511052014.jA5KEncD001879@pub.open-bio.org> senger Sat Nov 5 15:14:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1852/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java RegistrationPanel.java RegistryPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonTree.java,1.12,1.13 RegistrationPanel.java,1.8,1.9 RegistryPanel.java,1.17,1.18 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 17:51:04 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 20:14:49 1.13 @@ -243,16 +243,16 @@ menuReloadIconDis = SwingUtils.createIcon ("images/smallReload_dis.gif", Dashboard.class); - if (smallNIcon == null) smallNIcon = loadIcon ("images/smallN.gif"); - if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallN_dis.gif"); - if (smallAIcon == null) smallAIcon = loadIcon ("images/smallA.gif"); - if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallA_dis.gif"); - if (smallTIcon == null) smallTIcon = loadIcon ("images/smallT.gif"); - if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallT_dis.gif"); - if (smallIIcon == null) smallIIcon = loadIcon ("images/smallI.gif"); - if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); - if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); - if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + if (smallNIcon == null) smallNIcon = loadIcon ("images/smallSortAZ.gif"); + if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallSortAZ_dis.gif"); + if (smallAIcon == null) smallAIcon = loadIcon ("images/smallAuth.gif"); + if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallAuth_dis.gif"); + if (smallTIcon == null) smallTIcon = loadIcon ("images/smallInher.gif"); + if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallInher_dis.gif"); + if (smallIIcon == null) smallIIcon = loadIcon ("images/smallImport.gif"); + if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallImport_dis.gif"); + if (smallOIcon == null) smallOIcon = loadIcon ("images/smallExport.gif"); + if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallExport_dis.gif"); if (nsLeafIcon == null) nsLeafIcon = loadIcon ("images/small_yellow.gif"); if (stLeafIcon == null) stLeafIcon = loadIcon ("images/magentaDiamond.gif"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 17:51:04 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 20:14:49 1.9 @@ -190,15 +190,11 @@ if (menuAddHASIconDis == null) menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); - if (menuUnregisterIcon == null) - menuUnregisterIcon = loadIcon ("images/smallUnregister.gif"); - if (menuUnregisterIconDis == null) - menuUnregisterIconDis = loadIcon ("images/smallUnregister_dis.gif"); - - if (registerIcon == null) - registerIcon = loadIcon ("images/smallRegister.gif"); - if (registerIconDis == null) - registerIconDis = loadIcon ("images/smallRegister_dis.gif"); + if (menuUnregisterIcon == null) menuUnregisterIcon = loadIcon ("images/smallTrash.gif"); + if (menuUnregisterIconDis == null) menuUnregisterIconDis = loadIcon ("images/smallTrash_dis.gif"); + + if (registerIcon == null) registerIcon = loadIcon ("images/smallRegister.gif"); + if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); if (addDataIcon == null) addDataIcon = loadIcon ("images/smallAddData.gif"); @@ -697,6 +693,7 @@ JComboBox comboBox = new JComboBox (comboModel); comboBox.setOpaque (true); + createPopups ("Namespace Menu", comboBox); MobyPrimaryDataSimple simple = null; if (value instanceof MobyPrimaryDataSimple) { @@ -2021,4 +2018,57 @@ } } + + + + protected JPopupMenu popup; + + /********************************************************************* + * Create a popup object with common items. Subclasses can (and + * usually do) add more items, or re-created the whole popup.

    + * + * @param title is given to the popups + ********************************************************************/ + protected void createPopups (String title, JComponent component) { + System.out.println ("POPUP"); + popup = new JPopupMenu (title); + popup.add + (CommonTree.createMenuItem (new AbstractAction ("Remove") { + public void actionPerformed (ActionEvent e) { + } + }, "R", trashIcon, trashIcon)); + + // add listener to this tree to bring up popup menus + MouseListener popupListener = new PopupListener(); + component.addMouseListener (popupListener); + } + + class PopupListener extends MouseAdapter { + public void mousePressed (MouseEvent e) { + maybeShowPopup (e); + } + public void mouseReleased (MouseEvent e) { + maybeShowPopup (e); + } + private void maybeShowPopup (MouseEvent e) { + System.out.println ("ME: " + e); + if (e.isPopupTrigger() && popup.isEnabled()) { + popup.show (e.getComponent(), + e.getX(), e.getY()); + } + } + } + + + + + + + + + + + + + } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 17:51:04 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 20:14:49 1.18 @@ -82,7 +82,9 @@ CommonConsole console; // shared icons - protected static Icon infoIcon, infoIconDis; + protected static Icon defaultsIcon; + protected static Icon reloadIcon; + protected static Icon infoIcon, updateIcon, eraseIcon; /********************************************************************* * Default constructor. @@ -96,7 +98,11 @@ ********************************************************************/ protected void loadIcons() { super.loadIcons(); - if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + if (defaultsIcon == null) defaultsIcon = loadIcon ("images/smallUndo.gif"); + if (reloadIcon == null) reloadIcon = loadIcon ("images/smallReload.gif"); + if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + if (updateIcon == null) updateIcon = loadIcon ("images/smallSynch.gif"); + if (eraseIcon == null) eraseIcon = loadIcon ("images/smallTrash.gif"); } /************************************************************************** @@ -247,6 +253,7 @@ onReloadAll(); } }); + reloadAllButton.setIcon (reloadIcon); JButton defaultsButton = createButton (" Restore defaults ", "Fill the text fields above with the default values", @@ -256,6 +263,8 @@ onDefaults(); } }); + defaultsButton.setIcon (defaultsIcon); + JPanel buttonPanel = createButtonPanel (new JButton[] { reloadAllButton, defaultsButton }); JPanel rLocation = createTitledPanel ("Biomoby registry location"); @@ -300,7 +309,7 @@ onCacheInfo(); } }); -// infoButton.setIcon (infoIcon); + infoButton.setIcon (infoIcon); JButton updateButton = createButton (" Update ", @@ -311,6 +320,7 @@ onCacheUpdate(); } }); + updateButton.setIcon (updateIcon); JButton eraseButton = createButton (" Erase ", "Remove everything from the local cache", @@ -320,6 +330,7 @@ onCacheErase(); } }); + eraseButton.setIcon (eraseIcon); JPanel buttonPanel = createButtonPanel (new JButton[] { infoButton, updateButton, eraseButton }); From senger at pub.open-bio.org Sat Nov 5 15:14:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 15:14:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511052014.jA5KEnLa001917@pub.open-bio.org> senger Sat Nov 5 15:14:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv1852/src/main/org/biomoby/service/dashboard/images Modified Files: smallInfo.gif smallRegister.gif smallRegister_dis.gif Added Files: smallAuth.gif smallAuth_dis.gif smallExport.gif smallExport_dis.gif smallImport.gif smallImport_dis.gif smallInher.gif smallInher_dis.gif smallSortAZ.gif smallSortAZ_dis.gif smallSynch.gif smallSynch_dis.gif smallTrash_dis.gif smallUndo.gif smallUndo_dis.gif Removed Files: smallA.gif smallA_dis.gif smallI.gif smallI_dis.gif smallN.gif smallN_dis.gif smallO.gif smallO_dis.gif smallT.gif smallT_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallAuth.gif,NONE,1.1 smallAuth_dis.gif,NONE,1.1 smallExport.gif,NONE,1.1 smallExport_dis.gif,NONE,1.1 smallImport.gif,NONE,1.1 smallImport_dis.gif,NONE,1.1 smallInher.gif,NONE,1.1 smallInher_dis.gif,NONE,1.1 smallSortAZ.gif,NONE,1.1 smallSortAZ_dis.gif,NONE,1.1 smallSynch.gif,NONE,1.1 smallSynch_dis.gif,NONE,1.1 smallTrash_dis.gif,NONE,1.1 smallUndo.gif,NONE,1.1 smallUndo_dis.gif,NONE,1.1 smallInfo.gif,1.1,1.2 smallRegister.gif,1.1,1.2 smallRegister_dis.gif,1.1,1.2 smallA.gif,1.1,NONE smallA_dis.gif,1.1,NONE smallI.gif,1.1,NONE smallI_dis.gif,1.1,NONE smallN.gif,1.1,NONE smallN_dis.gif,1.1,NONE smallO.gif,1.1,NONE smallO_dis.gif,1.1,NONE smallT.gif,1.1,NONE smallT_dis.gif,1.1,NONE =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif 2005/11/05 17:51:04 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif: diff failed =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif 2005/11/03 08:38:40 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif: diff failed =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif 2005/11/03 08:38:40 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif: diff failed rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallA.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallA_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallI.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallI_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallN.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallN_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallO.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallO_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallT.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallT_dis.gif,v: No such file or directory From senger at pub.open-bio.org Sun Nov 6 00:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 00:31:35 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZ7q003429@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv3367/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSimple.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSimple.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/09/22 16:07:09 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 05:31:35 1.6 @@ -100,6 +100,20 @@ return true; } + public void removeNamespace (String namespaceName) { + removeNamespace (new MobyNamespace (namespaceName)); + } + + public void removeNamespace (MobyNamespace value) { + for (Enumeration en = namespaces.elements(); en.hasMoreElements(); ) { + if (en.nextElement().equals (value)) { + namespaces.removeElement (value); + return; + } + } + } + + /************************************************************************** * Convert this instance into XML. * The XML will look like this: From senger at pub.open-bio.org Sun Nov 6 00:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 00:31:35 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZOm003386@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv3367/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.46,1.47 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/02 06:39:05 1.46 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 05:31:34 1.47 @@ -1,3 +1,14 @@ +2005-11-06 Martin Senger + + * Added test for not to duplicate same namespaces in + MobyPrimaryData. + + * Added new class MobyPrimaryData in between MobyData and + MobyPrimaryDataSimple/Set - helps better distinguished between + primary and secondary data. + + * Added removeNamespace() to MobyPrimaryDataSimple. + 2005-11-02 Martin Senger * Changed method equals() in MobyService. From senger at pub.open-bio.org Sun Nov 6 00:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 00:31:35 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZRB003409@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv3367/src/main/org/biomoby/service/dashboard Modified Files: NOTES RegistrationPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,1.17,1.18 RegistrationPanel.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/05 17:51:04 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/06 05:31:35 1.18 @@ -127,9 +127,6 @@ * The same, after de-registration * Then make the reg/unreg real... -* Icons: - - better icon for AddHAS (with a small star) - ? small icons to buttons * alltools2: - JTextFieldWithHistory should remember also an empty value ("") =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 20:14:49 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/06 05:31:35 1.10 @@ -38,12 +38,14 @@ import javax.swing.JTextArea; import javax.swing.JTabbedPane; import javax.swing.JTable; +import javax.swing.JList; import javax.swing.JComboBox; import javax.swing.JPopupMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.AbstractAction; import javax.swing.JComponent; +import javax.swing.ListCellRenderer; import javax.swing.DefaultListModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultCellEditor; @@ -59,6 +61,8 @@ import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; import javax.swing.border.Border; +import javax.swing.event.PopupMenuListener; +import javax.swing.event.PopupMenuEvent; import java.awt.GridBagLayout; import java.awt.Font; @@ -175,20 +179,15 @@ ********************************************************************/ protected void loadIcons() { super.loadIcons(); - if (menuAddISAIcon == null) - menuAddISAIcon = loadIcon ("images/smallAddISA.gif"); - if (menuAddISAIconDis == null) - menuAddISAIconDis = loadIcon ("images/smallAddISA_dis.gif"); + + if (menuAddISAIcon == null) menuAddISAIcon = loadIcon ("images/smallAddISA.gif"); + if (menuAddISAIconDis == null) menuAddISAIconDis = loadIcon ("images/smallAddISA_dis.gif"); - if (menuAddHASAIcon == null) - menuAddHASAIcon = loadIcon ("images/smallAddHASA.gif"); - if (menuAddHASAIconDis == null) - menuAddHASAIconDis = loadIcon ("images/smallAddHASA_dis.gif"); + if (menuAddHASAIcon == null) menuAddHASAIcon = loadIcon ("images/smallAddHASA.gif"); + if (menuAddHASAIconDis == null) menuAddHASAIconDis = loadIcon ("images/smallAddHASA_dis.gif"); - if (menuAddHASIcon == null) - menuAddHASIcon = loadIcon ("images/smallAddHAS.gif"); - if (menuAddHASIconDis == null) - menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); + if (menuAddHASIcon == null) menuAddHASIcon = loadIcon ("images/smallAddHAS.gif"); + if (menuAddHASIconDis == null) menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); if (menuUnregisterIcon == null) menuUnregisterIcon = loadIcon ("images/smallTrash.gif"); if (menuUnregisterIconDis == null) menuUnregisterIconDis = loadIcon ("images/smallTrash_dis.gif"); @@ -196,19 +195,14 @@ if (registerIcon == null) registerIcon = loadIcon ("images/smallRegister.gif"); if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); - if (addDataIcon == null) - addDataIcon = loadIcon ("images/smallAddData.gif"); - if (addDataIconDis == null) - addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); - - if (editDataIcon == null) - editDataIcon = loadIcon ("images/smallEdit.gif"); - if (editDataIconDis == null) - editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); + if (addDataIcon == null) addDataIcon = loadIcon ("images/smallAddData.gif"); + if (addDataIconDis == null) addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); + + if (editDataIcon == null) editDataIcon = loadIcon ("images/smallEdit.gif"); + if (editDataIconDis == null) editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); if (deleteDataIcon == null) deleteDataIcon = loadIcon ("images/smallRemove.gif"); if (trashIcon == null) trashIcon = loadIcon ("images/smallTrash.gif"); - } /************************************************************************** @@ -675,12 +669,59 @@ } } - /************************************************************************** + /************************************************************************** * **************************************************************************/ class NamespaceEditor extends AbstractCellEditor implements TableCellEditor { + + // this is what is diplay when some namespaces are present DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); + JComboBox comboBox; + + // used when there are no namespaces (so a combo box is useless) + DefaultTableCellRenderer defaultRenderer = new DefaultTableCellRenderer(); + + // remember where this combo box is located it (we will need + // it to fire 'table update' when we remove some namespaces) + JTable table; + int row, col; + + // remember where the displayed namespaces come from + MobyPrimaryDataSimple lastSimple = null; + + public NamespaceEditor() { + defaultRenderer.setText (""); + comboBox = new JComboBox (comboModel); + comboBox.setOpaque (true); + comboBox.setRenderer (new ComboBoxRenderer()); + comboBox.addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + if ( (e.getModifiers() & ActionEvent.CTRL_MASK) > 0) { + JComboBox cb = (JComboBox)e.getSource(); + Object selectedItem = cb.getSelectedItem(); + if (selectedItem != null) { + String namespace = selectedItem.toString(); + if (lastSimple != null) { + lastSimple.removeNamespace (namespace); + ((AbstractTableModel)table.getModel()).fireTableCellUpdated (row, col); + + } + } + } + // make the renderer reappear + fireEditingStopped(); + } + }); + comboBox.addPopupMenuListener (new PopupMenuListener() { + public void popupMenuCanceled (PopupMenuEvent e) { + // make the renderer reappear + fireEditingStopped(); + } + public void popupMenuWillBecomeVisible (PopupMenuEvent e) {} + public void popupMenuWillBecomeInvisible (PopupMenuEvent e) {} + }); + } public Object getCellEditorValue() { return null; @@ -689,28 +730,63 @@ public Component getTableCellEditorComponent (JTable table, Object value, boolean isSelected, - int row, int column) { + int row, int col) { - JComboBox comboBox = new JComboBox (comboModel); - comboBox.setOpaque (true); - createPopups ("Namespace Menu", comboBox); + // remember (used when a namespace is being deleted) + this.table = table; + this.row = row; + this.col = col; - MobyPrimaryDataSimple simple = null; + // fill combo box with the current namespaces + lastSimple = null; if (value instanceof MobyPrimaryDataSimple) { - simple = (MobyPrimaryDataSimple)value; + lastSimple = (MobyPrimaryDataSimple)value; } else if (value instanceof MobyPrimaryDataSet) { MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); if (simples.length > 0) - simple = simples[0]; + lastSimple = simples[0]; } - if (simple != null) { - MobyNamespace[] nss = simple.getNamespaces(); - comboModel.removeAllElements(); - for (int i = 0; i < nss.length; i++) { - comboModel.addElement (nss[i].getName()); + if (lastSimple != null) { + MobyNamespace[] nss = lastSimple.getNamespaces(); + if (nss.length > 0) { + comboModel.removeAllElements(); + for (int i = 0; i < nss.length; i++) + comboModel.addElement (nss[i].getName()); + return comboBox; } } - return comboBox; + return defaultRenderer; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ComboBoxRenderer extends JLabel + implements ListCellRenderer { + + public ComboBoxRenderer() { + setOpaque (true); + setIcon (trashIcon); + } + + public Component getListCellRendererComponent (JList list, + Object value, + int index, + boolean isSelected, + boolean cellHasFocus) { + if (isSelected) { + setBackground (list.getSelectionBackground()); + setForeground (list.getSelectionForeground()); + if (index > -1) + list.setToolTipText ("To remove a namespce, hold CTRL and select it"); + + } else { + setBackground (list.getBackground()); + setForeground (list.getForeground()); + } + setText (value == null ? "" : value.toString()); + return this; } } @@ -1999,7 +2075,6 @@ int[] rows = table.getSelectedRows(); for (int i = 0; i < rows.length; i++) { String value = nodeObject.getValue(); -// table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); Object data = table.getValueAt (rows[i],PrimaryDataTableModel.COL_NAMESPACE); MobyPrimaryDataSimple simple = null; if (data instanceof MobyPrimaryDataSimple) { @@ -2017,58 +2092,4 @@ } } } - - - - - protected JPopupMenu popup; - - /********************************************************************* - * Create a popup object with common items. Subclasses can (and - * usually do) add more items, or re-created the whole popup.

    - * - * @param title is given to the popups - ********************************************************************/ - protected void createPopups (String title, JComponent component) { - System.out.println ("POPUP"); - popup = new JPopupMenu (title); - popup.add - (CommonTree.createMenuItem (new AbstractAction ("Remove") { - public void actionPerformed (ActionEvent e) { - } - }, "R", trashIcon, trashIcon)); - - // add listener to this tree to bring up popup menus - MouseListener popupListener = new PopupListener(); - component.addMouseListener (popupListener); - } - - class PopupListener extends MouseAdapter { - public void mousePressed (MouseEvent e) { - maybeShowPopup (e); - } - public void mouseReleased (MouseEvent e) { - maybeShowPopup (e); - } - private void maybeShowPopup (MouseEvent e) { - System.out.println ("ME: " + e); - if (e.isPopupTrigger() && popup.isEnabled()) { - popup.show (e.getComponent(), - e.getX(), e.getY()); - } - } - } - - - - - - - - - - - - - } From senger at pub.open-bio.org Sun Nov 6 11:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNniP013637@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv13600/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/10/27 08:55:48 1.3 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/06 16:23:49 1.4 @@ -1,3 +1,3 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel -org.biomoby.service.dashboard.DebuggingPanel +#org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Sun Nov 6 11:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNo70013750@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java MobyPrimaryDataSimple.java MobySecondaryData.java Added Files: MobyPrimaryData.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryData.java,NONE,1.1 MobyPrimaryDataSet.java,1.5,1.6 MobyPrimaryDataSimple.java,1.6,1.7 MobySecondaryData.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/05 17:51:04 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/06 16:23:50 1.6 @@ -24,7 +24,7 @@ */ public class MobyPrimaryDataSet - extends MobyData { + extends MobyPrimaryData { protected Vector elements = new Vector(); // elemenst are of type MobyPrimaryDataSimple @@ -74,10 +74,11 @@ elements.addElement (value); } - public boolean isPrimary() { - return true; - } - + /************************************************************************** + * Return a data type of the first element of this collection + * (according the Biomoby API, however, all elements should have + * the same data type). + *************************************************************************/ public MobyDataType getDataType() { synchronized (elements) { if (elements.size() > 0) @@ -87,6 +88,11 @@ } } + /************************************************************************** + * Set given data type to all elements of this collection + * (according the Biomoby API all elements should have the same + * data type). + *************************************************************************/ public void setDataType (MobyDataType dataType) { synchronized (elements) { for (Enumeration en = elements.elements(); en.hasMoreElements(); ) @@ -95,6 +101,59 @@ } /************************************************************************** + * Return namespaces of the first element of this collection. + *************************************************************************/ + public MobyNamespace[] getNamespaces() { + synchronized (elements) { + if (elements.size() > 0) + return ((MobyPrimaryDataSimple)elements.firstElement()).getNamespaces(); + else + return new MobyNamespace[] {}; + } + } + + /************************************************************************** + * Set given namespaces of all elements of this collection. + *************************************************************************/ + public void setNamespaces (MobyNamespace[] value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).setNamespaces (value); + } + } + + /************************************************************************** + * Add given namespace of all elements of this collection. + *************************************************************************/ + public void addNamespace (MobyNamespace value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).addNamespace (value); + } + } + + /************************************************************************** + * Remove given namespace (defined by its name) from all elements + * of this collection. + *************************************************************************/ + public void removeNamespace (String namespaceName) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).removeNamespace (namespaceName); + } + } + + /************************************************************************** + * Remove given namespace from all elements of this collection. + *************************************************************************/ + public void removeNamespace (MobyNamespace value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).removeNamespace (value); + } + } + + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: * =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 05:31:35 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 16:23:50 1.7 @@ -26,7 +26,7 @@ */ public class MobyPrimaryDataSimple - extends MobyData { + extends MobyPrimaryData { protected Vector namespaces = new Vector(); // elements are of type MobyNamespace protected MobyDataType dataType; @@ -72,48 +72,71 @@ } } + /************************************************************************** + * + *************************************************************************/ public MobyDataType getDataType() { return dataType; } + + /************************************************************************** + * + *************************************************************************/ public void setDataType (MobyDataType value) { dataType = value; } + /************************************************************************** + * Return all namespaces defined in this data container. + *************************************************************************/ public MobyNamespace[] getNamespaces() { MobyNamespace[] result = new MobyNamespace [namespaces.size()]; namespaces.copyInto (result); return result; } + + /************************************************************************** + * Replace all existing namespaces (if any) by a new array of + * namespaces. Do not accept duplicates (same names). + *************************************************************************/ public void setNamespaces (MobyNamespace[] value) { if (value == null) { namespaces.clear(); } else { for (int i = 0; i < value.length; i++) - namespaces.addElement (value[i]); + addNamespace (value[i]); } } - public void addNamespace (MobyNamespace value) { - namespaces.addElement (value); - } - public boolean isPrimary() { - return true; + /************************************************************************** + * Add one namespace to already existing ones (but only if a + * namespace of the same name does not exist yet). + *************************************************************************/ + public void addNamespace (MobyNamespace value) { + synchronized (namespaces) { + if (! namespaces.contains (value)) + namespaces.addElement (value); + } } + /************************************************************************** + * Remove namespace given by its name. + *************************************************************************/ public void removeNamespace (String namespaceName) { removeNamespace (new MobyNamespace (namespaceName)); } + /************************************************************************** + * Remove given namespace. + *************************************************************************/ public void removeNamespace (MobyNamespace value) { - for (Enumeration en = namespaces.elements(); en.hasMoreElements(); ) { - if (en.nextElement().equals (value)) { - namespaces.removeElement (value); - return; - } + synchronized (namespaces) { + int index = namespaces.indexOf (value); + if (index > -1) + namespaces.remove (index); } } - /************************************************************************** * Convert this instance into XML. * The XML will look like this: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java 2005/09/22 16:07:09 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java 2005/11/06 16:23:50 1.5 @@ -26,7 +26,7 @@ public class MobySecondaryData extends MobyData { - protected String dataType = "STRING"; + protected String dataType = "String"; protected String defaultValue = ""; protected int minimumValue = Integer.MIN_VALUE; protected int maximumValue = Integer.MAX_VALUE; From senger at pub.open-bio.org Sun Nov 6 11:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNofh013772@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/shared/datatypes Modified Files: MobyObject.java Log Message: moby-live/Java/src/main/org/biomoby/shared/datatypes MobyObject.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.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/shared/datatypes/MobyObject.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.java 2005/11/06 16:23:50 1.2 @@ -133,7 +133,7 @@ * * @return a jDom - * element that can be easily incorporated into bigger a XML + * element that can be easily incorporated into a bigger XML * document *************************************************************************/ public Element toXML() { From senger at pub.open-bio.org Sun Nov 6 11:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNnpp013657@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/10/27 04:15:23 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31 @@ -1316,28 +1316,50 @@ /************************************************************************* * *************************************************************************/ + public String getRegisterServiceXML (MobyService service) { + return + "" + + "" + service.getCategory() + "" + + "" + service.getName() + "" + + "" + service.getType() + "" + + "" + service.getAuthority() + "" + + "" + service.getSignatureURL() + "" + + "" + service.getURL() + "" + + "" + service.getEmailContact() + "" + + "" + (service.isAuthoritative() ? "1" : "0") + "" + + "" + + "" + + buildPrimaryInputTag (service) + + buildSecondaryInputTag (service) + + buildOutputTag (service) + + ""; + } + + /************************************************************************* + * + *************************************************************************/ public void registerService (MobyService service) throws MobyException, NoSuccessException, PendingCurationException { String result = (String)doCall ("registerService", - new Object[] { - "" + - "" + service.getCategory() + "" + - "" + service.getName() + "" + - "" + service.getType() + "" + - "" + service.getAuthority() + "" + - "" + service.getSignatureURL() + "" + - "" + service.getURL() + "" + - "" + service.getEmailContact() + "" + - "" + (service.isAuthoritative() ? "1" : "0") + "" + - "" + - "" + - buildPrimaryInputTag (service) + - buildSecondaryInputTag (service) + - buildOutputTag (service) + - "" - }); + new Object[] { getRegisterServiceXML (service) }); +// "" + +// "" + service.getCategory() + "" + +// "" + service.getName() + "" + +// "" + service.getType() + "" + +// "" + service.getAuthority() + "" + +// "" + service.getSignatureURL() + "" + +// "" + service.getURL() + "" + +// "" + service.getEmailContact() + "" + +// "" + (service.isAuthoritative() ? "1" : "0") + "" + +// "" + +// "" + +// buildPrimaryInputTag (service) + +// buildSecondaryInputTag (service) + +// buildOutputTag (service) + +// "" +// }); String[] registered = checkRegistration (result, service); service.setId (registered [0]); service.setRDF (registered [1]); From senger at pub.open-bio.org Sun Nov 6 11:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNnjo013619@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv13600/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.47,1.48 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 05:31:34 1.47 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 16:23:49 1.48 @@ -1,5 +1,12 @@ +2005-11-07 Martin Senger + + * Change default data type in MobySecondaryData from STRING to + String. + 2005-11-06 Martin Senger + * Added method getRegisterServiceXML() to CentralIMpl. + * Added test for not to duplicate same namespaces in MobyPrimaryData. From senger at pub.open-bio.org Sun Nov 6 11:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNoFF013723@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/service/dashboard/images Added Files: smallLog.gif smallLog_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallLog.gif,NONE,1.1 smallLog_dis.gif,NONE,1.1 From senger at pub.open-bio.org Sun Nov 6 11:47:10 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:10 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlAmB013890@pub.open-bio.org> senger Sun Nov 6 11:47:10 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/client Modified Files: GraphsServlet.java Log Message: moby-live/Java/src/main/org/biomoby/client GraphsServlet.java,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/10/27 04:15:23 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/06 16:47:10 1.14 @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; -import java.util.Map; import java.util.Properties; import java.util.Vector; From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBdR013910@pub.open-bio.org> senger Sun Nov 6 11:47:10 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/registry/rdfagent/test Modified Files: RDFAgentTestSuite.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/test RDFAgentTestSuite.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.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/test/RDFAgentTestSuite.java 2005/09/12 18:21:13 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.java 2005/11/06 16:47:10 1.2 @@ -75,7 +75,6 @@ if (connection == null) connection = createConnection(); - String locationOldRDFDoc = ""; // perform the update try { Statement stmt = connection.createStatement(); @@ -303,7 +302,6 @@ public void performInitForTests() { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; println("#### Test 0a ####"); println("Initializing the agent with 0a.rdf"); switchTestRDFDocuments(createRdfDocumentURLString("0a.rdf")); @@ -328,8 +326,6 @@ public void performTest1() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test one ####"); println("Initializing the agent with 1.rdf"); switchTestRDFDocuments(createRdfDocumentURLString("1.rdf")); From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlB8Z013929@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service Modified Files: BaseService.java Log Message: moby-live/Java/src/main/org/biomoby/service BaseService.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java 2005/09/04 13:45:37 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java 2005/11/06 16:47:11 1.4 @@ -13,7 +13,6 @@ import org.tulsoft.shared.GException; import org.biomoby.shared.MobyException; -import org.biomoby.shared.parser.MobyParser; import org.biomoby.shared.parser.MobyPackage; import org.biomoby.shared.parser.MobyJob; From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlB4Q014004@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java BuildDataTypeTree.java CommonDataTable.java CommonTree.java Dashboard.java DashboardProperties.java DataTypesBoard.java DataTypesTree.java DebuggingPanel.java JProgressBarWithCancel.java NamespacesBoard.java NamespacesTree.java PrimaryDataTable.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.14,1.15 BuildDataTypeTree.java,1.4,1.5 CommonDataTable.java,1.1,1.2 CommonTree.java,1.13,1.14 Dashboard.java,1.11,1.12 DashboardProperties.java,1.10,1.11 DataTypesBoard.java,1.6,1.7 DataTypesTree.java,1.10,1.11 DebuggingPanel.java,1.1,1.2 JProgressBarWithCancel.java,1.2,1.3 NamespacesBoard.java,1.1,1.2 NamespacesTree.java,1.5,1.6 PrimaryDataTable.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/05 17:51:04 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/06 16:47:11 1.15 @@ -21,22 +21,16 @@ import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JTextField; import javax.swing.JTextArea; -import javax.swing.JComboBox; import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import javax.swing.JComponent; -import javax.swing.SwingConstants; import javax.swing.border.Border; -import javax.swing.border.TitledBorder; import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; import javax.swing.Box; import javax.swing.BoxLayout; -import javax.swing.filechooser.FileFilter; import javax.swing.text.html.HTMLDocument; import java.awt.Component; @@ -45,7 +39,6 @@ import java.awt.Insets; import java.awt.Font; import java.awt.Color; -import java.awt.Dimension; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.ItemListener; @@ -54,7 +47,6 @@ import java.io.File; import java.util.prefs.Preferences; -import java.util.Map; /** * WORK IN PROGRESS.

    =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/10/26 08:05:18 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/06 16:47:11 1.5 @@ -17,13 +17,11 @@ import javax.swing.JTree; import javax.swing.JPanel; -import javax.swing.JTextField; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.Icon; import javax.swing.JPopupMenu; import javax.swing.JOptionPane; -import javax.swing.JMenuItem; import javax.swing.ToolTipManager; import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; @@ -31,10 +29,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreeSelectionModel; import javax.swing.tree.TreePath; -import javax.swing.event.TreeSelectionListener; -import javax.swing.event.TreeSelectionEvent; import javax.swing.SwingUtilities; -import javax.swing.BoxLayout; import java.awt.Component; import java.awt.Font; @@ -48,13 +43,9 @@ import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.border.TitledBorder; -import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; -import javax.swing.border.EtchedBorder; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; -import java.util.HashSet; import java.util.Enumeration; /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.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/service/dashboard/CommonDataTable.java 2005/11/06 16:23:49 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/06 16:47:11 1.2 @@ -8,34 +8,19 @@ package org.biomoby.service.dashboard; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyNamespace; -import org.biomoby.shared.MobyPrimaryData; -import org.biomoby.shared.MobyPrimaryDataSimple; -import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; - import org.tulsoft.tools.gui.SwingUtils; -import javax.swing.JLabel; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JScrollPane; import javax.swing.JTable; -import javax.swing.JList; -import javax.swing.JComboBox; import javax.swing.JComponent; -import javax.swing.ListCellRenderer; -import javax.swing.DefaultComboBoxModel; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; import javax.swing.table.JTableHeader; -import javax.swing.table.DefaultTableCellRenderer; import javax.swing.AbstractCellEditor; -import javax.swing.event.PopupMenuListener; -import javax.swing.event.PopupMenuEvent; import java.awt.Component; import java.awt.event.ActionEvent; @@ -136,7 +121,6 @@ protected JTableHeader createDefaultTableHeader() { return new JTableHeader (columnModel) { public String getToolTipText (MouseEvent e) { - String tip = null; java.awt.Point p = e.getPoint(); int index = columnModel.getColumnIndexAtX (p.x); int realIndex = =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 20:14:49 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/06 16:47:11 1.14 @@ -8,7 +8,6 @@ package org.biomoby.service.dashboard; -import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JTree; @@ -28,7 +27,6 @@ import javax.swing.tree.TreePath; import javax.swing.event.TreeSelectionListener; import javax.swing.event.TreeSelectionEvent; -import javax.swing.SwingUtilities; import java.awt.Component; import java.awt.Font; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/05 17:51:04 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/06 16:47:11 1.12 @@ -33,12 +33,10 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeSupport; import java.util.Vector; import java.util.Enumeration; import java.util.Properties; -import java.util.Hashtable; import java.util.Date; import java.net.URL; import java.text.DateFormat; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 15:21:57 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/06 16:47:11 1.11 @@ -8,11 +8,6 @@ package org.biomoby.service.dashboard; -import javax.swing.JLabel; -import javax.swing.text.html.HTMLDocument; -import javax.swing.Icon; -import javax.swing.JComponent; - /** * A list of names of most/all recognized properties that can be fired * by dashboard panels, and a list of names of Java properties that =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/06 16:23:49 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/06 16:47:11 1.7 @@ -11,7 +11,6 @@ import org.biomoby.shared.MobyDataType; import org.biomoby.shared.event.NotificationEvent; import org.biomoby.shared.event.Notifier; -import org.tulsoft.shared.UUtils; /** * This is a simple graphical widget combining together a tree (a =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:23:49 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:47:11 1.11 @@ -15,14 +15,10 @@ import org.biomoby.service.generator.DataTypesGenerator; import org.tulsoft.shared.UUtils; -import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JProgressBar; -import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; -import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -268,9 +264,6 @@ void addMembers (DefaultMutableTreeNode node, MobyDataType dataType) { MobyRelationship[] rels = dataType.getChildren(); for (int i = 0; i < rels.length; i++) { - String memberName = rels[i].getName(); - String memberType = rels[i].getDataTypeName(); - int memberRel = rels[i].getRelationshipType(); node.add (new DefaultMutableTreeNode (new MemberNode (rels[i]))); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.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/service/dashboard/DebuggingPanel.java 2005/10/27 08:55:48 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/06 16:47:11 1.2 @@ -16,14 +16,11 @@ import javax.swing.JTextField; import javax.swing.Icon; import javax.swing.JComponent; -import javax.swing.text.html.HTMLDocument; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Map; - /** * A debugging panel.

    * =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/JProgressBarWithCancel.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/service/dashboard/JProgressBarWithCancel.java 2005/10/22 01:38:04 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/JProgressBarWithCancel.java 2005/11/06 16:47:11 1.3 @@ -28,9 +28,7 @@ import java.awt.GridBagLayout; import java.awt.GridBagConstraints; -import java.awt.Dimension; import java.awt.Insets; -import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.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/service/dashboard/NamespacesBoard.java 2005/10/28 13:39:09 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/06 16:47:11 1.2 @@ -11,7 +11,6 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.event.NotificationEvent; import org.biomoby.shared.event.Notifier; -import org.tulsoft.shared.UUtils; /** * This is a simple graphical widget combining together a tree (a =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:23:49 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:47:11 1.6 @@ -9,27 +9,14 @@ package org.biomoby.service.dashboard; import org.biomoby.shared.MobyException; -import org.biomoby.shared.Central; import org.biomoby.shared.MobyNamespace; -import org.biomoby.shared.MobyRelationship; -import org.biomoby.service.generator.DataTypesGenerator; import org.tulsoft.shared.UUtils; -import javax.swing.JMenuItem; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JProgressBar; -import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; -import java.awt.event.ActionEvent; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; - import java.util.HashMap; import java.util.HashSet; -import java.util.Enumeration; -import java.util.Vector; /** * A component showing and manipulating a tree of namespaces =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.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/service/dashboard/PrimaryDataTable.java 2005/11/06 16:23:49 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/06 16:47:11 1.2 @@ -13,25 +13,16 @@ import org.biomoby.shared.MobyPrimaryData; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; - -import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JLabel; -import javax.swing.Icon; -import javax.swing.JButton; -import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JList; import javax.swing.JComboBox; -import javax.swing.JComponent; import javax.swing.ListCellRenderer; import javax.swing.DefaultComboBoxModel; import javax.swing.table.AbstractTableModel; -import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; -import javax.swing.table.JTableHeader; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.AbstractCellEditor; import javax.swing.event.PopupMenuListener; @@ -40,9 +31,6 @@ import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; - -import java.util.Vector; /** * A swing JTable that collects definitions of primary data (input or From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBij014048@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared Modified Files: CentralAll.java Log Message: moby-live/Java/src/main/org/biomoby/shared CentralAll.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/CentralAll.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/shared/CentralAll.java 2005/10/22 01:38:04 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/CentralAll.java 2005/11/06 16:47:11 1.3 @@ -6,8 +6,6 @@ package org.biomoby.shared; -import org.biomoby.shared.event.Notifier; - /** * A common interface to the classical features of a MobyRegistry (as * expressed in {@link Central}) and to the cumulated (digested) From senger at pub.open-bio.org Sun Nov 6 11:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBmP014027@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service/generator Modified Files: DataTypesGenerator.java Generator.java Log Message: moby-live/Java/src/main/org/biomoby/service/generator DataTypesGenerator.java,1.2,1.3 Generator.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.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/service/generator/DataTypesGenerator.java 2005/09/24 17:51:52 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2005/11/06 16:47:11 1.3 @@ -452,8 +452,6 @@ if (isTrue (props.get (GPROP_NOGRAPHS))) return false; - boolean graphCreated = false; - MobyDataType[] subTree = FilterDataTypes.getSubTree (dataType, allDataTypes); if (spaceForImageMap != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/Generator.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/service/generator/Generator.java 2005/09/04 13:45:38 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/Generator.java 2005/11/06 16:47:11 1.3 @@ -11,23 +11,14 @@ import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; import org.tulsoft.tools.external.Executor; -import org.tulsoft.tools.servlets.Html; -import org.tulsoft.tools.servlets.HtmlConstants; import org.biomoby.shared.MobyException; -import org.biomoby.shared.Central; import org.biomoby.shared.CentralAll; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.Utils; -import org.biomoby.shared.parser.MobyTags; import org.biomoby.client.CentralDigestCachedImpl; -import org.biomoby.client.Graphviz; - import java.util.Properties; import java.util.HashMap; -import java.util.Date; import java.util.regex.Pattern; import java.io.File; From senger at pub.open-bio.org Sun Nov 6 11:47:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlCO5014069@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared/data Modified Files: MobyDataBoolean.java Log Message: moby-live/Java/src/main/org/biomoby/shared/data MobyDataBoolean.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.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/shared/data/MobyDataBoolean.java 2005/08/04 14:05:34 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.java 2005/11/06 16:47:11 1.2 @@ -1,7 +1,6 @@ package org.biomoby.shared.data; import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyNamespace; /** * A class representing a MOBY Boolean primitive. @@ -115,7 +114,6 @@ } public String toXML(){ - MobyNamespace[] ns = getNamespaces(); if(xmlMode == MobyDataInstance.SERVICE_XML_MODE){ return "" + value + ""; } From senger at pub.open-bio.org Sun Nov 6 11:47:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlCWl014091@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared/event Modified Files: NotificationEvent.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event NotificationEvent.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java 2005/10/28 11:30:37 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java 2005/11/06 16:47:11 1.6 @@ -8,7 +8,6 @@ package org.biomoby.shared.event; -import org.tulsoft.shared.UUtils; import java.util.EventObject; /** From senger at pub.open-bio.org Mon Nov 7 02:03:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773oKk016556@pub.open-bio.org> senger Mon Nov 7 02:03:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/service/generator Modified Files: ServicesGenerator.java Log Message: moby-live/Java/src/main/org/biomoby/service/generator ServicesGenerator.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/ServicesGenerator.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/service/generator/ServicesGenerator.java 2005/09/04 13:45:38 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/ServicesGenerator.java 2005/11/07 07:03:50 1.3 @@ -15,10 +15,8 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; import org.biomoby.shared.Utils; import org.biomoby.shared.CentralAll; -import org.biomoby.shared.parser.MobyTags; import org.biomoby.shared.parser.MobyParser; import org.biomoby.shared.datatypes.MapDataTypesIfc; @@ -28,7 +26,6 @@ import org.biomoby.client.Graphviz; import org.tulsoft.tools.servlets.Html; -import org.tulsoft.tools.servlets.HtmlConstants; import java.util.Properties; import java.util.Iterator; @@ -582,8 +579,6 @@ if (isTrue (props.get (GPROP_NOGRAPHS))) return false; - boolean graphCreated = false; - ServicesEdge[] edges = ServiceConnections.build (allDataTypes, allServices); edges = FilterServices.filter (edges, null, new String[] { serviceName }, 1); From senger at pub.open-bio.org Mon Nov 7 02:03:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773oDq016575@pub.open-bio.org> senger Mon Nov 7 02:03:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/shared Modified Files: Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared Utils.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/08/26 06:27:04 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/07 07:03:50 1.7 @@ -7,9 +7,6 @@ package org.biomoby.shared; -import org.apache.axis.AxisFault; -import javax.xml.namespace.QName; - import java.util.HashSet; import java.io.PrintWriter; import java.io.BufferedWriter; From senger at pub.open-bio.org Mon Nov 7 02:03:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773nCU016457@pub.open-bio.org> senger Mon Nov 7 02:03:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.31,1.32 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32 @@ -1344,22 +1344,6 @@ String result = (String)doCall ("registerService", new Object[] { getRegisterServiceXML (service) }); -// "" + -// "" + service.getCategory() + "" + -// "" + service.getName() + "" + -// "" + service.getType() + "" + -// "" + service.getAuthority() + "" + -// "" + service.getSignatureURL() + "" + -// "" + service.getURL() + "" + -// "" + service.getEmailContact() + "" + -// "" + (service.isAuthoritative() ? "1" : "0") + "" + -// "" + -// "" + -// buildPrimaryInputTag (service) + -// buildSecondaryInputTag (service) + -// buildOutputTag (service) + -// "" -// }); String[] registered = checkRegistration (result, service); service.setId (registered [0]); service.setRDF (registered [1]); @@ -1371,9 +1355,22 @@ fileout.println (registered [1]); fileout.close(); } catch (IOException e) { - throw new MobyException ("Failed to save RDF in '" + fileRDF.getAbsolutePath() + "'. " + - e.toString() + - "\nReturned RDF:\n" + registered [1]); + StringBuffer buf = new StringBuffer (100); + buf.append ("Failed to save RDF in '"); + buf.append (fileRDF.getAbsolutePath() + "'. "); + buf.append (e.toString()); + try { + File tmpFile = File.createTempFile (service.getName() + "-", ".rdf"); + PrintStream fileout = new PrintStream (new FileOutputStream (tmpFile)); + fileout.println (registered [1]); + fileout.close(); + buf.append ("\nReturned RDF file was therefore stored in: "); + buf.append (tmpFile.getAbsolutePath()); + } catch (IOException e2) { + buf.append ("\nEven saving in a temporary file failed: "); + buf.append (e2.toString()); + } + throw new MobyException (buf.toString()); } } } From senger at pub.open-bio.org Mon Nov 7 02:03:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773n0W016476@pub.open-bio.org> senger Mon Nov 7 02:03:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/registry/rdfagent/test Modified Files: RDFAgentTestSuite.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/test RDFAgentTestSuite.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.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/test/RDFAgentTestSuite.java 2005/11/06 16:47:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.java 2005/11/07 07:03:49 1.3 @@ -353,8 +353,6 @@ public void performTest2() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test two ####"); println("Adding another simple output DNASequence(myDNASequence) with no namespace."); println("Changing the signature url to point to 2.rdf"); @@ -371,8 +369,6 @@ public void performTest3() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test three ####"); println("Adding another simple input DNASequence(myDNASequence) with no namespace."); println("Changing the signature url to point to 3.rdf"); @@ -389,8 +385,6 @@ public void performTest4() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test four ####"); println("Modified the simple output 'myString' to be called 'myNewString'."); println("Changing the signature url to point to 4.rdf"); @@ -407,8 +401,6 @@ public void performTest5() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test five ####"); println("Modified the simple input 'myDNASequence' to be called 'myNewDNASequence'."); println("Changing the signature url to point to 5.rdf"); @@ -425,8 +417,6 @@ public void performTest6() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test six ####"); println("Modified the simple output 'myDNASequence' contain a namespace EC\nand I removed the namespace from the simple output 'myNewString'."); println("Changing the signature url to point to 6.rdf"); @@ -443,8 +433,6 @@ public void performTest7() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seven ####"); println("Swapped the input 'myNewString' with the output 'myKeyword'."); println("Changing the signature url to point to 7.rdf"); @@ -461,8 +449,6 @@ public void performTest8() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eight ####"); println("removed the simple output 'myKeyword'."); println("Changing the signature url to point to 8.rdf"); @@ -479,8 +465,6 @@ public void performTest9() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test nine ####"); println("Removed the very last simple output 'myDNASequence'."); println("Changing the signature url to point to 9.rdf"); @@ -497,8 +481,6 @@ public void performTest10() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test ten ####"); println("removed the simple input 'myNewDNASequence'."); println("Changing the signature url to point to 10.rdf"); @@ -515,8 +497,6 @@ public void performTest11() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eleven ####"); println("Added a simple output of type BasicGFFSequenceFeature and articlename 'myGFF'."); println("Changing the signature url to point to 11.rdf"); @@ -533,8 +513,6 @@ public void performTest12() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twelve ####"); println("appended a 'blah blah blah' to the description."); println("Changing the signature url to point to 12.rdf"); @@ -551,8 +529,6 @@ public void performTest13() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirteen ####"); println("changed the contact email address to be kawas7 at yahoo.com"); println("Changing the signature url to point to 13.rdf"); @@ -569,8 +545,6 @@ public void performTest14() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fourteen ####"); println("Chagned the service type to be analysis."); println("Changing the signature url to point to 14.rdf"); @@ -587,8 +561,6 @@ public void performTest15() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fifteen ####"); println("added a secondary input, called pseudocount of type integer with a\nmin/max of (-)2147483648 and a default value of 9"); println("Changing the signature url to point to 15.rdf"); @@ -605,8 +577,6 @@ public void performTest16() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test sixteen ####"); println("Added a duplicate secondary input as in test 15 called 'second'"); println("Changing the signature url to point to 16.rdf"); @@ -623,8 +593,6 @@ public void performTest17() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen ####"); println("removed the simple output 'myGFF'."); println("Changing the signature url to point to 17.rdf"); @@ -641,8 +609,6 @@ public void performTest17a() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen a ####"); println("Removed the last remaining simple input.\nTHIS SHOULD NOT WORK!"); println("Changing the signature url to point to 17a.rdf"); @@ -659,8 +625,6 @@ public void performTest17b() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen b ####"); println("Changed the pre-existing simple input to be an input of datatype Integer called myInt with no namespace declared."); println("Changing the signature url to point to 17b.rdf"); @@ -677,8 +641,6 @@ public void performTest18() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eighteen ####"); println("removed the secondary input 'pseudocount'. Note that there is an mobyPred:produces element that contains an empty bag."); println("Changing the signature url to point to 18.rdf"); @@ -695,8 +657,6 @@ public void performTest19() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test nineteen ####"); println("Added another secondary input that handles floats."); println("The name is 'expectation_value' and is of type Float.\nNo min/max, but an enumeration of the 8 values(.0001,.01,.001,.1,10,.000001,.00001,1\nand a default of 10.0."); @@ -714,8 +674,6 @@ public void performTest20() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty ####"); println("Added an enum value to expectation value of 101.1."); println("Changing the signature url to point to 20.rdf"); @@ -732,8 +690,6 @@ public void performTest21() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-one ####"); println("changed the default value of expectation_value to be 47.2"); println("Changing the signature url to point to 21.rdf"); @@ -750,8 +706,6 @@ public void performTest22() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-two ####"); println("removed all enums except 101.1 from the secondary input 'expectation_value'"); println("Changing the signature url to point to 22.rdf"); @@ -768,8 +722,6 @@ public void performTest23() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-three ####"); println("added a min value to the secondary input expectation value of .000001"); println("Changing the signature url to point to 23.rdf"); @@ -786,8 +738,6 @@ public void performTest24() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-four ####"); println("added a max value to the secondary input expectation_value of 885858.01."); println("Changing the signature url to point to 24.rdf"); @@ -804,8 +754,6 @@ public void performTest25() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-five ####"); println("removed the max value from the secondary input expectation_value."); println("Changing the signature url to point to 25.rdf"); @@ -822,8 +770,6 @@ public void performTest26() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-six ####"); println("changed the datatype of the secondary input expecation_value to be String."); println("Changing the signature url to point to 26.rdf"); @@ -840,8 +786,6 @@ public void performTest27() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-seven ####"); println("removed the min value from the secondary input 'expectation_value'."); println("Changing the signature url to point to 27.rdf"); @@ -858,8 +802,6 @@ public void performTest28() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-eight ####"); println("removed the secondary input 'expectation_value'"); println("Changing the signature url to point to 28.rdf"); @@ -876,8 +818,6 @@ public void performTest29() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-nine ####"); println("removing the last secondary input 'second'"); println("Changing the signature url to point to 29.rdf"); @@ -894,8 +834,6 @@ public void performTest30() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty ####"); println("Adding a simple output called 'Jim', of type DNASequence, and ns EBI"); println("Changing the signature url to point to 30.rdf"); @@ -912,8 +850,6 @@ public void performTest31() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-one ####"); println("Added an output collection, 'myOutputCollection', containing a simple "); println("Changing the signature url to point to 31.rdf"); @@ -930,8 +866,6 @@ public void performTest32() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-two ####"); println("Added to the output collection, 'myOutputCollection', a simple "); println("Changing the signature url to point to 32.rdf"); @@ -948,8 +882,6 @@ public void performTest33() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-three ####"); println("Modified the simple output DNASequence is now an object, ns = EC and articlename JimIII>"); println("Changing the signature url to point to 33.rdf"); @@ -966,8 +898,6 @@ public void performTest34() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-four ####"); println("Modified the simple output object: added another ns to object EMBL, and added a ns, EC, to 'myNewString' contained in the output collection."); println("Changing the signature url to point to 34.rdf"); @@ -984,8 +914,6 @@ public void performTest35() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-five ####"); println("Modified the output collection: added another ns, EC, to the GO_Term"); println("Changing the signature url to point to 35.rdf"); @@ -1020,8 +948,6 @@ public void performTest37() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-seven ####"); println("Cloned the output collection and placed it as an input. Article Name is myInputCollection."); println("Changing the signature url to point to 37.rdf"); @@ -1038,8 +964,6 @@ public void performTest38() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-eight ####"); println("Removed the output collection 'myOutputCollection'"); println("Changing the signature url to point to 38.rdf"); @@ -1056,8 +980,6 @@ public void performTest39() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-nine ####"); println("Removed the last output collection."); println("Changing the signature url to point to 39.rdf"); @@ -1074,8 +996,6 @@ public void performTest40() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty ####"); println("Removed Go_Term from myInputCollection."); println("Changing the signature url to point to 40.rdf"); @@ -1092,8 +1012,6 @@ public void performTest41() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-one ####"); println("Changed the name of the simple and changed its type (myOldString, Object) in the collection input.\nALso added a new ns EMBL.\nThe simple input 'myNewString' has a new ns EC."); println("Changing the signature url to point to 41.rdf"); @@ -1110,8 +1028,6 @@ public void performTest42() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-two ####"); println("Added a simple to the input collection "); println("Changing the signature url to point to 42.rdf"); @@ -1128,8 +1044,6 @@ public void performTest43a() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-three a####"); println("Cloning the input collection and adding it as input twice with articleName myClonedCollection and no article name."); println("Changing the signature url to point to 43a.rdf"); @@ -1146,8 +1060,6 @@ public void performTest43() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-three ####"); println("Removed myOldString from the input collection. TODO more tests with 43a as starting point"); println("Changing the signature url to point to 43.rdf"); @@ -1164,8 +1076,6 @@ public void performTest44() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-four ####"); println("Removed a ns (EMBL) from the simple in the input collection."); println("Changing the signature url to point to 44.rdf"); @@ -1182,8 +1092,6 @@ public void performTest45() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-five ####"); println("Removed the last remaining ns from the simple in the input collection"); println("Changing the signature url to point to 45.rdf"); @@ -1200,8 +1108,6 @@ public void performTest46() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-six ####"); println("Removed the article name of the simple in the collection."); println("Changing the signature url to point to 46.rdf"); @@ -1218,8 +1124,6 @@ public void performTest47() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-seven ####"); println("Removed the articlename from the input collection."); println("Changing the signature url to point to 47.rdf"); @@ -1236,8 +1140,6 @@ public void performTest48() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-eight ####"); println("Removed the simple input. All that is left is the collection."); println("Changing the signature url to point to 48.rdf"); @@ -1254,8 +1156,6 @@ public void performTest49() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-nine ####"); println("Removed the last remaining input."); println("Changing the signature url to point to 49.rdf"); @@ -1272,8 +1172,6 @@ public void performTest50() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fifty ####"); println("Added an input collection containing a datatype GFF2."); println("Changing the signature url to point to 50.rdf"); From senger at pub.open-bio.org Mon Nov 7 02:07:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:07:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070707.jA777PBK016646@pub.open-bio.org> senger Mon Nov 7 02:07:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv16628/src/main/org/biomoby/service/dashboard/images Removed Files: smallTrash_gis.gif smallUnregister.gif smallUnregister_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallTrash_gis.gif,1.1,NONE smallUnregister.gif,1.1,NONE smallUnregister_dis.gif,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallTrash_gis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallUnregister.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallUnregister_dis.gif,v: No such file or directory From senger at pub.open-bio.org Mon Nov 7 12:14:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 12:14:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511071714.jA7HElJf018916@pub.open-bio.org> senger Mon Nov 7 12:14:46 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv18815/src/main/org/biomoby/service/dashboard/images Added Files: smallFromDoc.gif smallFromDoc_dis.gif smallToDoc.gif smallToDoc_dis.gif smallZoomIn.gif smallZoomIn_dis.gif smallZoomOut.gif smallZoomOut_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallFromDoc.gif,NONE,1.1 smallFromDoc_dis.gif,NONE,1.1 smallToDoc.gif,NONE,1.1 smallToDoc_dis.gif,NONE,1.1 smallZoomIn.gif,NONE,1.1 smallZoomIn_dis.gif,NONE,1.1 smallZoomOut.gif,NONE,1.1 smallZoomOut_dis.gif,NONE,1.1 From kawas at pub.open-bio.org Mon Nov 7 18:59:14 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon, 7 Nov 2005 18:59:14 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511072359.jA7NxEkH024932@pub.open-bio.org> kawas Mon Nov 7 18:59:14 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv24911/org/biomoby/client/rdf/vocabulary Added Files: ServiceDescriptionPredicates.java Log Message: new service instance predicates. moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary ServiceDescriptionPredicates.java,NONE,1.1 From senger at pub.open-bio.org Mon Nov 7 19:01:44 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:01:44 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080001.jA801irH024999@pub.open-bio.org> senger Mon Nov 7 19:01:43 EST 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv24984 Added Files: fetaEngine.jar Log Message: jars-archive/current fetaEngine.jar,NONE,1.1 From kawas at pub.open-bio.org Mon Nov 7 19:02:08 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon, 7 Nov 2005 19:02:08 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080002.jA80282F025053@pub.open-bio.org> kawas Mon Nov 7 19:02:08 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv25028/org/biomoby/registry/rdfagent/verifier Modified Files: ServiceDescrParser.java Log Message: java 1.4 fix moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier ServiceDescrParser.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/07 22:47:06 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/08 00:02:08 1.11 @@ -261,7 +261,6 @@ while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - System.out.println(":" + s.toString()); StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); StmtIterator outs = r.listProperties(FetaModelRDF.outputParameter); while (ins.hasNext()) { @@ -475,7 +474,7 @@ while (enumerations.hasNext()) { enums+=enumerations.nextStatement().getLiteral().getValue().toString()+","; } - if (enums.contains(",")) + if (enums.indexOf(",") > 0) enums= enums.substring(0, enums.lastIndexOf(",")); else enums = null; From senger at pub.open-bio.org Mon Nov 7 19:06:55 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:06:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080006.jA806t6b025119@pub.open-bio.org> senger Mon Nov 7 19:06:55 EST 2005 Update of /home/repository/moby/moby-live/Java/xmls In directory pub.open-bio.org:/tmp/cvs-serv25100 Modified Files: libraries.xml Log Message: moby-live/Java/xmls libraries.xml,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/10/12 11:17:59 1.7 +++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/08 00:06:55 1.8 @@ -12,6 +12,7 @@ + @@ -50,6 +51,7 @@ + @@ -111,6 +113,7 @@ + From mwilkinson at pub.open-bio.org Mon Nov 7 19:16:47 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Mon, 7 Nov 2005 19:16:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080016.jA80Gltk025221@pub.open-bio.org> mwilkinson Mon Nov 7 19:16:47 EST 2005 Update of /home/repository/moby/moby-live/Perl In directory pub.open-bio.org:/tmp/cvs-serv25202 Modified Files: MANIFEST Log Message: updating MANIFEST with new debugYourScript filename moby-live/Perl MANIFEST,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MANIFEST,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Perl/MANIFEST 2004/07/28 23:00:09 1.12 +++ /home/repository/moby/moby-live/Perl/MANIFEST 2005/11/08 00:16:47 1.13 @@ -25,7 +25,7 @@ MOBY/Adaptor/moby/queryapi.pm MOBY/Adaptor/moby/queryapi/mysql.pm t/Client-Central.t -scripts/debugYourService +scripts/DebugYourService.pl scripts/MOBY-Central.pl scripts/Services.cgi scripts/testMOBYCentral_v05.pl From senger at pub.open-bio.org Mon Nov 7 19:34:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:34:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080034.jA80YPVU025286@pub.open-bio.org> senger Mon Nov 7 19:34:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.32,1.33 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33 @@ -1151,8 +1151,7 @@ /************************************************************************* * *************************************************************************/ - public void registerDataType (MobyDataType dataType) - throws MobyException, NoSuccessException, PendingCurationException { + public String getRegisterDataTypeXML (MobyDataType dataType) { // build the ISA tag (expressing hierarchy of data types) String[] names = dataType.getParentNames(); @@ -1184,23 +1183,31 @@ } } + return + "" + + "" + dataType.getName() + "" + + "" + + "" + + "" + new String (buf) + + "" + + "" + new String (buf2) + + "" + + "" + new String (buf3) + + "" + + "" + dataType.getAuthority() + "" + + "" + dataType.getEmailContact() + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ + public void registerDataType (MobyDataType dataType) + throws MobyException, NoSuccessException, PendingCurationException { + String result = (String)doCall ("registerObjectClass", - new Object[] { - "" + - "" + dataType.getName() + "" + - "" + - "" + - "" + new String (buf) + - "" + - "" + new String (buf2) + - "" + - "" + new String (buf3) + - "" + - "" + dataType.getAuthority() + "" + - "" + dataType.getEmailContact() + "" + - "" - }); + new Object[] { getRegisterDataTypeXML (dataType) }); dataType.setId (checkRegistration (result, dataType)[0]); } @@ -1222,8 +1229,7 @@ /************************************************************************* * *************************************************************************/ - public void registerServiceType (MobyServiceType serviceType) - throws MobyException, NoSuccessException, PendingCurationException { + public String getRegisterServiceTypeXML (MobyServiceType serviceType) { // build the ISA tag (expressing hierarchy of service types) String[] names = serviceType.getParentNames(); @@ -1235,35 +1241,30 @@ buf.append ("\n"); } + return + "" + + "" + serviceType.getName() + "" + + "" + serviceType.getEmailContact() + "" + + "" + serviceType.getAuthority() + "" + + "" + + "" + + "" + new String (buf) + + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ + public void registerServiceType (MobyServiceType serviceType) + throws MobyException, NoSuccessException, PendingCurationException { + String result = (String)doCall ("registerServiceType", - new Object[] { - "" + - "" + serviceType.getName() + "" + - "" + serviceType.getEmailContact() + "" + - "" + serviceType.getAuthority() + "" + - "" + - "" + - "" + new String (buf) + - "" + - "" - }); + new Object[] { getRegisterServiceTypeXML (serviceType) }); serviceType.setId (checkRegistration (result, serviceType)[0]); } -// -// NewServiceType -// your_name at contact.address.com -// Your.URI.here -// -// -// -// -// ExistingServiceType -// ExistingServiceType -// -// - /************************************************************************* * *************************************************************************/ @@ -1282,19 +1283,25 @@ /************************************************************************* * *************************************************************************/ + public String getRegisterNamespaceXML (MobyNamespace namespace) { + return + "" + + "" + namespace.getName() + "" + + "" + namespace.getEmailContact() + "" + + "" + namespace.getAuthority() + "" + + "" + + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ public void registerNamespace (MobyNamespace namespace) throws MobyException, NoSuccessException, PendingCurationException { String result = (String)doCall ("registerNamespace", - new Object[] { - "" + - "" + namespace.getName() + "" + - "" + namespace.getEmailContact() + "" + - "" + namespace.getAuthority() + "" + - "" + - "" + - "" - }); + new Object[] { getRegisterNamespaceXML (namespace) }); namespace.setId (checkRegistration (result, namespace)[0]); } From senger at pub.open-bio.org Mon Nov 7 19:34:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:34:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080034.jA80YPjE025317@pub.open-bio.org> senger Mon Nov 7 19:34:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/service/dashboard Modified Files: RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationDataTypeSubPanel.java,1.2,1.3 RegistrationNamespaceSubPanel.java,1.2,1.3 RegistrationServiceTypeSubPanel.java,1.2,1.3 RegistryModel.java,1.14,1.15 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.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/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/08 00:34:25 1.3 @@ -234,8 +234,8 @@ registryModel.registerDataType (dataType); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterDataTypeXML (dataType); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterDataTypeXML (dataType); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.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/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/08 00:34:25 1.3 @@ -207,8 +207,8 @@ registryModel.registerNamespace (namespace); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterNamespaceXML (namespace); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterNamespaceXML (namespace); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.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/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/08 00:34:25 1.3 @@ -221,8 +221,8 @@ registryModel.registerServiceType (serviceType); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterServiceTypeXML (serviceType); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterServiceTypeXML (serviceType); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/07 07:03:49 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/08 00:34:25 1.15 @@ -108,6 +108,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterDataTypeXML (MobyDataType dataType) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterDataTypeXML (dataType); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterDataType (MobyDataType dataType) throws MobyException { initWorker(); @@ -195,6 +204,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterServiceTypeXML (MobyServiceType serviceType) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterServiceTypeXML (serviceType); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); @@ -281,6 +299,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterNamespaceXML (MobyNamespace namespace) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterNamespaceXML (namespace); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterNamespace (MobyNamespace namespace) throws MobyException { initWorker(); From senger at pub.open-bio.org Wed Nov 9 00:29:38 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TcB2030374@pub.open-bio.org> senger Wed Nov 9 00:29:38 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.33,1.34 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/09 05:29:38 1.34 @@ -1500,8 +1500,10 @@ /************************************************************************** * *************************************************************************/ - public void setDebug (boolean debug) { - this.debug = debug; + public boolean setDebug (boolean enabled) { + boolean oldMode = debug; + debug = enabled; + return oldMode; } /************************************************************************** From senger at pub.open-bio.org Wed Nov 9 00:29:38 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TcEq030355@pub.open-bio.org> senger Wed Nov 9 00:29:38 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv30336/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.48,1.49 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 16:23:49 1.48 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/09 05:29:38 1.49 @@ -1,3 +1,10 @@ +2005-11-08 Martin Senger + + * Added methods getRegister[...]XML() to CentralImpl. + + * Changed return value of setDebug() in Central.java (now ir + return the previous debug mode). + 2005-11-07 Martin Senger * Change default data type in MobySecondaryData from STRING to @@ -5,7 +12,7 @@ 2005-11-06 Martin Senger - * Added method getRegisterServiceXML() to CentralIMpl. + * Added method getRegisterServiceXML() to CentralImpl. * Added test for not to duplicate same namespaces in MobyPrimaryData. From senger at pub.open-bio.org Wed Nov 9 00:29:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TdBr030462@pub.open-bio.org> senger Wed Nov 9 00:29:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/shared Modified Files: Central.java Log Message: moby-live/Java/src/main/org/biomoby/shared Central.java,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java 2005/10/27 04:15:23 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java 2005/11/09 05:29:39 1.14 @@ -408,10 +408,14 @@ throws MobyException; /************************************************************************** - * Ask the implementation to create more verbose logs or messages about - * what is going on. The behaviour is completely implementation dependent. + * Ask the implementation to create more verbose logs or messages + * about what is going on. The behaviour is completely + * implementation dependent.

    + * + * @param enabled true if debug mode should be enabled, false otherwise + * @return the previous value of the debug mode *************************************************************************/ - void setDebug (boolean debug); + boolean setDebug (boolean debug); /************************************************************************** * Set whether the server responses should cached or not to speedup From senger at pub.open-bio.org Wed Nov 9 00:29:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TdGl030442@pub.open-bio.org> senger Wed Nov 9 00:29:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/service/dashboard/images Added Files: register2.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images register2.gif,NONE,1.1 From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWkU032215@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory pub.open-bio.org:/tmp/cvs-serv32177/src/Clients/help Modified Files: CacheRegistryClient_usage.txt Log Message: moby-live/Java/src/Clients/help CacheRegistryClient_usage.txt,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/09/22 16:07:08 1.4 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/09 16:23:32 1.5 @@ -42,6 +42,16 @@ -fill-t ... ditto as -fill but only for service types -fill-n ... ditto as -fill but only for namespaces + -update ... update the current cache with data from the + given Moby registry + (note that this does not influence data from + other Moby registries stored in the same + -cachedir directory) + -update-d ... ditto as -update but only for data types + -update-s ... ditto as -update but only for services + -update-t ... ditto as -update but only for service types + -update-n ... ditto as -update but only for namespaces + -remove ... remove the current cache of the given Moby registry (again it does not influence data from other Moby registries stored in the same @@ -51,7 +61,9 @@ -remove-t ...ditto as -remove but only for service types -remove-n ...ditto as -remove but only for namespaces - -q ... quiet mode + -q ... quiet mode (prints only errors) + (default) ... prints events what is happenning (to a log) + -v ... verbose mode (prints also decorations) [Note: You can also use -argsfile to read arguments from a file. See details in src/Client/help/argsfile.example.] From senger at pub.open-bio.org Wed Nov 9 11:23:33 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:33 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWHF032305@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/shared/event Modified Files: Notifier.java Added Files: LogListener.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event LogListener.java,NONE,1.1 Notifier.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/10/28 13:39:09 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/09 16:23:32 1.7 @@ -55,7 +55,6 @@ static final int NAMESPACES_UPDATED = 30; static final int AUTHORITIES_UPDATED = 31; - static final int SIGNAL_CANCEL_DATA_TYPES = 1; static final int SIGNAL_CANCEL_SERVICE_TYPES = 2; static final int SIGNAL_CANCEL_SERVICES = 3; From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWiW032196@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv32177/src/Clients Modified Files: CacheRegistryClient.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/10/27 04:15:23 1.5 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/09 16:23:32 1.6 @@ -1,13 +1,17 @@ // CacheRegistryClient.java -// A command-line client dealing with a registry cache. // -// senger at ebi.ac.uk -// November 2004 +// Created: November 2004 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger at gmail.com). // import org.biomoby.shared.*; import org.biomoby.client.*; +import org.biomoby.shared.event.LogListener; +import org.biomoby.shared.event.Notifier; + import org.tulsoft.tools.BaseCmdLine; import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; @@ -26,7 +30,7 @@ * org.biomoby.client.CentralDigestCachedImpl CentralDigestCachedImpl} * - which is a real caching worker.

    * - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ @@ -70,14 +74,17 @@ System.exit (1); } - verbose = !cmd.hasOption ("-q"); - // where is a Moby registry CentralAll worker = new CentralDigestCachedImpl (cmd.getParam ("-e"), cmd.getParam ("-uri"), cacheDir); CentralDigestCachedImpl castWorker = (CentralDigestCachedImpl)worker; + + // how much to show + verbose = cmd.hasOption ("-v"); + if (! cmd.hasOption ("-q")) + ((Notifier)castWorker).addNotificationListener (new LogListener()); if (cmd.hasOption ("-debug")) { worker.setDebug (true); @@ -126,6 +133,26 @@ } // + // update the cache + // + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-d")) { + decorationLn ("Updating data types..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-s")) { + decorationLn ("Updating services..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-t")) { + decorationLn ("Updating service types..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-n")) { + decorationLn ("Updating namespaces..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + } + + // // remove the cache // if (cmd.hasOption ("-remove") || cmd.hasOption ("-remove-d")) { @@ -171,10 +198,10 @@ * Print 'msg' but only if in verbose mode *************************************************************************/ static void decoration (String msg) { - if (verbose) System.out.print (msg); + if (verbose) System.out.print (msg); } static void decorationLn (String msg) { - if (verbose) System.out.println (msg); + if (verbose) System.out.println (msg); } } From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWiT032236@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/10/27 04:15:23 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/09 16:23:32 1.12 @@ -23,6 +23,7 @@ import java.io.PrintWriter; import java.util.Iterator; import java.util.Map; +import java.util.HashSet; import java.util.TreeMap; import java.util.Vector; import java.util.Arrays; @@ -51,6 +52,9 @@ extends CentralDigestImpl implements CentralAll { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (CentralDigestCachedImpl.class); + // filename for a list of cached entities protected static final String LIST_FILE = "__L__I__S__T__"; @@ -132,7 +136,7 @@ * was initiated for). Otherwise 'id' indicates which part of the * cache that will be removed.

    * - * @param id should be either null, or one of the fillowing: + * @param id should be either null, or one of the following: * {@link #CACHE_PART_DATATYPES}, {@link #CACHE_PART_SERVICES}, * {@link #CACHE_PART_SERVICETYPES}, and {@link * #CACHE_PART_NAMESPACES}. @@ -156,9 +160,42 @@ } } } catch (MobyException e) { - // TBD: keep this here at least for some time (until we - // have proper logging perhaps) - System.err.println ("Removing cache failed: " + e.getMessage()); + log.error ("Removing cache failed: " + e.getMessage()); + } + } + + /************************************************************************* + * Update the indicated part of the cache. If 'id' is null it + * updates the whole cache (for that Moby registry this instance + * was initiated for).

    + * + * Updates means to fetch a new list of entities, compare it with + * existing entities in the cache (only by name, not by contents), + * fetch the missing ones and remove the redundant ones.

    + * + * @param id should be either null, or one of the following: + * {@link #CACHE_PART_DATATYPES}, {@link #CACHE_PART_SERVICES}, + * {@link #CACHE_PART_SERVICETYPES}, and {@link + * #CACHE_PART_NAMESPACES}. + * + *************************************************************************/ + public void updateCache (String id) + throws MobyException { + if (cacheDir != null) { + initCache(); + if (id == null || id.equals (CACHE_PART_SERVICES)) { + remove (servicesCache, LIST_FILE); + fillServicesCache(); + } else if (id == null || id.equals (CACHE_PART_DATATYPES)) { + remove (dataTypesCache, LIST_FILE); + fillDataTypesCache(); + } else if (id == null || id.equals (CACHE_PART_SERVICETYPES)) { + remove (serviceTypesCache, LIST_FILE); + fillServiceTypesCache(); + } else if (id == null || id.equals (CACHE_PART_NAMESPACES)) { + remove (namespacesCache, LIST_FILE); + fillNamespacesCache(); + } } } @@ -291,6 +328,15 @@ } } + // remove a file from a cache + protected void remove (File cache, String name) { + File file = new File (cache, name); + // do not throw here an exception because a missing file + // can be a legitimate status (e.g. for LIST_FILE when we + // are updating) + file.delete(); + } + /************************************************************************** * Read a cached file *************************************************************************/ @@ -332,34 +378,95 @@ return true; } - /************************************************************************** - * Load data types from a moby registry into local cache. If it is - * interrupted (by a callback signal) it removes what was already - * put into this cache and returns false. Otherwise returns - * true. It raises an exception if it cannot fill the cache (from - * some other reasons). +// /************************************************************************** +// * Load data types from a moby registry into local cache. If it is +// * interrupted (by a callback signal) it removes what was already +// * put into this cache and returns false. Otherwise returns +// * true. It raises an exception if it cannot fill the cache (from +// * some other reasons). +// *************************************************************************/ +// protected boolean fillDataTypesCache() +// throws MobyException { +// try { +// fireEvent (DATA_TYPES_START); +// String typesAsXML = getDataTypeNamesAsXML(); +// store (dataTypesCache, LIST_FILE, typesAsXML); +// Map types = createDataTypeNamesFromXML (typesAsXML); +// fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); +// for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { +// Map.Entry entry = (Map.Entry)it.next(); +// String name = (String)entry.getKey(); +// fireEvent (DATA_TYPE_LOADING, name); +// String xml = getDataTypeAsXML (name); +// store (dataTypesCache, name, xml); +// fireEvent (DATA_TYPE_LOADED, name); +// if (stopDT) { +// removeFromCache (CACHE_PART_DATATYPES); +// return false; +// } +// } +// return true; +// } catch (Exception e) { +// throw new MobyException (formatException (e)); +// } finally { +// fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); +// stopDT = false; +// } +// } + + /************************************************************************** + * Update data types from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE *************************************************************************/ protected boolean fillDataTypesCache() throws MobyException { try { fireEvent (DATA_TYPES_START); String typesAsXML = getDataTypeNamesAsXML(); - store (dataTypesCache, LIST_FILE, typesAsXML); + remove (dataTypesCache, LIST_FILE); Map types = createDataTypeNamesFromXML (typesAsXML); fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = dataTypesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (dataTypesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String name = (String)entry.getKey(); - fireEvent (DATA_TYPE_LOADING, name); - String xml = getDataTypeAsXML (name); - store (dataTypesCache, name, xml); - fireEvent (DATA_TYPE_LOADED, name); - if (stopDT) { - removeFromCache (CACHE_PART_DATATYPES); - return false; + if ( ! currentFiles.contains (name)) { + // missing file: fetch it from a registry + fireEvent (DATA_TYPE_LOADING, name); + String xml = getDataTypeAsXML (name); + store (dataTypesCache, name, xml); + fireEvent (DATA_TYPE_LOADED, name); + if (stopDT) { + return false; + } } + currentFiles.remove (name); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (dataTypesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (dataTypesCache, LIST_FILE, typesAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -397,27 +504,59 @@ } } - // + /************************************************************************** + * Update service types from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE + *************************************************************************/ protected boolean fillServiceTypesCache() throws MobyException { try { fireEvent (SERVICE_TYPES_START); String typesAsXML = getServiceTypesAsXML(); - store (serviceTypesCache, LIST_FILE, typesAsXML); + remove (serviceTypesCache, LIST_FILE); MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = serviceTypesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (serviceTypesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files for (int i = 0 ; i < types.length; i++) { String name = types[i].getName(); - fireEvent (SERVICE_TYPE_LOADING, name); - String xml = getServiceTypeRelationshipsAsXML (name, false); - store (serviceTypesCache, name, xml); - fireEvent (SERVICE_TYPE_LOADED, name); - if (stopST) { - removeFromCache (CACHE_PART_SERVICETYPES); - return false; + if ( ! currentFiles.contains (name)) { + // missing file: fetch it from a registry + fireEvent (SERVICE_TYPE_LOADING, name); + String xml = getServiceTypeRelationshipsAsXML (name, false); + store (serviceTypesCache, name, xml); + fireEvent (SERVICE_TYPE_LOADED, name); + if (stopST) { + log.warn ("Service types cache not fully updated"); + return false; + } } + currentFiles.remove (name); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (serviceTypesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (serviceTypesCache, LIST_FILE, typesAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -426,6 +565,34 @@ } } +// protected boolean fillServiceTypesCache() +// throws MobyException { +// try { +// fireEvent (SERVICE_TYPES_START); +// String typesAsXML = getServiceTypesAsXML(); +// store (serviceTypesCache, LIST_FILE, typesAsXML); +// MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); +// fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); +// for (int i = 0 ; i < types.length; i++) { +// String name = types[i].getName(); +// fireEvent (SERVICE_TYPE_LOADING, name); +// String xml = getServiceTypeRelationshipsAsXML (name, false); +// store (serviceTypesCache, name, xml); +// fireEvent (SERVICE_TYPE_LOADED, name); +// if (stopST) { +// removeFromCache (CACHE_PART_SERVICETYPES); +// return false; +// } +// } +// return true; +// } catch (Exception e) { +// throw new MobyException (formatException (e)); +// } finally { +// fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); +// stopST = false; +// } +// } + // protected boolean fillNamespacesCache() throws MobyException { @@ -458,6 +625,12 @@ // get a list file (with all data type names) String xmlList = getListFile (dataTypesCache); + if (xmlList == null) { + initCache(); + if (! fillDataTypesCache()) + // callback stopped filling + return new TreeMap(); + } return createDataTypeNamesFromXML (xmlList); } } @@ -513,6 +686,12 @@ // get a list file (with all service names) String xmlList = getListFile (servicesCache); + if (xmlList == null) { + initCache(); + if (! fillServicesCache()) + // callback stopped filling + return new TreeMap(); + } return createServiceNamesByAuthorityFromXML (xmlList); } } @@ -568,6 +747,10 @@ // get a list file (with all namespaces) String xmlList = getListFile (namespacesCache); + if (xmlList == null) { + initCache(); + fillNamespacesCache(); + } return createNamespacesFromXML (xmlList); } } @@ -583,12 +766,17 @@ if (isCacheEmpty (serviceTypesCache)) { initCache(); if (! fillServiceTypesCache()) - // callback stopped filling + // a callback stopped filling return new MobyServiceType[] {}; } // get a list file (with all service type names) String xmlList = getListFile (serviceTypesCache); + if (xmlList == null) { + if (! fillServiceTypesCache()) + // a callback stopped filling + return new MobyServiceType[] {}; + } MobyServiceType[] types = createServiceTypesFromXML (xmlList); // add details about relationship to get full service types @@ -606,13 +794,15 @@ } /************************************************************************** - * + * A LIST_FILE is a TOC of a cache object (each cache part has its + * own LIST_FILE). Read it and return it. If it does not exist, + * return null. *************************************************************************/ protected static String getListFile (File cache) throws MobyException { File listFile = new File (cache, LIST_FILE); if (! listFile.exists()) - throw new MobyException ("Corrupted cache '" + cache + "': Missing a LIST file."); + return null; return load (listFile); } From senger at pub.open-bio.org Wed Nov 9 11:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWkk032284@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java NOTES RegistrationPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java RegistryPanel.java ServiceTypesBoard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.18,1.19 NOTES,1.20,1.21 RegistrationPanel.java,1.14,1.15 RegistrationServiceTypeSubPanel.java,1.4,1.5 RegistryModel.java,1.16,1.17 RegistryPanel.java,1.20,1.21 ServiceTypesBoard.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 05:29:38 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 16:23:32 1.19 @@ -404,7 +404,7 @@ clearButton.setFocusPainted (false); clearButton.setMargin (new Insets (0,0,0,0)); clearButton.setContentAreaFilled (false); - clearButton.setToolTipText ("Clear text area"); + clearButton.setToolTipText ("Clear " + title.toLowerCase() + " text area"); clearButton.addActionListener (new ActionListener() { public void actionPerformed (ActionEvent e) { area.requestFocusInWindow(); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/07 17:14:46 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/09 16:23:32 1.21 @@ -1,15 +1,14 @@ +* after unregistration, fill the form with just unregistered entity - + so it is easier to update it and register again * better initial dimension of the whole dashboard * too much empty space in the dashboard title... (perhaps to move the icon somewhere else - like a "splash panel") --- -* show/store XML sent to register this service - (a place for using it other time?) - * how to squeeze too long combo boxes into smaller place ? -*introduce perhaps preferred/minimal/maximal sizes into text fields? +* introduce perhaps preferred/minimal/maximal sizes into text fields? * registration: selecting an authority is really propagated to the text fields? (Do for data type registration the same as was done for @@ -130,6 +129,8 @@ * The same, after de-registration * Then make the reg/unreg real... +* log4j.configuration property - works only from Ant... add it to the + cmd-line clients, as well * alltools2: - JTextFieldWithHistory should remember also an empty value ("") =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 05:29:38 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 16:23:32 1.15 @@ -284,7 +284,7 @@ error ("An error occured when trying to register a new entity.\n\n", exception); registerButton.setEnabled (true); - showXMLButton.setEnabled (true); + fromXMLButton.setEnabled (true); maybeDisableVerbose (bag); console.setAppendMode (oldAppendMode); } @@ -299,6 +299,13 @@ throws MobyException { } + /************************************************************************** + * Should be overwritten by sub-panels. + **************************************************************************/ + protected void updateCache() + throws MobyException { + } + /********************************************************************* * ********************************************************************/ @@ -321,6 +328,8 @@ console.setText (registryModel.callRegistry (myMethodName, xmlFile)); console.setText ("\n"); + updateCache(); + } catch (MobyException e) { exception = e; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 16:23:32 1.5 @@ -200,6 +200,7 @@ serviceType.toString() + "\n"); registryModel.registerServiceType (serviceType); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterServiceTypeXML (serviceType); console.setText ("\n" + xml + "\n"); @@ -208,6 +209,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateServiceTypesCache(); + } + + /************************************************************************** * * Customized tree of service types - has different popup menus etc... * @@ -352,6 +363,7 @@ console.setText ("Service type to be unregistered: " + name + "\n"); registryModel.unRegisterServiceType (serviceType); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 05:29:38 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 16:23:32 1.17 @@ -48,6 +48,8 @@ org.apache.commons.logging.LogFactory.getLog (RegistryModel.class); CentralAll worker; + CentralDigestCachedImpl castWorker; + boolean useCache = true; Hashtable dataTypesTable = new Hashtable(); Hashtable serviceTypesTable = new Hashtable(); @@ -262,6 +264,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateServiceTypesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + fireEvent (Notifier.SERVICE_TYPES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadServiceTypesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + fireEvent (Notifier.SERVICE_TYPES_UPDATED, "", null); + } + + /********************************************************************* * Fetch service types (from a cache or from a registry). When done, * signal that service types are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -505,7 +528,7 @@ /********************************************************************* * - * The rest... + * Dealing with local cache. * ********************************************************************/ @@ -521,6 +544,12 @@ /********************************************************************* * + * The rest... + * + ********************************************************************/ + + /********************************************************************* + * ********************************************************************/ protected void initWorker() throws MobyException { @@ -554,6 +583,7 @@ maybeNewCacheDir); ((Notifier)worker).addNotificationListeners (nls); } + castWorker = (CentralDigestCachedImpl)worker; } /************************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/07 07:03:49 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/09 16:23:32 1.21 @@ -12,11 +12,16 @@ import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.JFileChooserWithHistory; +import org.biomoby.shared.MobyException; +import org.biomoby.shared.event.Notifier; +import org.biomoby.client.CentralDigestCachedImpl; + import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.JSplitPane; import javax.swing.JComponent; @@ -40,10 +45,13 @@ public class RegistryPanel extends AbstractPanel { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (RegistryPanel.class); + // names of user preferences keys static final String USE_CACHE = "use-cache"; - // associated model working behind the scenes + // associated model working behind the scene RegistryModel registryModel; // components that are used from more methods @@ -53,6 +61,8 @@ JLabel labelCacheDir; CommonConsole console; + JCheckBox bServices, bDataTypes, bNamespaces, bServiceTypes, bAll; + // shared icons protected static Icon defaultsIcon; protected static Icon reloadIcon; @@ -142,6 +152,37 @@ /************************************************************************** * **************************************************************************/ + private JPanel createCacheDialog (String introText) { + JPanel p = new JPanel (new GridBagLayout()); + JLabel start = new JLabel (introText); + + bServices = createCheckBox ("Services", false, KeyEvent.VK_S, null); + bDataTypes = createCheckBox ("Data types", false, KeyEvent.VK_D, null); + bNamespaces = createCheckBox ("Namespaces", false, KeyEvent.VK_N, null); + bServiceTypes = createCheckBox ("Service types", false, KeyEvent.VK_T, null); + bAll = createCheckBox ("All", false, KeyEvent.VK_A, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + boolean enabled = (e.getStateChange() != ItemEvent.SELECTED); + bServices.setEnabled (enabled); + bDataTypes.setEnabled (enabled); + bNamespaces.setEnabled (enabled); + bServiceTypes.setEnabled (enabled); + } + }); + // put it together + SwingUtils.addComponent (p, start, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bServices, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (p, bDataTypes, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bNamespaces, 0, 3, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bServiceTypes, 0, 4, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bAll, 0, 5, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + return p; + } + + /************************************************************************** + * + **************************************************************************/ public void onDefaults() { registryURL.setText (registryModel.getDefaultRegistryEndpoint()); registryNS.setText (registryModel.getDefaultRegistryNamespace()); @@ -159,10 +200,84 @@ public void onCacheErase() { } + final static String UPDATE_LABEL = + "Update or reload your local cache
    " + + "for the entities selected below.

    " + + + "Update is faster than reload but
    " + + "it may not reflect changes in the
    " + + "contents of the entities.

    " + + + "Reload is slower than update but it
    " + + "guarantees that the full contents
    " + + "of all cached entities is up to date.

    "; + /************************************************************************** * **************************************************************************/ public void onCacheUpdate() { + JPanel p = createCacheDialog (UPDATE_LABEL); + String[] buttons = new String[] { "Update", "Reload", "Cancel"}; + int selected = + JOptionPane.showOptionDialog (null, p, + "Update/Reload local cache", + JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE, + confirmIcon, + buttons, + null); + boolean toReload; + if (selected == 0) + toReload = false; // 'update' selected + else if (selected == 1) + toReload = true; // 'reload' selected + else + return; // cancelled + + boolean all = bAll.isSelected(); + if (all || bServices.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES, toReload); + if (all || bDataTypes.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES, toReload); + if (all || bNamespaces.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES, toReload); + if (all || bServiceTypes.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES, toReload); + } + + /************************************************************************** + * + **************************************************************************/ + private void updateCache (String cachePart, boolean reload) { + final String myCachePart = cachePart; + final boolean myReload = reload; + final SwingWorker worker = new SwingWorker() { + MobyException exception = null; + public Object construct() { + try { + if (myReload) { + registryModel.reloadServiceTypesCache(); + } else { + registryModel.updateServiceTypesCache(); + } + } catch (MobyException e) { + exception = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (log.isDebugEnabled()) + log.debug (myReload ? "Reload of " : "Update of " + myCachePart + " finished"); + if (exception != null) + error ("An error occured when filling/updating the cache.\n\n", + exception); + } + + }; + worker.start(); + } /************************************************************************** @@ -184,8 +299,8 @@ JLabel labelRegistryNS = new JLabel("Namespace (URI)"); registryNS = createText (null, "registryNamespace", DP_REGISTRY_NAMESPACE); JButton reloadAllButton = - createButton (" Reload all ", - "Reload all ontology trees from the Biomoby registry", + createButton (" Reload ", + "Reload fully some or all ontology trees from the Biomoby registry", KeyEvent.VK_R, new ActionListener() { public void actionPerformed (ActionEvent e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/09 16:23:32 1.4 @@ -88,12 +88,14 @@ case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); +// log.info ("RESET initiator: " + initiator + ", this tree: " + tree); if (tree == initiator) channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: initiator = event.getSource(); +// log.info ("UPDATED initiator: " + initiator + ", this tree: " + tree); if (tree != initiator) { // someone else (of this instance) initiated request // for updating service types - so we need to update our From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVAE003844@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv3825/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.49,1.50 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/09 05:29:38 1.49 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/10 08:54:31 1.50 @@ -1,3 +1,7 @@ +2005-11-10 Martin Senger + + * Added method getParentName() to MobyServiceType + 2005-11-08 Martin Senger * Added methods getRegister[...]XML() to CentralImpl. From senger at pub.open-bio.org Thu Nov 10 03:54:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sW3X004003@pub.open-bio.org> senger Thu Nov 10 03:54:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/shared Modified Files: MobyDataType.java MobyServiceType.java Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyDataType.java,1.11,1.12 MobyServiceType.java,1.4,1.5 Utils.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/10/28 07:58:08 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/11/10 08:54:32 1.12 @@ -154,6 +154,20 @@ return names; } } + + /** + * Return the first parent name (at the moment the only one set + * and used, anyway. This is a convenient method to {@link + * #getParentNames}.

    + * + * @return parent name, or an empty string if there is no parent + * set + */ + public String getParentName() { + String[] names = getParentNames(); + return (names.length == 0 ? "" : names[0]); + } + /** * @see #getParentNames * @param value is a set of parent names (usually just one name, =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java 2005/10/28 11:30:37 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java 2005/11/10 08:54:32 1.5 @@ -83,6 +83,11 @@ description = (value == null ? "" : value); } + public String getParentName() { + String[] names = getParentNames(); + return (names.length == 0 ? "" : names[0]); + } + public String[] getParentNames() { synchronized (parentNames) { String[] names = new String [parentNames.length]; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/07 07:03:50 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/10 08:54:32 1.8 @@ -106,6 +106,25 @@ } /************************************************************************* + * Give back an elapsed time (given in milllis) in a human + * readable form.

    + * + * @param millis is a time interval in milliseconds + * @return formatted, human-readable, time + *************************************************************************/ + public static String ms2Human (long millis) { + StringBuffer buf = new StringBuffer (100); + long seconds = millis / 1000; + long minutes = seconds / 60; + long hours = minutes / 60; + long days = hours / 24; + if (days > 0) + buf.append (days + " days and "); + buf.append ((hours % 24) + ":" + (minutes % 60) + ":" + (seconds % 60) + "." + (millis % 1000)); + return new String (buf); + } + + /************************************************************************* * Return just the last part of the LSID identifier. An example of * an LSID identifier as used by and returned from the Moby * registry is urn:lsid:biomoby.org:objectclass:object. From senger at pub.open-bio.org Thu Nov 10 03:54:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sW1J003976@pub.open-bio.org> senger Thu Nov 10 03:54:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java Dashboard.java DashboardProperties.java DataTypesBoard.java NOTES NamespacesBoard.java RegistrationDataTypeSubPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonTree.java,1.14,1.15 Dashboard.java,1.13,1.14 DashboardProperties.java,1.13,1.14 DataTypesBoard.java,1.8,1.9 NOTES,1.21,1.22 NamespacesBoard.java,1.3,1.4 RegistrationDataTypeSubPanel.java,1.4,1.5 RegistrationServiceSubPanel.java,1.3,1.4 RegistrationServiceTypeSubPanel.java,1.5,1.6 RegistryModel.java,1.17,1.18 RegistryPanel.java,1.21,1.22 ServiceTypesBoard.java,1.4,1.5 ServiceTypesTree.java,1.7,1.8 ServicesBoard.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/06 16:47:11 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 08:54:31 1.15 @@ -57,6 +57,7 @@ protected final static String AC_ASORT = "ac-asort"; // some shared constants + final static protected int SORTED_AS_PREVIOUSLY = -1; final static protected int SORTED_BY_NAME = 0; final static protected int SORTED_BY_AUTHORITY = 1; final static protected int SORTED_UNUSUAL = 9; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/07 17:14:46 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 08:54:31 1.14 @@ -116,8 +116,14 @@ JFrame frame = SwingUtils.createMainFrame (getComponent (propertyChannel), getName()); addMenuBar (frame); -// SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); - SwingUtils.showMainFrame (frame, new Dimension (1000, 800)); + + Dimension screenSize = frame.getToolkit().getScreenSize(); + double myWidth = Math.min (screenSize.getWidth(), 1100); + double myHeight = Math.min (screenSize.getHeight(), 900); + Dimension mySize = new Dimension(); + mySize.setSize (myWidth, myHeight); + + SwingUtils.showMainFrame (frame, mySize); } /************************************************************************** @@ -266,7 +272,8 @@ * the bottom of a dashboard). **************************************************************************/ protected StatusBar getStatusBar() { - return new StatusBar ("Status: Work in progress"); + return new StatusBar + ("Dashboard is ready. Fasten your seat belts - it's going to be a bumpy ride."); } class StatusBar extends JLabel implements PropertyChangeListener { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/09 05:29:38 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 08:54:31 1.14 @@ -63,6 +63,7 @@ static final String DP_REG_S_XML_PATH = "dp-reg-s-xml-path"; static final String DP_USE_SIGNATURE = "dp-use-signature"; // type: Boolean static final String DP_USE_AUTHORITATIVE = "dp-use-auth"; // type: Boolean + static final String DP_REG_S_TYPE = "dp-reg-s-type"; static final String DP_REG_VERBOSE = "dp-reg-verbose"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/07 17:14:46 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/10 08:54:31 1.9 @@ -99,7 +99,8 @@ // for updating data types - so we need to update our // own tree - using for that data types included in // this event - tree.update (-1, (MobyDataType[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyDataType[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/09 16:23:32 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 08:54:31 1.22 @@ -1,10 +1,28 @@ +* More testing: + - interrupting loading + - different order of panels + - loading without caching + - changing cache... + +* MAJOR BUG: synchronization problem when starting; revised it! + - perhaps singletons for registry model and for workers there + +* BUG: still sometimes a bug by reloading the cache - + NullPointerException reported in a dialog window - difficult to + reproduce it... but it is somewhere there :-( + +* WARN: How would an authority with characters 'http://' cope as a + cache name? Can it happen? + * after unregistration, fill the form with just unregistered entity - so it is easier to update it and register again -* better initial dimension of the whole dashboard * too much empty space in the dashboard title... (perhaps to move the icon somewhere else - like a "splash panel") +* log warning if the 'notified' is not called from the event-dispatch + queue + --- * how to squeeze too long combo boxes into smaller place ? @@ -19,8 +37,6 @@ * BUG: When 'no-use-chache' then changing sorting also reloads; which is bad I think -* Reload ... does it ignore cache? - TODO generally: --------------- @@ -35,26 +51,19 @@ ? select a part of an error message and highlight it in red? ? HELP (in a Dashboard Menu) + - starting panel/splash screen - helps from panels - About - credits - add dynamically a URL from dashboard.properties... -* change onMethods() to be protected or even private... - ? improve API javadoc of all these Central*Impl ? start to work on/think of the RDF-based cache TODO for cache: --------------- -* poor-man update: keep what's there but add what is not there - (and perhaps delete what should not be there) - but do not - check any age of existing -* getInfo() method -* corresponding changes with command-line clients for cache - implementations -* remove memory-caching from CentralImpl -* graphics by default: yes for datatyeps and no for services +? remove memory-caching from CentralImpl +? graphics by default: yes for datatyeps and no for services General options (available from the menu) --------------- @@ -63,12 +72,6 @@ * language ( => use proper ResourceBundler...) -Registry panel --------------- - -* finish all buttons - - Registration panel ------------------ @@ -123,12 +126,6 @@ - the BuildDataTypeTree is sometimes damaged (after adding a member node); not sure how to reproduce it - ! finish all the caching stuff (separate scrap of paper) - -* After registration, update cache, update list -* The same, after de-registration -* Then make the reg/unreg real... - * log4j.configuration property - works only from Ant... add it to the cmd-line clients, as well =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/10 08:54:31 1.4 @@ -99,7 +99,8 @@ // for updating namespaces - so we need to update our // own tree - using for that namespaces included in // this event - tree.update (-1, (MobyNamespace[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyNamespace[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 08:54:31 1.5 @@ -327,7 +327,10 @@ /********************************************************************* * Called when a tree node is selected, or deselected (in * which case 'node' is null). If a data type name is - * selected, enable few popup menu items, otherwise disable them. + * selected, enable few popup menu items, otherwise disable + * them. Then copy the contents of this data type to a + * console, and additional (if indicated in the + * propertyChannel) to the newly built data type fields. ********************************************************************/ protected void selected (DefaultMutableTreeNode node) { if (node == null) { @@ -366,6 +369,7 @@ dtAuth.setText (dataType.getAuthority()); dtEmail.setText (dataType.getEmailContact()); dtDescArea.setText (dataType.getDescription()); + buildTree.setParent (dataType.getParentName()); } } else if (isAuthority) { if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/09 05:29:38 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 08:54:31 1.4 @@ -59,6 +59,7 @@ // names of user preferences keys static final String USE_SIGNATURE = "use-signature"; static final String USE_AUTHORITATIVE = "use-authoritative"; + static final String REG_S_TYPE = "reg-s-type"; static final String REG_S_FROM_XML = "reg-service-from-xml-file"; // components that are used from more methods @@ -142,7 +143,7 @@ // service type JPanel serviceType = new JPanel (new GridBagLayout()); JLabel labelST = new JLabel ("Service type: "); - sType = new JLabel (""); + sType = new JLabel (getPrefValue (REG_S_TYPE, "")); SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); @@ -585,8 +586,12 @@ protected void selected (DefaultMutableTreeNode node) { if (node == null) return; CommonNode nodeObject = (CommonNode)node.getUserObject(); - if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) - sType.setText (nodeObject.getValue()); + if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) { + String value = nodeObject.getValue(); + sType.setText (value); + setPrefValue (REG_S_TYPE, value); + propertyChannel.put (DP_REG_S_TYPE, value); + } } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 16:23:32 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 08:54:31 1.6 @@ -312,6 +312,7 @@ stAuth.setText (serviceType.getAuthority()); stEmail.setText (serviceType.getEmailContact()); stDescArea.setText (serviceType.getDescription()); + stISA.setText (serviceType.getParentName()); } } else if (isAuthority) { if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 16:23:32 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/10 08:54:31 1.18 @@ -32,9 +32,9 @@ import java.io.IOException; /** - * A real worker that supplies all data to the {@link - * RegistryPanel}. It accesses a Biomoby registry (or a local cache) - * to get data.

    + * A real worker that supplies all data from a Biomoby registry (or + * from a local cache) to various panels, especially to the {@link + * RegistryPanel} and the {@link RegistrationPanel}.

    * * @author Martin Senger * @version $Id$ @@ -47,6 +47,14 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (RegistryModel.class); + // Biomoby parts: reflects the same what from is in + // CentralDigestCachedImpl for cache parts - but here more + // conveniently as integers + public static final int PART_SERVICES = 1; + public static final int PART_DATA_TYPES = 2; + public static final int PART_SERVICE_TYPES = 4; + public static final int PART_NAMESPACES = 8; + CentralAll worker; CentralDigestCachedImpl castWorker; @@ -168,6 +176,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateDataTypesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + fireEvent (Notifier.DATA_TYPES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadDataTypesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + fireEvent (Notifier.DATA_TYPES_UPDATED, "", null); + } + + /********************************************************************* * Fetch data types (from a cache or from a registry). When done, * signal that data types are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -380,6 +409,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateNamespacesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + fireEvent (Notifier.NAMESPACES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadNamespacesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + fireEvent (Notifier.NAMESPACES_UPDATED, "", null); + } + + /********************************************************************* * Fetch namespaces (from a cache or from a registry). When done, * signal that namespaces are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -476,6 +526,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateServicesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + fireEvent (Notifier.AUTHORITIES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadServicesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + fireEvent (Notifier.AUTHORITIES_UPDATED, "", null); + } + + /********************************************************************* * Fetch services (from a cache or from a registry). When done, * signal that services are updated. If an initiator is known (not * null), signal, who asked for it, as well. @@ -544,6 +615,20 @@ /********************************************************************* * + ********************************************************************/ + public String getCacheInfoFormatted() + throws MobyException { + initWorker(); + StringBuffer buf = new StringBuffer (500); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_DATATYPES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_NAMESPACES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES)); + return new String (buf); + } + + /********************************************************************* + * * The rest... * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/09 16:23:32 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/10 08:54:31 1.22 @@ -14,7 +14,6 @@ import org.biomoby.shared.MobyException; import org.biomoby.shared.event.Notifier; -import org.biomoby.client.CentralDigestCachedImpl; import javax.swing.JPanel; import javax.swing.JLabel; @@ -62,6 +61,12 @@ CommonConsole console; JCheckBox bServices, bDataTypes, bNamespaces, bServiceTypes, bAll; + JButton infoButton, updateButton, eraseButton; + + DataTypesBoard dataTypesBoard; + ServiceTypesBoard serviceTypesBoard; + NamespacesBoard namespacesBoard; + ServicesBoard servicesBoard; // shared icons protected static Icon defaultsIcon; @@ -108,25 +113,21 @@ console.setAppendMode (false); // ontology trees - DataTypesBoard dataTypesBoard = - new DataTypesBoard (registryModel, - console, - propertyChannel); + dataTypesBoard = new DataTypesBoard (registryModel, + console, + propertyChannel); dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); - ServiceTypesBoard serviceTypesBoard = - new ServiceTypesBoard (registryModel, - console, - propertyChannel); + serviceTypesBoard = new ServiceTypesBoard (registryModel, + console, + propertyChannel); serviceTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); - NamespacesBoard namespacesBoard = - new NamespacesBoard (registryModel, - console, - propertyChannel); + namespacesBoard = new NamespacesBoard (registryModel, + console, + propertyChannel); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); - ServicesBoard servicesBoard = - new ServicesBoard (registryModel, - console, - propertyChannel); + servicesBoard = new ServicesBoard (registryModel, + console, + propertyChannel); servicesBoard.updateTree (CommonTree.SORTED_BY_NAME); // split it into moving panels @@ -144,9 +145,23 @@ } /************************************************************************** - * + * It updates all lists. Each tree is responsible to reload itself + * in a separate thread. + **************************************************************************/ + protected void onReloadAll() { + dataTypesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + serviceTypesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + namespacesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + servicesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + } + + /************************************************************************** + * Replace text fields that define location of a Biomoby registry + * with a default location. **************************************************************************/ - public void onReloadAll() { + protected void onDefaults() { + registryURL.setText (registryModel.getDefaultRegistryEndpoint()); + registryNS.setText (registryModel.getDefaultRegistryNamespace()); } /************************************************************************** @@ -183,21 +198,53 @@ /************************************************************************** * **************************************************************************/ - public void onDefaults() { - registryURL.setText (registryModel.getDefaultRegistryEndpoint()); - registryNS.setText (registryModel.getDefaultRegistryNamespace()); - } + protected void onCacheInfo() { - /************************************************************************** - * - **************************************************************************/ - public void onCacheInfo() { + final JLabel contents = new JLabel(); + final String[] buttons = new String[] { "Copy to console", "Done"}; + propertyChannel.fire (DP_STATUS_MSG, "Retrieving cach info..."); + infoButton.setEnabled (false); + + final SwingWorker worker = new SwingWorker() { + MobyException exception = null; + String info = null; + public Object construct() { + try { + info = registryModel.getCacheInfoFormatted(); + } catch (MobyException e) { + exception = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (exception == null) + contents.setText ("

    " + info + "
    "); + else + contents.setText ("Sorry, I could not retrieve any info...
    " + + "I think that the problem is actually here:

    " +
    +					  exception.getMessage() +
    +					  "
    "); + if (JOptionPane.showOptionDialog (null, contents, + "Info on local cache", + JOptionPane.YES_NO_OPTION, + JOptionPane.PLAIN_MESSAGE, + confirmIcon, + buttons, + null) == 0) + console.setText (info); + propertyChannel.fire (DP_STATUS_MSG, "Done"); + infoButton.setEnabled (true); + } + }; + worker.start(); } /************************************************************************** * **************************************************************************/ - public void onCacheErase() { + protected void onCacheErase() { } final static String UPDATE_LABEL = @@ -215,7 +262,7 @@ /************************************************************************** * **************************************************************************/ - public void onCacheUpdate() { + protected void onCacheUpdate() { JPanel p = createCacheDialog (UPDATE_LABEL); String[] buttons = new String[] { "Update", "Reload", "Cancel"}; int selected = @@ -234,31 +281,53 @@ else return; // cancelled + // update each cache part in a separate (and concurrent) thread boolean all = bAll.isSelected(); if (all || bServices.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES, toReload); + updateCache (RegistryModel.PART_SERVICES, toReload); if (all || bDataTypes.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES, toReload); + updateCache (RegistryModel.PART_DATA_TYPES, toReload); if (all || bNamespaces.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES, toReload); + updateCache (RegistryModel.PART_NAMESPACES, toReload); if (all || bServiceTypes.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES, toReload); + updateCache (RegistryModel.PART_SERVICE_TYPES, toReload); } /************************************************************************** * **************************************************************************/ - private void updateCache (String cachePart, boolean reload) { - final String myCachePart = cachePart; + private void updateCache (int cachePart, boolean reload) { + final int myCachePart = cachePart; final boolean myReload = reload; final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { try { - if (myReload) { - registryModel.reloadServiceTypesCache(); - } else { - registryModel.updateServiceTypesCache(); + switch (myCachePart) { + case RegistryModel.PART_SERVICES: + if (myReload) + registryModel.reloadServicesCache(); + else + registryModel.updateServicesCache(); + break; + case RegistryModel.PART_DATA_TYPES: + if (myReload) + registryModel.reloadDataTypesCache(); + else + registryModel.updateDataTypesCache(); + break; + case RegistryModel.PART_SERVICE_TYPES: + if (myReload) + registryModel.reloadServiceTypesCache(); + else + registryModel.updateServiceTypesCache(); + break; + case RegistryModel.PART_NAMESPACES: + if (myReload) + registryModel.reloadNamespacesCache(); + else + registryModel.updateNamespacesCache(); + break; } } catch (MobyException e) { exception = e; @@ -269,7 +338,7 @@ // runs on the event-dispatching thread. public void finished() { if (log.isDebugEnabled()) - log.debug (myReload ? "Reload of " : "Update of " + myCachePart + " finished"); + log.debug (myReload ? "Reload of " : "Update of part " + myCachePart + " finished"); if (exception != null) error ("An error occured when filling/updating the cache.\n\n", exception); @@ -286,6 +355,8 @@ protected void onUseCache (boolean enabled) { cacheDir.setEnabled (enabled); labelCacheDir.setEnabled (enabled); + infoButton.setEnabled (enabled); + updateButton.setEnabled (enabled); setPrefValue (USE_CACHE, enabled); propertyChannel.put (DP_USE_CACHE, new Boolean (enabled).toString()); } @@ -299,8 +370,8 @@ JLabel labelRegistryNS = new JLabel("Namespace (URI)"); registryNS = createText (null, "registryNamespace", DP_REGISTRY_NAMESPACE); JButton reloadAllButton = - createButton (" Reload ", - "Reload fully some or all ontology trees from the Biomoby registry", + createButton (" Reload all lists ", + "Reload all ontology trees from a Biomoby registry, or from the cache", KeyEvent.VK_R, new ActionListener() { public void actionPerformed (ActionEvent e) { @@ -353,8 +424,7 @@ DP_CACHE_DIR); cacheDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - onUseCache (usingCache); - JButton infoButton = + infoButton = createButton (" Info ", "Show current information about the local cache", KeyEvent.VK_I, @@ -365,7 +435,7 @@ }); infoButton.setIcon (infoIcon); - JButton updateButton = + updateButton = createButton (" Update ", "Update local cache from Biomoby registry", KeyEvent.VK_U, @@ -375,19 +445,21 @@ } }); updateButton.setIcon (updateIcon); - JButton eraseButton = - createButton (" Erase ", - "Remove everything from the local cache", - KeyEvent.VK_E, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - onCacheErase(); - } - }); - eraseButton.setIcon (eraseIcon); +// eraseButton = +// createButton (" Erase ", +// "Remove everything from the local cache", +// KeyEvent.VK_E, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// onCacheErase(); +// } +// }); +// eraseButton.setIcon (eraseIcon); + JPanel buttonPanel = createButtonPanel (new JButton[] { infoButton, - updateButton, - eraseButton }); + updateButton }); +// eraseButton }); + onUseCache (usingCache); JPanel cLocation = createTitledPanel ("Local cache"); SwingUtils.addComponent (cLocation, useCache, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/09 16:23:32 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/10 08:54:31 1.5 @@ -88,20 +88,19 @@ case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); -// log.info ("RESET initiator: " + initiator + ", this tree: " + tree); if (tree == initiator) channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: initiator = event.getSource(); -// log.info ("UPDATED initiator: " + initiator + ", this tree: " + tree); if (tree != initiator) { // someone else (of this instance) initiated request // for updating service types - so we need to update our // own tree - using for that service types included in // this event - tree.update (-1, (MobyServiceType[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyServiceType[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/07 07:03:49 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/10 08:54:31 1.8 @@ -176,8 +176,9 @@ } /********************************************************************* - * Reload the tree from the Biomoby registry, ignoring (and - * updating) cache. + * Reload the tree from the Biomoby registry (or from the current + * cache). If you want to update also cache, use the cache buttons + * - they will invoke this method also after updating the cache. ********************************************************************/ protected void reload() { update (lastSorted, null); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 08:54:31 1.4 @@ -99,7 +99,8 @@ // for updating services - so we need to update our // own tree - using for that services included in this // event - tree.update (-1, (MobyService[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyService[])event.getDetails()); } break; } From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVPI003882@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory pub.open-bio.org:/tmp/cvs-serv3825/src/Clients/help Modified Files: CacheRegistryClient_usage.txt Log Message: moby-live/Java/src/Clients/help CacheRegistryClient_usage.txt,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/09 16:23:32 1.5 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/10 08:54:31 1.6 @@ -19,19 +19,6 @@ (default: http://mobycentral.icapture.ubc.ca/MOBY/Central) where are: - -age ... print date when the cache was created - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty'); - format: dow mon dd hh:mm:ss zzz yyyy - -agediff ... print how old is cache - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty') - -rawage ... print date when the cache was created - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty'); - format: number of milliseconds since the standard base - time known as "the epoch" (January 1, 1970, 00:00:00 GMT) - -fill ... remove the current cache and reread all data from the given Moby registry and cache them (note that this does not influence data from @@ -61,6 +48,12 @@ -remove-t ...ditto as -remove but only for service types -remove-n ...ditto as -remove but only for namespaces + -info ... print info on all part of the cache + -info-d ...ditto as -info but only for data types + -info-s ...ditto as -info but only for services + -info-t ...ditto as -info but only for service types + -info-n ...ditto as -info but only for namespaces + -q ... quiet mode (prints only errors) (default) ... prints events what is happenning (to a log) -v ... verbose mode (prints also decorations) From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVLW003863@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv3825/src/Clients Modified Files: CacheRegistryClient.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/09 16:23:32 1.6 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/10 08:54:31 1.7 @@ -91,24 +91,6 @@ } // - // how old is the current cache? - // - if (cmd.hasOption ("-age") || cmd.hasOption ("-rawage") || cmd.hasOption ("-agediff")) { - decorationLn ("Cache age for " + worker.getRegistryEndpoint() + ":"); - long age = castWorker.getCacheAge(); - if (age < 0) - decorationLn ("(cache is empty)"); - else { - if (cmd.hasOption ("-age")) - System.out.println (new Date (age).toString()); - if (cmd.hasOption ("-agediff")) - System.out.println (ms2Human (new Date().getTime() - age)); - if (cmd.hasOption ("-ageraw")) - System.out.println (age); - } - } - - // // [re-]fill the cache // if (cmd.hasOption ("-fill") || cmd.hasOption ("-fill-d")) { @@ -172,6 +154,30 @@ decorationLn ("Cache for namespaces removed."); } + // + // cache info + // + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-d")) { + decorationLn ("Cache for data types..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_DATATYPES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-s")) { + decorationLn ("Cache for service authorities..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-t")) { + decorationLn ("Cache for service types..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-n")) { + decorationLn ("Cache for namespaces..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_NAMESPACES)); + } + } catch (Exception e) { System.err.println ("===ERROR==="); e.printStackTrace(); @@ -180,21 +186,6 @@ } /************************************************************************* - * Give me an elapsed time (given in milllis) in a human readable form. - *************************************************************************/ - public static String ms2Human (long millis) { - StringBuffer buf = new StringBuffer (100); - long seconds = millis / 1000; - long minutes = seconds / 60; - long hours = minutes / 60; - long days = hours / 24; - if (days > 0) - buf.append (days + " days and "); - buf.append ((hours % 24) + ":" + (minutes % 60) + ":" + (seconds % 60) + "." + (millis % 1000)); - return new String (buf); - } - - /************************************************************************* * Print 'msg' but only if in verbose mode *************************************************************************/ static void decoration (String msg) { From senger at pub.open-bio.org Thu Nov 10 03:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVDg003901@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/09 16:23:32 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/10 08:54:31 1.13 @@ -1,7 +1,9 @@ // CentralDigestCachedImpl.java // -// senger at ebi.ac.uk -// September 2004 +// Created: September 2004 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger at gmail.com). // package org.biomoby.client; @@ -13,6 +15,7 @@ import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyServiceType; import org.biomoby.shared.NoSuccessException; +import org.biomoby.shared.Utils; import java.io.BufferedOutputStream; import java.io.BufferedReader; @@ -28,6 +31,8 @@ import java.util.Vector; import java.util.Arrays; import java.util.Comparator; +import java.util.Properties; +import java.util.Date; /** * An implementation of {@link org.biomoby.shared.CentralAll}, @@ -44,7 +49,7 @@ * This class can be used also without caching - just instantiate it * with 'cacheDir' set to null in the constructor.

    * - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ @@ -70,6 +75,16 @@ /** An ID used in {@link #removeFromCache} indicating namespaces part. */ public static final String CACHE_PART_NAMESPACES = "c4"; + // TBD: this will go to cache interface later, probably + // names of properties returned by getCacheInfo() + public static final String CACHE_PROP_NAME = "cache-name"; + public static final String CACHE_PROP_COUNT = "cache-count"; + public static final String CACHE_PROP_OLDEST = "cache-oldest"; + public static final String CACHE_PROP_YOUNGEST = "cache-youngest"; + public static final String CACHE_PROP_SIZE = "cache-size"; + public static final String CACHE_PROP_LOCATION = "cache-loc"; + public static final String CACHE_PROP_REGISTRY_URL = "cache-reg-url"; + // cache location private String cacheDir; // as defined in the constructor protected File dataTypesCache; @@ -193,7 +208,6 @@ remove (serviceTypesCache, LIST_FILE); fillServiceTypesCache(); } else if (id == null || id.equals (CACHE_PART_NAMESPACES)) { - remove (namespacesCache, LIST_FILE); fillNamespacesCache(); } } @@ -378,42 +392,6 @@ return true; } -// /************************************************************************** -// * Load data types from a moby registry into local cache. If it is -// * interrupted (by a callback signal) it removes what was already -// * put into this cache and returns false. Otherwise returns -// * true. It raises an exception if it cannot fill the cache (from -// * some other reasons). -// *************************************************************************/ -// protected boolean fillDataTypesCache() -// throws MobyException { -// try { -// fireEvent (DATA_TYPES_START); -// String typesAsXML = getDataTypeNamesAsXML(); -// store (dataTypesCache, LIST_FILE, typesAsXML); -// Map types = createDataTypeNamesFromXML (typesAsXML); -// fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); -// for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { -// Map.Entry entry = (Map.Entry)it.next(); -// String name = (String)entry.getKey(); -// fireEvent (DATA_TYPE_LOADING, name); -// String xml = getDataTypeAsXML (name); -// store (dataTypesCache, name, xml); -// fireEvent (DATA_TYPE_LOADED, name); -// if (stopDT) { -// removeFromCache (CACHE_PART_DATATYPES); -// return false; -// } -// } -// return true; -// } catch (Exception e) { -// throw new MobyException (formatException (e)); -// } finally { -// fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); -// stopDT = false; -// } -// } - /************************************************************************** * Update data types from a moby registry: * - get a new LIST_FILE (but do not put it into the cache yet) @@ -475,27 +453,59 @@ } } + /************************************************************************** + * Update services from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE + *************************************************************************/ protected boolean fillServicesCache() throws MobyException { try { fireEvent (AUTHORITIES_START); String byAuthorityAsXML = getServiceNamesByAuthorityAsXML(); - store (servicesCache, LIST_FILE, byAuthorityAsXML); + remove (servicesCache, LIST_FILE); Map authorities = createServiceNamesByAuthorityFromXML (byAuthorityAsXML); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = servicesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (servicesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files fireEvent (AUTHORITIES_COUNT, new Integer (authorities.size())); for (Iterator it = authorities.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String authority = (String)entry.getKey(); - fireEvent (AUTHORITY_LOADING, authority); - String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); - store (servicesCache, authority, xml); - fireEvent (AUTHORITY_LOADED, authority); - if (stopS) { - removeFromCache (CACHE_PART_SERVICES); - return false; + if ( ! currentFiles.contains (authority)) { + // missing file: fetch it from a registry + fireEvent (AUTHORITY_LOADING, authority); + String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); + store (servicesCache, authority, xml); + fireEvent (AUTHORITY_LOADED, authority); + if (stopS) { + return false; + } } + currentFiles.remove (authority); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (servicesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (servicesCache, LIST_FILE, byAuthorityAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -565,35 +575,10 @@ } } -// protected boolean fillServiceTypesCache() -// throws MobyException { -// try { -// fireEvent (SERVICE_TYPES_START); -// String typesAsXML = getServiceTypesAsXML(); -// store (serviceTypesCache, LIST_FILE, typesAsXML); -// MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); -// fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); -// for (int i = 0 ; i < types.length; i++) { -// String name = types[i].getName(); -// fireEvent (SERVICE_TYPE_LOADING, name); -// String xml = getServiceTypeRelationshipsAsXML (name, false); -// store (serviceTypesCache, name, xml); -// fireEvent (SERVICE_TYPE_LOADED, name); -// if (stopST) { -// removeFromCache (CACHE_PART_SERVICETYPES); -// return false; -// } -// } -// return true; -// } catch (Exception e) { -// throw new MobyException (formatException (e)); -// } finally { -// fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); -// stopST = false; -// } -// } - - // + /************************************************************************** + * Update namespaces from a moby registry - this easier than with + * other entities: just get a new LIST_FILE. + *************************************************************************/ protected boolean fillNamespacesCache() throws MobyException { try { @@ -901,4 +886,100 @@ } } + /************************************************************************** + * Return as many properties describing the given part of a cache + * as possible. The key used for returned properties are publicly + * available from this class but other may be returned as well.

    + * + * @return properties describing a cache + * @param id is a part of cache to be described, or null if the + * whole cache should be described (this may return different kind + * of properties than for individual cache parts) + **************************************************************************/ + public Properties getCacheInfo (String id) { + Properties result = new Properties(); + result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint()); + result.put (CACHE_PROP_COUNT, new Integer (0)); + if (cacheDir == null) return result; + String realName = null; + try { + File thisPart = null; + if (CACHE_PART_SERVICES.equals (id)) { + thisPart = servicesCache; + realName = "Cache for Services (authorities)"; + } else if (CACHE_PART_DATATYPES.equals (id)) { + thisPart = dataTypesCache; + realName = "Cache for Data Types"; + } else if (CACHE_PART_SERVICETYPES.equals (id)) { + thisPart = serviceTypesCache; + realName = "Cache for Service Types"; + } else if (CACHE_PART_NAMESPACES.equals (id)) { + thisPart = namespacesCache; + realName = "Cache for Namespaces"; + } + if (thisPart == null) return result; + result.put (CACHE_PROP_NAME, realName); + + File[] list = thisPart.listFiles(); + if (list == null) return result; + result.put (CACHE_PROP_LOCATION, thisPart.getAbsolutePath()); + int realCount = 0; + long realSize = 0; + long ageOfYoungest = -1; + long ageOfOldest = Long.MAX_VALUE; + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) { + realCount++; + realSize += list[i].length(); + long age = list[i].lastModified(); + ageOfYoungest = Math.max (ageOfYoungest, age); + ageOfOldest = Math.min (ageOfOldest, age); + } + } + result.put (CACHE_PROP_COUNT, new Integer (realCount)); + result.put (CACHE_PROP_SIZE, new Long (realSize)); + if (ageOfYoungest > 0) + result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest)); + if (ageOfOldest < Long.MAX_VALUE) + result.put (CACHE_PROP_OLDEST, new Long (ageOfOldest)); + + } catch (Exception e) { + log.error ("Getting cache info failed: " + e.toString()); + } + return result; + } + + public String getCacheInfoFormatted (String id) { + Properties props = getCacheInfo (id); + StringBuffer buf = new StringBuffer(); + buf.append (props.getProperty (CACHE_PROP_NAME) + "\n"); + add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL)); + add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); + Object value = props.get (CACHE_PROP_OLDEST); + if (value != null) { + long age = ((Long)value).longValue(); + add (buf, "Oldest entry created", new Date (age)); + add (buf, "Oldest entry has age", Utils.ms2Human (new Date().getTime() - age)); + } + value = props.get (CACHE_PROP_YOUNGEST); + if (value != null) { + long age = ((Long)value).longValue(); + add (buf, "Youngest entry created", new Date (age)); + add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age)); + } + add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); + add (buf, "Location", props.get (CACHE_PROP_LOCATION)); + return new String (buf); + } + + private void add (StringBuffer buf, String name, Object value) { + if (value != null) { + buf.append ("\t"); + buf.append (name); + buf.append ("\t"); + buf.append (value.toString()); + buf.append ("\n"); + } + } + } From senger at pub.open-bio.org Thu Nov 10 09:32:43 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 09:32:43 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101432.jAAEWhGc005019@pub.open-bio.org> senger Thu Nov 10 09:32:42 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv4952/src/main/org/biomoby/service/dashboard Modified Files: BuildDataTypeTree.java CommonDataTable.java CommonTree.java Dashboard.java DashboardProperties.java NOTES RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard BuildDataTypeTree.java,1.5,1.6 CommonDataTable.java,1.3,1.4 CommonTree.java,1.15,1.16 Dashboard.java,1.14,1.15 DashboardProperties.java,1.14,1.15 NOTES,1.22,1.23 RegistrationDataTypeSubPanel.java,1.5,1.6 RegistrationNamespaceSubPanel.java,1.4,1.5 RegistrationPanel.java,1.15,1.16 RegistrationServiceSubPanel.java,1.4,1.5 RegistrationServiceTypeSubPanel.java,1.6,1.7 ServicesBoard.java,1.4,1.5 ServicesTree.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/06 16:47:11 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/10 14:32:42 1.6 @@ -152,20 +152,22 @@ // make member nodes richer if (row > 1) { - MemberNode member = (MemberNode)((DefaultMutableTreeNode)value).getUserObject(); - MobyRelationship rel = member.getRelationship(); - cellBorder.setTitle (MobyRelationship.type2str (rel.getRelationshipType())); - dataTypeName.setText (member.getValue()); - articleName.setText (rel.getName()); - if (rel.getRelationshipType() == Central.iHASA) - cellPanel.setBackground (new Color (255, 255, 204)); - else - cellPanel.setBackground (new Color (204, 255, 204)); - return cellPanel; - } else { - return super.getTreeCellRendererComponent (tree, value, selected, - expanded, leaf, row, hasFocus); + Object aNode = ((DefaultMutableTreeNode)value).getUserObject(); + if (aNode instanceof MemberNode) { + MemberNode member = (MemberNode)aNode; + MobyRelationship rel = member.getRelationship(); + cellBorder.setTitle (MobyRelationship.type2str (rel.getRelationshipType())); + dataTypeName.setText (member.getValue()); + articleName.setText (rel.getName()); + if (rel.getRelationshipType() == Central.iHASA) + cellPanel.setBackground (new Color (255, 255, 204)); + else + cellPanel.setBackground (new Color (204, 255, 204)); + return cellPanel; + } } + return super.getTreeCellRendererComponent (tree, value, selected, + expanded, leaf, row, hasFocus); } } @@ -209,6 +211,23 @@ } /********************************************************************* + * + ********************************************************************/ + public void addMember (MobyRelationship child) { + MemberNode newNode = new MemberNode (child); + nameNode.add (new DefaultMutableTreeNode (newNode)); + updateTree(); + } + + /********************************************************************* + * + ********************************************************************/ + public void removeAllChildren() { + nameNode.removeAllChildren(); + updateTree(); + } + + /********************************************************************* * Load all menu icons. ********************************************************************/ protected void loadIcons() { @@ -358,10 +377,16 @@ * Draw/update this tree. ********************************************************************/ protected void updateTree() { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); - tModel.reload(); - propertyChannel.put (DP_REG_DT_TREE, extractFromTree()); - expand(); + + SwingUtilities.invokeLater (new Runnable() { + public void run() { + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + tModel.reload(); + propertyChannel.put (DP_REG_DT_TREE, extractFromTree()); + expand(); + } + }); + } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/10 14:32:42 1.4 @@ -10,6 +10,7 @@ import org.tulsoft.tools.gui.SwingUtils; +import org.biomoby.shared.MobyData; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JScrollPane; @@ -80,6 +81,13 @@ /********************************************************************* * ********************************************************************/ + public void setData (MobyData[] newData) { + tableModel.setData (newData); + } + + /********************************************************************* + * + ********************************************************************/ protected void createItself() { loadIcons(); @@ -212,6 +220,22 @@ abstract public void addEmptyData(); + /************************************************************************** + * Used to fill the table programatically. It clear the whole + * table a put given data there. + **************************************************************************/ + public void setData (MobyData[] newData) { + synchronized (this) { + int rowCount = getRowCount(); + int colCount = getColumnCount(); + for (int i = 0; i < rowCount; i++) + removeRow (i); + for (int i = 0; i < newData.length; i++) + data.addElement (newData[i]); + fireTableDataChanged(); + } + } + public Vector getData() { return data; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 08:54:31 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 14:32:42 1.16 @@ -72,6 +72,8 @@ protected String lastSearchText = ""; protected int lastSorted = SORTED_BY_NAME; + protected PropertyChannel propertyChannel; + // shared icons static protected Icon searchIcon; static protected Icon menuSearchIcon, menuSearchIconDis; @@ -123,6 +125,13 @@ loadIcons(); } + /************************************************************************** + * Keep shared storage of properties updated in various panels. + **************************************************************************/ + public void setPropertyChannel (PropertyChannel propertyChannel) { + this.propertyChannel = propertyChannel; + } + /********************************************************************* * ********************************************************************/ @@ -450,6 +459,7 @@ ********************************************************************/ protected void highlightAndJumpTo (HashSet toBeHighlighted) { + setSelectionPath (null); CommonTreeCellRenderer r = (CommonTreeCellRenderer)getCellRenderer(); r.setToBeHighlighted (toBeHighlighted); collapse (); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 08:54:31 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 14:32:42 1.15 @@ -60,8 +60,8 @@ protected JTabbedPane tabbedPane; protected Color bgcolor; protected DashboardPanel[] panels; - protected PropertyChannel propertyChannel; protected static Properties dashboardProperties; + protected PropertyChannel propertyChannel; static { try { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 08:54:31 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 14:32:42 1.15 @@ -20,7 +20,6 @@ public interface DashboardProperties { // names of properties used in property change events - static final String DP_LOG_MSG = "log-msg"; static final String DP_STATUS_MSG = "status-msg"; static final String DP_SERVICE_NAME = "dp-service-name"; static final String DP_DATATYPE_NAME = "dp-datatype-name"; @@ -37,21 +36,18 @@ static final String DP_REG_DT_AUTH = "dp-reg-dt-auth"; static final String DP_REG_DT_EMAIL = "dp-reg-dt-email"; static final String DP_REG_DT_DESC = "dp-reg-dt-desc"; - static final String DP_REG_DT_COPY_BY_SELECT = "dp-reg-dt-cbs"; // type: Boolean static final String DP_REG_DT_TREE = "dp-reg-dt-tree"; // type: MobyDataType static final String DP_REG_NS_NAME = "dp-reg-ns-name"; static final String DP_REG_NS_AUTH = "dp-reg-ns-auth"; static final String DP_REG_NS_EMAIL = "dp-reg-ns-email"; static final String DP_REG_NS_DESC = "dp-reg-ns-desc"; - static final String DP_REG_NS_COPY_BY_SELECT = "dp-reg-ns-cbs"; // type: Boolean static final String DP_REG_ST_NAME = "dp-reg-st-name"; static final String DP_REG_ST_AUTH = "dp-reg-st-auth"; static final String DP_REG_ST_EMAIL = "dp-reg-st-email"; static final String DP_REG_ST_DESC = "dp-reg-st-desc"; static final String DP_REG_ST_ISA = "dp-reg-st-isa"; - static final String DP_REG_ST_COPY_BY_SELECT = "dp-reg-st-cbs"; // type: Boolean static final String DP_REG_S_NAME = "dp-reg-s-name"; static final String DP_REG_S_AUTH = "dp-reg-s-auth"; @@ -67,6 +63,8 @@ static final String DP_REG_VERBOSE = "dp-reg-verbose"; + static final String DP_S_SELECTED = "dp-s-selected"; // type: MobyService + /** A filename containing Java properties that configure the dashboard. */ static final String DASHBOARD_PROPERTIES_FILE = "dashboard.properties"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 08:54:31 1.22 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 14:32:42 1.23 @@ -1,3 +1,6 @@ +* FWK005 parse may not be called while parsing. + - probably when too many network request together +--- * More testing: - interrupting loading - different order of panels @@ -11,6 +14,8 @@ NullPointerException reported in a dialog window - difficult to reproduce it... but it is somewhere there :-( +* BUG: the BuildDataTree does not paint itself always well + * WARN: How would an authority with characters 'http://' cope as a cache name? Can it happen? @@ -138,3 +143,5 @@ * SwingUtils can be simplified (closeOnExit etc.) - JFileChooserWithHistory - its method getSelectedFile() should reflect also what is entered in the text field; also it can have getText()? + - colors in JComboBox: +http://forum.java.sun.com/thread.jspa?threadID=670356&messageID=3920606 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 08:54:31 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 14:32:42 1.6 @@ -11,6 +11,7 @@ import org.biomoby.shared.Central; import org.biomoby.shared.MobyException; import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; @@ -110,19 +111,17 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_DT, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectDT (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_DT_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, dataTypesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); - SwingUtils.addComponent (board, copyBySelect, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (board, copyBySelect, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); // a tree with a new data type buildTree = new BuildDataTypeTree (propertyChannel); @@ -159,7 +158,6 @@ **************************************************************************/ protected void onCopyBySelectDT (boolean enabled) { setPrefValue (COPY_BY_SELECT_DT, enabled); - propertyChannel.put (DP_REG_DT_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -215,44 +213,6 @@ } } -// /************************************************************************** -// * -// **************************************************************************/ -// public void onRegisterFromXML (File file) { -// final File xmlFile = file; -// dtRegisterButton.setEnabled (false); -// dtFromXMLButton.setEnabled (false); -// dtException = null; -// final SwingWorker worker = new SwingWorker() { -// boolean oldAppendMode; -// StatusBag bag; -// public Object construct() { -// try { -// bag = maybeEnableVerbose(); -// oldAppendMode = console.setAppendMode (true); -// console.setText ("Registering data type from raw XML:\n" + -// "-----------------------------------\n"); -// console.setText (registryModel.callRegistry ("registerDataType", xmlFile)); -// console.setText ("\n"); -// } catch (MobyException e) { -// dtException = e; -// } -// return null; // not used here -// } - -// // runs on the event-dispatching thread. -// public void finished() { -// if (dtException != null) -// error (DATA_TYPE_PROLOGUE, dtException); -// dtRegisterButton.setEnabled (true); -// dtFromXMLButton.setEnabled (true); -// maybeDisableVerbose (bag); -// console.setAppendMode (oldAppendMode); -// } -// }; -// worker.start(); -// } - /************************************************************************** * * Customized tree of data types - has different popup menus... @@ -360,19 +320,23 @@ return dataType; // not used here } - // runs on the event-dispatching thread. + // runs on the event-dispatching thread public void finished() { if (dataType != null) { console.setText (dataType.toString()); - if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { dtName.setText (dataType.getName()); dtAuth.setText (dataType.getAuthority()); dtEmail.setText (dataType.getEmailContact()); dtDescArea.setText (dataType.getDescription()); buildTree.setParent (dataType.getParentName()); + buildTree.removeAllChildren(); + MobyRelationship[] children = dataType.getChildren(); + for (int i = 0; i < children.length; i++) + buildTree.addMember (children[i]); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) dtAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/10 14:32:42 1.5 @@ -100,15 +100,13 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_NS, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectNS (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_NS_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, namespacesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); @@ -145,7 +143,6 @@ **************************************************************************/ protected void onCopyBySelectNS (boolean enabled) { setPrefValue (COPY_BY_SELECT_NS, enabled); - propertyChannel.put (DP_REG_NS_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -269,14 +266,14 @@ public void finished() { if (namespace != null) { console.setText (namespace.toString() + "\n"); - if (propertyChannel.getBoolean (DP_REG_NS_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { nsName.setText (namespace.getName()); nsAuth.setText (namespace.getAuthority()); nsEmail.setText (namespace.getEmailContact()); nsDescArea.setText (namespace.getDescription()); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_NS_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) nsAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 16:23:32 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/10 14:32:42 1.16 @@ -17,6 +17,7 @@ import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JComponent; +import javax.swing.JCheckBox; import javax.swing.JFileChooser; import javax.swing.JButton; @@ -53,6 +54,7 @@ // components that are used from more methods protected CommonConsole console; protected JButton registerButton, showXMLButton, fromXMLButton; + protected JCheckBox copyBySelect; // shared icons protected static Icon menuAddISAIcon, menuAddISAIconDis; @@ -117,7 +119,6 @@ public JComponent getComponent (PropertyChannel propertyChannel) { setPropertyChannel (propertyChannel); registryModel = createRegistryModel(); - if (pComponent != null) return pComponent; // console panel =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 14:32:42 1.5 @@ -33,6 +33,7 @@ import javax.swing.JComponent; import javax.swing.JFileChooser; import javax.swing.Box; +import javax.swing.SwingUtilities; import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; @@ -42,7 +43,8 @@ import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; - +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeEvent; import java.io.File; import java.io.IOException; @@ -54,13 +56,15 @@ */ public class RegistrationServiceSubPanel - extends RegistrationPanel { + extends RegistrationPanel + implements PropertyChangeListener { // names of user preferences keys static final String USE_SIGNATURE = "use-signature"; static final String USE_AUTHORITATIVE = "use-authoritative"; static final String REG_S_TYPE = "reg-s-type"; static final String REG_S_FROM_XML = "reg-service-from-xml-file"; + static final String COPY_BY_SELECT_S = "s-copy-by-select"; // components that are used from more methods JTextFieldWithHistory sName, sAuth, sEmail, sURL, sSigURL; @@ -88,6 +92,7 @@ setPropertyChannel (propertyChannel); registryModel = createRegistryModel(); this.console = console; + this.propertyChannel.addPropertyChangeListener (this); JPanel p = new JPanel (new GridBagLayout()); @@ -147,6 +152,11 @@ SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + // copy-by-select + copyBySelect = + createCheckBox ("Copy here when selected in browser panel", + false, KeyEvent.VK_C, null); + // put together service fields JPanel defs = new JPanel (new GridBagLayout()); SwingUtils.addComponent (defs, labelSName, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); @@ -175,9 +185,10 @@ stBoard.updateTree (CommonTree.SORTED_BY_NAME); JPanel main = createTitledPanel ("New Service"); - SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); - SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); - SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); + SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + SwingUtils.addComponent (main, copyBySelect, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); // sub-panels for input/output data JTabbedPane dataPane = new JTabbedPane(); @@ -227,6 +238,49 @@ } /************************************************************************** + * Here we get notified when somebody somewhere select a service. Used to + * update this service fields - if it is enabled by COPY_BY_SELECT field. + **************************************************************************/ + public void propertyChange (PropertyChangeEvent event) { + if (copyBySelect == null || + ! copyBySelect.isSelected()) return; // copy not expected/allowed + String prop = event.getPropertyName(); + if (prop == null) return; // no interest in non-specific changes + Object obj = event.getNewValue(); + if (obj == null || ! (obj instanceof MobyService)) return; + final MobyService service = (MobyService)obj; + + // finally... + if (DP_S_SELECTED.equals (prop)) { + SwingUtilities.invokeLater (new Runnable() { + public void run() { + onFillService (service); + } + }); + } + } + + /************************************************************************** + * + **************************************************************************/ + protected void onFillService (MobyService service) { + sName.setText (service.getName()); + sAuth.setText (service.getAuthority()); + sEmail.setText (service.getEmailContact()); + sURL.setText (service.getURL()); + sSigURL.setText (service.getSignatureURL()); + sDescArea.setText (service.getDescription()); + useAuth.setEnabled (service.isAuthoritative()); + sType.setText (service.getType()); + String value = service.getPathToRDF(); + if (UUtils.notEmpty (value)) + localRDFFile.getTextField().setText (service.getPathToRDF()); + primInTable.setData (service.getPrimaryInputs()); + primOutTable.setData (service.getPrimaryOutputs()); + secTable.setData (service.getSecondaryInputs()); + } + + /************************************************************************** * **************************************************************************/ protected void onUseRDFSignature (boolean enabled) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 08:54:31 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 14:32:42 1.7 @@ -107,15 +107,13 @@ // allow to copy selected service types to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_ST, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_O, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectST (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_ST_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, serviceTypesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); @@ -152,7 +150,6 @@ **************************************************************************/ protected void onCopyBySelectST (boolean enabled) { setPrefValue (COPY_BY_SELECT_ST, enabled); - propertyChannel.put (DP_REG_ST_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -307,7 +304,7 @@ public void finished() { if (serviceType != null) { console.setText (serviceType.toString() + "\n"); - if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { stName.setText (serviceType.getName()); stAuth.setText (serviceType.getAuthority()); stEmail.setText (serviceType.getEmailContact()); @@ -315,7 +312,7 @@ stISA.setText (serviceType.getParentName()); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) stAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 14:32:42 1.5 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/07 07:03:49 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/10 14:32:42 1.5 @@ -419,8 +419,10 @@ // runs on the event-dispatching thread. public void finished() { - if (service != null) + if (service != null) { + propertyChannel.fire (DashboardProperties.DP_S_SELECTED, service); console.setText (service.toString()); + } } }; worker.start(); From kawas at pub.open-bio.org Thu Nov 10 11:03:02 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:03:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101603.jAAG32oB005624@pub.open-bio.org> kawas Thu Nov 10 11:03:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv5603/org/biomoby/client/rdf/vocabulary Added Files: FetaVocabulary.java Log Message: put all properties and resources used in a file so that we dont have to worry about using the Feta.jar file moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary FetaVocabulary.java,NONE,1.1 From kawas at pub.open-bio.org Thu Nov 10 11:09:07 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:09:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101609.jAAG97H8005730@pub.open-bio.org> kawas Thu Nov 10 11:09:07 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util In directory pub.open-bio.org:/tmp/cvs-serv5705/org/biomoby/registry/rdfagent/util Modified Files: Log.java Log Message: modified the logger so that only one file is created. when the agent ran, a different log file was created for each iteration of the agent and each log file contained its current iteration as well as the future iterations. moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Log.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java 2005/04/16 14:32:47 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java 2005/11/10 16:09:07 1.5 @@ -10,14 +10,18 @@ public class Log { static Logger logger; - + private static boolean isInit = false; public static void start() { - - logger = Logger.getLogger("org.biomoby.registry.rdfagent"); + logger = Logger.getLogger("org.biomoby.registry.rdfagent"); + // following ensures that only one log file is created. + if (isInit) { + return; + } + isInit = true; try { String logFile = Constants.RDFagentHome+Constants.SV_LOGFILE_PATH; - FileHandler fh = new FileHandler(logFile); + FileHandler fh = new FileHandler(logFile, true); fh.setFormatter(new SimpleFormatter()); logger.addHandler(fh); } catch (IOException e) { From kawas at pub.open-bio.org Thu Nov 10 11:09:57 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:09:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101609.jAAG9uUL005760@pub.open-bio.org> kawas Thu Nov 10 11:09:56 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util In directory pub.open-bio.org:/tmp/cvs-serv5735/org/biomoby/registry/rdfagent/util Modified Files: Report.java Log Message: added a clear method that erases the old report moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Report.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java 2005/09/29 20:14:11 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java 2005/11/10 16:09:56 1.9 @@ -26,9 +26,9 @@ public class Report { - static ArrayList mr = null; + private static ArrayList mr = null; - static ArrayList ds = null; + private static ArrayList ds = null; public static void add(String line) { @@ -57,7 +57,7 @@ StringBuffer mes1 = new StringBuffer(); for (int i = 0; i < mr.size(); i++) { - mes1.append(mr.get(i).toString() + "\n"); + mes1.append(mr.get(i).toString() + System.getProperty("line.separator")); } message += mes1; } @@ -66,7 +66,7 @@ StringBuffer mes2 = new StringBuffer(); for (int i = 0; i < ds.size(); i++) { - mes2.append(ds.get(i).toString() + "\n"); + mes2.append(ds.get(i).toString() + System.getProperty("line.separator")); } message += mes2; } @@ -137,6 +137,96 @@ mr = null; } } + + public static void send(String signURL, String email) { + + String message = ""; + + if (mr != null) { + + StringBuffer mes1 = new StringBuffer(); + + for (int i = 0; i < mr.size(); i++) { + mes1.append(mr.get(i).toString() + System.getProperty("line.separator")); + } + message += mes1; + } + if (ds != null) { + + StringBuffer mes2 = new StringBuffer(); + + for (int i = 0; i < ds.size(); i++) { + mes2.append(ds.get(i).toString() + System.getProperty("line.separator")); + } + message += mes2; + } + + if (Constants.MB_MAIL_SERVER != null + || !Constants.MB_MAIL_SERVER.equals("") + || Constants.MB_MAIL_PRGM != null + || !Constants.MB_MAIL_PRGM.equals("")) { + + String to = ""; + to = email; + + if (to.equals("")) { + to = "edward.kawas at gmail.com"; + + } + String subject = "The RDFagent Report"; + Log.info("email message is\n" + message); + if (Constants.MB_MAIL_PRGM != null + || !Constants.MB_MAIL_PRGM.equals("")) + try { + + //String cmd ="echo \"" + message.toString() + "\" | "+ + // Constants.MB_MAIL_PRGM+ " -s 'The RDFagent Report :-(' '" + // + "markw at illuminae.com"+ "'"; + String cmd = "echo \"" + message.toString() + "\" | " + + Constants.MB_MAIL_PRGM + + " -s 'The RDFagent Report :-(' '" + to + "'"; + File file = new File("_script_.sh"); + FileWriter fw = new FileWriter(file); + fw.write(_shellScriptHeader + cmd); + fw.close(); + + Process p = Runtime.getRuntime().exec( + "chmod +x _script_.sh"); + p.waitFor(); + p = Runtime.getRuntime().exec("./_script_.sh"); + InputStream stderr = p.getErrorStream(); + InputStreamReader isr = new InputStreamReader(stderr); + BufferedReader br = new BufferedReader(isr); + String line = null; + while ((line = br.readLine()) != null) { + + } + p.waitFor(); + Log.info("_script_.sh has " + + ((file.delete()) ? "" : "not ") + "been deleted" + + System.getProperty("line.separator") + + "The exit value of the spawned process was : " + + p.exitValue()); + } catch (IOException e) { + e.printStackTrace(); + Log.severe("Could not send message using cmd line mail to " + + to); + Report + .doWrite("Could not send message using cmd line mail to " + + to); + // use this only as a last resort + if (Constants.MB_MAIL_SERVER != null + || !Constants.MB_MAIL_SERVER.equals("")) + Communicator.sendMail(to, subject, message.toString(), + Constants.MB_FROM); + } catch (InterruptedException e) { + e.printStackTrace(); + } + //Communicator.sendMail(to,subject,message.toString(),Constants.MB_FROM); + ds = null; + mr = null; + } + } public static void createFile(String fileName) { try { @@ -197,5 +287,10 @@ private final static String _shellScriptHeader = "#!/bin/sh" + System.getProperty("line.separator"); + public static void clear() { + ds = null; + mr = null; + } + } From kawas at pub.open-bio.org Thu Nov 10 11:11:45 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:11:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101611.jAAGBjn6005838@pub.open-bio.org> kawas Thu Nov 10 11:11:45 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv5813/org/biomoby/registry/rdfagent/verifier Modified Files: Main.java Log Message: added logic to enable the ability to provide a url that contains service descriptions and have the agent populate your registry with them modified the logic of reporting moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Main.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java 2005/08/04 12:58:41 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java 2005/11/10 16:11:45 1.6 @@ -15,115 +15,126 @@ /** * @author Nina Opushneva * - * + * */ public class Main { - public static void main(String[] args) { - StringBuffer failedServices = new StringBuffer(); - Log.start(); - - String report = Constants.RDFagentHome + Constants.SV_REPORT_PATH; - Report.createFile(report); - - Date now = new Date(); - - Report - .doWrite("****************************************************************************************"); - Report.doWrite(" START MOBY RDFAGENT REPORT " - + now.toString()); - Report - .doWrite("****************************************************************************************"); - - Report.add(" RDFAGENT REPORT " + now.toString()); - Report - .add("****************************************************************************************"); - - Hashtable serviceList = new Hashtable(); - String signURL = ""; - Calendar c = Calendar.getInstance(); - - if (args.length == 0) { - - String delfile = Constants.RDFagentHome + Constants.SV_DELFILE_PATH; - Report.createFile(delfile); - - // DataMngr.delServiceSetByURL(signURL); - - String url_path = Constants.RDFagentHome - + Constants.SV_SIGN_URL_PATH; - - String filename = url_path + "_" + c.get(Calendar.DAY_OF_MONTH) - + "_" + c.get(Calendar.MONTH); - Report.createFile(filename); - serviceList = DataMngr.getServices(filename); - /* - * }else if (args[0].equals("list")){ serviceList = - * Communicator.readFromFile(args[1]); - * - * }else if (args[0].equals("sign")){ - */ - } else { - - signURL = args[0]; - serviceList = DataMngr.getServicesByURL(signURL); - } - - Enumeration list = serviceList.keys(); - while (list.hasMoreElements()) { - String ob = list.nextElement().toString(); - String val = serviceList.get(ob).toString(); - signURL = ob; - String servNames = val; - - Model model = Communicator.getServiceRDF(servNames, signURL); - - if (model.isEmpty()) { - Log.info("Model " + signURL + " is empty"); - failedServices.append("__PATTERN__" + signURL); // something unique - // that urls shouldnt - // have - } else { - Report.add(" "); - Report.add("List of the processed services:"); - ServiceDescrParser sdParser = new ServiceDescrParser(model); - sdParser.getValidRDF(servNames, signURL); - - } - exit(failedServices.toString()); - failedServices = new StringBuffer(); - } - // } - if (args.length != 0) { - // TODO this line sends email - //Report.send(signURL); - } - //exit(failedServices.toString()); - } - - public static void exit(String signURL) { - DBConnector.closeConnection(); - - Log.stop(); - Date now = new Date(); - Report.doWrite(" STOP MOBY RDFAGENT REPORT " - + now.toString()); - Report.add(" STOP MOBY RDFAGENT REPORT " - + now.toString()); - - Report - .doWrite("****************************************************************************************"); - - String[] failedURLs = signURL.split("__PATTERN__"); - for (int i = 0; i < failedURLs.length; i++) { - if (!failedURLs[i].equals("")) { - Log - .info("Sending an email to the individual identified by the following signature URL: " - + failedURLs[i]); - Report.send(failedURLs[i]); - } - } + public static void main(String[] args) { + StringBuffer failedServices = new StringBuffer(); + Log.start(); + Date now = new Date(); + Hashtable serviceList = new Hashtable(); + String signURL = ""; + String report = Constants.RDFagentHome + Constants.SV_REPORT_PATH; + Report.createFile(report); + + Calendar c = Calendar.getInstance(); + + if (args.length == 0) { + Report + .doWrite("****************************************************************************************"); + Report.doWrite(" START MOBY RDFAGENT REPORT " + + now.toString()); + Report + .doWrite("****************************************************************************************"); + + Report + .add(" RDFAGENT REPORT " + + now.toString()); + Report + .add("****************************************************************************************"); + String delfile = Constants.RDFagentHome + Constants.SV_DELFILE_PATH; + Report.createFile(delfile); + + // DataMngr.delServiceSetByURL(signURL); + + String url_path = Constants.RDFagentHome + + Constants.SV_SIGN_URL_PATH; + + String filename = url_path + "_" + c.get(Calendar.DAY_OF_MONTH) + + "_" + c.get(Calendar.MONTH); + Report.createFile(filename); + serviceList = DataMngr.getServices(filename); + /* + * }else if (args[0].equals("list")){ serviceList = + * Communicator.readFromFile(args[1]); + * + * }else if (args[0].equals("sign")){ + */ + } else if (args.length == 1){ + signURL = args[0]; + Log.info("Getting services from " + signURL); + // serviceList = DataMngr.getServicesByURL(signURL); + Model model = Communicator.getServiceRDF("", signURL); + Report.clear(); + if (model.isEmpty()) { + Log.info("Model " + signURL + " is empty"); + // not important + } else { + ServiceDescrParser sdParser = new ServiceDescrParser(model); + sdParser.addServicesFromRdfDocument(signURL, Constants.MB_ADMIN_EMAIL); + + } + Report.clear(); + return; + + } else { + Log.severe("Incorrect usage of the agent. Please enter a url where services can be found as a parameter or run the agent without parameters."); + return; + + } + + Enumeration list = serviceList.keys(); + while (list.hasMoreElements()) { + String ob = list.nextElement().toString(); + String val = serviceList.get(ob).toString(); + signURL = ob; + String servNames = val; + + Model model = Communicator.getServiceRDF(servNames, signURL); + + if (model.isEmpty()) { + Log.info("Model " + signURL + " is empty"); + failedServices.append("__PATTERN__" + signURL); // something + // unique + // that urls shouldnt + // have + } else { + Report.add(" "); + Report.add("List of the processed services:"); + ServiceDescrParser sdParser = new ServiceDescrParser(model); + sdParser.getValidRDF(servNames, signURL); + + } + exit(failedServices.toString()); + failedServices = new StringBuffer(); + } + Report.clear(); + } + + public static void exit(String signURL) { + DBConnector.closeConnection(); + + Log.stop(); + Date now = new Date(); + Report.doWrite(" STOP MOBY RDFAGENT REPORT " + + now.toString()); + Report.add(" STOP MOBY RDFAGENT REPORT " + + now.toString()); + + Report + .doWrite("****************************************************************************************"); + + String[] failedURLs = signURL.split("__PATTERN__"); + for (int i = 0; i < failedURLs.length; i++) { + if (!failedURLs[i].equals("")) { + Log + .info("Sending an email to the individual identified by the following signature URL: " + + failedURLs[i]); + Report.send(failedURLs[i]); + } + } - //System.exit(0); - } + // System.exit(0); + } } \ No newline at end of file From kawas at pub.open-bio.org Thu Nov 10 11:12:02 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:12:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101612.jAAGC2aT005868@pub.open-bio.org> kawas Thu Nov 10 11:12:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv5843/org/biomoby/registry/rdfagent/verifier Modified Files: ServiceDescrParser.java Log Message: some bug fixes moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier ServiceDescrParser.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/08 00:02:08 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/10 16:12:01 1.12 @@ -5,14 +5,12 @@ import java.util.Iterator; import java.util.Vector; +import org.biomoby.client.rdf.vocabulary.FetaVocabulary; import org.biomoby.client.rdf.vocabulary.ServiceDescriptionPredicates; -import org.biomoby.registry.rdfagent.util.Constants; import org.biomoby.registry.rdfagent.util.Log; import org.biomoby.registry.rdfagent.util.Report; import org.biomoby.registry.rdfagent.util.XMLBuilder; -import uk.ac.man.cs.img.fetaEngine.commons.FetaModelRDF; - import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ResIterator; import com.hp.hpl.jena.rdf.model.Resource; @@ -37,7 +35,7 @@ int n = 0; int[] ver = { 0, 0, 0, 0, 0, 0, 0, 0 }; - private String[] vers = { "authority uri", "category","contact email","url","service type","service name","authoritative value","signature url" }; + private String[] vers = { "authority uri", "category","contact email","url","service type","service name","description","authoritative value" }; ServiceDescrParser(Model serviceDescrMd) { @@ -69,7 +67,7 @@ // get the set of RDF with the same signatureURL - ResIterator iter = servDescrMd.listSubjectsWithProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy")); + ResIterator iter = servDescrMd.listSubjectsWithProperty(FetaVocabulary.providedBy); while (iter.hasNext()) { String resource = iter.next().toString(); // an LSID Hashtable servSign = new Hashtable(); @@ -93,8 +91,15 @@ servError += 1; String msg = "A bad Input or Output structure for the service <" + servName + ">. "; - String msg1 = "The service have not processed"; + String msg1 = "The service has not been processed"; Report.doWrite(msg + msg1); + Log.info(msg + msg1); + // added - should tell provider that service wasnt well. + Report.add(msg); + Report.add(msg1); + // send a message to service provider stating that service was removed + Report.send(signURL); + // end added } else { DataMngr.processService(servSign, servInp, servOut, servName, auth_URI, signURL); @@ -140,18 +145,11 @@ deletedServ.addElement(servName); String msg = "The service < " + servName - + " > was not found in the RDF file. The service was deregistered from MOBYCENTRAL Registry"; + + " > was either missing or incorrectly represented in the RDF document. The service was deregistered from MOBYCENTRAL Registry."; Report.doWrite(msg); Report.add(msg); - - if (Constants.MB_MAIL_SERVER != null - || !Constants.MB_MAIL_SERVER.equals("")) { - String to = DataMngr.getContactEmail(signURL); - Communicator.sendMail(to, Constants.SP_SUBJECT, msg, - Constants.MB_FROM); - // send message to the service provider - that service was - // deregistered - } + // send a message to service provider stating that service was removed + Report.send(signURL); } } int del = deletedServ.size(); @@ -180,6 +178,103 @@ } /** + * get a provider's RDF file by signatureURL, and check if every of service + * RDF is valid MOBY + * + * @param signURL - + * the URL of resource (signatureURL) + * + */ + + public void addServicesFromRdfDocument(String signURL, String email) { + String servNames = ""; + String res = ""; + int amount = 0; + int validMoby = 0; + int servError = 0; + Vector resources = new Vector(); // the list of services at given URL + // (including new services) + String auth_URI = ""; + String servName = ""; + Vector deletedServ = new Vector(); // the list of deleted services from + // database + + // get the set of RDF with the same signatureURL + + ResIterator iter = servDescrMd.listSubjectsWithProperty(FetaVocabulary.providedBy); + while (iter.hasNext()) { + Report + .add("****************************************************************************************"); + Report.add(" START MOBY RDFAGENT REPORT "); + Report + .add("****************************************************************************************"); + String resource = iter.next().toString(); // an LSID + Hashtable servSign = new Hashtable(); + amount += 1; + servSign = getServSignature(resource); + + if (!servSign.isEmpty()) { // a valid MOBY RDF + servName = servSign.get("servicename").toString(); + servNames+=servName+","; + auth_URI = servSign.get("authURI").toString(); + resources.addElement(servName); + + Hashtable servInp = new Hashtable(); + servInp = getInput(resource); + Hashtable servOut = new Hashtable(); + servOut = getOutput(resource); + + ver = new int[]{0,0,0,0,0,0,0,0}; + if (servInp.containsValue("error") + | servOut.containsValue("error")) { + servError += 1; + String msg = "A bad Input or Output structure for the service <" + + servName + ">. "; + String msg1 = "The service has not been processed"; + Report.add(msg); + Report.add(msg1); + Report + .add("======================================================================================="); + Report.add(" END MOBY RDFAGENT REPORT "); + Report + .add("======================================================================================="); + Log.info(msg); + Log.info((msg1)); + Report.doWrite(msg); + Report.doWrite(msg1); + Report.send(signURL, email); + } else { + // set the email address to be the admin since it doesnt make sense to swallow services and to make someone else curate them + //servSign.put("contact_email", email); + DataMngr.processService(servSign, servInp, servOut, + servName, auth_URI, signURL); + } + } else { + validMoby += 1; // a not valid MOBY RDF + } + Report.clear(); + } + + String[] result = servNames.split(","); + + Report + .add("----------------------------------------------------------------------------------------"); + Report.add(" "); + Report.add("Expected services for given URL " + result.length); + + Report.add("In fact = " + amount); + Report.add("notValidMoby services or with a bad structure = " + + (servError + validMoby)); + Report.add(" "); + + // Report.add("notValidMoby services or with a bad structure = + // "+(servError+validMoby)); + + Log + .info("======================================================================="); + } + + /** * get service Signature data for the service * * @param resource - @@ -194,6 +289,7 @@ Resource si = servDescrMd.getResource(resource); + Report.clear(); Report .doWrite("----------------------------------------------------------------------------------------"); Report @@ -209,9 +305,9 @@ // hash *should* contain the following keys: // authURI, category, contact_email, url, service_type_uri, servicename, authoritative, signatureURL - if (si.hasProperty(FetaModelRDF.hasServiceType)) { + if (si.hasProperty(FetaVocabulary.hasServiceType)) { ver[4] = 1; // set flag to indicate that we have the property - String serviceType = si.getProperty(FetaModelRDF.hasServiceType).getObject().toString(); + String serviceType = si.getProperty(FetaVocabulary.hasServiceType).getObject().toString(); sign.put("service_type_uri", "urn:lsid:biomoby.org:servicetype:"+serviceType); } @@ -221,8 +317,8 @@ sign.put("category", category); } - if (si.hasProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy"))) { - Resource org = (Resource)si.getProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy")).getObject(); + if (si.hasProperty(FetaVocabulary.providedBy)) { + Resource org = (Resource)si.getProperty(FetaVocabulary.providedBy).getObject(); if (org.hasProperty(DC.publisher)) { ver[0] = 1;// set flag to indicate that we have the property String authorityURI = org.getProperty(DC.publisher).getObject().toString(); @@ -234,35 +330,35 @@ sign.put("contact_email", email); } if (org.hasProperty(ServiceDescriptionPredicates.authoritative)) { - ver[6] = 1;// set flag to indicate that we have the property + ver[7] = 1;// set flag to indicate that we have the property String authoritative = org.getProperty(ServiceDescriptionPredicates.authoritative).getObject().toString(); sign.put("authoritative", ((authoritative.equalsIgnoreCase("true")) ? "authoritative" : "non-authoritative")); } } - - if (si.hasProperty(FetaModelRDF.locationURI)) { + + if (si.hasProperty(FetaVocabulary.locationURI)) { ver[3] = 1; // set flag to indicate that we have the property - String url = si.getProperty(FetaModelRDF.locationURI).getObject().toString(); + String url = si.getProperty(FetaVocabulary.locationURI).getObject().toString(); sign.put("URL", url); } - if (si.hasProperty(FetaModelRDF.hasServiceDescriptionLocation)) { - ver[7] = 1; // set flag to indicate that we have the property - String signatureURL = si.getProperty(FetaModelRDF.hasServiceDescriptionLocation).getObject().toString(); - sign.put("signatureURL", signatureURL); + if (si.hasProperty(FetaVocabulary.hasServiceDescriptionText)) { + ver[6] = 1; // set flag to indicate that we have the property + String description = si.getProperty(FetaVocabulary.hasServiceDescriptionText).getObject().toString(); + sign.put("description", description); } - if (si.hasProperty(FetaModelRDF.hasServiceNameText)) { + if (si.hasProperty(FetaVocabulary.hasServiceNameText)) { ver[5] = 1; // set flag to indicate that we have the property - String name = si.getProperty(FetaModelRDF.hasServiceNameText).getObject().toString(); + String name = si.getProperty(FetaVocabulary.hasServiceNameText).getObject().toString(); sign.put("servicename", name); } // check for the inputs (moby says at least one input/output) - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); - StmtIterator outs = r.listProperties(FetaModelRDF.outputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.inputParameter); + StmtIterator outs = r.listProperties(FetaVocabulary.outputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary <- doesnt count @@ -284,7 +380,7 @@ Report .doWrite("THE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); Report - .add("THE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); + .add("\tTHE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); sign.clear(); break; //TODO should we break? if we dont, wont we know what is wrong completely with our service? } @@ -293,7 +389,7 @@ Report .doWrite("THE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); Report - .add("THE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); + .add("\nTHE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); Log .info("THE RDF IS NOT VALID MOBY RDF - Inputs and Outputs are absent"); sign.clear(); @@ -327,30 +423,30 @@ Hashtable input = new Hashtable(); Resource si = servDescrMd.getResource(resource); - if (si.hasProperty(FetaModelRDF.hasOperation)) + if (si.hasProperty(FetaVocabulary.hasOperation)) try { - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.inputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary - if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("simpleParameter")) { + if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("simpleParameter")) { // we have a simple // make sure that object type and article name exist Hashtable siminp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid simple input found in " + resource +". Missing moby object type."); - Report.add("Invalid simple input found in " + resource +". Missing moby object type."); + Report.add("\tInvalid simple input found in " + resource +". Missing moby object type."); Log.info("Invalid simple input found in " + resource +". Missing moby object type."); simple = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid simple input found in " + resource +". Missing an article name."); - Report.add("Invalid simple input found in " + resource +". Missing an article name."); + Report.add("\tInvalid simple input found in " + resource +". Missing an article name."); Log.info("Invalid simple input found in " + resource +". Missing an article name."); simple = "error"; break; @@ -362,8 +458,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid simple input found in " + resource +". Empty article name."); + Report.add("\tInvalid simple input found in " + resource +". Empty article name."); + Log.info("Invalid simple input found in " + resource +". Empty article name."); + simple = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -385,20 +487,20 @@ if (namespaces != null) siminp.put("namespace_type_uris", namespaces); input.put("siminp"+ sin++, siminp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("collectionParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("collectionParameter")) { // we have a collection // make sure that object type and article name exist Hashtable colinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid collection input found in " + resource +". Missing moby object type."); - Report.add("Invalid collection input found in " + resource +". Missing moby object type."); + Report.add("\tInvalid collection input found in " + resource +". Missing moby object type."); Log.info("Invalid collection input found in " + resource +". Missing moby object type."); collection = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); - Report.add("Invalid collection input found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection input found in " + resource +". Missing an article name."); Log.info("Invalid collection input found in " + resource +". Missing an article name."); collection = "error"; break; @@ -410,8 +512,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection input found in " + resource +". Missing an article name."); + Log.info("Invalid collection input found in " + resource +". Missing an article name."); + collection = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -429,22 +537,23 @@ namespaces = namespaces.substring(0, namespaces.lastIndexOf(",")); } colinp.put("col_articleName",articlename); - colinp.put("namespace_type_uris", namespaces); + if (namespaces != null) + colinp.put("namespace_type_uris", namespaces); colinp.put("object_type_uri", datatype); input.put("colinp"+cin++, colinp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("secondaryParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("secondaryParameter")) { // we have a secondary Hashtable secinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.datatype)) { Report.doWrite("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); - Report.add("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); + Report.add("\tInvalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); Log.info("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); secondary = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid secondary input found in " + resource +". Missing an article name."); - Report.add("Invalid secondary input found in " + resource +". Missing an article name."); + Report.add("\tInvalid secondary input found in " + resource +". Missing an article name."); Log.info("Invalid secondary input found in " + resource +". Missing an article name."); secondary = "error"; break; @@ -454,13 +563,20 @@ if (datatype.indexOf("#") > 0) datatype = datatype.substring(datatype.indexOf("#")+1); // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getLiteral().getValue().toString(); + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getLiteral().getValue().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid secondary input found in " + resource +". Empty article name."); + Report.add("\tInvalid secondary input found in " + resource +". Empty article name."); + Log.info("Invalid secondary input found in " + resource +". Empty article name."); + secondary = "error"; + break; + } String defaultValue = null; String min = null; String max = null; String enums = null; - if (parameter.hasProperty(FetaModelRDF.hasDefaultValue)) { - defaultValue = parameter.getProperty(FetaModelRDF.hasDefaultValue).getLiteral().getValue().toString(); + if (parameter.hasProperty(FetaVocabulary.hasDefaultValue)) { + defaultValue = parameter.getProperty(FetaVocabulary.hasDefaultValue).getLiteral().getValue().toString(); } if (parameter.hasProperty(ServiceDescriptionPredicates.max)) { max = parameter.getProperty(ServiceDescriptionPredicates.max).getLiteral().getValue().toString(); @@ -533,30 +649,30 @@ Hashtable output = new Hashtable(); Resource si = servDescrMd.getResource(resource); - if (si.hasProperty(FetaModelRDF.hasOperation)) + if (si.hasProperty(FetaVocabulary.hasOperation)) try { - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.outputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.outputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary - if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("simpleParameter")) { + if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("simpleParameter")) { // we have a simple // make sure that object type and article name exist Hashtable siminp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid simple output found in " + resource +". Missing moby object type."); - Report.add("Invalid simple output found in " + resource +". Missing moby object type."); + Report.add("\tInvalid simple output found in " + resource +". Missing moby object type."); Log.info("Invalid simple output found in " + resource +". Missing moby object type."); simple = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid simple output found in " + resource +". Missing an article name."); - Report.add("Invalid simple output found in " + resource +". Missing an article name."); + Report.add("\tInvalid simple output found in " + resource +". Missing an article name."); Log.info("Invalid simple output found in " + resource +". Missing an article name."); simple = "error"; break; @@ -568,8 +684,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid simple output found in " + resource +". Empty article name."); + Report.add("\tInvalid simple output found in " + resource +". Empty article name."); + Log.info("Invalid simple output found in " + resource +". Empty article name."); + simple = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -591,21 +713,21 @@ if (namespaces != null) siminp.put("namespace_type_uris", namespaces); output.put("simout"+ so++, siminp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("collectionParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("collectionParameter")) { // we have a collection // make sure that object type and article name exist Hashtable colinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { - Report.doWrite("Invalid collection input found in " + resource +". Missing moby object type."); - Report.add("Invalid collection input found in " + resource +". Missing moby object type."); - Log.info("Invalid collection input found in " + resource +". Missing moby object type."); + Report.doWrite("Invalid collection output found in " + resource +". Missing moby object type."); + Report.add("\tInvalid collection output found in " + resource +". Missing moby object type."); + Log.info("Invalid collection output found in " + resource +". Missing moby object type."); collection = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ - Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); - Report.add("Invalid collection input found in " + resource +". Missing an article name."); - Log.info("Invalid collection input found in " + resource +". Missing an article name."); + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ + Report.doWrite("Invalid collection output found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection output found in " + resource +". Missing an article name."); + Log.info("Invalid collection output found in " + resource +". Missing an article name."); collection = "error"; break; } @@ -616,8 +738,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid collection output found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection output found in " + resource +". Missing an article name."); + Log.info("Invalid collection output found in " + resource +". Missing an article name."); + collection = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -635,7 +763,8 @@ namespaces = namespaces.substring(0, namespaces.lastIndexOf(",")); } colinp.put("col_articleName",articlename); - colinp.put("namespace_type_uris", namespaces); + if (namespaces != null) + colinp.put("namespace_type_uris", namespaces); colinp.put("object_type_uri", datatype); output.put("colout"+ co++, colinp); } else { From senger at pub.open-bio.org Fri Nov 11 03:34:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:34:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110834.jAB8Yd4C008108@pub.open-bio.org> senger Fri Nov 11 03:34:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv8089/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/06 16:23:49 1.4 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/11 08:34:39 1.5 @@ -1,3 +1,4 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel +org.biomoby.service.dashboard.GeneratorPanel #org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Fri Nov 11 03:34:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:34:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110834.jAB8YdjI008143@pub.open-bio.org> senger Fri Nov 11 03:34:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv8089/src/main/org/biomoby/service/dashboard Modified Files: NOTES PrimaryDataTable.java RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceSubPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,1.23,1.24 PrimaryDataTable.java,1.3,1.4 RegistrationDataTypeSubPanel.java,1.6,1.7 RegistrationNamespaceSubPanel.java,1.5,1.6 RegistrationServiceSubPanel.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 14:32:42 1.23 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/11 08:34:39 1.24 @@ -28,6 +28,11 @@ * log warning if the 'notified' is not called from the event-dispatch queue +* confirmation before registering; separate "load from XML" and + "register" perhaps? - or having actuallt there an editor that allows + to change the XMl and then to click its button "register" + + --- * how to squeeze too long combo boxes into smaller place ? @@ -56,6 +61,7 @@ ? select a part of an error message and highlight it in red? ? HELP (in a Dashboard Menu) + - contextual help ? - starting panel/splash screen - helps from panels - About @@ -145,3 +151,46 @@ what is entered in the text field; also it can have getText()? - colors in JComboBox: http://forum.java.sun.com/thread.jspa?threadID=670356&messageID=3920606 +--- +public static void main(String args[]) +> { +> JComponent jc; +> JFrame f = new JFrame(); +> JPanel background = new JPanel( ), content = new JPanel( ); +> content.setLayout( new BorderLayout( ) ); +> content.add( jc = new JButton("FourthButton"), BorderLayout.WEST ); +> // you can comment lines like jc.setOpaque(false), in order to not see +> the background on the components ;) +> jc.setOpaque( false ); +> content.add( jc = new JButton("SecondButton"), BorderLayout.NORTH ); +> jc.setOpaque( false ); +> content.add( jc = new JButton("ThirdButton"), BorderLayout.SOUTH ); +> jc.setOpaque( false ); +> content.add( jc = new JButton("FivethButton"), BorderLayout.EAST ); +> jc.setOpaque( false ); +> content.setOpaque( false ); +> +> background.setLayout( new BorderLayout( ) ); +> background.add( new JLabel( new ImageIcon("background.gif") ), +> BorderLayout.CENTER ); +> +> f.getRootPane().setGlassPane( content ); +> f.getRootPane().getGlassPane().setVisible( true ); +> f.setContentPane( background ); +> f.setSize( 500, 300 ); +> f.setVisible( true ); +> } + + +problms with registration panel: + - no auto update after reg/unreg srevice, and data type + - after reload old files stayed (21.sep in data types) + - datetime was in cache but cannot make it into tree, why? + +right-click - if nothing selected, it should take what is under te + mouse (selected first), otherwise it is annoying + +serach should be propagated to all (same-kinds) trees in all panels + +wrap automatically text in descriptions fields + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/11 08:34:39 1.4 @@ -256,7 +256,7 @@ "Remove", "Article name", "Data Type", - "In Set", + "Set", "Namespaces" }; columnClasses = new Class[] { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 14:32:42 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/11 08:34:39 1.7 @@ -207,6 +207,7 @@ dataType.toString()); registryModel.registerDataType (dataType); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterDataTypeXML (dataType); console.setText ("\n" + xml + "\n"); @@ -214,6 +215,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateDataTypesCache(); + } + + /************************************************************************** * * Customized tree of data types - has different popup menus... * @@ -404,6 +415,7 @@ console.setText ("Data type to be unregistered: " + dataTypeName + "\n"); registryModel.unRegisterDataType (dataType); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { dtUnregException = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/11 08:34:39 1.6 @@ -182,6 +182,8 @@ namespace.toString()); registryModel.registerNamespace (namespace); console.setText ("\nRegistration successful!\n\n"); + updateCache(); + } else { String xml = registryModel.getRegisterNamespaceXML (namespace); console.setText ("\n" + xml + "\n"); @@ -189,6 +191,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateNamespacesCache(); + } + + /************************************************************************** * * Customized tree of namespaces - has different popup menus etc... * @@ -303,6 +315,7 @@ console.setText ("Namespace to be unregistered: " + name + "\n"); registryModel.unRegisterNamespace (namespace); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/11 08:34:39 1.6 @@ -502,6 +502,7 @@ service.toString()); registryModel.registerService (service); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterServiceXML (service); console.setText ("\n" + xml + "\n"); @@ -582,6 +583,7 @@ service.getName() + "\n"); registryModel.unRegisterService (service); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; @@ -602,6 +604,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateServicesCache(); + } + + /************************************************************************** * * Customized tree of service types - use for service registration * From senger at pub.open-bio.org Fri Nov 11 03:35:58 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:35:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110835.jAB8Zww5008208@pub.open-bio.org> senger Fri Nov 11 03:35:58 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv8193/src/main/org/biomoby/service/dashboard Added Files: AntModel.java GeneratorPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,NONE,1.1 GeneratorPanel.java,NONE,1.1 From senger at pub.open-bio.org Fri Nov 11 03:35:58 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:35:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110835.jAB8ZwOc008223@pub.open-bio.org> senger Fri Nov 11 03:35:58 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv8193/src/main/org/biomoby/service/dashboard/images Added Files: bricks.gif smallClass.gif smallClass2.gif smallClass2_dis.gif smallClass_dis.gif smallGenJ.gif smallGenJ_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images bricks.gif,NONE,1.1 smallClass.gif,NONE,1.1 smallClass2.gif,NONE,1.1 smallClass2_dis.gif,NONE,1.1 smallClass_dis.gif,NONE,1.1 smallGenJ.gif,NONE,1.1 smallGenJ_dis.gif,NONE,1.1 From gss at pub.open-bio.org Fri Nov 11 15:59:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 11 Nov 2005 15:59:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511112059.jABKxt40010331@pub.open-bio.org> gss Fri Nov 11 15:59:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build In directory pub.open-bio.org:/tmp/cvs-serv10306/build Modified Files: .cvsignore Log Message: Added ROOT.war to .cvsignore s-moby/ref-impl/semanticmoby.org/build .cvsignore,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore 2005/09/21 23:07:16 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore 2005/11/11 20:59:55 1.3 @@ -1,2 +1,3 @@ semanticmoby.org.war javadoc +ROOT.war From senger at pub.open-bio.org Sat Nov 12 11:43:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhlxL013007@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv12988/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.50,1.51 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/10 08:54:31 1.50 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/12 16:43:47 1.51 @@ -1,3 +1,11 @@ +2005-11-12 Martin Senger + + * Changed MobyException to use initCause() and log.debug to better + indicate what happened and where. + + * Fixed CentralImpl: it is not anymore vulnerable to a different + types of results coming back from biomoby registry. + 2005-11-10 Martin Senger * Added method getParentName() to MobyServiceType From senger at pub.open-bio.org Sat Nov 12 11:43:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhmOT013142@pub.open-bio.org> senger Sat Nov 12 11:43:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/shared Modified Files: MobyException.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyException.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyException.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/shared/MobyException.java 2005/04/20 21:42:09 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyException.java 2005/11/12 16:43:48 1.3 @@ -1,28 +1,34 @@ // MobyException.java // -// senger at ebi.ac.uk -// February 2003 +// Created: February 2003 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger at gmail.com). +// package org.biomoby.shared; +import java.io.StringWriter; +import java.io.PrintWriter; + /** A general exception which can be used as a wrapper * around other exceptions. Using this exception * simplifies the code (but on the other hand it makes it less * "type-safe" - which is usually not a problem when dealing * with exceptions). *

    - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ public class MobyException extends Exception { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (MobyException.class); private static final long serialVersionUID = 3257853190165969203L; - /** @serial - */ - private Throwable theOriginalException = null; + /** @serial */ public MobyException () { super(); } /****************************************************************************** @@ -36,22 +42,36 @@ * It allows access to the original (wrapped) exception and its message. * * @param s message (or reason of) - * @param theOriginalException + * @param e original cause of this exception ******************************************************************************/ - public MobyException (String s, Throwable theOriginalException) { - super (s); - this.theOriginalException = theOriginalException; + public MobyException (String s, Throwable e) { + super (s, e); + if (e != null) { + boolean seriousError = + ( (e instanceof java.lang.NullPointerException) || + (e instanceof java.lang.ClassCastException) || + (e instanceof java.lang.ClassNotFoundException) ); + if (seriousError || log.isDebugEnabled()) { + StringWriter sw = new StringWriter (500); + e.printStackTrace (new PrintWriter (sw)); + if (seriousError) + log.error (sw.toString()); + else + log.debug (sw.toString()); + } + } } /****************************************************************************** * Retrieve the original exception. * + * @deprecated Use instead getCause() directly. + * * @return an original exception which was wrapped by this BiomonyException, or * null if there was no original exception involved ******************************************************************************/ public Throwable getOriginalException() { - return theOriginalException; + return getCause(); } } - From senger at pub.open-bio.org Sat Nov 12 11:43:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhlvU013035@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java CentralDigestImpl.java CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.13,1.14 CentralDigestImpl.java,1.9,1.10 CentralImpl.java,1.34,1.35 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/10 08:54:31 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/12 16:43:47 1.14 @@ -446,7 +446,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); stopDT = false; @@ -459,7 +459,10 @@ * if failed do nothing (except reporting it) * - remove LIST_FILE * - compare contents of new LIST_FILE with file names in the cache - * and remove them, or fetched missing ones + * and remove them, or fetched missing ones; + * in order to compare properly you need to read individual files + * and look if they really contain all services mentioned in the + * LIST_FILE * if success add there new LIST_FILE *************************************************************************/ protected boolean fillServicesCache() @@ -485,7 +488,31 @@ for (Iterator it = authorities.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String authority = (String)entry.getKey(); - if ( ! currentFiles.contains (authority)) { + if (currentFiles.contains (authority)) { + MobyService[] servs = + extractServices (load (new File (servicesCache, authority))); + // compare names in 'services' (those are services we have in cache) + // with names in 'entry' (those are the ones we should have) + boolean theyAreEqual = true; + HashSet currentServices = new HashSet (servs.length); + for (int i = 0; i < servs.length; i++) + currentServices.add (servs[i].getName()); + String[] newServices = (String[])entry.getValue(); + for (int i = 0; i < newServices.length; i++) { + if (currentServices.contains (newServices[i])) { + currentServices.remove (newServices[i]); + } else { + theyAreEqual = false; + break; + } + } + if (currentServices.size() > 0) + theyAreEqual = false; + if (! theyAreEqual) + currentFiles.remove (authority); + } + + if (! currentFiles.contains (authority)) { // missing file: fetch it from a registry fireEvent (AUTHORITY_LOADING, authority); String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); @@ -494,8 +521,9 @@ if (stopS) { return false; } + } else { + currentFiles.remove (authority); } - currentFiles.remove (authority); } // remove files that are not any more needed @@ -507,7 +535,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopS ? AUTHORITIES_CANCELLED : AUTHORITIES_END); stopS = false; @@ -568,7 +596,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); stopST = false; @@ -587,7 +615,7 @@ store (namespacesCache, LIST_FILE, xml); return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (NAMESPACES_END); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2005/10/28 07:58:08 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2005/11/12 16:43:47 1.10 @@ -99,7 +99,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); stopDT = false; @@ -135,7 +135,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopST ? SERVICE_TYPES_CANCELLED : SERVICE_TYPES_END); stopST = false; @@ -188,7 +188,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopS ? AUTHORITIES_CANCELLED : AUTHORITIES_END); stopS = false; @@ -199,7 +199,8 @@ * Do more for NullPointerException... *************************************************************************/ protected String formatException (Exception e) { - if (e instanceof java.lang.NullPointerException) { + if ( (e instanceof java.lang.NullPointerException) || + (e instanceof java.lang.ClassCastException) ) { StringBuffer buf = new StringBuffer(); buf.append (e.toString()); buf.append (DGUtils.stackTraceToString (e)); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/09 05:29:38 1.34 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/12 16:43:47 1.35 @@ -191,18 +191,18 @@ System.err.println (result + "\n"); System.err.println ("------------\n"); - return result; + return resultToString (result); } else { - return call.invoke (uri, method, parameters); + return resultToString (call.invoke (uri, method, parameters)); } } catch (AxisFault e) { throw new MobyException (AxisUtils.formatFault (e, endpoint.toString(), - (call == null ? null : call.getOperationName()))); + (call == null ? null : call.getOperationName())), e); } catch (Exception e) { - throw new MobyException (e.toString()); + throw new MobyException (e.toString(), e); // e.printStackTrace(); } } @@ -1467,7 +1467,7 @@ false) + "" }; - return (String) doCall ("findService", query); + return (String)doCall ("findService", query); } /************************************************************************** @@ -1480,6 +1480,14 @@ result = doCall (methodName, new Object[] { }); else result = doCall (methodName, new Object[] { inputXML }); + return (String)result; + } + + /************************************************************************** + * + *************************************************************************/ + protected static String resultToString (Object result) + throws MobyException { if (result == null) throw new MobyException ("Returned result is null."); if (result instanceof String) From senger at pub.open-bio.org Sat Nov 12 11:43:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhmO0013119@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java CommonTree.java DataTypesBoard.java DataTypesTree.java NOTES NamespacesBoard.java NamespacesTree.java PropertyChannel.java RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.19,1.20 CommonTree.java,1.16,1.17 DataTypesBoard.java,1.9,1.10 DataTypesTree.java,1.11,1.12 NOTES,1.24,1.25 NamespacesBoard.java,1.4,1.5 NamespacesTree.java,1.6,1.7 PropertyChannel.java,1.6,1.7 RegistrationDataTypeSubPanel.java,1.7,1.8 RegistrationNamespaceSubPanel.java,1.6,1.7 RegistrationServiceSubPanel.java,1.6,1.7 RegistrationServiceTypeSubPanel.java,1.7,1.8 RegistryPanel.java,1.22,1.23 ServiceTypesBoard.java,1.5,1.6 ServiceTypesTree.java,1.8,1.9 ServicesBoard.java,1.5,1.6 ServicesTree.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 16:23:32 1.19 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/12 16:43:47 1.20 @@ -371,6 +371,8 @@ else area.setText (initValue); area.setCaretPosition (0); + area.setLineWrap (true); + area.setWrapStyleWord (true); if (eventName != null) { final String eName = eventName; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 14:32:42 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/12 16:43:47 1.17 @@ -9,6 +9,7 @@ package org.biomoby.service.dashboard; import org.tulsoft.tools.gui.SwingUtils; +import org.tulsoft.shared.PrefsUtils; import javax.swing.JTree; import javax.swing.JLabel; @@ -67,9 +68,13 @@ final static protected int SORTED_BY_INPUT_DATA = 12; final static protected int SORTED_BY_OUTPUT_DATA = 13; + final static protected String PREF_KEY_SEARCH = "searchKey"; + // tree components protected JPopupMenu popup; - protected String lastSearchText = ""; + protected static String + lastSearchText = PrefsUtils.getNode (Dashboard.class).get (PREF_KEY_SEARCH, ""); + protected int lastSorted = SORTED_BY_NAME; protected PropertyChannel propertyChannel; @@ -449,11 +454,13 @@ searchIcon, null, lastSearchText); - if (result != null) + if (result != null) { lastSearchText = result; + PrefsUtils.getNode (Dashboard.class).put (PREF_KEY_SEARCH, lastSearchText); + } return result; } - + /********************************************************************* * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/10 08:54:31 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/12 16:43:47 1.10 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.DATA_TYPE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.DATA_TYPE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.DATA_TYPES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.DATA_TYPES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:47:11 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/12 16:43:47 1.12 @@ -145,7 +145,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (DATA_TYPES_ACCESS_ERROR, updateException); if (dataTypes != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/11 08:34:39 1.24 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/12 16:43:47 1.25 @@ -1,3 +1,15 @@ +* Add Throwable.initCause() etc. into exception handling + +* Add Alt-x for quick changing panels + +* Why are not services sorted by name, the first time they appear in + Registry browser? + +* BUG: sort services tree by service types: parts of the tree are + empty (big gaps) + +* move various exceptions from being global to the swing workers + * FWK005 parse may not be called while parsing. - probably when too many network request together --- @@ -140,6 +152,8 @@ * log4j.configuration property - works only from Ant... add it to the cmd-line clients, as well +* use NDC (with log4j) when I understand it... (?) + * alltools2: - JTextFieldWithHistory should remember also an empty value ("") - combo box history is not updated if exit happened while focus is still in the text field @@ -183,14 +197,10 @@ problms with registration panel: - - no auto update after reg/unreg srevice, and data type - after reload old files stayed (21.sep in data types) - datetime was in cache but cannot make it into tree, why? right-click - if nothing selected, it should take what is under te mouse (selected first), otherwise it is annoying -serach should be propagated to all (same-kinds) trees in all panels - -wrap automatically text in descriptions fields =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/12 16:43:47 1.5 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.NAMESPACE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.NAMESPACE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.NAMESPACES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.NAMESPACES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:47:11 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/12 16:43:47 1.7 @@ -104,7 +104,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (NAMESPACES_ACCESS_ERROR, updateException); if (namespaces != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/10/28 11:30:37 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/12 16:43:47 1.7 @@ -8,6 +8,7 @@ package org.biomoby.service.dashboard; +import org.biomoby.shared.Utils; import org.tulsoft.shared.UUtils; import java.beans.PropertyChangeListener; @@ -188,9 +189,9 @@ if (source != null) { buf.append ("["); if (source instanceof DashboardPanel) - buf.append ( ((DashboardPanel)source).getName() ); + buf.append ( Utils.simpleClassName (((DashboardPanel)source).getName()) ); else - buf.append (source.getClass().getName()); + buf.append ( Utils.simpleClassName (source.getClass().getName()) ); buf.append ("] "); } buf.append (key); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/11 08:34:39 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/12 16:43:47 1.8 @@ -112,7 +112,7 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_DT, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, + createCheckBox ("Fill new Data Type when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectDT (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/11 08:34:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/12 16:43:47 1.7 @@ -101,7 +101,7 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_NS, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, + createCheckBox ("Fill new Namespace when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectNS (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/11 08:34:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/12 16:43:47 1.7 @@ -154,7 +154,7 @@ // copy-by-select copyBySelect = - createCheckBox ("Copy here when selected in browser panel", + createCheckBox ("Fill new Service when selected in browser panel", false, KeyEvent.VK_C, null); // put together service fields =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 14:32:42 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/12 16:43:47 1.8 @@ -108,7 +108,7 @@ // allow to copy selected service types to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_ST, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_O, + createCheckBox ("Fill new Service Type when selected", usingCopyBySelect, KeyEvent.VK_O, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectST (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/10 08:54:31 1.22 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/12 16:43:47 1.23 @@ -202,7 +202,7 @@ final JLabel contents = new JLabel(); final String[] buttons = new String[] { "Copy to console", "Done"}; - propertyChannel.fire (DP_STATUS_MSG, "Retrieving cach info..."); + propertyChannel.fire (DP_STATUS_MSG, "Retrieving cache info..."); infoButton.setEnabled (false); final SwingWorker worker = new SwingWorker() { @@ -338,7 +338,7 @@ // runs on the event-dispatching thread. public void finished() { if (log.isDebugEnabled()) - log.debug (myReload ? "Reload of " : "Update of part " + myCachePart + " finished"); + log.debug ( (myReload ? "Reload of " : "Update of part ") + myCachePart + " finished"); if (exception != null) error ("An error occured when filling/updating the cache.\n\n", exception); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/10 08:54:31 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/12 16:43:47 1.6 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.SERVICE_TYPE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.SERVICE_TYPE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/10 08:54:31 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/12 16:43:47 1.9 @@ -104,7 +104,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (SERVICE_TYPES_ACCESS_ERROR, updateException); if (serviceTypes != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/12 16:43:47 1.6 @@ -80,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.AUTHORITY_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.AUTHORITY_LOADED: addToProgressBar(); @@ -90,7 +90,7 @@ case Notifier.AUTHORITIES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.AUTHORITIES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/12 16:43:47 1.6 @@ -146,7 +146,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (SERVICES_ACCESS_ERROR, updateException); if (services != null) { From senger at pub.open-bio.org Sat Nov 12 12:27:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 12:27:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121727.jACHRdDP013336@pub.open-bio.org> senger Sat Nov 12 12:27:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv13317/src/main/org/biomoby/service/dashboard Modified Files: Dashboard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard Dashboard.java,1.15,1.16 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 14:32:42 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/12 17:27:39 1.16 @@ -119,7 +119,7 @@ Dimension screenSize = frame.getToolkit().getScreenSize(); double myWidth = Math.min (screenSize.getWidth(), 1100); - double myHeight = Math.min (screenSize.getHeight(), 900); + double myHeight = Math.min (screenSize.getHeight() - 25, 900); Dimension mySize = new Dimension(); mySize.setSize (myWidth, myHeight); @@ -218,6 +218,8 @@ tabbedPane.addTab (name, panels[i].getIcon(), panels[i].getComponent (propertyChannel)); + if (i < 10) + tabbedPane.setMnemonicAt (i, (0x30 + i + 1)); } StatusBar statusBar = getStatusBar(); propertyChannel.addPropertyChangeListener (statusBar); From gss at pub.open-bio.org Sun Nov 13 00:18:57 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Sun, 13 Nov 2005 00:18:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511130518.jAD5Iv33014613@pub.open-bio.org> gss Sun Nov 13 00:18:57 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images In directory pub.open-bio.org:/tmp/cvs-serv14576/WebRoot/images Modified Files: nsf.gif tigr.gif ncgr.gif cshl.gif Log Message: Updated logos for cshl, ncgr, nsf, and tigr s-moby/ref-impl/semanticmoby.org/WebRoot/images nsf.gif,1.1,1.2 tigr.gif,1.1,1.2 ncgr.gif,1.1,1.2 cshl.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif: diff failed From gss at pub.open-bio.org Sun Nov 13 00:43:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Sun, 13 Nov 2005 00:43:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511130543.jAD5h0Pa014701@pub.open-bio.org> gss Sun Nov 13 00:43:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images In directory pub.open-bio.org:/tmp/cvs-serv14660/WebRoot/images Modified Files: iwis.gif iris.gif lis.gif tigr-gi.gif dragondb.gif Log Message: Added transparency s-moby/ref-impl/semanticmoby.org/WebRoot/images iwis.gif,1.1,1.2 iris.gif,1.1,1.2 lis.gif,1.1,1.2 tigr-gi.gif,1.1,1.2 dragondb.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif: diff failed From senger at pub.open-bio.org Mon Nov 14 22:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 14 Nov 2005 22:25:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpxY029936@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv29860/src/main/org/biomoby/client Modified Files: BaseClient.java Log Message: moby-live/Java/src/main/org/biomoby/client BaseClient.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java 2005/10/22 01:38:04 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java 2005/11/15 03:25:51 1.4 @@ -170,7 +170,7 @@ throw new MobyException ("Service endpoint '" + serviceEndpoint + "' is not a valid URL."); } catch (GException e) { - throw new MobyException (e.getMessage()); + throw new MobyException (e.getMessage(), e); } } From senger at pub.open-bio.org Mon Nov 14 22:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 14 Nov 2005 22:25:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpAW029897@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv29860/src/config Modified Files: run-any-client Log Message: moby-live/Java/src/config run-any-client,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/09/18 08:46:25 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/15 03:25:51 1.5 @@ -15,5 +15,6 @@ CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH "$@" From senger at pub.open-bio.org Mon Nov 14 22:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 14 Nov 2005 22:25:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpZo029879@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv29860 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.39,1.40 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- /home/repository/moby/moby-live/Java/build.xml 2005/10/28 07:58:08 1.39 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/15 03:25:50 1.40 @@ -99,11 +99,11 @@ - - --> + - - + - From senger at pub.open-bio.org Wed Nov 16 03:39:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dnin002079@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/shared/parser Modified Files: MobyJob.java Log Message: moby-live/Java/src/main/org/biomoby/shared/parser MobyJob.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/MobyJob.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/shared/parser/MobyJob.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/MobyJob.java 2005/11/16 08:39:48 1.2 @@ -413,10 +413,6 @@ *

  • If it fails, try to find an unnamed Simple data element * matching just the data type.

    * - *

  • If it fails, and if here given 'name' is empty, try to - * find any Simple data element matching the data type. (I am - * not sure that this rule is what we want...)

    - * *

  • Return null.

    * * From senger at pub.open-bio.org Wed Nov 16 03:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dm7S002060@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/shared/event Modified Files: Notifier.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event Notifier.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/09 16:23:32 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/16 08:39:48 1.8 @@ -109,9 +109,9 @@ * Call the notifier and signal that it can stop loading data (or * whatever it is doing).

    * - * @param signal identify what to stop doing (some usual values of - * this signal are defined elsewhere in this interface with names - * starting by SIGNAL_) + * @param callbackSignal identify what to stop doing (some usual + * values of this signal are defined elsewhere in this interface + * with names starting by SIGNAL_) ********************************************************************/ void callback (int callbackSignal); From senger at pub.open-bio.org Wed Nov 16 03:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dmQk001998@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv1965/src/Clients Added Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,NONE,1.1 From senger at pub.open-bio.org Wed Nov 16 03:40:53 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:40:53 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160840.jAG8eru4002138@pub.open-bio.org> senger Wed Nov 16 03:40:53 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv2123/src/Clients Added Files: TestAuth.java Log Message: moby-live/Java/src/Clients TestAuth.java,NONE,1.1 From senger at pub.open-bio.org Wed Nov 16 03:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dmsk002022@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java PropertyChannel.java Added Files: ExitSecurityManager.java SimpleAnt.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard ExitSecurityManager.java,NONE,1.1 SimpleAnt.java,NONE,1.1 GeneratorPanel.java,1.2,1.3 PropertyChannel.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.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/service/dashboard/GeneratorPanel.java 2005/11/15 03:25:51 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/16 08:39:48 1.3 @@ -224,7 +224,7 @@ JPanel jMoby = createTitledPanel ("jMoby"); File currentDir = new File (System.getProperty ("user.dir")); - JLabel labelJMoby = new JLabel ("Directory with a local copy of jMoby"); + JLabel labelJMoby = new JLabel ("Directory with jMoby"); jmobyDir = createFileSelector ("Select directory with jMoby", "Select", currentDir.getAbsolutePath(), @@ -235,28 +235,28 @@ SwingUtils.addComponent (jMoby, labelJMoby, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (jMoby, jmobyDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); - // panel with output dirs - JPanel outputs = createTitledPanel ("Output locations"); +// // panel with output dirs +// JPanel outputs = createTitledPanel ("Output locations"); - JLabel labelOutput = new JLabel ("Output directory for generated code"); - outputDir = createFileSelector ("Select directory for generated code", - "Select", - new File (currentDir, "generated").getAbsolutePath(), - "generatedDirectory", - null); - outputDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - JLabel labelJavadoc = new JLabel ("Output directory for javadoc API"); - javadocDir = createFileSelector ("Select directory for generated javadoc", - "Select", - new File (currentDir, "docs/APIservices").getAbsolutePath(), - "apiDirectory", - null); - javadocDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - - SwingUtils.addComponent (outputs, labelOutput, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent (outputs, outputDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); - SwingUtils.addComponent (outputs, labelJavadoc, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent (outputs, javadocDir, 0, 3, 1, 1, HORI, NWEST, 1.0, 0.0); +// JLabel labelOutput = new JLabel ("Output directory for generated code"); +// outputDir = createFileSelector ("Select directory for generated code", +// "Select", +// new File (currentDir, "generated").getAbsolutePath(), +// "generatedDirectory", +// null); +// outputDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); +// JLabel labelJavadoc = new JLabel ("Output directory for javadoc API"); +// javadocDir = createFileSelector ("Select directory for generated javadoc", +// "Select", +// new File (currentDir, "docs/APIservices").getAbsolutePath(), +// "apiDirectory", +// null); +// javadocDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); + +// SwingUtils.addComponent (outputs, labelOutput, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (outputs, outputDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); +// SwingUtils.addComponent (outputs, labelJavadoc, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (outputs, javadocDir, 0, 3, 1, 1, HORI, NWEST, 1.0, 0.0); // all-in-one button bothButton = @@ -293,7 +293,7 @@ // put all together SwingUtils.addComponent (pComponent, split, 0, 0, 1, 7, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (pComponent, jMoby, 1, 0, 2, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent (pComponent, outputs, 1, 1, 2, 1, HORI, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (pComponent, outputs, 1, 1, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, options, 1, 2, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, flavours, 1, 3, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, genData, 1, 4, 1, 1, HORI, NWEST, 0.0, 0.0); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/12 16:43:47 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/16 08:39:48 1.8 @@ -35,7 +35,7 @@ * can register and deregister PropertyChangeListeners, and it can * fire an event to them on behave of other objects. The other objects * either identify themselves (see method {@link - * #fire(Object,String,Object}), or use this channel for firing + * #fire(Object,String,Object)}), or use this channel for firing * anonymous messages (see method {@link #fire(String,Object)}) - in * which case the message source will be this class.

    * From fgibbons at pub.open-bio.org Wed Nov 16 09:51:49 2005 From: fgibbons at pub.open-bio.org (Frank Gibbons) Date: Wed, 16 Nov 2005 09:51:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511161451.jAGEpnjX003352@pub.open-bio.org> fgibbons Wed Nov 16 09:51:48 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY In directory pub.open-bio.org:/tmp/cvs-serv3327 Modified Files: CommonSubs.pm Log Message: - Ooops! EXPORT_OK contained 'collectionResponse' when it should have had 'complexResponse' moby-live/Perl/MOBY CommonSubs.pm,1.70,1.71 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/09/30 23:23:13 1.70 +++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/11/16 14:51:48 1.71 @@ -206,7 +206,7 @@ );# complexResponse is *not* here, but is in @EXPORT_OK -our @EXPORT_OK = ("collectionResponse", @{$EXPORT_TAGS{'all'}}); +our @EXPORT_OK = ("complexResponse", @{$EXPORT_TAGS{'all'}}); =head2 genericServiceInputParser From senger at pub.open-bio.org Thu Nov 17 08:04:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 17 Nov 2005 08:04:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511171304.jAHD4PG8011061@pub.open-bio.org> senger Thu Nov 17 08:04:24 EST 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv11046 Added Files: commons-io-1.0.jar Log Message: jars-archive/current commons-io-1.0.jar,NONE,1.1 From gss at pub.open-bio.org Fri Nov 18 13:28:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 18 Nov 2005 13:28:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511181828.jAIISgZS022541@pub.open-bio.org> gss Fri Nov 18 13:28:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv22515/src/org/semanticmoby/ref/servlets/dev Modified Files: RepositoryPrintServlet.java Log Message: Accept format parameter; print N3 by default s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev RepositoryPrintServlet.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java 2005/10/09 01:11:21 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java 2005/11/18 18:28:42 1.4 @@ -18,29 +18,37 @@ PrintWriter out = response.getWriter(); StorageManager manager = new StorageManager(); - + + String format = "N3"; + Model model = null; + try { - - Model model = manager.openDBModel(); + model = manager.openDBModel(); if (model.isEmpty()) { - out.println("The repository is empty"); } else { - - StmtIterator it = model.listStatements(); - - while (it.hasNext()) { - - out.println(it.nextStatement()); + String fmt = request.getParameter("format"); + if ("rdf".equalsIgnoreCase(fmt)) { + format = "RDF/XML-ABBREV"; + } else if ("nt".equalsIgnoreCase(fmt)) { + format = "N-TRIPLES"; } + model.write(out, format); } model.close(); } catch (StorageException e) { - e.printStackTrace(); throw new ServletException(e); + } finally { + if (model != null) { + try { + model.close(); + } catch (Throwable t) { + t.printStackTrace(); + } + } } } } From senger at pub.open-bio.org Sat Nov 19 06:11:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 06:11:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191111.jAJBBCHE024767@pub.open-bio.org> senger Sat Nov 19 06:11:12 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory pub.open-bio.org:/tmp/cvs-serv24749/help Log Message: Directory /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help added to the repository moby-live/Java/src/main/org/biomoby/service/dashboard/help - New directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/directory,v: No such file or directory From senger at pub.open-bio.org Sat Nov 19 13:33:00 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX0gu025499@pub.open-bio.org> senger Sat Nov 19 13:33:00 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv25480 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.41,1.42 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/16 08:39:48 1.41 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/19 18:33:00 1.42 @@ -232,6 +232,7 @@ + From senger at pub.open-bio.org Sat Nov 19 13:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2n0025650@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/service/dashboard/images Added Files: registration.gif smallHelp.gif smallHelp_dis.gif smallPref.gif smallPref_dis.gif smallSelect.gif smallSelect_dis.gif Removed Files: registration.png Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images registration.gif,NONE,1.1 smallHelp.gif,NONE,1.1 smallHelp_dis.gif,NONE,1.1 smallPref.gif,NONE,1.1 smallPref_dis.gif,NONE,1.1 smallSelect.gif,NONE,1.1 smallSelect_dis.gif,NONE,1.1 registration.png,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/registration.png,v: No such file or directory From senger at pub.open-bio.org Sat Nov 19 13:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2wT025695@pub.open-bio.org> senger Sat Nov 19 13:33:02 EST 2005 Update of /home/repository/moby/moby-live/Java/xmls In directory pub.open-bio.org:/tmp/cvs-serv25480/xmls Modified Files: libraries.xml Log Message: moby-live/Java/xmls libraries.xml,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/08 00:06:55 1.8 +++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/19 18:33:02 1.9 @@ -21,6 +21,7 @@ + @@ -60,6 +61,7 @@ + @@ -124,6 +126,7 @@ + From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX17j025634@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/service/dashboard/help Added Files: Dashboard.html GeneratorPanel.html RegistrationPanel.html RegistryPanel.html Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/help Dashboard.html,NONE,1.1 GeneratorPanel.html,NONE,1.1 RegistrationPanel.html,NONE,1.1 RegistryPanel.html,NONE,1.1 From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1OV025554@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard/org/biomoby/service/dashboard Added Files: dashboard.txt project.txt Log Message: moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,NONE,1.1 project.txt,NONE,1.1 From senger at pub.open-bio.org Sat Nov 19 13:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2dG025671@pub.open-bio.org> senger Sat Nov 19 13:33:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/shared Modified Files: Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared Utils.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/10 08:54:32 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/19 18:33:01 1.9 @@ -7,6 +7,9 @@ package org.biomoby.shared; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; + import java.util.HashSet; import java.io.PrintWriter; import java.io.BufferedWriter; @@ -16,7 +19,11 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; - +import java.io.OutputStreamWriter; +import java.io.ByteArrayOutputStream; +import java.nio.charset.Charset; +import java.net.URL; +import java.net.MalformedURLException; /** * This is a set of several utility methods which may be useful for @@ -144,17 +151,21 @@ /************************************************************************* * Find the resource with the given 'filename', read it and return - * it. A resource is some data (images, audio, text, etc) that can be - * accessed by class code in a way that is independent of the location - * of the code, typicallt such resource file sits anywhere on the CLASSPATH.

    + * it. A resource is some data (images, audio, text, etc) that can + * be accessed by class code in a way that is independent of the + * location of the code, typically such resource file sits + * anywhere on the CLASSPATH.

    * * @param filename of a resource is a '/'-separated path name that * identifies the resource + * * @param resourceOwner is any object whose class loader is used * to find and get the resource; typically one would put here * "this" when calling this method + * * @return contents of the resource, or null if the resource could * not be found + * * @throws MobyException if resource was found but an error * occured during its reading (IO problem, memory problem etc.) *************************************************************************/ @@ -193,9 +204,114 @@ } /************************************************************************* + * Work in progress.

    + * + * Slightly richer version of {@link + * #readResource(String,Object)}. It reads the resource using + * platform default encoding (which may be not what you + * want... something to be done better (TBD).

    + * + * @return contents of the resource, or null if the resource could + * not be found + * + * @throws IOException if resource was found but an error + * occured during its reading (IO problem, memory problem etc.) + *************************************************************************/ + public static String readResource (String path, Class c) + throws IOException { + + // path can be empty + if (path == null) return null; + + // seems that we are going to read something - so prepare a + // default encoding + String encoding = new OutputStreamWriter (new ByteArrayOutputStream()).getEncoding(); + // for 1.5: +// String encoding = Charset.defaultCharset().name(); + + // path can be absolute... + File file = new File (path); + if (file.isAbsolute()) + return FileUtils.readFileToString (file, encoding); + + // ...or consider it a resource and load it as a resource of + // the given class + InputStream is = null; + if (c != null) { + is = c.getClassLoader().getResourceAsStream (path); + if (is != null) + return IOUtils.toString (is, encoding); + + // ...or extend the path by the package name of the given + // class + String className = c.getName(); + int pkgEndIndex = className.lastIndexOf ('.'); + if (pkgEndIndex > 0) { + String packageName = className.substring (0, pkgEndIndex); + String newPath = packageName.replace ('.', '/') + "/" + path; + is = c.getClassLoader().getResourceAsStream (newPath); + if (is != null) + return IOUtils.toString (is, encoding); + } + } + + // ...or (finally) try some general class loader + is = Thread.currentThread().getContextClassLoader().getResourceAsStream (path); + if (is != null) + return IOUtils.toString (is, encoding); + + // sorry, I cannot do more + return null; + } + + /************************************************************************* + * Work in progress.

    + * + * Similar to {@link #readResource(String,Class)} but return just + * an URL of a resource, not the resource itself.

    + * + * @return URL of the resource, or null if the resource could not + * be found + *************************************************************************/ + public static URL getResourceURL (String path, Class c) { + + // path can be empty + if (path == null) return null; + + // path can be absolute... + File file = new File (path); + if (file.isAbsolute()) { + try { + return file.toURI().toURL(); + } catch (MalformedURLException e) { + return null; + } + } + + // ...or consider it a resource of the given class + URL url = null; + if (c != null) { + url = c.getClassLoader().getResource (path); + if (url != null) return url; + + // ...or extend the path by the package name of the given class + String className = c.getName(); + int pkgEndIndex = className.lastIndexOf ('.'); + if (pkgEndIndex > 0) { + String packageName = className.substring (0, pkgEndIndex); + String newPath = packageName.replace ('.', '/') + "/" + path; + url = c.getClassLoader().getResource (newPath); + if (url != null) return url; + } + } + + // ...or (finally) try some general class loader + return Thread.currentThread().getContextClassLoader().getResource (path); + } + + /************************************************************************* * Return just the last part of a Java class name (after the last - * dot). It is useful for displaying purposes (and when data do - * not have article names).

    + * dot). It is useful for displaying purposes.

    * * @param className whose last part is being looked for * @return the last part of 'className', or the whole 'className' if it does From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1xR025518@pub.open-bio.org> senger Sat Nov 19 13:33:00 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard Modified Files: dashboard.properties Log Message: moby-live/Java/src/config/dashboard dashboard.properties,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties 2005/10/28 07:58:08 1.2 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties 2005/11/19 18:33:00 1.3 @@ -30,4 +30,23 @@ # --- a name or a number of color that will be used to paint the # background of the dasboard header and its status bar at the bottom + dashboard.bgcolor = aliceblue + +# --- short description what a dashboard can do generally; usually it +# is more convenient to put the description in a file and to use the +# alternative property name; this text is treated as an HTML text + +#dashboard.description = +dashboard.description.file = org/biomoby/service/dashboard/dashboard.txt + +# --- short description of a project that uses this dashboard; usually +# it is more convenient to put the description in a file and to use +# the alternative property name; this text is treated as an HTML text + +#project.description = +project.description.file = org/biomoby/service/dashboard/project.txt + +# --- contact person, possibly with an email address +# (note that this text is not treated as HTML document) +dashboard.contact = Martin Senger From senger at pub.open-bio.org Sat Nov 19 13:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1F7025538@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/11 08:34:39 1.5 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/19 18:33:01 1.6 @@ -1,4 +1,4 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel org.biomoby.service.dashboard.GeneratorPanel -#org.biomoby.service.dashboard.DebuggingPanel +org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpfl005036@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv4966/docs/images Modified Files: stylesheet.css Log Message: moby-live/Java/docs/images stylesheet.css,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/images/stylesheet.css,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/docs/images/stylesheet.css 2005/09/20 07:30:09 1.5 +++ /home/repository/moby/moby-live/Java/docs/images/stylesheet.css 2005/11/20 12:30:50 1.6 @@ -63,6 +63,10 @@ margin: 1em; } +.update { + background-color:#ccffcd; + } + pre.code { border: ridge; padding: 5px; background-color:#FFFF99; From senger at pub.open-bio.org Sun Nov 20 07:30:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUooY004993@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv4966 Modified Files: .cvsignore.template build-dev.bat build.bat Log Message: moby-live/Java .cvsignore.template,1.3,1.4 build-dev.bat,1.4,1.5 build.bat,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/.cvsignore.template,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/.cvsignore.template 2005/08/31 00:48:39 1.3 +++ /home/repository/moby/moby-live/Java/.cvsignore.template 2005/11/20 12:30:50 1.4 @@ -3,3 +3,4 @@ .classpath build build.properties +log4j.properties =================================================================== RCS file: /home/repository/moby/moby-live/Java/build-dev.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/build-dev.bat 2005/05/19 10:56:05 1.4 +++ /home/repository/moby/moby-live/Java/build-dev.bat 2005/11/20 12:30:50 1.5 @@ -1,38 +1,38 @@ - at echo off -REM $Id$ - -REM See comments in build-dev.sh. -REM ALSO: I do not understand Windows and do not develop on this platform. -REM Therefore, any improvements of this script are welcome. -REM Please do not hesitate and contact Martin Senger . - -REM Set-up JAVA_HOME -REM ---------------- - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=.\lib\ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set CP=%JAVA_HOME%\lib\tools.jar;%CP% - -REM Call Ant to do the building -REM --------------------------- -set JAVA=%JAVA_HOME%\bin\java -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end - - + at echo off +REM $Id$ + +REM See comments in build-dev.sh. +REM ALSO: I do not understand Windows and do not develop on this platform. +REM Therefore, any improvements of this script are welcome. +REM Please do not hesitate and contact Martin Senger . + +REM Set-up JAVA_HOME +REM ---------------- + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=.\lib\ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set CP=%JAVA_HOME%\lib\tools.jar;%CP% + +REM Call Ant to do the building +REM --------------------------- +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/build.bat 2005/05/19 10:56:05 1.4 +++ /home/repository/moby/moby-live/Java/build.bat 2005/11/20 12:30:50 1.5 @@ -1,38 +1,38 @@ - at echo off -REM $Id$ - -REM See comments in build.sh. -REM ALSO: I do not understand Windows and do not develop on this platform. -REM Therefore, any improvements of this script are welcome. -REM Please do not hesitate and contact Martin Senger . - -REM Set-up JAVA_HOME -REM ---------------- -REM Example: set JAVA_HOME=\development\jdk - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=.\lib\ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set CP=%JAVA_HOME%\lib\tools.jar;%CP% - -REM Call Ant to do the building -REM --------------------------- -set JAVA=%JAVA_HOME%\bin\java -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main -buildfile build.xml gather -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end + at echo off +REM $Id$ + +REM See comments in build.sh. +REM ALSO: I do not understand Windows and do not develop on this platform. +REM Therefore, any improvements of this script are welcome. +REM Please do not hesitate and contact Martin Senger . + +REM Set-up JAVA_HOME +REM ---------------- +REM Example: set JAVA_HOME=\development\jdk + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=.\lib\ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set CP=%JAVA_HOME%\lib\tools.jar;%CP% + +REM Call Ant to do the building +REM --------------------------- +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main -buildfile build.xml gather +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqTr005298@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema Modified Files: MElement.java Log Message: moby-live/Java/src/main/org/biomoby/shared/schema MElement.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.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/shared/schema/MElement.java 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.java 2005/11/20 12:30:52 1.2 @@ -1,173 +1,173 @@ -/* - * Created on Jun 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.biomoby.shared.schema; - -import java.util.Vector; - -/** - * @author Eddie - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class MElement { - // enumeration of types - /** - * A moby:String primitive type - */ - public static String STRING = "String"; - /** - * A moby:Integer primitive type - */ - public static String INTEGER = "Integer"; - /** - * A moby:Float primitive type - */ - public static String FLOAT = "Float"; - /** - * A moby:DateTime primitive type - */ - public static String DATA_TIME = "DataTime"; - - /** - * A moby data type that is not a primitive. - */ - public static String NON_PRIMITIVE = "NonPrimitiveType"; - - private String name = ""; - private String articleName = ""; - private Vector hasaMElements = new Vector(); - private Vector hasMElements = new Vector();; - private String description = ""; - private String type = ""; - - /** - * Default constructor. Name, etc need to be set. - */ - public MElement() { - } - - public MElement(String name) { - this.name = name; - } - - public MElement(String name, String articleName) { - this.name = name; - this.articleName = articleName; - } - - public String getArticleName() - { - return this.articleName; - } - public MElement(String name, String articleName, String description) { - this.name = name; - this.articleName = articleName; - this.description = description; - } - - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - /** - * @return Returns the type. - */ - public String getType() { - return type; - } - /** - * @param type The type to set. - */ - public void setType(String type) { - this.type = type; - } - /** - * @return Returns the hasaMElements. - */ - public Vector getHasaMElements() { - return hasaMElements; - } - /** - * @return Returns the hasMElements. - */ - public Vector getHasMElements() { - return hasMElements; - } - - public boolean addHasMElement(MElement element) { - return hasMElements.add(element); - } - - public boolean addHasaMElement(MElement element) { - return hasaMElements.add(element); - } - - public static boolean isPrimitive(String object) { - if (object.equals(MElement.STRING)) - return true; - if (object.equals(MElement.INTEGER)) - return true; - if (object.equals(MElement.FLOAT)) - return true; - if (object.equals(MElement.DATA_TIME)) - return true; - return false; - } - - /**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to - /*store MElement and articleNames;*/ - public int hashCode() - { - return this.name.hashCode(); - } - - - - public boolean equals(Object obj) - { - if(obj==null) - { - return false; - } - - if(obj instanceof MElement) - { - MElement mk=(MElement)obj; - - return (this.name).equalsIgnoreCase(mk.name); - } - return false; - } - - - public String toString() { - return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n"; -} -} - +/* + * Created on Jun 17, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.biomoby.shared.schema; + +import java.util.Vector; + +/** + * @author Eddie + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class MElement { + // enumeration of types + /** + * A moby:String primitive type + */ + public static String STRING = "String"; + /** + * A moby:Integer primitive type + */ + public static String INTEGER = "Integer"; + /** + * A moby:Float primitive type + */ + public static String FLOAT = "Float"; + /** + * A moby:DateTime primitive type + */ + public static String DATA_TIME = "DataTime"; + + /** + * A moby data type that is not a primitive. + */ + public static String NON_PRIMITIVE = "NonPrimitiveType"; + + private String name = ""; + private String articleName = ""; + private Vector hasaMElements = new Vector(); + private Vector hasMElements = new Vector();; + private String description = ""; + private String type = ""; + + /** + * Default constructor. Name, etc need to be set. + */ + public MElement() { + } + + public MElement(String name) { + this.name = name; + } + + public MElement(String name, String articleName) { + this.name = name; + this.articleName = articleName; + } + + public String getArticleName() + { + return this.articleName; + } + public MElement(String name, String articleName, String description) { + this.name = name; + this.articleName = articleName; + this.description = description; + } + + + /** + * @return Returns the description. + */ + public String getDescription() { + return description; + } + /** + * @param description The description to set. + */ + public void setDescription(String description) { + this.description = description; + } + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + /** + * @param name The name to set. + */ + public void setName(String name) { + this.name = name; + } + /** + * @return Returns the type. + */ + public String getType() { + return type; + } + /** + * @param type The type to set. + */ + public void setType(String type) { + this.type = type; + } + /** + * @return Returns the hasaMElements. + */ + public Vector getHasaMElements() { + return hasaMElements; + } + /** + * @return Returns the hasMElements. + */ + public Vector getHasMElements() { + return hasMElements; + } + + public boolean addHasMElement(MElement element) { + return hasMElements.add(element); + } + + public boolean addHasaMElement(MElement element) { + return hasaMElements.add(element); + } + + public static boolean isPrimitive(String object) { + if (object.equals(MElement.STRING)) + return true; + if (object.equals(MElement.INTEGER)) + return true; + if (object.equals(MElement.FLOAT)) + return true; + if (object.equals(MElement.DATA_TIME)) + return true; + return false; + } + + /**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to + /*store MElement and articleNames;*/ + public int hashCode() + { + return this.name.hashCode(); + } + + + + public boolean equals(Object obj) + { + if(obj==null) + { + return false; + } + + if(obj instanceof MElement) + { + MElement mk=(MElement)obj; + + return (this.name).equalsIgnoreCase(mk.name); + } + return false; + } + + + public String toString() { + return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n"; +} +} + From senger at pub.open-bio.org Sun Nov 20 07:30:53 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:53 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqlt005398@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/webapps In directory pub.open-bio.org:/tmp/cvs-serv4966/src/webapps Modified Files: deploy.bat Log Message: moby-live/Java/src/webapps deploy.bat,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/webapps/deploy.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/webapps/deploy.bat 2005/09/22 07:55:44 1.1 +++ /home/repository/moby/moby-live/Java/src/webapps/deploy.bat 2005/11/20 12:30:52 1.2 @@ -1,33 +1,33 @@ - at echo off -REM $Id$ - -REM Set-up JAVA_HOME -REM ---------------- - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" - -REM Call Ant -REM -------- -set "JAVA=%JAVA_HOME%\bin\java" -%JAVA% -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end - - + at echo off +REM $Id$ + +REM Set-up JAVA_HOME +REM ---------------- + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" + +REM Call Ant +REM -------- +set "JAVA=%JAVA_HOME%\bin\java" +%JAVA% -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end + + From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqsv005334@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema/example Modified Files: BasicGFFSequenceFeature.xml DNASequence.xml DnaSequenceHolderxsd.xml Object.xml String.xml Log Message: moby-live/Java/src/main/org/biomoby/shared/schema/example BasicGFFSequenceFeature.xml,1.1,1.2 DNASequence.xml,1.1,1.2 DnaSequenceHolderxsd.xml,1.1,1.2 Object.xml,1.1,1.2 String.xml,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/BasicGFFSequenceFeature.xml,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/shared/schema/example/BasicGFFSequenceFeature.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/BasicGFFSequenceFeature.xml 2005/11/20 12:30:52 1.2 @@ -1,27 +1,27 @@ - - - - - adf - aaaa - arrr - aaaaaa - wwww - gggg - 112 - 113 - - 3.14159E0 - - - aaa - aaasss - - - asss - aaat - - - - - + + + + + adf + aaaa + arrr + aaaaaa + wwww + gggg + 112 + 113 + + 3.14159E0 + + + aaa + aaasss + + + asss + aaat + + + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DNASequence.xml,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/shared/schema/example/DNASequence.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DNASequence.xml 2005/11/20 12:30:52 1.2 @@ -6,4 +6,4 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DnaSequenceHolderxsd.xml,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/shared/schema/example/DnaSequenceHolderxsd.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DnaSequenceHolderxsd.xml 2005/11/20 12:30:52 1.2 @@ -1,41 +1,41 @@ - - - - Generating a XML Schema for the Moby object DnaSequenceHolder. Fri Aug 12 10:25:26 PDT 2005. Eddie and Lixin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Generating a XML Schema for the Moby object DnaSequenceHolder. Fri Aug 12 10:25:26 PDT 2005. Eddie and Lixin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/Object.xml,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/shared/schema/example/Object.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/Object.xml 2005/11/20 12:30:52 1.2 @@ -1,3 +1,3 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/String.xml,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/shared/schema/example/String.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/String.xml 2005/11/20 12:30:52 1.2 @@ -1,3 +1,3 @@ this is string - + From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUq4V005376@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/support In directory pub.open-bio.org:/tmp/cvs-serv4966/src/support Modified Files: run-any-client.bat run-cache-client.bat run-cmdline-client.bat run-digest-client.bat run-graphs-client.bat run-testing-central.bat Log Message: moby-live/Java/src/support run-any-client.bat,1.1,1.2 run-cache-client.bat,1.1,1.2 run-cmdline-client.bat,1.1,1.2 run-digest-client.bat,1.1,1.2 run-graphs-client.bat,1.1,1.2 run-testing-central.bat,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-any-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-any-client.bat 2003/11/08 00:27:24 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-any-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat 2004/12/05 22:28:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat 2003/09/25 02:35:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat 2004/12/05 22:28:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat 2003/11/08 00:27:24 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat 2003/09/25 02:35:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUprg005190@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/registry/rdfagent/verifier Modified Files: InpOut.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier InpOut.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/InpOut.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/verifier/InpOut.java 2004/10/28 17:55:43 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/InpOut.java 2005/11/20 12:30:51 1.2 @@ -1,61 +1,61 @@ -package org.biomoby.registry.rdfagent.verifier; - -/** - * @author Nina Opushneva - * - * This class represents the model data for an input or output. - * It is a value-object and has fine-grained getter and setter - * methods. - */ - -public class InpOut { - - - String objectTypeURI; - String namespaceTypeUris; - String articleName; - int serviceInstanceId; - - public InpOut() { - } - - public InpOut( String objectTypeURI, String namespaceTypeUris, String articleName, int serviceInstanceId) { - - this.serviceInstanceId = serviceInstanceId; - this.objectTypeURI = objectTypeURI; - this.namespaceTypeUris = namespaceTypeUris; - this.articleName = articleName; - - } - - public String getObjectTypeURI() { - return objectTypeURI; - } - public void setObjectTypeURI(String objectTypeURI) { - this.objectTypeURI = objectTypeURI; - } - - public String getNamespaceTypeUris() { - return namespaceTypeUris; - } - - public void setNamespaceTypeUris(String namespaceTypeUris) { - this.namespaceTypeUris = namespaceTypeUris; - } - - public String getArticleName() { - return articleName; - } - - public void setArticleName(String articleName) { - this.articleName = articleName; - } - - public int getserviceInstanceId() { - return serviceInstanceId; - } - - public void setserviceInstanceId(int serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } -} +package org.biomoby.registry.rdfagent.verifier; + +/** + * @author Nina Opushneva + * + * This class represents the model data for an input or output. + * It is a value-object and has fine-grained getter and setter + * methods. + */ + +public class InpOut { + + + String objectTypeURI; + String namespaceTypeUris; + String articleName; + int serviceInstanceId; + + public InpOut() { + } + + public InpOut( String objectTypeURI, String namespaceTypeUris, String articleName, int serviceInstanceId) { + + this.serviceInstanceId = serviceInstanceId; + this.objectTypeURI = objectTypeURI; + this.namespaceTypeUris = namespaceTypeUris; + this.articleName = articleName; + + } + + public String getObjectTypeURI() { + return objectTypeURI; + } + public void setObjectTypeURI(String objectTypeURI) { + this.objectTypeURI = objectTypeURI; + } + + public String getNamespaceTypeUris() { + return namespaceTypeUris; + } + + public void setNamespaceTypeUris(String namespaceTypeUris) { + this.namespaceTypeUris = namespaceTypeUris; + } + + public String getArticleName() { + return articleName; + } + + public void setArticleName(String articleName) { + this.articleName = articleName; + } + + public int getserviceInstanceId() { + return serviceInstanceId; + } + + public void setserviceInstanceId(int serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } +} From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpC8005171@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/client Modified Files: BaseCmdLineClient.java CentralDigestCachedImpl.java CentralImpl.java GraphsServlet.java ServicesEdge.java Log Message: moby-live/Java/src/main/org/biomoby/client BaseCmdLineClient.java,1.4,1.5 CentralDigestCachedImpl.java,1.14,1.15 CentralImpl.java,1.35,1.36 GraphsServlet.java,1.14,1.15 ServicesEdge.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java 2005/10/12 11:36:59 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java 2005/11/20 12:30:51 1.5 @@ -297,12 +297,12 @@ } } - protected MobyObject createInstance (MobyObject obj) + protected MobyObject createInstance (MobyObject mobj) throws MobyException { try { - return (MobyObject)obj.getClass().newInstance(); + return (MobyObject)mobj.getClass().newInstance(); } catch (Exception e) { - throw new MobyException ("Cannot instantiate data type '" + obj.getClass().getName() + "'."); + throw new MobyException ("Cannot instantiate data type '" + mobj.getClass().getName() + "'."); } } @@ -351,14 +351,14 @@ /************************************************************************** * *************************************************************************/ - protected boolean createChildren (MobyObject obj) + protected boolean createChildren (MobyObject mobj) throws MobyException { boolean someChildrenCreated = false; try { HashMap methodsAndArticleNames = new HashMap(); HashMap methodsAndChildTypes = new HashMap(); HashMap methodNamesAndHowManyTimes = new HashMap(); - Class myClass = obj.getClass(); + Class myClass = mobj.getClass(); Field[] fields = myClass.getFields(); for (int i = 0; i < fields.length; i++) { String fieldName = fields[i].getName(); @@ -392,20 +392,20 @@ Class childType = (Class)entry.getValue(); int count = ( ((Integer)methodNamesAndHowManyTimes.get (method.getName())).intValue() ); while (count-- > 0) { - if (createOneChild (obj, method, childType, (String)methodsAndArticleNames.get (method))) + if (createOneChild (mobj, method, childType, (String)methodsAndArticleNames.get (method))) someChildrenCreated = true; } } } else { // this is a leaf that does not have any children... - if (obj.isPrimitiveType()) { + if (mobj.isPrimitiveType()) { // ...if it is a primitive type, we may ignore it if there is no more values - return setPrimitiveValue (obj, articleName); + return setPrimitiveValue (mobj, articleName); } else { // ...if it is an Object leaf, we always keep it // but id and namespaces are here like values for // primitives so filltem - setIdAndNamespace (obj); + setIdAndNamespace (mobj); return true; } } @@ -422,12 +422,12 @@ /************************************************************************** * *************************************************************************/ - boolean createOneChild (MobyObject parent, Method setMethod, Class childType, String articleName) + boolean createOneChild (MobyObject parent, Method setMethod, Class childType, String artName) throws MobyException { try { MobyObject child = createInstance (childType); if (child.isPrimitiveType()) { - if (setPrimitiveValue (child, articleName)) { + if (setPrimitiveValue (child, artName)) { setMethod.invoke (parent, new Object[] { child }); return true; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/12 16:43:47 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15 @@ -215,7 +215,7 @@ /** - * Create a cache directory from 'cacheDir' and 'registryId' if it + * Create a cache directory from 'cacheDirectory' and 'registryId' if it * does not exist yet. Make sure that it is writable. Return a * File representing created directory. * @@ -223,11 +223,11 @@ * cache is going to be created for. If null, an endpoint of a * default Moby registry is used. */ - protected File createCacheDir (String cacheDir, String registryId) + protected File createCacheDir (String cacheDirectory, String registryId) throws MobyException { if (registryId == null || registryId.equals ("")) registryId = CentralImpl.DEFAULT_ENDPOINT; - File cache = new File (cacheDir + fileSeparator + clean (registryId)); + File cache = new File (cacheDirectory + fileSeparator + clean (registryId)); try { if (! cache.exists()) if (! cache.mkdirs()) @@ -246,11 +246,13 @@ * Remove cache and all (but given in 'subCacheDirNames') its * subdirectories. */ - protected void removeCacheDir (String cacheDir, String registryId, String[] subCacheDirNames) + protected void removeCacheDir (String cacheDirectory, + String registryId, + String[] subCacheDirNames) throws MobyException { if (registryId == null || registryId.equals ("")) registryId = CentralImpl.DEFAULT_ENDPOINT; - File cache = new File (cacheDir + fileSeparator + clean (registryId)); + File cache = new File (cacheDirectory + fileSeparator + clean (registryId)); try { if (! cache.exists()) return; if (! cache.isDirectory()) @@ -263,7 +265,8 @@ for (int f = 0; f < files.length; f++) { if (files[f].isDirectory()) throw new MobyException ("Found a directory '" + files[f].getAbsolutePath() + "' where no directory should be"); - files[f].delete(); + if (! files[f].delete()) + log.error ("Can't delete file '" + files[f] + "'."); } cacheSubDir.delete(); } @@ -673,7 +676,8 @@ if (ignored (list[i])) continue; v.addElement (createDataTypeFromXML (load (list[i]), "-dummy-")); } catch (NoSuccessException e) { - System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); + log.error (MSG_CACHE_BAD_FILE (list[i], e)); + //System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); } } MobyDataType[] result = new MobyDataType [v.size()]; @@ -736,7 +740,7 @@ v.addElement (servs[j]); } } catch (MobyException e) { - System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); + log.error (MSG_CACHE_BAD_FILE (list[i], e)); } } MobyService[] result = new MobyService [v.size()]; @@ -799,6 +803,7 @@ try { types[i].setParentNames (createServiceTypeRelationshipsFromXML (load (file))); } catch (MobyException e) { + log.error (MSG_CACHE_BAD_FILE (file, e)); System.err.println (MSG_CACHE_BAD_FILE (file, e)); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/12 16:43:47 1.35 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/20 12:30:51 1.36 @@ -154,7 +154,7 @@ dbf.setNamespaceAware(true); docBuilder = dbf.newDocumentBuilder(); } catch (Exception e) { - throw new MobyException ("Could not configure an XML parser: " + e); + throw new MobyException ("Could not configure an XML parser: " + e, e); } cache = new Hashtable(); @@ -241,7 +241,7 @@ try { document=docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } Element root = document.getDocumentElement(); @@ -465,12 +465,13 @@ *************************************************************************/ public MobyService[] extractServices (String xml) throws MobyException { - +// if (xmk == null) +// throw new MobyException () Document document = null; try { document = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Service"); @@ -677,7 +678,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceName"); @@ -723,7 +724,7 @@ try { document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); } catch (Exception e) { - throw new MobyException (e.toString()); + throw new MobyException (e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceName"); @@ -774,7 +775,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceProvider"); @@ -832,7 +833,8 @@ Document document = null; try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e); + } NodeList list = document.getElementsByTagName ("serviceType"); if (list == null || list.getLength() == 0) @@ -888,7 +890,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getDocumentElement().getElementsByTagName ("Namespace"); @@ -960,7 +962,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Object"); @@ -1027,7 +1029,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream (xmlSource.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("retrieveObjectDefinition"); @@ -1135,7 +1137,7 @@ // parse returned XML Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} Element service = document.getDocumentElement(); Node wsdl = service.getFirstChild(); @@ -1555,7 +1557,7 @@ Vector v = new Vector(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { @@ -1611,7 +1613,7 @@ Map results = new HashMap(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); @@ -1668,7 +1670,7 @@ Vector v = new Vector(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); @@ -1732,7 +1734,7 @@ try { document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Resource"); @@ -1771,7 +1773,7 @@ try { return url.openStream(); } catch (java.io.IOException e2) { - throw new MobyException (e2.toString()); + throw new MobyException (e2.toString(), e2); } } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/06 16:47:10 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/20 12:30:51 1.15 @@ -1759,11 +1759,11 @@ * cached files starting from CACHE_DIR directory, otherwise we * store them inside this servlet context on the 'contextPath'. ********************************************************************/ - protected SimpleFileCache initCache (ServletContext context, + protected SimpleFileCache initCache (ServletContext sContext, String contextPath) { String cacheDir = (String)initParams.get (CACHE_DIR); if (UUtils.isEmpty (cacheDir)) { - return new ServletFileCache (context, contextPath); + return new ServletFileCache (sContext, contextPath); } else { String cacheURL = (String)initParams.get (CACHE_URL); return new FileCache (cacheDir, cacheURL); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java 2005/07/19 12:39:59 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java 2005/11/20 12:30:51 1.7 @@ -219,9 +219,9 @@ /************************************************************************* * Checks if the given connection type is known. *************************************************************************/ - private boolean checkConnectionType (int connectionType) { - return (connectionType >= MIN_CONNECTION_TYPE && - connectionType <= MAX_CONNECTION_TYPE); + private boolean checkConnectionType (int conType) { + return (conType >= MIN_CONNECTION_TYPE && + conType <= MAX_CONNECTION_TYPE); } } From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpPB005131@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv4966/src/config Modified Files: RDFagent_config.xml run-any-client.bat run-cache-client.bat run-cmdline-client.bat run-dashboard run-dashboard.bat run-digest-client.bat run-generator.bat run-graphs-client.bat run-moby-parser.bat run-service.bat run-testing-central.bat Log Message: moby-live/Java/src/config RDFagent_config.xml,1.1,1.2 run-any-client.bat,1.5,1.6 run-cache-client.bat,1.3,1.4 run-cmdline-client.bat,1.4,1.5 run-dashboard,1.2,1.3 run-dashboard.bat,1.3,1.4 run-digest-client.bat,1.3,1.4 run-generator.bat,1.3,1.4 run-graphs-client.bat,1.3,1.4 run-moby-parser.bat,1.3,1.4 run-service.bat,1.3,1.4 run-testing-central.bat,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml 2004/10/28 17:54:02 1.1 +++ /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml 2005/11/20 12:30:51 1.2 @@ -1,32 +1,33 @@ - + - - - mwilkinson at mrl.ubc.ca - RDFagent warning - - mail.cbr.nrc.ca - - - rdf_agent at cbr.nrc.ca - - - RDFagent warning - Connect was refused with HTTP code - - - - com.mysql.jdbc.Driver - jdbc:mysql://localhost/mobycentral - mobycentral - moby - moby - 3306 - - /RDFagent.log - /RDFagent_report - /RDFagent_delServices - /RDFagent_signURLlist - 3 - + + + mwilkinson at mrl.ubc.ca + RDFagent warning + + mail.cbr.nrc.ca + + + rdf_agent at cbr.nrc.ca + + + RDFagent warning + Connect was refused with HTTP code + + + + com.mysql.jdbc.Driver + jdbc:mysql://localhost/mobycentral + mobycentral + moby + moby + 3306 + + /RDFagent.log + /RDFagent_report + /RDFagent_delServices + /RDFagent_signURLlist + 3 + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/09/21 05:26:18 1.5 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/20 12:30:51 1.6 @@ -1,13 +1,14 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% - -java -classpath "%CP%" %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% + +java -classpath "%CP%" %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" CacheRegistryClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat 2005/09/21 05:26:18 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat 2005/11/20 12:30:51 1.5 @@ -7,4 +7,4 @@ set CP=build\classes;%CP% set CP=build\Clients;%CP% -java -classpath "%CP%" MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +java -classpath "%CP%" MobyCmdLineClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/09/21 06:13:28 1.2 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/20 12:30:51 1.3 @@ -14,5 +14,6 @@ CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/09/21 06:13:28 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/20 12:30:51 1.4 @@ -1,14 +1,15 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% -set CP=build\lib\dashboard-config.jar;%CP% - -java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% +set CP=build\lib\dashboard-config.jar;%CP% + +java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" MobyDigestClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-generator.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-generator.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-generator.bat 2005/11/20 12:30:51 1.4 @@ -1,12 +1,12 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% - -java -classpath "%CP%" MosesGenerators %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% + +java -classpath "%CP%" MosesGenerators %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" MobyGraphs %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat 2005/11/20 12:30:51 1.4 @@ -1,11 +1,11 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% - -java -classpath "%CP%" TestingMobyParser %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% + +java -classpath "%CP%" TestingMobyParser %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-service.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-service.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-service.bat 2005/11/20 12:30:51 1.4 @@ -1,13 +1,13 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% - -java -classpath "%CP%" org.biomoby.client.BaseCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% + +java -classpath "%CP%" org.biomoby.client.BaseCmdLineClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" TestingCentral %* From senger at pub.open-bio.org Sun Nov 20 07:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUp0g005060@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv4966/src/Clients Modified Files: CacheRegistryClient.java TestAntWorker.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.7,1.8 TestAntWorker.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/10 08:54:31 1.7 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/20 12:30:51 1.8 @@ -16,8 +16,6 @@ import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; -import java.util.*; - /** * This is a command-line client creating (and removing) a cache of a * Moby registry. It allows to store locally (in a file system) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/16 08:39:48 1.1 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 12:30:51 1.2 @@ -12,16 +12,13 @@ import org.tulsoft.tools.gui.SwingUtils; -import org.apache.tools.ant.DefaultLogger; import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.ExitException; import org.apache.tools.ant.NoBannerLogger; import javax.swing.JFrame; import javax.swing.SwingUtilities; -import java.awt.Dimension; import java.util.Properties; import java.io.PrintStream; import java.io.OutputStream; From senger at pub.open-bio.org Sun Nov 20 07:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqB9005279@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/service/dashboard Modified Files: CommonBoard.java CommonDataTable.java CommonTree.java Dashboard.java DataTypesBoard.java DataTypesTree.java DebuggingPanel.java GeneratorPanel.java NamespacesBoard.java NamespacesTree.java PrimaryDataTable.java PropertyChannel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonBoard.java,1.6,1.7 CommonDataTable.java,1.4,1.5 CommonTree.java,1.18,1.19 Dashboard.java,1.17,1.18 DataTypesBoard.java,1.10,1.11 DataTypesTree.java,1.12,1.13 DebuggingPanel.java,1.3,1.4 GeneratorPanel.java,1.4,1.5 NamespacesBoard.java,1.5,1.6 NamespacesTree.java,1.7,1.8 PrimaryDataTable.java,1.4,1.5 PropertyChannel.java,1.8,1.9 RegistryPanel.java,1.24,1.25 ServiceTypesBoard.java,1.6,1.7 ServiceTypesTree.java,1.9,1.10 ServicesBoard.java,1.6,1.7 ServicesTree.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java 2005/11/07 17:14:46 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java 2005/11/20 12:30:51 1.7 @@ -42,8 +42,8 @@ extends JPanel implements NotificationListener { - private static org.apache.commons.logging.Log log = - org.apache.commons.logging.LogFactory.getLog (CommonBoard.class); +// private static org.apache.commons.logging.Log log = +// org.apache.commons.logging.LogFactory.getLog (CommonBoard.class); protected RegistryModel model; protected PropertyChannel channel; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/10 14:32:42 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/20 12:30:51 1.5 @@ -227,7 +227,6 @@ public void setData (MobyData[] newData) { synchronized (this) { int rowCount = getRowCount(); - int colCount = getColumnCount(); for (int i = 0; i < rowCount; i++) removeRow (i); for (int i = 0; i < newData.length; i++) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/19 18:33:01 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/20 12:30:51 1.19 @@ -156,17 +156,17 @@ public Component getTreeCellRendererComponent (JTree tree, java.lang.Object value, - boolean selected, + boolean isSelected, boolean expanded, boolean leaf, int row, - boolean hasFocus) { + boolean hasAFocus) { // // I will reuse the default rendering done by my parent, // except the change of an icon (for naming contexts) // - Component c = super.getTreeCellRendererComponent (tree, value, selected, - expanded, leaf, row, hasFocus); + Component c = super.getTreeCellRendererComponent (tree, value, isSelected, + expanded, leaf, row, hasAFocus); // add a tool-tip for the root node if (row == 0) { setToolTipText ("Right-click will show other options"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/19 18:33:01 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/20 12:30:51 1.18 @@ -143,6 +143,7 @@ * creates the GUI - but does not show it yet. **************************************************************************/ public Dashboard() { + log.debug ("----------------------- new dashboard start ------------------------"); loadIcons(); loadPanels(); propertyChannel = new PropertyChannel(); @@ -251,13 +252,10 @@ getName()); addMenuBar (frame); - Dimension screenSize = frame.getToolkit().getScreenSize(); - double myWidth = Math.min (screenSize.getWidth(), 1100); - double myHeight = Math.min (screenSize.getHeight() - 25, 900); - Dimension mySize = new Dimension(); - mySize.setSize (myWidth, myHeight); - - SwingUtils.showMainFrame (frame, mySize); + Dimension screenSize = frame.getToolkit().getScreenSize(); + int width = screenSize.width * 4 / 5; + int height = screenSize.height * 5 / 6; + SwingUtils.showMainFrame (frame, width, height); } /************************************************************************** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/12 16:43:47 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/20 12:30:51 1.11 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.DATA_TYPES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_DATA_TYPES); insertProgressBar(); break; case Notifier.DATA_TYPES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.DATA_TYPES_END: case Notifier.DATA_TYPES_CANCELLED: case Notifier.DATA_TYPES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.DATA_TYPES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // some other instance of this class initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/12 16:43:47 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/20 12:30:51 1.13 @@ -49,11 +49,9 @@ RegistryModel registryModel; CommonConsole console; - MobyDataType[] dataTypes = null; boolean showBadGuys = false; boolean showMembers = false; JCheckBoxMenuItem deprecatedBox; - MobyException updateException = null; final static String DATA_TYPES_ACCESS_ERROR = "An error happened when accessing a list of available data types.\n\n" @@ -110,33 +108,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyDataType[] newDataTypes = (newData == null ? null : (MobyDataType[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyDataType[] dataTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newDataTypes); // get data types (unless you already have them) if (newDataTypes == null) { - log.debug ("Asking registry model to update"); dataTypes = registryModel.getDataTypes (source); } else { dataTypes = newDataTypes; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (dataTypes, MobyDataType.getAuthorityComparator()); - else - java.util.Arrays.sort (dataTypes); - } catch (MobyException e) { updateException = e; } @@ -165,7 +158,10 @@ worker.start(); } - void onUpdateDataTree (MobyDataType[] dataTypes) { + void onUpdateDataTree (MobyDataType[] theDataTypes) { + MobyDataType[] dataTypes = copy (theDataTypes); + java.util.Arrays.sort (dataTypes); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -199,8 +195,11 @@ } - void onUpdateDataTreeByAuth (MobyDataType[] dataTypes) { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + void onUpdateDataTreeByAuth (MobyDataType[] theDataTypes) { + MobyDataType[] dataTypes = copy (theDataTypes); + java.util.Arrays.sort (dataTypes, MobyDataType.getAuthorityComparator()); + + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist HashMap nodes = new HashMap (dataTypes.length); @@ -268,6 +267,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyDataType[] copy (MobyDataType[] s) { + synchronized (s) { + MobyDataType[] result = new MobyDataType [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/19 18:33:01 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/20 12:30:51 1.4 @@ -14,7 +14,6 @@ import javax.swing.JLabel; import javax.swing.JButton; import javax.swing.JTextField; -import javax.swing.Icon; import javax.swing.JComponent; import java.awt.GridBagLayout; @@ -42,8 +41,8 @@ /************************************************************************** * **************************************************************************/ - public JComponent getComponent (PropertyChannel propertyChannel) { - setPropertyChannel (propertyChannel); + public JComponent getComponent (PropertyChannel newPropertyChannel) { + setPropertyChannel (newPropertyChannel); JPanel p = new JPanel (new GridBagLayout(), true); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/19 18:33:01 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/20 12:30:51 1.5 @@ -9,11 +9,9 @@ package org.biomoby.service.dashboard; import org.tulsoft.tools.gui.SwingUtils; -import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.JFileChooserWithHistory; import org.biomoby.shared.MobyException; -import org.biomoby.shared.event.Notifier; import javax.swing.JPanel; import javax.swing.JLabel; @@ -23,7 +21,6 @@ import javax.swing.JRadioButton; import javax.swing.ButtonGroup; import javax.swing.JCheckBox; -import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.JSplitPane; import javax.swing.JComponent; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/12 16:43:47 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/20 12:30:51 1.6 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.NAMESPACES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_NAMESPACES); insertProgressBar(); break; case Notifier.NAMESPACES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.NAMESPACES_END: case Notifier.NAMESPACES_CANCELLED: case Notifier.NAMESPACES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.NAMESPACES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/12 16:43:47 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/20 12:30:51 1.8 @@ -36,9 +36,6 @@ RegistryModel registryModel; CommonConsole console; - MobyNamespace[] namespaces = null; - MobyException updateException = null; - final static String NAMESPACES_ACCESS_ERROR = "An error happened when accessing a list of available namespaces.\n\n" + ACCESS_ERROR_INTRO; @@ -69,33 +66,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyNamespace[] newNamespaces = (newData == null ? null : (MobyNamespace[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyNamespace[] namespaces = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newNamespaces); // get namespaces (unless you already have them) if (newNamespaces == null) { - log.debug ("Asking registry model to update"); namespaces = registryModel.getNamespaces (source); } else { namespaces = newNamespaces; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (namespaces, MobyNamespace.getAuthorityComparator()); - else - java.util.Arrays.sort (namespaces); - } catch (MobyException e) { updateException = e; } @@ -119,7 +111,10 @@ worker.start(); } - void onUpdateNamespacesTree (MobyNamespace[] namespaces) { + void onUpdateNamespacesTree (MobyNamespace[] theNamespaces) { + MobyNamespace[] namespaces = copy (theNamespaces); + java.util.Arrays.sort (namespaces); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -131,7 +126,10 @@ } - void onUpdateNamespacesTreeByAuth (MobyNamespace[] namespaces) { + void onUpdateNamespacesTreeByAuth (MobyNamespace[] theNamespaces) { + MobyNamespace[] namespaces = copy (theNamespaces); + java.util.Arrays.sort (namespaces, MobyNamespace.getAuthorityComparator()); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -158,6 +156,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyNamespace[] copy (MobyNamespace[] s) { + synchronized (s) { + MobyNamespace[] result = new MobyNamespace [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/11 08:34:39 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/20 12:30:51 1.5 @@ -165,15 +165,15 @@ return null; } - public Component getTableCellEditorComponent (JTable table, + public Component getTableCellEditorComponent (JTable aTable, Object value, boolean isSelected, - int row, int col) { + int aRow, int aCol) { // remember (used when a namespace is being deleted) - this.table = table; - this.row = row; - this.col = col; + this.table = aTable; + this.row = aRow; + this.col = aCol; // fill combo box with the current namespaces if (value == null) { @@ -288,9 +288,9 @@ return ""; } - private String getDataTypeName (MobyPrimaryData data) { - if (data == null) return ""; - MobyDataType dataType = data.getDataType(); + private String getDataTypeName (MobyPrimaryData theData) { + if (theData == null) return ""; + MobyDataType dataType = theData.getDataType(); if (dataType == null) return ""; String name = dataType.getName(); return (name == null ? "" : name); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/16 08:39:48 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/20 12:30:51 1.9 @@ -185,6 +185,8 @@ ********************************************************************/ protected void logDebug (Object source, String key, Object value) { + if (DashboardProperties.DP_STATUS_MSG.equals (key)) + return; StringBuffer buf = new StringBuffer (100); if (source != null) { buf.append ("["); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/19 18:33:01 1.24 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/20 12:30:51 1.25 @@ -13,7 +13,6 @@ import org.tulsoft.tools.gui.JFileChooserWithHistory; import org.biomoby.shared.MobyException; -import org.biomoby.shared.event.Notifier; import javax.swing.JPanel; import javax.swing.JLabel; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/20 12:30:51 1.7 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.SERVICE_TYPES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_SERVICE_TYPES); insertProgressBar(); break; case Notifier.SERVICE_TYPES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.SERVICE_TYPES_END: case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/12 16:43:47 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/20 12:30:51 1.10 @@ -36,9 +36,6 @@ RegistryModel registryModel; CommonConsole console; - MobyServiceType[] serviceTypes = null; - MobyException updateException = null; - final static String SERVICE_TYPES_ACCESS_ERROR = "An error happened when accessing a list of available service types.\n\n" + ACCESS_ERROR_INTRO; @@ -69,33 +66,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyServiceType[] newServiceTypes = (newData == null ? null : (MobyServiceType[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyServiceType[] serviceTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newServiceTypes); // get service types (unless you already have them) if (newServiceTypes == null) { - log.debug ("Asking registry model to update"); serviceTypes = registryModel.getServiceTypes (source); } else { serviceTypes = newServiceTypes; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (serviceTypes, MobyServiceType.getAuthorityComparator()); - else - java.util.Arrays.sort (serviceTypes); - } catch (MobyException e) { updateException = e; } @@ -119,7 +111,10 @@ worker.start(); } - void onUpdateServiceTypesTree (MobyServiceType[] serviceTypes) { + void onUpdateServiceTypesTree (MobyServiceType[] theServiceTypes) { + MobyServiceType[] serviceTypes = copy (theServiceTypes); + java.util.Arrays.sort (serviceTypes); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -148,7 +143,10 @@ } - void onUpdateServiceTypesTreeByAuth (MobyServiceType[] serviceTypes) { + void onUpdateServiceTypesTreeByAuth (MobyServiceType[] theServiceTypes) { + MobyServiceType[] serviceTypes = copy (theServiceTypes); + java.util.Arrays.sort (serviceTypes, MobyServiceType.getAuthorityComparator()); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -175,6 +173,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyServiceType[] copy (MobyServiceType[] s) { + synchronized (s) { + MobyServiceType[] result = new MobyServiceType [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry (or from the current * cache). If you want to update also cache, use the cache buttons * - they will invoke this method also after updating the cache. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/20 12:30:51 1.7 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.AUTHORITIES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_SERVICES); insertProgressBar(); break; case Notifier.AUTHORITIES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.AUTHORITIES_END: case Notifier.AUTHORITIES_CANCELLED: case Notifier.AUTHORITIES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.AUTHORITIES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/20 12:30:51 1.7 @@ -51,11 +51,6 @@ RegistryModel registryModel; CommonConsole console; - MobyService[] services = null; - MobyServiceType[] serviceTypes = null; - MobyDataType[] dataTypes = null; - MobyException updateException = null; - final static String SERVICES_ACCESS_ERROR = "An error happened when accessing a list of available services.\n\n" + ACCESS_ERROR_INTRO; @@ -104,33 +99,30 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyService[] newServices = (newData == null ? null : (MobyService[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyService[] services = null; + MobyServiceType[] serviceTypes = null; + MobyDataType[] dataTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newServices); // get services (unless you already have them) if (newServices == null) { - log.debug ("Asking registry model to update"); services = registryModel.getServices (source); } else { services = newServices; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (services, MobyService.getAuthorityComparator()); - else - java.util.Arrays.sort (services); - // ...and perhaps add some other types if (sorted == SORTED_BY_SERVICE_TYPE) serviceTypes = registryModel.getServiceTypes (source); @@ -169,7 +161,10 @@ worker.start(); } - void onUpdateServicesTree (MobyService[] services) { + void onUpdateServicesTree (MobyService[] theServices) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -194,8 +189,11 @@ } - void onUpdateServicesTreeByAuth (MobyService[] services) { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + void onUpdateServicesTreeByAuth (MobyService[] theServices) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services, MobyService.getAuthorityComparator()); + + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist HashMap nodes = new HashMap (services.length); @@ -220,8 +218,11 @@ tModel.reload(); } - void onUpdateServicesTreeByType (MobyService[] services, + void onUpdateServicesTreeByType (MobyService[] theServices, MobyServiceType[] serviceTypes) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -283,9 +284,12 @@ tModel.reload(); } - void onUpdateServicesTreeByData (MobyService[] services, + void onUpdateServicesTreeByData (MobyService[] theServices, MobyDataType[] dataTypes, int whatData) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -361,6 +365,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyService[] copy (MobyService[] s) { + synchronized (s) { + MobyService[] result = new MobyService [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ From senger at pub.open-bio.org Sun Nov 20 07:30:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUoil005016@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv4966/docs Modified Files: EclipseAndJMoby.html WindowsAndJMoby.html Log Message: moby-live/Java/docs EclipseAndJMoby.html,1.6,1.7 WindowsAndJMoby.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2005/09/21 07:56:55 1.6 +++ /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2005/11/20 12:30:50 1.7 @@ -29,7 +29,7 @@ Because it was painful (I have yet to find a good reference guide for Eclipse) I would like to share my experiences here. Please feel free to add there yours, or correct my observations. Also, there are "more -ways to do" things in Eclipse (but not as many as in Perl ) so the steps described below may not represent the only way, and I do not claim that are the most efficient - but TGT (The Good Thing) is that they work.

    @@ -144,9 +144,7 @@

    Create a new project

    File -> New -> Project. Select Java -> Java Project. I could not find what is the -difference between selecting Java Project and Java -> -Java project. I always used the latter one.

    +class="step">Java -> Java Project.

    Type a project name (I use jMoby), check Create project from existing source, and type the @@ -188,17 +186,11 @@ We are doing this step now, before telling Eclipse where the libraries are (because we first need to have them in order to show them to -Eclipse, don't we?). But Eclipse already found some 3rd-party -libraries in jMoby and listed them in our project. These are, however, -from the included Ant, and we do not need them on the CLASSPATH when -we execute our programs. So remove them (before they mixed together -with the real 3rd-party libraries that we are going to add in a -minute): Right-click on the project name: (jMoby) --> Properties -> Java Build Path. Select tab Libraries, and remove from there everything except -JRE System Library.

    +Eclipse, don't we?). Eclipse already found some 3rd-party libraries in +jMoby and listed them in our project. These are from the included Ant +(they were not needed for jMoby programs until recently).

    -Then, it's time for our real libraries. Open an Ant view by Window -> Show View -> Ant. Then right-click and select Add Buildfiles. Select build.xml from jMoby. You can Hide @@ -377,7 +369,7 @@

    Martin Senger
    -Last modified: Wed Sep 21 15:07:18 2005 +Last modified: Sun Nov 20 19:53:57 2005
    =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html 2005/09/21 07:56:55 1.1 +++ /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html 2005/11/20 12:30:50 1.2 @@ -139,6 +139,26 @@

    Too many command-line parameters

    +Update (November 2005): +
    + +I found that Windows actually understand a similar construct as UNIX +does: %* which is substituted with all arguments from the +command line: + +
    + at echo off
    +java Program %*
    +
    + +Therefore, this section would not be needed. But, as stated below, to +have a way how to use often used subset of command-line arguments from +a file is useful on its own, so I keep this section here.

    + +

    +End of Update

    + + I still know only how to pass maximum nine parameters to a Windows batch script (does anybody knows how to pass more?): @@ -240,7 +260,7 @@

    Martin Senger
    -Last modified: Wed Sep 21 16:47:24 2005 +Last modified: Sun Nov 20 20:05:06 2005
    From mwilkinson at pub.open-bio.org Sun Nov 20 10:45:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 10:45:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201545.jAKFjaCs005829@pub.open-bio.org> mwilkinson Sun Nov 20 10:45:35 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby In directory pub.open-bio.org:/tmp/cvs-serv5810/MOBY/Adaptor/moby Modified Files: queryapi.pm Log Message: added lsid retrieval to adaptor for getServiceNames call moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/08/31 22:28:22 1.30 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/11/20 15:45:35 1.31 @@ -50,12 +50,12 @@ =head2 new Title : new - Usage : my $MOBY = MOBY::Client::Central->new(Registries => \%regrefs) + Usage : my $MOBY = MOBY::Client::Central->new(%args) Function : connect to one or more MOBY-Central registries for searching Returns : MOBY::Client::Central object - Args : Registries - optional. - Notes : Each registry must have a different + Args : + Notes : =cut @@ -223,7 +223,7 @@ Title : driver Usage : my $un = $API->driver($arg) - Function : get/set string name of driver module (e.g. DBD::mySQL) + Function : get/set string name of DSI driver module (e.g. DBI:mySQL) Returns : String (driver) Args : String (driver) - optional. @@ -340,7 +340,6 @@ =cut - sub delete_collection_input{ die "delete_collection_input not implemented in adaptor\n"; } @@ -412,6 +411,7 @@ # # simple_output table functions # + =head2 query_simple_input Title : query_simple_input @@ -467,7 +467,6 @@ =cut - sub delete_simple_input{ die "delete_simple_input not implemented in adaptor\n"; } From mwilkinson at pub.open-bio.org Sun Nov 20 10:45:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 10:45:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201545.jAKFjaq1005848@pub.open-bio.org> mwilkinson Sun Nov 20 10:45:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi In directory pub.open-bio.org:/tmp/cvs-serv5810/MOBY/Adaptor/moby/queryapi Modified Files: mysql.pm Log Message: added lsid retrieval to adaptor for getServiceNames call moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.74,1.75 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/09/22 16:23:13 1.74 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/11/20 15:45:35 1.75 @@ -1260,7 +1260,7 @@ sub get_service_names{ my ($self, %args) = @_; my $dbh = $self->dbh; - my $statement = "select authority_uri, servicename from authority as a, service_instance as s where s.authority_id = a.authority_id"; + my $statement = "select authority_uri, servicename, lsid from authority as a, service_instance as s where s.authority_id = a.authority_id"; my @bindvalues = (); my $result = do_query($dbh, $statement, @bindvalues); From mwilkinson at pub.open-bio.org Sun Nov 20 11:05:05 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 11:05:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201605.jAKG55Ee005989@pub.open-bio.org> mwilkinson Sun Nov 20 11:05:05 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv5966/t Modified Files: Client-Central.t Client-Service.t Log Message: added lsid retrieval test for getServiceNames to teh test harness, also trying to figure out why client::service is failing tests moby-live/Perl/t Client-Central.t,1.42,1.43 Client-Service.t,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/09/16 16:36:39 1.42 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/20 16:05:05 1.43 @@ -475,6 +475,13 @@ ok(grep(/mysecondservice/, @serviceNames), "'mysecondservice' not found") or diag("retrieveServiceNames didn't return mysecondservice"); +$r = $C->retrieveServiceNames(as_lsid=>1); +isa_ok($r, "HASH", "Service Names Hash") or diag("retrieveServiceNames as lsid didn't return a hashref") ; +isa_ok($r->{$RegSmpl{authURI}}, 'ARRAY') or diag("retrieveServiceNames as lsid didn't return a hasref of arrayrefs"); +my @serviceNamesLSID = @{$r->{$RegSmpl{authURI}}}; +ok(grep(/urn\:lsid/, @serviceNamesLSID), "'myfirstservice' lsid not found") + or diag("retrieveServiceNames as LSID didn't return LSIDs"); + $r = $C->deregisterService( serviceName => $RegSmpl{serviceName}, authURI => $RegSmpl{authURI} ); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/09/16 16:38:47 1.5 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:05:05 1.6 @@ -37,7 +37,9 @@ my ($s, $r) = $C->findService( authURI => 'www.illuminae.com', name => 'getDragonLocusAlleles' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); +ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); my $wsdl = $C->retrieveService($$s[0]); +ok($wsdl =~ /WSDL/) or diag("retrieveService didn't return a WSDL file"); $service = MOBY::Client::Service->new (service => $wsdl); isa_ok($service, "MOBY::Client::Service") or diag("Expected new to return MOBY::Client::Service"); From mwilkinson at pub.open-bio.org Sun Nov 20 11:13:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 11:13:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201613.jAKGDNOt006068@pub.open-bio.org> mwilkinson Sun Nov 20 11:13:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv6049/MOBY/Client Modified Files: Central.pm Log Message: figured out why perl client code wasn't returning LSIDs moby-live/Perl/MOBY/Client Central.pm,1.126,1.127 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v retrieving revision 1.126 retrieving revision 1.127 diff -u -r1.126 -r1.127 --- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/09/27 16:21:04 1.126 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/20 16:13:23 1.127 @@ -1302,7 +1302,7 @@ =cut sub retrieveServiceNames { - my ($self, %args) = shift; + my ($self, %args) = @_; my $reg = $args{registry}; my $aslsid = $args{as_lsid}; From mwilkinson at pub.open-bio.org Sun Nov 20 11:15:30 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 11:15:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201615.jAKGFUuH006134@pub.open-bio.org> mwilkinson Sun Nov 20 11:15:30 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv6115/t Modified Files: Client-Service.t Log Message: fixed test for client::service moby-live/Perl/t Client-Service.t,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:05:05 1.6 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:15:30 1.7 @@ -34,7 +34,7 @@ # Find a service at MOBY Central, try to create a local instance. my $C = MOBY::Client::Central->new(); -my ($s, $r) = $C->findService( authURI => 'www.illuminae.com', +my ($s, $r) = $C->findService( authURI => 'bioinfo.icapture.ubc.ca', name => 'getDragonLocusAlleles' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); From senger at pub.open-bio.org Sun Nov 20 12:38:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 12:38:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201738.jAKHcdpb006330@pub.open-bio.org> senger Sun Nov 20 12:38:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv6311/src/Clients Modified Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 12:30:51 1.2 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 17:38:39 1.3 @@ -1,4 +1,4 @@ -// TestArnWorker.java +// TestAntWorker.java // // Created: November 2005 // From senger at pub.open-bio.org Sun Nov 20 12:38:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 12:38:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201738.jAKHce4b006349@pub.open-bio.org> senger Sun Nov 20 12:38:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv6311/src/config Modified Files: log4j.properties Log Message: moby-live/Java/src/config log4j.properties,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/log4j.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/10/28 07:58:53 1.1 +++ /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/20 17:38:39 1.2 @@ -19,15 +19,20 @@ # $Id$ # ------------------------------------------------------------ -# Set root logger level to INFO and its only appender to A1. +# create A1 logger and set its severity level: +# -------------------------------------------- +##log4j.rootLogger=DEBUG, A1 log4j.rootLogger=INFO, A1 -# A1 is set to be a ConsoleAppender. +# set properties for A1 logger: +# ----------------------------- log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. +#log4j.appender.A1=org.apache.log4j.FileAppender +log4j.appender.A1.file=./jMoby-debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{1} %x - %m%n +# the rest: +# --------- # Ignore less significant messages from the third-party packages log4j.logger.org.apache.axis=WARN From senger at pub.open-bio.org Sun Nov 20 12:43:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 12:43:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201743.jAKHh2x5006534@pub.open-bio.org> senger Sun Nov 20 12:43:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/doc-files In directory pub.open-bio.org:/tmp/cvs-serv6519/src/main/org/biomoby/service/dashboard/doc-files Added Files: moby-dashboard-1.jpg moby-dashboard-2.jpg Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/doc-files moby-dashboard-1.jpg,NONE,1.1 moby-dashboard-2.jpg,NONE,1.1 From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRDo009791@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv9749/docs Modified Files: ChangeLog Moses-deploy.html Log Message: moby-live/Java/docs ChangeLog,1.51,1.52 Moses-deploy.html,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/12 16:43:47 1.51 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/21 17:17:27 1.52 @@ -1,3 +1,8 @@ +2005-11-22 Martin Senger + + * Fixed getting XML parsers in CentralImpl.java in order to be + thread-safe. + 2005-11-12 Martin Senger * Changed MobyException to use initCause() and log.debug to better =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/Moses-deploy.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2005/09/22 16:07:08 1.2 +++ /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2005/11/21 17:17:27 1.3 @@ -306,7 +306,7 @@
    -./build-dev.sh deploy-services
    +./build-dev.sh undeploy-services
     
    @@ -419,7 +419,7 @@
    Martin Senger
    -Last modified: Thu Sep 22 18:24:09 2005 +Last modified: Mon Nov 21 23:55:46 2005
    From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRlP009768@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv9749 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.42,1.43 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/19 18:33:00 1.42 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/21 17:17:27 1.43 @@ -102,6 +102,9 @@ + + + + + From senger at pub.open-bio.org Mon Nov 21 12:17:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHSfQ009868@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv9749/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.36,1.37 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/20 12:30:51 1.36 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/21 17:17:27 1.37 @@ -24,6 +24,8 @@ import org.tulsoft.tools.soap.axis.AxisUtils; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -94,7 +96,6 @@ private URL endpoint; private String uri; - private javax.xml.parsers.DocumentBuilder docBuilder; protected boolean debug = false; /** Default location (endpoint) of a Moby registry. */ @@ -103,6 +104,20 @@ /** Default namespace used by the contacted Moby registry. */ public static final String DEFAULT_NAMESPACE = "http://mobycentral.icapture.ubc.ca/MOBY/Central"; + /** + * Thread local that gives each thread its own + * DocumentBuilderFactory (since it is not thread-safe). Code taken + * from Apache's JaxpUtils. + */ + public static ThreadLocal DOCUMENT_BUILDER_FACTORIES = new ThreadLocal() { + protected synchronized Object initialValue() { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware (true); + return dbf; + } + }; + + /************************************************************************* * Default constructor. It connects to a default Moby registry * (as defined in {@link #DEFAULT_ENDPOINT}) using a default namespace @@ -147,21 +162,27 @@ } this.uri = namespace; - // This method should work on almost all platforms to get an XML parser instance - try { - javax.xml.parsers.DocumentBuilderFactory dbf = - javax.xml.parsers.DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - docBuilder = dbf.newDocumentBuilder(); - } catch (Exception e) { - throw new MobyException ("Could not configure an XML parser: " + e, e); - } - cache = new Hashtable(); useCache = true; } /************************************************************************* + * Loads a DOM Document from an InputStream. Uses thread-safe + * mechanism. + *************************************************************************/ + public static Document loadDocument (InputStream input) + throws MobyException { + try { + DocumentBuilderFactory dbf + = (DocumentBuilderFactory)DOCUMENT_BUILDER_FACTORIES.get(); + DocumentBuilder db = dbf.newDocumentBuilder(); + return (db.parse (input)); + } catch (Exception e) { + throw new MobyException ("Problem with reading XML input: " + e.toString(), e); + } + } + + /************************************************************************* * Call 'method' with 'parameters' and return its result. *************************************************************************/ protected Object doCall (String method, Object[] parameters) @@ -237,12 +258,7 @@ String id = "", success = "0", message = "", rdf = ""; // parse returned XML - Document document = null; - try { - document=docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } + Document document = loadDocument (new ByteArrayInputStream (xml.getBytes())); Element root = document.getDocumentElement(); NodeList children = root.getChildNodes(); @@ -465,15 +481,8 @@ *************************************************************************/ public MobyService[] extractServices (String xml) throws MobyException { -// if (xmk == null) -// throw new MobyException () - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } + Document document = loadDocument (new ByteArrayInputStream (xml.getBytes())); NodeList list = document.getElementsByTagName ("Service"); MobyService[] results = new MobyService [list.getLength()]; for (int i = 0; i < list.getLength(); i++) { @@ -671,16 +680,9 @@ String result = (String)doCall ("retrieveServiceNames", new Object[] {}); - // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceName"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -720,13 +722,7 @@ // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); - } catch (Exception e) { - throw new MobyException (e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceName"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -771,13 +767,7 @@ new Object[] {}); // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceProvider"); String[] results = new String [list.getLength()]; for (int i = 0; i < list.getLength(); i++) @@ -830,12 +820,7 @@ throws MobyException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceType"); if (list == null || list.getLength() == 0) return new MobyServiceType[] {}; @@ -886,13 +871,7 @@ throws MobyException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getDocumentElement().getElementsByTagName ("Namespace"); if (list == null || list.getLength() == 0) { return new MobyNamespace[] {}; @@ -958,13 +937,7 @@ // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Object"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -1025,13 +998,7 @@ throws MobyException, NoSuccessException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream (xmlSource.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (xmlSource.getBytes())); NodeList list = document.getElementsByTagName ("retrieveObjectDefinition"); if (list == null || list.getLength() == 0) throw new NoSuccessException ("Data Type name was not found.", @@ -1135,10 +1102,7 @@ }); // parse returned XML - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); Element service = document.getDocumentElement(); Node wsdl = service.getFirstChild(); if (wsdl == null) @@ -1555,10 +1519,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -1611,10 +1572,7 @@ // parse returned XML Map results = new HashMap(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { @@ -1668,10 +1626,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); // it should always be just one element in this list @@ -1730,13 +1685,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try { - document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Resource"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRKX009811@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv9749/src/Clients Modified Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 17:38:39 1.3 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/21 17:17:27 1.4 @@ -12,6 +12,7 @@ import org.tulsoft.tools.gui.SwingUtils; +import org.apache.tools.ant.Project; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.ExitException; import org.apache.tools.ant.NoBannerLogger; @@ -41,11 +42,11 @@ Properties props = new Properties(); SimpleAnt ant = new SimpleAnt(); -// DefaultLogger logger = new DefaultLogger(); NoBannerLogger logger = new NoBannerLogger(); logger.setOutputPrintStream (new PrintStream (new ConsoleStream (false))); logger.setErrorPrintStream (new PrintStream (new ConsoleStream (false))); ant.addBuildListener (logger); +// ant.setMsgOutputLevel (Project.MSG_VERBOSE); ant.startAnt (args, props); } From senger at pub.open-bio.org Mon Nov 21 12:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRGN009848@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv9749/src/config Modified Files: log4j.properties run-any-client run-any-client.bat run-dashboard run-dashboard.bat Log Message: moby-live/Java/src/config log4j.properties,1.2,1.3 run-any-client,1.5,1.6 run-any-client.bat,1.6,1.7 run-dashboard,1.3,1.4 run-dashboard.bat,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/log4j.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/20 17:38:39 1.2 +++ /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/21 17:17:27 1.3 @@ -28,7 +28,7 @@ # ----------------------------- log4j.appender.A1=org.apache.log4j.ConsoleAppender #log4j.appender.A1=org.apache.log4j.FileAppender -log4j.appender.A1.file=./jMoby-debug.log +#log4j.appender.A1.file=./jMoby-debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{1} %x - %m%n =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/15 03:25:51 1.5 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/21 17:17:27 1.6 @@ -14,6 +14,7 @@ CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/20 12:30:51 1.6 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/21 17:17:27 1.7 @@ -5,6 +5,7 @@ set CP= for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" set CP=build\classes;%CP% set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/20 12:30:51 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/21 17:17:27 1.4 @@ -5,6 +5,19 @@ # $Id$ # ---------------------------------------------------- +# --- setup JAVA_HOME +if [ -z "$JAVA_HOME" ] ; then + JAVA=`which java` + if [ -z "$JAVA" ] ; then + echo "Cannot find JAVA. Please set your PATH." + exit 1 + else + JAVA_BIN=`dirname $JAVA` + JAVA_HOME=$JAVA_BIN/.. + export JAVA_HOME + fi +fi + PROJECT_HOME=@PROJECT_HOME@ CLASSPATH=${PROJECT_HOME}/build/classes @@ -15,5 +28,7 @@ CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH -exec java -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" +JAVA=$JAVA_HOME/bin/java +exec $JAVA -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/20 12:30:51 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/21 17:17:27 1.5 @@ -1,10 +1,20 @@ @echo off +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + set "PROJECT_HOME=@PROJECT_HOME@" cd "%PROJECT_HOME%" set CP= for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" set CP=build\classes;%CP% set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% @@ -12,4 +22,7 @@ set CP=build\others\samples;%CP% set CP=build\lib\dashboard-config.jar;%CP% -java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* + +:end From senger at pub.open-bio.org Mon Nov 21 12:46:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:46:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211746.jALHk4YK010085@pub.open-bio.org> senger Mon Nov 21 12:46:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv10066/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.15,1.16 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/21 17:46:04 1.16 @@ -607,7 +607,7 @@ } /************************************************************************** - * Update namespaces from a moby registry - this easier than with + * Update namespaces from a moby registry - this is easier than with * other entities: just get a new LIST_FILE. *************************************************************************/ protected boolean fillNamespacesCache() @@ -933,6 +933,7 @@ Properties result = new Properties(); result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint()); result.put (CACHE_PROP_COUNT, new Integer (0)); + result.put (CACHE_PROP_SIZE, new Long (0)); if (cacheDir == null) return result; String realName = null; try { @@ -969,8 +970,10 @@ ageOfOldest = Math.min (ageOfOldest, age); } } - result.put (CACHE_PROP_COUNT, new Integer (realCount)); - result.put (CACHE_PROP_SIZE, new Long (realSize)); + if (! CACHE_PART_NAMESPACES.equals (id)) { + result.put (CACHE_PROP_COUNT, new Integer (realCount)); + result.put (CACHE_PROP_SIZE, new Long (realSize)); + } if (ageOfYoungest > 0) result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest)); if (ageOfOldest < Long.MAX_VALUE) @@ -987,7 +990,8 @@ StringBuffer buf = new StringBuffer(); buf.append (props.getProperty (CACHE_PROP_NAME) + "\n"); add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL)); - add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); + if ( ((Integer)props.get (CACHE_PROP_COUNT)).intValue() > 0 ) + add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); Object value = props.get (CACHE_PROP_OLDEST); if (value != null) { long age = ((Long)value).longValue(); @@ -1000,7 +1004,8 @@ add (buf, "Youngest entry created", new Date (age)); add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age)); } - add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); + if ( ((Long)props.get (CACHE_PROP_SIZE)).longValue() > 0 ) + add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); add (buf, "Location", props.get (CACHE_PROP_LOCATION)); return new String (buf); } From senger at pub.open-bio.org Tue Nov 22 13:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 13:03:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SQS013418@pub.open-bio.org> senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv13384/src/Clients Added Files: TestLog.java Log Message: moby-live/Java/src/Clients TestLog.java,NONE,1.1 From senger at pub.open-bio.org Tue Nov 22 13:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 13:03:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SGE013403@pub.open-bio.org> senger Tue Nov 22 13:03:27 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv13384 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.43,1.44 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/21 17:17:27 1.43 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/22 18:03:27 1.44 @@ -1530,7 +1530,7 @@ - + senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv13384/src/config Modified Files: run-any-client run-any-client.bat run-cache-client run-dashboard run-service Log Message: moby-live/Java/src/config run-any-client,1.6,1.7 run-any-client.bat,1.7,1.8 run-cache-client,1.1,1.2 run-dashboard,1.4,1.5 run-service,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/21 17:17:27 1.6 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/22 18:03:28 1.7 @@ -9,13 +9,13 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH -CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH exec java -cp $CLASSPATH "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/21 17:17:27 1.7 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/22 18:03:28 1.8 @@ -6,10 +6,10 @@ for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" -set CP=build\classes;%CP% -set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% set CP=build\others\skeletons;%CP% set CP=build\others\samples;%CP% +set CP=build\classes;%CP% +set CP=build\Clients;%CP% java -classpath "%CP%" %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cache-client,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/run-cache-client 2004/11/14 16:12:50 1.1 +++ /home/repository/moby/moby-live/Java/src/config/run-cache-client 2005/11/22 18:03:28 1.2 @@ -10,8 +10,8 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'` +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH CacheRegistryClient "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/21 17:17:27 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/22 18:03:28 1.5 @@ -20,15 +20,15 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH JAVA=$JAVA_HOME/bin/java exec $JAVA -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-service,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/run-service 2005/08/26 06:27:03 1.1 +++ /home/repository/moby/moby-live/Java/src/config/run-service 2005/11/22 18:03:28 1.2 @@ -10,11 +10,11 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'` CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH exec java -cp $CLASSPATH org.biomoby.client.BaseCmdLineClient "$@" From senger at pub.open-bio.org Tue Nov 22 13:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 13:03:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SiU013550@pub.open-bio.org> senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv13384/src/main/org/biomoby/service/dashboard/images Added Files: smallDeploy.gif smallDeploy_dis.gif smallUnDeploy.gif smallUnDeploy_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallDeploy.gif,NONE,1.1 smallDeploy_dis.gif,NONE,1.1 smallUnDeploy.gif,NONE,1.1 smallUnDeploy_dis.gif,NONE,1.1 From mwilkinson at pub.open-bio.org Tue Nov 22 15:05:01 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 15:05:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222005.jAMK51xA013984@pub.open-bio.org> mwilkinson Tue Nov 22 15:05:01 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv13959/t Modified Files: Client-Central.t Client-Service.t Log Message: modified the test suite so that it connects to whatever MOBY Central is set as the default in the environment. The test suite will function on a registry that is empty *except for the bootstrap object ontology*. It also works under Windows using nmake test. moby-live/Perl/t Client-Central.t,1.43,1.44 Client-Service.t,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/20 16:05:05 1.43 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/22 20:05:00 1.44 @@ -14,9 +14,36 @@ use Test::More 'no_plan'; #skip_all => "Turn off for development"; # See perldoc Test::More for details use strict; use Data::Dumper; + +print STDERR <new( - Registries => { # URL/URI should be specific, not just "localhost" - mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl', - URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'} - } - ); + my $C = MOBY::Client::Central->new(); my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); $r = $C->deregisterService( serviceName => 'myfirstservice', authURI => 'test.suite.com' ); @@ -46,15 +68,19 @@ }; # Can we connect to the registry? -my $C = MOBY::Client::Central->new( - Registries => { # URL/URI should be specific, not just "localhost" - mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl', - URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'} - } - ); +my $C = MOBY::Client::Central->new(); isa_ok( $C, 'MOBY::Client::Central',"Connected to test MOBY Central") or die("Cannot Connect to MOBY Central... cannot continue?"); +print STDERR <Registries->{mobycentral}->{URL},"\n\n\n"; + + ############ ENFORCE REGISTRY API ############### # First, mandatory methods for all registries. =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:15:30 1.7 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/22 20:05:00 1.8 @@ -22,7 +22,15 @@ BEGIN { use_ok('MOBY::Client::Service') }; END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterService( serviceName => 'myfirstservice', + authURI => 'test.suite.com' ); }; @@ -34,8 +42,25 @@ # Find a service at MOBY Central, try to create a local instance. my $C = MOBY::Client::Central->new(); -my ($s, $r) = $C->findService( authURI => 'bioinfo.icapture.ubc.ca', - name => 'getDragonLocusAlleles' ); +my %RegSmpl = ( serviceName => "myfirstservice", + serviceType => "Retrieval", + authURI => "test.suite.com", + contactEmail => 'your at mail.address', + description => "this is my first service", + category => "moby", + URL => "http://illuminae/cgi-bin/service.pl", + input => [ + ['articleName1', [Object => []]], # Simple + ], + output => [ + ['articleName2', [String => []]], # Simple + ], + ); + +# Service name can't start with numeric +my $r = $C->registerService( %RegSmpl ); +my ($s, $err) = $C->findService( authURI => 'test.suite.com', + name => 'myfirstservice' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); my $wsdl = $C->retrieveService($$s[0]); From mwilkinson at pub.open-bio.org Tue Nov 22 16:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 16:33:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNbe014235@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv14216/MOBY/Client Modified Files: OntologyServer.pm Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/MOBY/Client OntologyServer.pm,1.14,1.15 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm 2005/09/27 00:01:24 1.14 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm 2005/11/22 21:33:23 1.15 @@ -124,6 +124,7 @@ $self->{$attrname} = $self->_default_for( $attrname ); } } + $self->host($ENV{MOBY_ONTOLOGYSERVER}) if ($ENV{MOBY_ONTOLOGYSERVER}); return undef unless $self->host; return $self; } From mwilkinson at pub.open-bio.org Tue Nov 22 16:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 16:33:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNvK014254@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/scripts In directory pub.open-bio.org:/tmp/cvs-serv14216/scripts Modified Files: OntologyServer.cgi Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/scripts OntologyServer.cgi,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi 2005/09/27 00:01:24 1.5 +++ /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi 2005/11/22 21:33:23 1.6 @@ -1,7 +1,6 @@ -#!/usr/bin/perl -w +#!perl -w use CGI qw/:standard/; -use lib "/usr/local/apache/cgi-bin/MOBY05"; use MOBY::OntologyServer; use strict; From mwilkinson at pub.open-bio.org Tue Nov 22 16:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 16:33:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNtr014278@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv14216/t Modified Files: Client-OntologyServer.t CommonSubs.t Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/t Client-OntologyServer.t,1.5,1.6 CommonSubs.t,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t 2005/09/27 00:06:24 1.5 +++ /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t 2005/11/22 21:33:23 1.6 @@ -15,11 +15,50 @@ use Test::More 'no_plan'; #skip_all => "Skipped for development"; #'no_plan'; # perldoc Test::More for details use strict; use MOBY::Client::OntologyServer; -#Is the client-code even installed? -BEGIN { use_ok('MOBY::Client::OntologyServer') }; - +use MOBY::Client::Central; +BEGIN { use_ok('MOBY::Client::OntologyServer'); + # initialize with a couple of useless things that we can guarantee to find + my $C = MOBY::Client::Central->new(); + + my %Namespace = ( namespaceType => 'Rub1', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + my $r = $C->registerNamespace( %Namespace ); + %Namespace = ( namespaceType => 'Rub2', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + $r = $C->registerNamespace( %Namespace ); + my %ServiceType = ( serviceType => "Rub1", + description => "a human-readable description of the service", + contactEmail => 'your at email.address', + authURI => "test.suite.com", + Relationships => { ISA => ['Service'] } + ); + $r = $C->registerServiceType( %ServiceType ); + %ServiceType = ( serviceType => "Rub2", + description => "a human-readable description of the service", + contactEmail => 'your at email.address', + authURI => "test.suite.com", + Relationships => { ISA => ['Service'] } + ); + $r = $C->registerServiceType( %ServiceType );}; + END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterNamespace( namespaceType => 'Rub1' ); + $r = $C->deregisterNamespace( namespaceType => 'Rub2' ); + $r = $C->deregisterServiceType( serviceType => 'Rub2' ); + $r = $C->deregisterServiceType( serviceType => 'Rub2' ); }; @@ -28,6 +67,29 @@ objectExists serviceExists namespaceExists /); my $os = MOBY::Client::OntologyServer->new(); + +print STDERR <host,"\n\n\n"; + + foreach (@autoload) {eval{$os->$_};} # Call all AUTOLOAD methods, to create them. can_ok("MOBY::Client::OntologyServer", @API) or diag("OntologyServer doesn't implement full API"); @@ -47,14 +109,9 @@ # Start fresh.... $os = MOBY::Client::OntologyServer->new(); -################ CHECK THAT VALID STUFF RETURNS CORRECTLY ########## -# -# It would really be better not to have literal lists of valid namespaces here, -# Can we pull the entire list of valid namespaces in programmatically from somewhere, -# and check them all here? Ditto for Objects, Service-types -# + my ($success, $msg, $existingURI); -my @check_ns = qw/SGD NCBI_gi GO FB PMID/; # These seem pretty solid +my @check_ns = qw/Rub1 Rub2/; # These seem pretty solid foreach (@check_ns) { ($success, $msg, $existingURI) = $os->namespaceExists( term => $_); is($success, 1) @@ -70,10 +127,7 @@ or diag("Object '$_' reported erroneously as non-existent."); } -my @check_servicetype = qw/Alignment Analysis Conversion Edit -NCBI_Blast Parsing SetIntersection SetOperation SetUnion -Retrieval Registration Resolution -StructuralPrediction/; # Service types don't change much, but who knows.... +my @check_servicetype = qw/Rub1 Rub2/; # Service types don't change much, but who knows.... foreach (@check_servicetype) { ($success, $msg, $existingURI) = $os->serviceExists(term => $_); is($success, 1) =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/CommonSubs.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/t/CommonSubs.t 2005/09/21 19:08:28 1.3 +++ /home/repository/moby/moby-live/Perl/t/CommonSubs.t 2005/11/22 21:33:23 1.4 @@ -21,10 +21,38 @@ use XML::LibXML; use MOBY::MobyXMLConstants; +use MOBY::Client::Central; +BEGIN { use_ok('MOBY::Client::OntologyServer'); + # initialize with a couple of useless things that we can guarantee to find + my $C = MOBY::Client::Central->new(); + + my %Namespace = ( namespaceType => 'Rub1', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + my $r = $C->registerNamespace( %Namespace ); + %Namespace = ( namespaceType => 'Rub2', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + $r = $C->registerNamespace( %Namespace ); +}; + END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterNamespace( namespaceType => 'Rub1' ); + $r = $C->deregisterNamespace( namespaceType => 'Rub2' ); }; + my @must_implement = qw/ collectionResponse complexResponse @@ -150,7 +178,7 @@ # be returned; other articlenames will generate a 'undef' response, so that the number of inputs # matches the number of outputs. -my @NS = ("NCBI_gi", "SGD"); +my @NS = ("Rub1", "Rub2"); my $articles = [ XML_maker(""), XML_maker(""), XML_maker("") @@ -177,7 +205,7 @@ or diag("Wrong number of Simple Articles IDs returned " . "(expected zero for bogus namespace)"); -is(scalar getSimpleArticleIDs('SGD_LOCUS', $articles), scalar @{$articles}) +is(scalar getSimpleArticleIDs('Rub1', $articles), scalar @{$articles}) or diag("Wrong number of Simple Articles IDs returned " . "(expected zero for valid but unused namespace)"); @@ -300,7 +328,7 @@ } } # Check that bona-fide namespaces are valid, regardless of position in the list of valid namespaces -my @ns = ('SGD', 'SGD_LOCUS'); +my @ns = ('Rub1', 'Rub2'); foreach (@ns) { ok (validateThisNamespace($_, @ns), "Validate namespace") or diag("Namespace ($_) not in list of namespaces"); From senger at pub.open-bio.org Tue Nov 22 21:48:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 21:48:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511230248.jAN2me8U014961@pub.open-bio.org> senger Tue Nov 22 21:48:40 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv14926/src/main/org/biomoby/service/dashboard Modified Files: AntModel.java DashboardProperties.java DeploymentTable.java GeneratorPanel.java NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,1.4,1.5 DashboardProperties.java,1.20,1.21 DeploymentTable.java,1.1,1.2 GeneratorPanel.java,1.8,1.9 NOTES,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2005/11/22 18:03:28 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2005/11/23 02:48:40 1.5 @@ -27,6 +27,8 @@ import java.util.Vector; import java.util.Enumeration; import java.util.Properties; +import java.util.Map; +import java.util.Iterator; import java.io.File; /** @@ -212,35 +214,17 @@ public void mosesDeploy() throws MobyException { -// boolean toGenerate = propertyChannel.getBoolean (DP_USE_DT_GEN, true); -// boolean toCompile = propertyChannel.getBoolean (DP_USE_DT_COMP, true); -// boolean toJavadoc = propertyChannel.getBoolean (DP_USE_DT_DOC, true); -// boolean toJar = propertyChannel.getBoolean (DP_USE_DT_JAR, true); - -// // build a set of properties for Ant -// Properties props = new Properties(); -// addRegistryProps (props); -// addGeneratorProps (props); - -// // build a set of Ant targets -// Vector v = new Vector(); -// if (toGenerate && toCompile && toJavadoc && toJar) { -// v.addElement ("moses-datatypes"); -// } else { -// if (toGenerate) -// v.addElement ("generate-datatypes"); -// if (toJavadoc) -// v.addElement ("moses-docs"); -// if (toJar) -// v.addElement ("jar-datatypes"); -// if (toCompile && ! toJavadoc && ! toJar) -// v.addElement ("moses-compile"); -// } -// String[] targets = new String [v.size()]; -// v.copyInto (targets); + // build a set of properties for Ant + Properties props = new Properties(); + addDeploymentProps (props); + add (props, "users.lib.dir", DP_USER_JARS); + add (props, "wsdd.template", DP_WSDD_TEMPL); -// // run it... -// runAnt (targets, props); + // run it... + if (propertyChannel.getBoolean (DP_LOCAL_DEPLOY, true)) + runAnt (new String[] { "deploy-services" }, props); + else + runAnt (new String[] { "deploy-remote" }, props); } /********************************************************************* @@ -248,6 +232,14 @@ ********************************************************************/ public void mosesUndeploy() throws MobyException { + + // build a set of properties for Ant + Properties props = new Properties(); + addDeploymentProps (props); + + // run it... + if (propertyChannel.getBoolean (DP_LOCAL_DEPLOY, true)) + runAnt (new String[] { "undeploy-services" }, props); } /********************************************************************* @@ -394,6 +386,26 @@ } /********************************************************************* + * Add properties shared by deployment and undeployment... + ********************************************************************/ + protected void addDeploymentProps (Properties props) { + add (props, "catalina.home", DP_TOMCAT_HOME); + add (props, "axis.relative.path", DP_AXIS_IN_TOMCAT); + add (props, "tomcat.host", DP_HOSTNAME); + add (props, "tomcat.port", DP_PORT); + add (props, "axis.admin.url", DP_AXIS_ADMIN); + + Map services = (Map)propertyChannel.get (DP_DEPL_SERVICES); + if (services == null) return; + for (Iterator it = services.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = (Map.Entry)it.next(); + String serviceName = (String)entry.getKey(); + String className = (String)entry.getValue(); + props.put ("service." + serviceName, className); + } + } + + /********************************************************************* * Take a property 'channelPropName' from the property channel, * and if it is not empty, add it to 'props' under the name * 'antPropName'. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/22 18:03:28 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/23 02:48:40 1.21 @@ -46,6 +46,7 @@ static final String DP_SEL_SERVICES = "selectedServices"; // type: Vector with service/authority name static final String DP_SEL_AUTHORITIES = "selectedAuthorities"; // type: Vector with authority name + static final String DP_DEPL_SERVICES = "servicesToDeploy"; // type: Map with serviceName => className static final String DP_LOCAL_DEPLOY = "use-local-deploy"; static final String DP_TOMCAT_HOME = "tomcatHome"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DeploymentTable.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/service/dashboard/DeploymentTable.java 2005/11/22 18:03:28 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DeploymentTable.java 2005/11/23 02:48:40 1.2 @@ -12,6 +12,8 @@ import javax.swing.table.TableColumn; import java.util.Enumeration; import java.util.Vector; +import java.util.Map; +import java.util.HashMap; /** * A swing JTable that collects names of services that are going to be @@ -39,13 +41,28 @@ } /********************************************************************* - * + * Add data representing one row to this table. ********************************************************************/ public void addData (String serviceName, String className) { ((DeploymentTableModel)tableModel).addData (serviceName, className); } /********************************************************************* + * Return all data currently available in the table. The keys are + * service names, the values are class names (representing classes + * that will implement these services). + ********************************************************************/ + public Map getData() { + Vector v = tableModel.getData(); + Map result = new HashMap (v.size() + 1); + for (Enumeration en = v.elements(); en.hasMoreElements(); ) { + TableDataBag bag = (TableDataBag)en.nextElement(); + result.put (bag.serviceName, bag.className); + } + return result; + } + + /********************************************************************* * Ignored. ********************************************************************/ public void setData (org.biomoby.shared.MobyData[] newData) { } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/22 18:03:28 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 02:48:40 1.9 @@ -50,6 +50,8 @@ import java.io.ByteArrayOutputStream; import java.util.Enumeration; import java.util.Vector; +import java.util.Map; +import java.util.Iterator; /** * A panel allowing to generate Java code for new services using the @@ -90,6 +92,19 @@ "You can also select one or more authorities\n" + "(then code for all their services will be made).\n\n"; + protected static final String NODEPL_ERROR = + "Sorry, you need first to select some services\n" + + "which you wish to be deployed (or undeployed).\n\n" + + + "You can select several (or even many) of them\n" + + "by using CTRL and SHIFT when selecting them.\n" + + "You can also select one or more authorities\n" + + "(it will add all their services to the list).\n\n"; + + protected static final String NOIMPL_ERROR = + "Sorry, each service that is going to be deployed\n" + + "needs to have assigned a class that implements it.\n\n"; + // associated models working behind the scene AntModel antModel; RegistryModel registryModel; @@ -109,6 +124,7 @@ JTextFieldWithHistory pattern; DeploymentTable dTable; JCheckBox copyBySelect; + JRadioButton locally; // shared icons protected static Icon genDTIcon, genDTIconDis; @@ -172,22 +188,20 @@ antModel.setErrorStream (new ConsoleStream (console, true)); antModel.setMsgOutputLevel (AntModel.MSG_INFO); - // service tree panel + // three major parts JPanel selection = getServicesSelectionPanel(); - - // code generators panel JPanel generators = getGeneratorsPanel(); + JPanel deployment = getDeploymentPanel(); - // deployment panel - JPanel deploy = getDeploymentPanel(); + JPanel fields = new JPanel (new GridBagLayout()); + SwingUtils.addComponent (fields, generators, 0, 0, 1, 1, HORI, NWEST, 0.0, 0.0); + SwingUtils.addComponent (fields, deployment, 1, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); // split it into moving panels - JSplitPane split = vSplit (selection, console, 0.5); - - // put all together - SwingUtils.addComponent (pComponent, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); - SwingUtils.addComponent (pComponent, generators, 1, 0, 1, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent (pComponent, deploy, 2, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + JSplitPane split = hSplit (vSplit (selection, + console, 0.5), + fields, 0.5); + SwingUtils.addComponent (pComponent, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); return pComponent; } @@ -422,12 +436,12 @@ boolean deployLocally = getPrefValue (DP_LOCAL_DEPLOY, true); propertyChannel.put (DP_LOCAL_DEPLOY, new Boolean (deployLocally).toString()); - JRadioButton locally = new JRadioButton ("On local machine", deployLocally); + locally = new JRadioButton ("On local machine", deployLocally); locally.setActionCommand ("true"); locally.addActionListener (deployListener); - JRadioButton remotely = new JRadioButton ("On remote machine", deployLocally); - locally.setActionCommand ("false"); - locally.addActionListener (deployListener); + JRadioButton remotely = new JRadioButton ("On remote machine", ! deployLocally); + remotely.setActionCommand ("false"); + remotely.addActionListener (deployListener); ButtonGroup group = new ButtonGroup(); group.add (locally); @@ -537,7 +551,6 @@ }); deployButton.setIcon (deployIcon); deployButton.setDisabledIcon (deployIconDis); - deployButton.setEnabled (false); // temporarily undeployButton = createButton (" Undeploy ", @@ -551,9 +564,9 @@ }); undeployButton.setIcon (undeployIcon); undeployButton.setDisabledIcon (undeployIconDis); + undeployButton.setEnabled (locally.isSelected()); undeployButton.setEnabled (false); // temporarily - // put all together Component glue2 = Box.createHorizontalGlue(); SwingUtils.addComponent (p, pDeploy, 0, 0, 3, 1, HORI, NWEST, 0.0, 0.0); @@ -566,12 +579,17 @@ return p; } - // + // this is used both for 'locally' and 'remotelly' radio buttons; + // 'locally' button has an action command "true" and 'remotely' + // button has an action command "false" private ActionListener deployListener = new ActionListener() { public void actionPerformed (ActionEvent e) { String local = e.getActionCommand(); - setPrefValue (DP_LOCAL_DEPLOY, UUtils.is (local)); + boolean isLocal = UUtils.is (local); + setPrefValue (DP_LOCAL_DEPLOY, isLocal); propertyChannel.put (DP_LOCAL_DEPLOY, local); + undeployButton.setEnabled (isLocal); + undeployButton.setEnabled (false); // temporarily } }; @@ -815,6 +833,19 @@ * Deploy services... **************************************************************************/ protected void onDeploy() { + if (! onCheckData()) return; + Map data = dTable.getData(); + for (Iterator it = data.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = (Map.Entry)it.next(); + String className = (String)entry.getValue(); + if (UUtils.isEmpty (className)) { + String msg = NOIMPL_ERROR.replaceAll ("\\\\n", "
    "); + error ("" + msg); + return; + } + } + + // ...and let Ant to deploy it final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { @@ -847,6 +878,7 @@ * Undeploy services... **************************************************************************/ protected void onUndeploy() { + if (! onCheckData()) return; final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { @@ -876,6 +908,22 @@ } /************************************************************************** + * Get data from a deployment table; check if there are some + * (report error if not) and put them in the property + * channel. Return accordingly. + **************************************************************************/ + protected boolean onCheckData() { + Map data = dTable.getData(); + if (data.size() == 0) { + String msg = NODEPL_ERROR.replaceAll ("\\\\n", "
    "); + error ("" + msg); + return false; + } + propertyChannel.put (DP_DEPL_SERVICES, data); + return true; + } + + /************************************************************************** * Disable/enable Ant-processing buttons... **************************************************************************/ protected void setEnabledAntButtons (boolean enabled) { @@ -884,8 +932,8 @@ bothButton.setEnabled (enabled); dtclsButton.setEnabled (enabled); sclsButton.setEnabled (enabled); -// deployButton.setEnabled (enabled); -// undeployButton.setEnabled (enabled); + deployButton.setEnabled (enabled); +// undeployButton.setEnabled (enabled && locally.isSelected()); // temporarily } /************************************************************************** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/22 18:03:28 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 02:48:40 1.31 @@ -25,13 +25,18 @@ * BUG: the BuildDataTree does not paint itself always well +* Not yet ready: Undeploy: too many messages... + Should be done: --------------- * right-click - if nothing selected, it should take what is under the mouse (selected first), otherwise it is annoying +* Implement ConsoleStream better + * documentation (both pages and help documents) + - also to start Moses/Dashboard FAQs (with Eddie's one to start) * More testing: - interrupting loading @@ -51,6 +56,8 @@ * more attention for the various encodings +* current registry in the window title... "Connected to..." + Later: ------ * WARN: How would an authority with characters 'http://' cope as a From senger at pub.open-bio.org Tue Nov 22 22:14:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 22:14:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511230314.jAN3El2a015083@pub.open-bio.org> senger Tue Nov 22 22:14:46 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv15060/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard GeneratorPanel.java,1.9,1.10 NOTES,1.31,1.32 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 02:48:40 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 03:14:46 1.10 @@ -458,7 +458,8 @@ String initValue = null; String os = System.getProperty ("os.name"); if (os.startsWith ("Windows")) - initValue = "c:\\Program Files\\Apache Software Foundation\\Tomcat 5.5"; + initValue = null; +// initValue = "c:\\Program Files\\Apache Software Foundation\\Tomcat 5.5"; else if (os.startsWith ("Mac")) initValue = null; else =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 02:48:40 1.31 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 03:14:46 1.32 @@ -50,12 +50,8 @@ * starting panel/splash screen -* add deployment panel to code generator - * base client panel (services testing panel) -* more attention for the various encodings - * current registry in the window title... "Connected to..." Later: @@ -77,6 +73,8 @@ * manage/export/import user preferences +* more attention for the various encodings + ? some of the notification stuff can inherit from property change stuff ? move help system to Java Help; more contextual help From mwilkinson at pub.open-bio.org Wed Nov 23 15:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 15:58:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaKU017570@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv17528/MOBY/Client Modified Files: Central.pm Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/MOBY/Client Central.pm,1.127,1.128 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v retrieving revision 1.127 retrieving revision 1.128 diff -u -r1.127 -r1.128 --- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/20 16:13:23 1.127 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/23 20:58:36 1.128 @@ -1709,10 +1709,13 @@ Usage : $def = $MOBY->Relationships(%args) Function : traverse and return the relationships in the ontology - Returns : hashref of $hash{relationship_type}=\@lsids + Returns : hashref of + FOR SERVICES: + $hash{'isa'}=[{lsid => $lsid, term => 'termy'},...] + FOR OBJECTS: + $hash{relationship_type}=[{lsid => $lsid, articleName => 'thingy', term => 'termy'},...] Args : EITHER serviceType => $term_or_lsid OR objectType => $term_or_lsid - Relationships => \@relationship_types (optional, 'all' if parameter is missing) Registry => $registry_name (optional) expandRelationships => [1/0] (optional) @@ -1769,6 +1772,7 @@ return &_relationshipsPayload($payload); } + sub _relationshipsPayload { my ($payload) = @_; return undef unless $payload; @@ -1779,23 +1783,32 @@ my $x = $doc->getElementsByTagName("Relationship"); my $no_relationships = $x->size(); for ( my $n = 1 ; $n <= $no_relationships ; ++$n ) { - my $relationshipType = - $x->get_node($n)->getAttributeNode('relationshipType') - ; # may or may not have a name + my $relationshipType = $x->get_node($n)->getAttributeNode('relationshipType'); # may or may not have a name if ($relationshipType) { $relationshipType = $relationshipType->getValue(); - } - else { - return - "FAILED! must include a relationshipType in every relationship\n"; + } else { + return "FAILED! must include a relationshipType in every relationship\n"; } my @child = $x->get_node($n)->childNodes; - foreach (@child) { - next unless $_->nodeType == ELEMENT_NODE; - my @child2 = $_->childNodes; - foreach (@child2) { - next unless $_->nodeType == TEXT_NODE; - push @{ $relationships{$relationshipType} }, $_->toString; + foreach my $child(@child) { + my ($lsid, $article, $term) = ("", "", ""); + next unless $child->nodeType == ELEMENT_NODE; + my $lsidattr = $child->getAttributeNode('lsid'); # may or may not have a name + if ($lsidattr) { + $lsid = $lsidattr->getValue(); + } + my $ARTattr = $child->getAttributeNode('articleName'); # may or may not have a name + if ($ARTattr) { + $article = $ARTattr->getValue(); + } + my %info; + $info{lsid} = $lsid; + ($info{articleName} = $article) if $article; + my @child2 = $child->childNodes; + foreach my $child2(@child2) { + next unless $child2->nodeType == TEXT_NODE; + $info{term} = $child2->toString; + push @{ $relationships{$relationshipType} }, \%info; } } } From mwilkinson at pub.open-bio.org Wed Nov 23 15:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 15:58:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaG7017590@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv17528/t Modified Files: Client-Central.t Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/t Client-Central.t,1.44,1.45 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/22 20:05:00 1.44 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/23 20:58:36 1.45 @@ -51,20 +51,20 @@ # Reconnect to MOBY Central here, since other connections # will have gone out of scope by the time we get to this END block. # Also can't use %Obj, - my $C = MOBY::Client::Central->new(); - my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); - $r = $C->deregisterService( serviceName => 'myfirstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => '1myfirstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'my]firstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'myf_irstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'mysecondservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); - $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); +# my $C = MOBY::Client::Central->new(); +# my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); +# $r = $C->deregisterService( serviceName => 'myfirstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => '1myfirstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'my]firstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'myf_irstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'mysecondservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); +# $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); }; # Can we connect to the registry? @@ -183,19 +183,22 @@ $r = $C->Relationships(objectType => $Obj{objectType}); isa_ok($r, "HASH", "Relationship types hash") - or diag("Relationships didn't return a hashref for object types") ; + or diag("Object Relationships didn't return a hashref for object types") ; isa_ok( $r->{'isa'}, 'ARRAY') - or diag("Relationships didn't return a hash of arrayrefs"); -is(shift @{$r->{'isa'}}, "Object") - or diag("Relationships(objectType) doesn't have the right parentage."); + or diag("Object Relationships didn't return a hash of arrayrefs"); +isa_ok($r->{'isa'}->[0], "HASH") + or diag("Object Relationships didn't return a hash of arrayrefs of hasrefs"); +is($r->{'isa'}->[0]->{term}, "Object") + or diag("Object Relationships(objectType) doesn't have the right parentage."); $r = $C->Relationships(serviceType => $ServiceType{serviceType}); isa_ok($r, "HASH", "Relationship types hash") - or diag("Relationships didn't return a hashref for service types") ; -#print STDERR "\n\n\nkeys ",(keys %rel), "\n\n\n"; + or diag("Service Relationships didn't return a hashref for service types") ; isa_ok($r->{'isa'}, 'ARRAY') - or diag("Relationships didn't return a hash of arrayrefs for services"); -is(shift @{$r->{'isa'}}, + or diag("Service Relationships didn't return a hash of arrayrefs for services"); +isa_ok($r->{'isa'}->[0], "HASH") + or diag("Service Relationships didn't return a hash of arrayrefs of hasrefs"); +is($r->{'isa'}->[0]->{term}, $ServiceType{Relationships}->{ISA}->[0]) or diag("Relationships (serviceType) doesn't have the right parentage."); From mwilkinson at pub.open-bio.org Wed Nov 23 15:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 15:58:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaqj017551@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY In directory pub.open-bio.org:/tmp/cvs-serv17528/MOBY Modified Files: Central.pm OntologyServer.pm Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/MOBY Central.pm,1.222,1.223 OntologyServer.pm,1.88,1.89 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v retrieving revision 1.222 retrieving revision 1.223 diff -u -r1.222 -r1.223 --- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/09/29 14:47:39 1.222 +++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/11/23 20:58:36 1.223 @@ -484,7 +484,8 @@ (@ISAlist = @{$relationships->{$isa}}) if ($relationships->{$isa}) ; # for each of the inherited parents, check their articleNames foreach my $ISA(@ISAlist){ # $ISA = [lsid, articleName] (but articleName shuld be null anyway in this case) - my $what_it_is = shift @$ISA; + my $what_it_is = $ISA->{lsid}; + # my $articleName = $ISA->{articleName} map {($x=1) if ($what_it_is eq $_)} @primitive_lsids; # test primitives against this one } return $x; # return flag state @@ -2892,8 +2893,8 @@ outputXML : - ExistingServiceType - ExistingServiceType + ExistingObjectType + ExistingObjectType .... @@ -2983,12 +2984,12 @@ $response .= "\n"; foreach my $lsid_article ( @lsids_articles ) { - my ($lsid, $articleName) = @$lsid_article; - # ugh... I have to cheat here because the term is not returned from the Ontology Server - # one day we may have to fix this... - $lsid =~ /urn\:lsid\:[^\:]+\:[^\:]+\:([^\:]+)/; # get the term portion of the LSID - $term = $1; - $response .= "<${ontology}Type lsid='$lsid'>$term\n"; + my $lsid = $lsid_article->{lsid}; + my $term = $lsid_article->{term}; + my $articleName = $lsid_article->{articleName}; + $response .= "<${ontology}Type lsid='$lsid' "; + $response .= "articleName='$articleName'" if $articleName; + $response .= ">$term\n"; } $response .= "\n"; } =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/09/30 23:14:12 1.88 +++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/11/23 20:58:36 1.89 @@ -223,6 +223,94 @@ } } +=head2 objectInfo + +=cut + +sub objectInfo{ + my ( $self, %args ) = @_; + + $CONFIG ||= MOBY::Config->new; # exported by Config.pm + my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyobject' ); + + my $term = $args{term}; + $term =~ s/^moby://; # if the term is namespaced, then remove that + my $sth; + return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'object' ); + return (0, undef, undef) unless $term; + + my $result; + + $result = $adaptor->query_object(type => $term); + my $row = shift(@$result); + #my $lsid = $row->{object_lsid}; + #my $type = $row->{object_type}; + #my $desc = $row->{description}; + #my $auth = $row->{authority}; + #my $email = $row->{contact_email}; + # + if ($row->{object_lsid}) + { # if it is in there, then it has been discovered regardless of being foreign or not + return $row; + } elsif ( _isForeignLSID($term) ) { # if not in our ontology, but is a foreign LSID, then pass it back verbatim + return {object_lsid => $term, + object_type => $term, + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } else { # under all other circumstances (i.e. not a term, or a non-existent biomoby LSID) then fail + return {object_lsid => "", + object_type => "", + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } +} + + +=head2 serviceInfo + +=cut + +sub serviceInfo{ + my ( $self, %args ) = @_; + + $CONFIG ||= MOBY::Config->new; # exported by Config.pm + my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyservice' ); + + my $term = $args{term}; + $term =~ s/^moby://; # if the term is namespaced, then remove that + my $sth; + return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'service' ); + return (0, undef, undef) unless $term; + + my $result; + + $result = $adaptor->query_service(type => $term); + my $row = shift(@$result); + + if ($row->{service_lsid}) + { # if it is in there, then it has been discovered regardless of being foreign or not + return $row; + } elsif ( _isForeignLSID($term) ) { # if not in our ontology, but is a foreign LSID, then pass it back verbatim + return {service_lsid => $term, + service_type => $term, + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } else { # under all other circumstances (i.e. not a term, or a non-existent biomoby LSID) then fail + return {service_lsid => "", + service_type => "", + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } +} + sub _isMOBYLSID { my ($lsid) = @_; return 1 if $lsid =~ /^urn\:lsid\:biomoby.org/; @@ -536,7 +624,7 @@ (@ISAlist = @{$relationships->{$isa}}) if ($relationships->{$isa}) ; # for each of the inherited parents, check their articleNames foreach my $ISA(@ISAlist){ # $ISA = [lsid, articleName] (but articleName shuld be null anyway in this case) - my $what_it_is = shift @$ISA; + my $what_it_is = $ISA->{lsid}; # check the hasa relationships for common articleName $foundCommonArticleNameFlag += _compareArticleNames(OS => $OS, type => $what_it_is, relationship => $hasalsid, targetArticleName => $articleName); # check the has relationships for common articleName @@ -564,7 +652,7 @@ if ($contents->{$content}){ my @CONTENTlist = @{$contents->{$content}}; foreach my $CONTAINED(@CONTENTlist){ - $foundCommonArticleNameFlag = 1 if ($CONTAINED->[1] eq $targetArticleName); #->[1] is the articleName field + $foundCommonArticleNameFlag = 1 if ($CONTAINED->{articleName} eq $targetArticleName); #->[1] is the articleName field } } } @@ -1111,11 +1199,11 @@ return \%result; } -=head2 Relationships +=head2 RelationshipsDEPRECATED =cut -sub Relationships { +sub RelationshipsDEPRECATED { # this entire subroutine assumes that there is NOT multiple parenting!! my ( $self, %args ) = @_; @@ -1167,6 +1255,69 @@ return \%results; #results(relationship} = [[lsid1,articleNmae], [lsid2, articleName], [lsid3, articleName]] } + +=head2 Relationships + +=cut + +sub Relationships { + + # this entire subroutine assumes that there is NOT multiple parenting!! + my ( $self, %args ) = @_; + my $ontology = $args{ontology} ? $args{ontology} : $self->ontology; + my $term = $args{term}; + my $relationship = $args{relationship}; + my $direction = $args{direction} ? $args{direction} : 'root'; + my $expand = $args{expand} ? 1 : 0; + return + unless ( $ontology + && $term + && ( ( $ontology eq 'service' ) || ( $ontology eq 'object' ) ) ); + + # convert $term into an LSID if it isn't already + if ( $ontology eq 'service' ) { + $term = $self->getServiceURI($term); + $relationship ||="isa"; + my $OS = MOBY::OntologyServer->new(ontology => 'relationship'); + $relationship = $OS->getRelationshipURI("service", $relationship); + } elsif ( $ontology eq 'object' ) { + $term = $self->getObjectURI($term); + $relationship ||="isa"; + my $OS = MOBY::OntologyServer->new(ontology => 'relationship'); + $relationship = $OS->getRelationshipURI("object", $relationship); + } + my %results; + while ( ( $term ne 'urn:lsid:biomoby.org:objectclass:Object' ) + && ( $term ne 'urn:lsid:biomoby.org:servicetype:Service' ) ) + { + my $defs = $self->_doRelationshipsQuery( $ontology, $term, + $relationship, $direction ); + return {[]} unless $defs; # somethig has gone terribly wrong! + my $lsid; + my $rel; + my $articleName; + foreach ( @{$defs} ) { + $lsid = $_->[0]; + $rel = $_->[1]; + $articleName = $_->[2]; + $articleName ||=""; + if ($ontology eq 'object'){ + my $info = $self->objectInfo(term => $lsid); # we need to get the term name, and that doesn't come from here + my $term = $info->{object_type}; + push @{ $results{$rel} }, {lsid => $lsid, articleName => $articleName, term => $term}; + } else { + my $info = $self->serviceInfo(term => $lsid); # we need to get the term name, and that doesn't come from here + my $term = $info->{service_type}; + push @{ $results{$rel} }, {lsid => $lsid, term => $term}; + } + } + last unless ($expand); + last unless ( $direction eq "root" ); # if we aren't going to root, then be careful or we'll loop infnitely + $term = $lsid; # this entire subroutine assumes that there is NOT multiple parenting... + } + return \%results; +} + sub _doRelationshipsQuery { my ( $self, $ontology, $term, $relationship, $direction ) = @_; $CONFIG ||= MOBY::Config->new; # exported by Config.pm @@ -1260,7 +1411,8 @@ #${$lsids}{relationshiptype}=[lsid, lsid, lsid]; foreach my $lsid_article ( @{ $lsids->{$relationship} } ) { # go through the related terms - my ($lsid, $article) = @{$lsid_article}; + my $lsid = $lsid_article->{lsid}, + my $article = $lsid_article->{articleName}; $debug && _LOG("found $lsid as relationship"); next if ( defined $IDS{$lsid} ) From mwilkinson at pub.open-bio.org Wed Nov 23 16:01:05 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 16:01:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232101.jANL15LI017666@pub.open-bio.org> mwilkinson Wed Nov 23 16:01:05 EST 2005 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API In directory pub.open-bio.org:/tmp/cvs-serv17645/MOBY-S_API Modified Files: XMLPayloads.html Log Message: updated documentation for new Relationships output moby-live/Docs/MOBY-S_API XMLPayloads.html,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html 2005/10/24 17:31:57 1.4 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html 2005/11/23 21:01:05 1.5 @@ -415,7 +415,7 @@ <Relationships> <Relationship relationshipType="RelationshipOntologyTerm1" lsid='urn:lsid:authority.uri:namespace:id'> - [ <objecctType lsid='...'>OntologyTerm</objectType> | + [ <objecctType lsid='...' articleName='foo'>OntologyTerm</objectType> | <serviceType lsid='...'>OntologyTerm</serviceType> ] ... </Relationship> From gss at pub.open-bio.org Wed Nov 23 18:53:03 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:53:03 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232353.jANNr3Ul018009@pub.open-bio.org> gss Wed Nov 23 18:53:03 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv17984/src/org/semanticmoby/vocabulary Modified Files: MOBY.java Log Message: Removed keyword property; added metadata property s-moby/ref-impl/core/src/org/semanticmoby/vocabulary MOBY.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/03 22:31:42 1.5 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/23 23:53:03 1.6 @@ -59,14 +59,10 @@ public static final Property lastModifiedDate = property(getURI(), "lastModifiedDate"); - public static final Property Property = - property(getURI(), "Property"); - - public static final Property keyword = - property(getURI(), "keyword"); + public static final Property metadata = + property(getURI(), "metadata"); public static String getURI() { - return "http://www.semanticmoby.org/ontologies/core/"; } From gss at pub.open-bio.org Wed Nov 23 18:53:38 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:53:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232353.jANNrc1m018045@pub.open-bio.org> gss Wed Nov 23 18:53:38 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/util In directory pub.open-bio.org:/tmp/cvs-serv18024/WebRoot/ontologies/util Added Files: N3Serialization Serialization RDFXMLSerialization Log Message: Converted from N3 s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/util N3Serialization,NONE,1.1 Serialization,NONE,1.1 RDFXMLSerialization,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:54:45 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:54:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232354.jANNsjeI018115@pub.open-bio.org> gss Wed Nov 23 18:54:44 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies In directory pub.open-bio.org:/tmp/cvs-serv18063/WebRoot/examples/ontologies Removed Files: GreetingResource ProxyResource.n3 FASTASequence index.html GeneSymbol CerealGrainSearchResource GeneDetails.n3 FASTASequence.n3 GreetingResource.n3 ElegansSearchResource BlastResource.n3 ArabidopsisSearchResource.n3 ArabidopsisSearchResource GeneSymbol.n3 PubSearchResource DrosophilaSearchResource.n3 PubSearchResource.n3 geneName ElegansSearchResource.n3 BlastResource greeting.n3 geneName.n3 GeneDetails DrosophilaSearchResource SacchromycesSearchResource.n3 greeting ProxyResource sequenceText.n3 CerealGrainSearchResource.n3 SacchromycesSearchResource sequenceText Log Message: These classes were here only to provide keywords; that functionality is now replaced with the moby:metadata Pull model s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies GreetingResource,1.1,NONE ProxyResource.n3,1.1,NONE FASTASequence,1.1,NONE index.html,1.2,NONE GeneSymbol,1.1,NONE CerealGrainSearchResource,1.1,NONE GeneDetails.n3,1.1,NONE FASTASequence.n3,1.1,NONE GreetingResource.n3,1.1,NONE ElegansSearchResource,1.1,NONE BlastResource.n3,1.1,NONE ArabidopsisSearchResource.n3,1.1,NONE ArabidopsisSearchResource,1.1,NONE GeneSymbol.n3,1.1,NONE PubSearchResource,1.1,NONE DrosophilaSearchResource.n3,1.1,NONE PubSearchResource.n3,1.1,NONE geneName,1.1,NONE ElegansSearchResource.n3,1.1,NONE BlastResource,1.1,NONE greeting.n3,1.1,NONE geneName.n3,1.1,NONE GeneDetails,1.1,NONE DrosophilaSearchResource,1.1,NONE SacchromycesSearchResource.n3,1.1,NONE greeting,1.1,NONE ProxyResource,1.1,NONE sequenceText.n3,1.1,NONE CerealGrainSearchResource.n3,1.1,NONE SacchromycesSearchResource,1.1,NONE sequenceText,1.1,NONE rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GreetingResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ProxyResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/FASTASequence,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/index.html,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneSymbol,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/CerealGrainSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneDetails.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/FASTASequence.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GreetingResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ElegansSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/BlastResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ArabidopsisSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ArabidopsisSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneSymbol.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/PubSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/DrosophilaSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/PubSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/geneName,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ElegansSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/BlastResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/greeting.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/geneName.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneDetails,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/DrosophilaSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/SacchromycesSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/greeting,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ProxyResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/sequenceText.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/CerealGrainSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/SacchromycesSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/sequenceText,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 18:55:26 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:55:26 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232355.jANNtQUG018195@pub.open-bio.org> gss Wed Nov 23 18:55:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core In directory pub.open-bio.org:/tmp/cvs-serv18130/WebRoot/ontologies/core Modified Files: outputURI oneLineDescription index.html operatesOn Subject.n3 name.n3 name oneLineDescription.n3 Subject Added Files: inputURI aboutURI metadata.n3 aboutURI.n3 inputURI.n3 outputURI.n3 metadata Removed Files: resourceAboutURI.n3 subjectProperty.n3 Service keyword subjectProperty Service.n3 resourceAboutURI keyword.n3 Log Message: Misc cleanup of ontology elements s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core inputURI,NONE,1.1 aboutURI,NONE,1.1 metadata.n3,NONE,1.1 aboutURI.n3,NONE,1.1 inputURI.n3,NONE,1.1 outputURI.n3,NONE,1.1 metadata,NONE,1.1 outputURI,1.1,1.2 oneLineDescription,1.2,1.3 index.html,1.2,1.3 operatesOn,1.3,1.4 Subject.n3,1.1,1.2 name.n3,1.2,1.3 name,1.2,1.3 oneLineDescription.n3,1.2,1.3 Subject,1.1,1.2 resourceAboutURI.n3,1.1,NONE subjectProperty.n3,1.1,NONE Service,1.1,NONE keyword,1.1,NONE subjectProperty,1.1,NONE Service.n3,1.1,NONE resourceAboutURI,1.1,NONE keyword.n3,1.1,NONE =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI 2005/11/23 23:55:25 1.2 @@ -1,12 +1,12 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription 2005/11/23 23:55:25 1.3 @@ -1,12 +1,12 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html 2005/11/23 23:55:25 1.3 @@ -27,9 +27,9 @@
  • =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/03 22:37:29 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/23 23:55:25 1.4 @@ -4,33 +4,33 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > + + + + + + + + - + + + + + - + - + - - - - - - - - - - - - - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3 2005/11/23 23:55:25 1.2 @@ -10,9 +10,4 @@ a owl:Restriction ; owl:onProperty moby:mapsTo ; owl:minCardinality "1"^^xsd:nonNegativeInteger - ] ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty moby:subjectProperty ; - owl:minCardinality "1"^^xsd:nonNegativeInteger - ] . + ] . \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3 2005/11/23 23:55:25 1.3 @@ -9,7 +9,7 @@ rdfs:domain [ rdfs:subClassOf [ a owl:Class ; - owl:unionOf (moby:Service moby:Subject moby:Object) + owl:unionOf (moby:Resource moby:Subject moby:Object) ] ]; rdfs:range xsd:string . \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name 2005/11/23 23:55:25 1.3 @@ -9,23 +9,23 @@ - - + + + + + + + - + + + + - - - - - - - - - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3 2005/11/23 23:55:25 1.3 @@ -6,5 +6,5 @@ moby:oneLineDescription a owl:DatatypeProperty ; - rdfs:domain moby:Service ; + rdfs:domain moby:Resource ; rdfs:range xsd:string . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject 2005/11/23 23:55:25 1.2 @@ -1,22 +1,16 @@ - - 1 - - - + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + 1 - - + \ No newline at end of file rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/resourceAboutURI.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/subjectProperty.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/keyword,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/subjectProperty,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/Service.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/resourceAboutURI,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/keyword.n3,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 18:55:45 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:55:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232355.jANNtjUI018233@pub.open-bio.org> gss Wed Nov 23 18:55:45 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies In directory pub.open-bio.org:/tmp/cvs-serv18208/WebRoot/ontologies Modified Files: index.html Log Message: Fixed a typo s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies index.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html 2004/07/15 20:27:16 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html 2005/11/23 23:55:44 1.2 @@ -20,11 +20,11 @@ - + - +
    - - Technical Overview - - - An overview of how to use VPIN-compliant OWL graphs to search for - resources that match a query graph -
    Advertising Resources @@ -52,7 +41,7 @@ - A set of Developer tools to convert and validate OWL graphs + Developer tools to convert OWL graphs
    - - - + + + @@ -51,12 +51,12 @@ - - - - - - + + + + + + @@ -66,12 +66,6 @@ - - - - - -
    ServiceN3RDF/XML
    ResourceN3RDF/XML
    Graph N3 RDF/XML
    oneLineDescription N3 RDF/XML
    resourceAboutURIN3RDF/XML
    keywordN3RDF/XML
    aboutURIN3RDF/XML
    metadataN3RDF/XML
    operatesOn N3 RDF/XML
    mapsTo N3 RDF/XML
    subjectPropertyN3RDF/XML
    objectPropertyN3RDF/XML
    GroupDescription
    Corecore Core classes and properties, which, taken together, form the backbone "canonical" structure of Semantic MOBY graphs.
    Utilityutil Utility classes and properties
    From gss at pub.open-bio.org Wed Nov 23 18:56:36 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:56:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232356.jANNuavs018267@pub.open-bio.org> gss Wed Nov 23 18:56:36 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies In directory pub.open-bio.org:/tmp/cvs-serv18246/WebRoot/examples/proxies Added Files: ncbi-megablast-metadata.txt gramene-query-metadata.txt sgd-quicksearch-metadata.txt wormbase-query-metadata.txt flybase-genequery-metadata.txt tair-seqviewer-metadata.txt tair-mapviewer-metadata.txt pubmed-metadata.txt Log Message: Added files containing keywords to replace ontology elements that were only there to provide keywords s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies ncbi-megablast-metadata.txt,NONE,1.1 gramene-query-metadata.txt,NONE,1.1 sgd-quicksearch-metadata.txt,NONE,1.1 wormbase-query-metadata.txt,NONE,1.1 flybase-genequery-metadata.txt,NONE,1.1 tair-seqviewer-metadata.txt,NONE,1.1 tair-mapviewer-metadata.txt,NONE,1.1 pubmed-metadata.txt,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:57:02 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:57:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNv2Q9018357@pub.open-bio.org> gss Wed Nov 23 18:57:02 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies In directory pub.open-bio.org:/tmp/cvs-serv18272/WebRoot/examples/proxies Modified Files: wormbase-query tair-seqviewer flybase-genequery ncbi-megablast.n3 gramene-query.n3 sgd-quicksearch.n3 tair-seqviewer.n3 tair-mapviewer tair-mapviewer.n3 pubmed ncbi-megablast sgd-quicksearch pubmed.n3 gramene-query wormbase-query.n3 flybase-genequery.n3 Log Message: Updated to remove keyword properties, add metadata properties s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies wormbase-query,1.5,1.6 tair-seqviewer,1.6,1.7 flybase-genequery,1.5,1.6 ncbi-megablast.n3,1.5,1.6 gramene-query.n3,1.5,1.6 sgd-quicksearch.n3,1.6,1.7 tair-seqviewer.n3,1.6,1.7 tair-mapviewer,1.5,1.6 tair-mapviewer.n3,1.5,1.6 pubmed,1.5,1.6 ncbi-megablast,1.5,1.6 sgd-quicksearch,1.6,1.7 pubmed.n3,1.5,1.6 gramene-query,1.5,1.6 wormbase-query.n3,1.5,1.6 flybase-genequery.n3,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - - - - - + - + - - WormBase Query C. elegans database query at wormbase.org http://www.wormbase.org/ - + http://www.semanticmoby.org/examples/proxies/wormbase-query-metadata.txt + + + + + - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer 2005/11/23 23:57:02 1.7 @@ -1,29 +1,27 @@ - + + - + - + - - TAIR Sequence Viewer Arabidopsis Sequence Viewer resource provided by TAIR http://www.arabidopsis.org/servlets/sv - + http://www.semanticmoby.org/examples/proxies/tair-seqviewer-metadata.txt + - - - + + - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@ - - - FlyBase Gene Query - http://flybase.bio.indiana.edu/genes/fbgquery.hform FlyBase gene query form at flybase.bio.indiana.edu + http://flybase.bio.indiana.edu/genes/fbgquery.hform + http://www.semanticmoby.org/examples/proxies/flybase-genequery-metadata.txt + - + + - + - - + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:ncbi-megablast - a moby:Resource, exterms:ProxyResource, exterms:BlastResource ; + a moby:Resource, ; moby:name "NCBI Mega BLAST" ; moby:oneLineDescription "NCBI MegaBlast resource provided by NCBI" ; moby:inputURI "http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/ncbi-megablast-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:gramene-query - a moby:Resource, exterms:ProxyResource, exterms:CerealGrainSearchResource ; + a moby:Resource ; moby:name "Gramene Query" ; moby:oneLineDescription "Cereal grains database query at gramene.org" ; moby:inputURI "http://www.gramene.org/" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/gramene-query-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3 2005/11/23 23:57:02 1.7 @@ -1,22 +1,22 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:sgd-quicksearch - a moby:Resource, exterms:ProxyResource, exterms:SacchromycesSearchResource ; + a moby:Resource ; moby:name "SGD Quick Search" ; moby:oneLineDescription "Saccharomyces cerevisiae quick search" ; moby:inputURI "http://db.yeastgenome.org/cgi-bin/search/quickSearch" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/sgd-quicksearch-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ - a moby:Subject, exterms:GeneSymbol ; + a moby:Subject ; moby:mapsTo [ - a moby:Object, exterms:GeneDetails + a moby:Object ] ] ] . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3 2005/11/23 23:57:02 1.7 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:tair-seqviewer - a moby:Resource, exterms:ProxyResource, exterms:ArabidopsisSearchResource ; + a moby:Resource ; moby:name "TAIR Sequence Viewer" ; moby:oneLineDescription "Arabidopsis Sequence Viewer resource provided by TAIR" ; moby:inputURI "http://www.arabidopsis.org/servlets/sv" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/tair-seqviewer-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@ - - TAIR Map Viewer Arabidopsis Map Viewer resource provided by TAIR http://www.arabidopsis.org/servlets/mapper + http://www.semanticmoby.org/examples/proxies/tair-mapviewer-metadata.txt - - - - + + + + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:tair-mapviewer - a moby:Resource, exterms:ProxyResource, exterms:ArabidopsisSearchResource ; + a moby:Resource ; moby:name "TAIR Map Viewer" ; moby:oneLineDescription "Arabidopsis Map Viewer resource provided by TAIR" ; moby:inputURI "http://www.arabidopsis.org/servlets/mapper" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/tair-mapviewer-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@
    - - - - - PubMed Entrez PubMed resource provided by NCBI http://www.ncbi.nlm.nih.gov/entrez/query.fcgi? + http://www.semanticmoby.org/examples/proxies/pubmed-metadata.txt - \ No newline at end of file + + + + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - - + + - - + - + + - NCBI Mega BLAST - - http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2 - + NCBI Mega BLAST NCBI MegaBlast resource provided by NCBI - + http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2 + http://www.semanticmoby.org/examples/proxies/ncbi-megablast-metadata.txt + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch 2005/11/23 23:57:02 1.7 @@ -1,6 +1,5 @@ - - - - - - - - - - - SGD Quick Search Saccharomyces cerevisiae quick search http://db.yeastgenome.org/cgi-bin/search/quickSearch + http://www.semanticmoby.org/examples/proxies/sgd-quicksearch-metadata.txt + + + + + + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:pubmed - a moby:Resource, exterms:ProxyResource, exterms:PubSearchResource ; + a moby:Resource ; moby:name "PubMed" ; moby:oneLineDescription "Entrez PubMed resource provided by NCBI" ; moby:inputURI "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/pubmed-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - + + + + + + - - + - Gramene Query + Gramene Query + Cereal grains database query at gramene.org http://www.gramene.org/ - - + http://www.semanticmoby.org/examples/proxies/gramene-query-metadata.txt - Cereal grains database query at gramene.org - - - - - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:wormbase-query - a moby:Resource, exterms:ProxyResource, exterms:ElegansSearchResource ; + a moby:Resource ; moby:name "WormBase Query" ; moby:oneLineDescription "C. elegans database query at wormbase.org" ; moby:inputURI "http://www.wormbase.org/" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/wormbase-query-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3 2005/11/23 23:57:02 1.7 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:flybase-genequery - a moby:Resource, exterms:ProxyResource, exterms:DrosophilaSearchResource ; + a moby:Resource ; moby:name "FlyBase Gene Query" ; moby:oneLineDescription "FlyBase gene query form at flybase.bio.indiana.edu" ; moby:inputURI "http://flybase.bio.indiana.edu/genes/fbgquery.hform" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/flybase-genequery-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Wed Nov 23 18:57:21 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:57:21 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNvL46018391@pub.open-bio.org> gss Wed Nov 23 18:57:21 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv18370/WebRoot/examples/hello Added Files: metadata.txt Log Message: Added files containing keywords to replace ontology elements that were only there to provide keywords s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello metadata.txt,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:57:31 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:57:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNvVFW018425@pub.open-bio.org> gss Wed Nov 23 18:57:31 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv18396/WebRoot/examples/hello Modified Files: hello-world.rdf hello-world.n3 Log Message: Updated to remove keyword properties, add metadata properties s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello hello-world.rdf,1.6,1.7 hello-world.n3,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/03 22:37:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/23 23:57:31 1.7 @@ -6,25 +6,25 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - - - - VPIN Hello World resource Simple example of a VPIN resource http://www.semanticmoby.org/examples/hello-world http://www.semanticmoby.org/examples/display-hello-world - + http://www.semanticmoby.org/examples/hello/metadata.txt + - - + + - + - + + + + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/03 22:37:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/23 23:57:31 1.7 @@ -7,11 +7,12 @@ @prefix xsd: . ex:hello-world - a moby:Resource, exterms:GreetingResource ; + a moby:Resource ; moby:name "VPIN Hello World resource" ; moby:oneLineDescription "Simple example of a VPIN resource" ; moby:aboutURI "http://www.semanticmoby.org/examples/hello-world" ; moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world" ; + moby:metadata "http://www.semanticmoby.org/examples/hello/metadata.txt" ; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Wed Nov 23 18:58:15 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:58:15 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232358.jANNwF5n018463@pub.open-bio.org> gss Wed Nov 23 18:58:15 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv18438/WebRoot/developer Modified Files: dev-tools.jsp Log Message: Fixed a typo; removed unused forms s-moby/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.jsp,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/17 02:53:03 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/23 23:58:15 1.7 @@ -13,7 +13,7 @@ Convert a Graph to a Different Format -
    + Paste a graph, select its input format, and press "Convert Graph" to convert to the other format @@ -48,61 +48,6 @@
    -
    - -

    - List All Statements in the S-MOBY Metadata Repository -

    - -
    - - - -
    - -
    - -

    - Validate an OWL Graph using Jena -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see what type of - OWL the graph represents - - - -
    -
    - - - -
    - -
    - -

    - Validate an OWL Graph for MOBY Canonical Form -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see if it is MOBY - canonical form - - - -
    -
    - - - -
    - -
    - <%@ include file="/footer.jsp" %> From gss at pub.open-bio.org Wed Nov 23 18:58:48 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:58:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232358.jANNwml4018499@pub.open-bio.org> gss Wed Nov 23 18:58:48 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv18476/src/org/semanticmoby/ref/tools Removed Files: KeywordFinder.java KeywordList.java Log Message: Functionality supplanted by MetadataRetriever class s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordFinder.java,1.10,NONE KeywordList.java,1.7,NONE rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/RCS/KeywordFinder.java,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/RCS/KeywordList.java,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 18:59:09 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:59:09 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232359.jANNx9ol018533@pub.open-bio.org> gss Wed Nov 23 18:59:09 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv18512/src/org/semanticmoby/ref/tools Added Files: MetadataRetriever.java Log Message: Helper class for Pull model of keyword registration s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools MetadataRetriever.java,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 18:59:37 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:59:37 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232359.jANNxbsw018571@pub.open-bio.org> gss Wed Nov 23 18:59:37 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv18546/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java Log Message: Use the new MetadataRetriever to find keywords to register s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/15 22:34:08 1.10 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/23 23:59:36 1.11 @@ -12,6 +12,7 @@ import org.semanticmoby.vocabulary.*; import java.sql.Connection; +import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.*; @@ -93,14 +94,11 @@ Statement stmt = it.nextStatement(); Resource subject = stmt.getSubject(); - String subjectURI = subject.getURI(); - - if (subject.isAnon() || - ( - (subjectURI != null) && - subjectURI.startsWith(uriString) - )) { + String subjectURI = subject.getURI(); + if ((subject.isAnon()) || + ((subjectURI != null) && + (subjectURI.startsWith(uriString)))) { dbModel.add(stmt); } } @@ -117,9 +115,14 @@ // Add keywords associated with the resource // - KeywordFinder finder = new KeywordFinder(resource); - addKeywords(resource.getResource().getURI(), finder.getKeywords(), - dbModel); + MetadataRetriever retriever = new MetadataRetriever( + resource.getJenaModel(), 10000); + + Set words = retriever.getKeywords(); + + if (! words.isEmpty()) { + addKeywords(words, uriString, dbModel); + } // Commit the transaction on the database model // @@ -141,71 +144,65 @@ } } - - private void addKeywords(String resourceURI, KeywordList list, Model model) + private void addKeywords(Set keywords, String resourceURI, Model model) throws StorageException { - + + PreparedStatement stmt = null; + try { - ModelRDB dbModel = (ModelRDB) model; - Connection conn = dbModel.getConnection().getConnection(); + ModelRDB dbModel = (ModelRDB) model; + Connection conn = dbModel.getConnection().getConnection(); - java.sql.Statement sql = conn.createStatement(); - - doAddKeywords(resourceURI, list.getResourceKeywords(), "P", sql); - doAddKeywords(resourceURI, list.getSubjectKeywords(), "S", sql); - doAddKeywords(resourceURI, list.getObjectKeywords(), "O", sql); + stmt = conn.prepareStatement( + "INSERT INTO MOBY_KEYWORD " + + " (keyword, resource_uri, applies_to) " + + "VALUES ( ?, ?, '' )"); + + for (Iterator it = keywords.iterator(); it.hasNext();) { + String keyword = (String) it.next(); + stmt.setString(1, keyword); + stmt.setString(2, resourceURI); + stmt.execute(); + } + } catch (Throwable t) { - t.printStackTrace(); throw new StorageException(t); + } finally { + if (stmt != null) { + try { + stmt.close(); + } catch (Throwable t) {} + } } } - - private void doAddKeywords(String resourceURI, Iterator it, - String appliesTo, java.sql.Statement sql) - throws SQLException { - - while (it.hasNext()) { - - String keyword = it.next().toString(); - - StringBuffer sb = new StringBuffer(); - - sb.append("INSERT INTO MOBY_KEYWORD\n"); - sb.append(" (keyword, resource_uri, applies_to)\n"); - sb.append("values ('"); - sb.append(keyword.toLowerCase().trim()); - sb.append("', '"); - sb.append(resourceURI); - sb.append("', '"); - sb.append(appliesTo); - sb.append("')"); - - String queryString = sb.toString(); - - sql.execute(queryString); - } - } - - private void removeKeywords(String resourceURI, Model model) throws StorageException { - + + PreparedStatement stmt = null; + try { - ModelRDB dbModel = (ModelRDB) model; - Connection conn = dbModel.getConnection().getConnection(); - - java.sql.Statement sql = conn.createStatement(); + ModelRDB dbModel = (ModelRDB) model; + Connection conn = dbModel.getConnection().getConnection(); - sql.execute("DELETE FROM MOBY_KEYWORD WHERE resource_uri = '" + - resourceURI + "'"); + stmt = conn.prepareStatement( + "DELETE FROM MOBY_KEYWORD WHERE resource_uri = '?'"); + + stmt.setString(1, resourceURI); + stmt.execute(); + } catch (Throwable t) { - t.printStackTrace(); throw new StorageException(t); + } finally { + if (stmt != null) { + try { + stmt.close(); + } catch (Throwable t) {} + } } } From gss at pub.open-bio.org Wed Nov 23 19:00:05 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 19:00:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511240000.jAO005j8018610@pub.open-bio.org> gss Wed Nov 23 19:00:05 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv18589/src/org/semanticmoby/ref/tools/db Added Files: ClearDB.java Log Message: Utility class to clear a database of Jena statements and MOBY keywords s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db ClearDB.java,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 05:42:08 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 05:42:08 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241042.jAOAg8We020249@pub.open-bio.org> senger Thu Nov 24 05:42:07 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/panels In directory pub.open-bio.org:/tmp/cvs-serv20231/panels Log Message: Directory /home/repository/moby/moby-live/Java/docs/panels added to the repository moby-live/Java/docs/panels - New directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/directory,v: No such file or directory From senger at pub.open-bio.org Thu Nov 24 08:51:30 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpUHa020603@pub.open-bio.org> senger Thu Nov 24 08:51:30 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv20584 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.44,1.45 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/22 18:03:27 1.44 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/24 13:51:30 1.45 @@ -38,6 +38,7 @@ + @@ -290,6 +291,8 @@ 'excludepackagenames' below (use comma-separated list, wildcard allowed). Consider also to add new 'group' elements (below) for new packages. --> + + @@ -337,6 +340,10 @@ + + + + From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVEu020622@pub.open-bio.org> senger Thu Nov 24 08:51:30 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv20584/docs Modified Files: index.html Added Files: Dashboard-NOTES.txt Dashboard.html Log Message: moby-live/Java/docs Dashboard-NOTES.txt,NONE,1.1 Dashboard.html,NONE,1.1 index.html,1.16,1.17 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/index.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/docs/index.html 2005/10/18 20:15:37 1.16 +++ /home/repository/moby/moby-live/Java/docs/index.html 2005/11/24 13:51:30 1.17 @@ -44,9 +44,9 @@
  • How to use jMoby @@ -54,7 +54,8 @@
  • How to develop with jMoby
      -
    • MoSeS - Moby Services Support +
    • MoSeS - Moby Services Support +
    • Biomoby Dashboard
    • The Twelve Commandments for jMoby developers (and some good advice)
    • Directories and packages names explained
    • Available APIs @@ -92,7 +93,7 @@
      Martin Senger
      -Last modified: Tue Oct 18 22:04:57 2005 +Last modified: Thu Nov 24 16:19:09 2005
      From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpV2C020639@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv20584/docs/images Added Files: MosesGeneratorPanel-small.jpg MosesGeneratorPanel.jpg RegistrationPanel-small.jpg RegistrationPanel.jpg RegistryBrowserPanel-small.jpg RegistryBrowserPanel.jpg updated.gif Log Message: moby-live/Java/docs/images MosesGeneratorPanel-small.jpg,NONE,1.1 MosesGeneratorPanel.jpg,NONE,1.1 RegistrationPanel-small.jpg,NONE,1.1 RegistrationPanel.jpg,NONE,1.1 RegistryBrowserPanel-small.jpg,NONE,1.1 RegistryBrowserPanel.jpg,NONE,1.1 updated.gif,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVYn020677@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv20584/src/Clients Modified Files: TestAuth.java Log Message: moby-live/Java/src/Clients TestAuth.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java 2005/11/16 08:40:53 1.1 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java 2005/11/24 13:51:31 1.2 @@ -11,7 +11,7 @@ // Access the page try { // Create a URL for the desired page - URL url = new URL ("http://localhost/~senger/secure/a.tmp"); + URL url = new URL ("http://localhost:9999/~senger/secure/a.tmp"); // Read all the text returned by the server BufferedReader in = new BufferedReader (new InputStreamReader (url.openStream())); From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVW5020720@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20584/src/main/org/biomoby/service/dashboard Modified Files: RegistrationPanel.java Removed Files: NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationPanel.java,1.17,1.18 NOTES,1.32,NONE =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/19 18:33:01 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/24 13:51:31 1.18 @@ -161,7 +161,7 @@ * **************************************************************************/ public String getName() { - return "Biomoby Registration"; + return "Registration"; } /************************************************************************** rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RCS/NOTES,v: No such file or directory From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVmY020698@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20584/src/config/dashboard/org/biomoby/service/dashboard Modified Files: dashboard.txt Log Message: moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt 2005/11/19 18:33:01 1.1 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt 2005/11/24 13:51:31 1.2 @@ -1,8 +1,8 @@ -Dasboard is a Graphical User Interface helping Biomoby service +Dashboard is a Graphical User Interface helping Biomoby service providers to develop and deploy their Biomoby services. However, because of its extensibility, it may contain also panels that are useful even for pure Biomoby end-users when they wish to call Biomoby -services).

      +services.

      Support for Java developing for Biomoby is available at http://biomoby.org/moby-live/Java/docs/. From senger at pub.open-bio.org Thu Nov 24 08:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVlP020658@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/panels In directory pub.open-bio.org:/tmp/cvs-serv20584/docs/panels Added Files: .cvsignore.template Log Message: moby-live/Java/docs/panels .cvsignore.template,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 08:52:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:52:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241352.jAODql25020788@pub.open-bio.org> senger Thu Nov 24 08:52:47 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv20773/docs/images Added Files: GCP-dashboard-smaller.jpg GCP-dashboard.jpg bug.gif Log Message: moby-live/Java/docs/images GCP-dashboard-smaller.jpg,NONE,1.1 GCP-dashboard.jpg,NONE,1.1 bug.gif,NONE,1.1 From gss at pub.open-bio.org Tue Nov 1 16:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCnf009588@pub.open-bio.org> gss Tue Nov 1 11:28:11 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/tools Modified Files: InvocationBroker.java KeywordFinder.java KeywordList.java URIInvestigator.java KeywordQuery.java DiscoveryQuery.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.5,1.6 KeywordFinder.java,1.6,1.7 KeywordList.java,1.3,1.4 URIInvestigator.java,1.6,1.7 KeywordQuery.java,1.6,1.7 DiscoveryQuery.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/10/09 01:11:21 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/01 16:28:11 1.6 @@ -9,8 +9,6 @@ import org.semanticmoby.http.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.vocabulary.MOBY; import java.io.*; @@ -23,7 +21,7 @@ /** * This class is used to invoke and display the results of Semantic - * MOBY services. + * MOBY resources. */ public class InvocationBroker { @@ -54,49 +52,49 @@ this.response = response; } - private String rdfxmlString(MOBYService service) { + private String rdfxmlString(MOBYResource resource) { StringWriter writer = new StringWriter(); - service.getJenaModel().write(writer); + resource.getJenaModel().write(writer); return writer.toString(); } - private String n3String(MOBYService service) { + private String n3String(MOBYResource resource) { StringWriter writer = new StringWriter(); - service.getJenaModel().write(writer, "N3"); + resource.getJenaModel().write(writer, "N3"); return writer.toString(); } /** - * Handle a request to invoke a service at a given URI. - * If the service requires inputs, and the service has + * Handle a request to invoke a resource at a given URI. + * If the resource requires inputs, and the resource has * a valid inputURI property, redirect to the URI that is - * the value of the property. If the service requires input + * the value of the property. If the resource requires input * and has no inputURI property, then build a simple input * GUI from scratch. *

      - * If the service doesn't require any inputs, then do an HTTP - * POST to the service URI, passing the graph as a parameter. + * If the resource doesn't require any inputs, then do an HTTP + * POST to the resource URI, passing the graph as a parameter. */ - public void invokeURI(String serviceURI) { + public void invokeURI(String resourceURI) { - // Try to retrieve and parse a service graph from the URI; + // Try to retrieve and parse a resource graph from the URI; // on failure, print a message and return. // - MOBYService service = null; + MOBYResource resource = null; try { Model model = ModelFactory.createDefaultModel(); - model.read(serviceURI); + model.read(resourceURI); Parser parser = new Parser(model); - service = parser.parseService(); + resource = parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); @@ -104,18 +102,18 @@ return; } - if (requiresInputs(service)) { + if (requiresInputs(resource)) { - // Since the service requires input, either redirect to its + // Since the resource requires input, either redirect to its // inputURI (if it has one) or build a simple GUI for it. // try { - String inputURI = getInputURI(service); + String inputURI = getInputURI(resource); if (inputURI == null) { - buildInputGUI(service); + buildInputGUI(resource); } else { // Do an HTTP HEAD request to find out if the @@ -131,24 +129,24 @@ response.sendRedirect(inputURI); } else { - buildInputGUI(service); + buildInputGUI(resource); } } } catch (Throwable t) { t.printStackTrace(); - buildInputGUI(service); + buildInputGUI(resource); } } else // No input required { try { - // Invoke the service + // Invoke the resource // - HTTPRequest rqst = HTTPRequest.newPostRequest(service.getURI()); + HTTPRequest rqst = HTTPRequest.newPostRequest(resource.getURI()); rqst.addParameter(MOBY.GRAPH_PARAMETER_NAME, - rdfxmlString(service)); + rdfxmlString(resource)); HTTPResponse resp = rqst.send(); @@ -165,16 +163,16 @@ model.read(resp.getBodyAsStream(), ""); Parser parser = new Parser(model); - MOBYService resultsService = parser.parseService(); + MOBYResource resultsResource = parser.parseResource(); - String outputURI = getOutputURI(resultsService); + String outputURI = getOutputURI(resultsResource); if (outputURI == null) { // No output URI was specified, so build a generic // display of the results // - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } else { // There is an output URI. Conceptually, what we want @@ -193,7 +191,7 @@ // rqst = HTTPRequest.newPostRequest(outputURI); - String graphString = rdfxmlString(resultsService); + String graphString = rdfxmlString(resultsResource); rqst.addParameter(MOBY.GRAPH_PARAMETER_NAME, graphString); resp = rqst.send(); @@ -210,12 +208,12 @@ // The output URI returned a status other than // 200 OK, so fall back to a default output GUI // - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } } catch (Throwable t) { t.printStackTrace(); - buildOutputGUI(resultsService); + buildOutputGUI(resultsResource); } } } else { @@ -252,13 +250,13 @@ } - private String getInputURI(MOBYService service) { + private String getInputURI(MOBYResource resource) { try { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Statement stmt = - model.getProperty(service.getResource(), MOBY.inputURI); + model.getProperty(resource.getResource(), MOBY.inputURI); if (stmt != null) { @@ -276,13 +274,13 @@ } - private String getOutputURI(MOBYService service) { + private String getOutputURI(MOBYResource resource) { try { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Statement stmt = - model.getProperty(service.getResource(), MOBY.outputURI); + model.getProperty(resource.getResource(), MOBY.outputURI); return stmt.getString(); } catch (Throwable t) { @@ -294,30 +292,30 @@ } - public void buildInputGUI(MOBYService service) { + public void buildInputGUI(MOBYResource resource) { // error message } - public void buildOutputGUI(MOBYService service) + public void buildOutputGUI(MOBYResource resource) throws IOException, ServletException { HttpSession session = request.getSession(true); session.setAttribute("n3Graph", - n3String(service).replaceAll("<", "<") + n3String(resource).replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """)); session.setAttribute("rdfxmlGraph", - rdfxmlString(service).replaceAll("<", "<") + rdfxmlString(resource).replaceAll("<", "<") .replaceAll(">", ">").replaceAll("\"", """)); redirectToPage("/jsp/display.jsp"); } - private boolean requiresInputs(MOBYService service) { + private boolean requiresInputs(MOBYResource resource) { - return getInputURI(service) != null; + return getInputURI(resource) != null; } } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/01 16:28:11 1.7 @@ -6,8 +6,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.vocabulary.MOBY; import java.util.*; @@ -16,15 +14,15 @@ public class KeywordFinder { /** - * The MOBY service for which to find keywords + * The MOBY resource for which to find keywords */ - private MOBYService service; + private MOBYResource resource; /** - * The underlying Jena model on which the MOBY service + * The underlying Jena model on which the MOBY resource * is based */ - private Model serviceModel; + private Model resourceModel; /** * A keyword list object to hold the keywords that are @@ -33,17 +31,17 @@ private KeywordList keywords = null; /** - * Construct an instance for the given service and model + * Construct an instance for the given resource and model */ - public KeywordFinder(MOBYService service) { + public KeywordFinder(MOBYResource resource) { - this.service = service; - this.serviceModel = service.getJenaModel(); + this.resource = resource; + this.resourceModel = resource.getJenaModel(); } /** * Retrieve, if necessary, and return the keywords associated - * with the service. + * with the resource. */ public KeywordList getKeywords() throws Exception { @@ -58,20 +56,20 @@ /** - * Collect keywords for the service + * Collect keywords for the resource */ - private void collectKeywords() { // Add keywords from classes that the service is asserted to + private void collectKeywords() { // Add keywords from classes that the resource is asserted to - // be an instance of (i.e. service rdf:type ) + // be an instance of (i.e. resource rdf:type ) // - Resource res = service.getResource(); + Resource res = resource.getResource(); - keywords.addServiceKeywords(getKeywordsFor(res)); + keywords.addResourceKeywords(getKeywordsFor(res)); // Add keywords from subjects and objects of each // operatesOn subgraph // - for (Iterator it = service.getOperatesOn(); it.hasNext();) { + for (Iterator it = resource.getOperatesOn(); it.hasNext();) { MOBYGraphNode node = (MOBYGraphNode) it.next(); @@ -176,7 +174,7 @@ // Iterate over the resource's rdf:type properties // StmtIterator it = - serviceModel.listStatements(res, RDF.type, (RDFNode) null); + resourceModel.listStatements(res, RDF.type, (RDFNode) null); while (it.hasNext()) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/10/09 01:11:21 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/01 16:28:11 1.4 @@ -7,25 +7,25 @@ public class KeywordList { - private Set serviceKeywords = new HashSet(); + private Set resourceKeywords = new HashSet(); private Set subjectKeywords = new HashSet(); private Set objectKeywords = new HashSet(); - public void addServiceKeyword(String keyword) { + public void addResourceKeyword(String keyword) { - serviceKeywords.add(keyword); + resourceKeywords.add(keyword); } - public void addServiceKeywords(List keywords) { + public void addResourceKeywords(List keywords) { - serviceKeywords.addAll(keywords); + resourceKeywords.addAll(keywords); } - public Iterator getServiceKeywords() { + public Iterator getResourceKeywords() { - return serviceKeywords.iterator(); + return resourceKeywords.iterator(); } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/01 16:28:11 1.7 @@ -9,8 +9,6 @@ import org.semanticmoby.http.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.*; @@ -46,15 +44,15 @@ * The URL that is to be investigated for possible inclusion in the * metadata repository. */ - private String serviceURL; + private String resourceURL; /** * Create an instance for investingating the given resource URL * @param resourceURL the URL to investigate */ - private URIInvestigator(String serviceURL) { + private URIInvestigator(String resourceURL) { - this.serviceURL = serviceURL; + this.resourceURL = resourceURL; } /** @@ -64,19 +62,19 @@ * investigated, then this call is a NO-OP. * @param resourceURL the URL to investigate */ - public synchronized static void investigate(String serviceURL) { + public synchronized static void investigate(String resourceURL) { synchronized (instances) { - if (instances.get(serviceURL) != null) { + if (instances.get(resourceURL) != null) { - syncLog.warn("Already investigating " + serviceURL); + syncLog.warn("Already investigating " + resourceURL); return; } - URIInvestigator investigator = new URIInvestigator(serviceURL); - instances.put(serviceURL, investigator); + URIInvestigator investigator = new URIInvestigator(resourceURL); + instances.put(resourceURL, investigator); investigator.start(); } } @@ -121,7 +119,7 @@ // synchronized (instances) { - instances.remove(serviceURL); + instances.remove(resourceURL); } } } @@ -152,13 +150,13 @@ try { - lastModifiedDate = manager.getLastModifiedDate(serviceURL); + lastModifiedDate = manager.getLastModifiedDate(resourceURL); alreadyRegistered = (lastModifiedDate != null); } catch (StorageException e) { e.printStackTrace(); syncLog.error("Couldn't check for last modified date of resource URL " + - serviceURL, e); + resourceURL, e); e.printStackTrace(); return; @@ -166,7 +164,7 @@ // Helper class for making the HTTP GET call // - HTTPRequest request = HTTPRequest.newGetRequest(serviceURL); + HTTPRequest request = HTTPRequest.newGetRequest(resourceURL); // If there was a last modified date, then request that the graph only // be sent if it has been modified since that date @@ -190,7 +188,7 @@ } catch (HTTPException e) { e.printStackTrace(); - syncLog.warn("Couldn't reach suggested resource " + serviceURL); + syncLog.warn("Couldn't reach suggested resource " + resourceURL); return; } @@ -202,7 +200,7 @@ // The resource has not been modified since it was // registered, so there is nothing to do but log a message. // - syncLog.info("IN-SYNC : " + serviceURL); + syncLog.info("IN-SYNC : " + resourceURL); break; @@ -214,10 +212,10 @@ if (alreadyRegistered) { deregisterResource(manager, true); - syncLog.info("ALREADY REGISTERED : " + serviceURL); + syncLog.info("ALREADY REGISTERED : " + resourceURL); } else { - syncLog.info("IGNORED : " + serviceURL + " doesn't exist"); + syncLog.info("IGNORED : " + resourceURL + " doesn't exist"); } break; @@ -245,7 +243,7 @@ // e.printStackTrace(); syncLog.warn("Unable to get Last-Modified date for " + - serviceURL + "; using current date"); + resourceURL + "; using current date"); lastModifiedDate = new Date(); } catch (Throwable t) { @@ -254,7 +252,7 @@ // t.printStackTrace(); syncLog.warn("Unparsable Last-Modified date " + "(\"" + - dateString + "\") for " + serviceURL + + dateString + "\") for " + resourceURL + "; ignoring"); } @@ -270,48 +268,48 @@ } catch (HTTPException e) { e.printStackTrace(); - syncLog.error("Couldn't retrieve graph from " + serviceURL); + syncLog.error("Couldn't retrieve graph from " + resourceURL); return; } - MOBYService service = null; + MOBYResource resource = null; try { Parser parser = Parser.forInputStream(in, Parser.LANGUAGE_RDF_XML); - service = parser.parseService(); + resource = parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); System.err.println("Parse error: " + t); } - if (service == null) { + if (resource == null) { // De-register the resource, printing a removal message if - // a service couldn't be parsed - deregisterResource(manager, service == null); - syncLog.error("Couldn't parse a resource from graph at " + serviceURL); + // a resource couldn't be parsed + deregisterResource(manager, resource == null); + syncLog.error("Couldn't parse a resource from graph at " + resourceURL); - // If a service was parsed, then register it + // If a resource was parsed, then register it } else { try { - manager.registerResource(service, lastModifiedDate); + manager.registerResource(resource, lastModifiedDate); // Log a message about successfully registering the graph: // syncLog.info(( alreadyRegistered ? "UPDATED : " : "ADDED : " - ) + serviceURL); + ) + resourceURL); } catch (Exception e) { e.printStackTrace(); - syncLog.error("Error storing graph for " + serviceURL, e); + syncLog.error("Error storing graph for " + resourceURL, e); } } @@ -322,7 +320,7 @@ // Log a message about the failed attempt to contact the URL // syncLog.error("Status " + status + " received while trying " + - "to contact resource " + serviceURL); + "to contact resource " + resourceURL); break; } @@ -333,16 +331,16 @@ try { - manager.deregisterResource(serviceURL); + manager.deregisterResource(resourceURL); if (removing) { - syncLog.info("REMOVED : " + serviceURL); + syncLog.info("REMOVED : " + resourceURL); } } catch (StorageException e) { e.printStackTrace(); - syncLog.error("Unable to de-register resource " + serviceURL, e); + syncLog.error("Unable to de-register resource " + resourceURL, e); } } } =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordQuery.java 2005/11/01 16:28:11 1.7 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.Util; @@ -50,7 +48,7 @@ while (rs.next()) { String uri = rs.getString("resource_uri"); - MOBYService resource = serviceAt(uri, model); + MOBYResource resource = resourceAt(uri, model); if (resource != null) { @@ -75,7 +73,7 @@ } - private MOBYService serviceAt(String uri, Model model) { + private MOBYResource resourceAt(String uri, Model model) { Model resourceModel = ModelFactory.createDefaultModel(); Resource resource = resourceModel.createResource(uri); @@ -86,7 +84,7 @@ Parser parser = new Parser(resourceModel); - return parser.parseService(); + return parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/01 16:28:11 1.7 @@ -10,8 +10,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.tools.Util; @@ -53,7 +51,7 @@ /** * The graph that serves as a template for resources that match. */ - private MOBYService queryResource; + private MOBYResource queryResource; /** * Flag indicating which statements should be returned: URI_ONLY, @@ -79,25 +77,25 @@ * @param statementsToReturn which statements should be returned: URI_ONLY, * QUERY_STMTS_ONLY, or ALL_STMTS (use the static constants on this class). */ - private DiscoveryQuery(MOBYService queryResource, int statementsToReturn) { + private DiscoveryQuery(MOBYResource queryResource, int statementsToReturn) { this.queryResource = queryResource; this.statementsToReturn = statementsToReturn; } - public static DiscoveryQuery newMinimalStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newMinimalStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, MINIMAL_STMTS); } - public static DiscoveryQuery newQueryStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newQueryStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, QUERY_STMTS); } - public static DiscoveryQuery newReachableStmtsQuery(MOBYService resource) { + public static DiscoveryQuery newReachableStmtsQuery(MOBYResource resource) { return new DiscoveryQuery(resource, REACHABLE_STMTS); } @@ -114,7 +112,7 @@ } - public MOBYServiceSet findMatchingGraphs() { + public MOBYResourceSet findMatchingGraphs() { init(); @@ -123,7 +121,7 @@ try { Model queryModel = - ((MOBYService) queryResource).getJenaModel(); + ((MOBYResource) queryResource).getJenaModel(); String queryString = buildQueryString(queryModel); StorageManager manager = new StorageManager(); dbModel = manager.openDBModel(); @@ -142,14 +140,14 @@ results.close(); - MOBYServiceSet returnSet = new MOBYServiceSet(); + MOBYResourceSet returnSet = new MOBYResourceSet(); for (Iterator it = matching.iterator(); it.hasNext();) { Object next = it.next(); - MOBYService mp = + MOBYResource mp = buildGraphModel(dbModel, queryModel, (ResultBinding) next); - returnSet.addService(mp); + returnSet.addResource(mp); } return returnSet; @@ -273,7 +271,7 @@ * @param binding bindings for variables * @return */ - private MOBYService buildGraphModel(Model dbModel, Model queryModel, + private MOBYResource buildGraphModel(Model dbModel, Model queryModel, ResultBinding binding) throws NonCanonicalException { @@ -313,7 +311,7 @@ // Parser parser = new Parser(adjusted); - return parser.parseService(); + return parser.parseResource(); } @@ -361,7 +359,7 @@ try { Statement resourceTypeStmt = - original.listStatements(null, RDF.type, MOBY.Service) + original.listStatements(null, RDF.type, MOBY.Resource) .nextStatement(); minimal.add(resourceTypeStmt); @@ -433,7 +431,7 @@ try { Statement resourceTypeStmt = - original.listStatements(null, RDF.type, MOBY.Service) + original.listStatements(null, RDF.type, MOBY.Resource) .nextStatement(); Resource subject = resourceTypeStmt.getSubject(); Util.addReachableStmts(dbModel, reachable, subject, subject.getURI()); From gss at pub.open-bio.org Tue Nov 1 16:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCc0009634@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java DBConnection.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.6,1.7 DBConnection.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/10/28 04:12:27 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/01 16:28:12 1.7 @@ -60,16 +60,16 @@ * are in the resource graph's namespace will be stored in the global repository, * and all statements from the resource graph are stored in a separate model * that has as its name the fully expanded URI of the resource. - * @param service the resource to store + * @param resource the resource to store * @param lastModifiedDate when the graph was last modified * @throws StorageException if unable to access the database */ - public void registerResource(MOBYService service, Date lastModifiedDate) + public void registerResource(MOBYResource resource, Date lastModifiedDate) throws StorageException { - Model model = service.getJenaModel(); + Model model = resource.getJenaModel(); Model dbModel = null; - String uriString = service.getResource().getURI(); + String uriString = resource.getResource().getURI(); Resource uri = model.createResource(uriString); try { @@ -119,8 +119,8 @@ // Add keywords associated with the resource // - KeywordFinder finder = new KeywordFinder(service); - addKeywords(service.getResource().getURI(), finder.getKeywords(), + KeywordFinder finder = new KeywordFinder(resource); + addKeywords(resource.getResource().getURI(), finder.getKeywords(), dbModel); // Commit the transaction on the database model @@ -154,7 +154,7 @@ java.sql.Statement sql = conn.createStatement(); - doAddKeywords(resourceURI, list.getServiceKeywords(), "P", sql); + doAddKeywords(resourceURI, list.getResourceKeywords(), "P", sql); doAddKeywords(resourceURI, list.getSubjectKeywords(), "S", sql); doAddKeywords(resourceURI, list.getObjectKeywords(), "O", sql); } catch (Throwable t) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/10/09 01:11:22 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/01 16:28:12 1.2 @@ -57,17 +57,11 @@ * for this application. */ public DBConnection() { - - this.propsFileName = propsFileName; - this.logFileName = logFileName; - try { - startLog(); loadDBProperties(); connect(); } catch (Exception e) { - System.err.println(); e.printStackTrace(); } From gss at pub.open-bio.org Tue Nov 1 16:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCxZ009677@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/.settings In directory pub.open-bio.org:/tmp/cvs-serv9543/.settings Added Files: org.eclipse.jdt.core.prefs org.eclipse.jdt.ui.prefs Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/.settings org.eclipse.jdt.core.prefs,NONE,1.1 org.eclipse.jdt.ui.prefs,NONE,1.1 From gss at pub.open-bio.org Tue Nov 1 16:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCDk009661@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets Modified Files: DiscoveryServlet.java KeywordSearchServlet.java ResultsDisplayServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets DiscoveryServlet.java,1.5,1.6 KeywordSearchServlet.java,1.7,1.8 ResultsDisplayServlet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/10/28 04:12:26 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/01 16:28:12 1.6 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.*; - import org.semanticmoby.ref.tools.*; import org.semanticmoby.servlet.*; @@ -50,9 +48,9 @@ ParamReader.getParameter("query-graph", request); // Parse the query graph into a MOBYGraph object - Parser parser = + Parser parser = Parser.forString(graphString, Parser.LANGUAGE_RDF_XML); - MOBYService service = parser.parseService(); + MOBYResource resource = parser.parseResource(); // Find which statements the user wishes to have returned String statements = @@ -66,17 +64,14 @@ DiscoveryQuery q = null; if (statements.equalsIgnoreCase("minimal")) { - - q = DiscoveryQuery.newMinimalStmtsQuery(service); + q = DiscoveryQuery.newMinimalStmtsQuery(resource); } else if (statements.equalsIgnoreCase("query")) { - - q = DiscoveryQuery.newQueryStmtsQuery(service); + q = DiscoveryQuery.newQueryStmtsQuery(resource); } else { - - q = DiscoveryQuery.newReachableStmtsQuery(service); + q = DiscoveryQuery.newReachableStmtsQuery(resource); } - MOBYServiceSet matching = q.findMatchingGraphs(); + MOBYResourceSet matching = q.findMatchingGraphs(); if ((matching == null) || (matching.size() == 0)) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/10/28 04:12:26 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/01 16:28:12 1.8 @@ -5,8 +5,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.tools.*; import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.ref.tools.db.DBConnection; @@ -87,7 +85,7 @@ String uri = result.getString(1); row.add(uri); - MOBYService resource = resourceAt(uri, model); + MOBYResource resource = resourceAt(uri, model); String name = resource.getName(); row.add(name); @@ -194,7 +192,7 @@ } - private MOBYService resourceAt(String uri, Model model) { + private MOBYResource resourceAt(String uri, Model model) { Model resourceModel = ModelFactory.createDefaultModel(); Resource resource = resourceModel.createResource(uri); @@ -205,7 +203,7 @@ Parser parser = new Parser(resourceModel); - return parser.parseService(); + return parser.parseResource(); } catch (Throwable t) { t.printStackTrace(); =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResultsDisplayServlet.java 2005/11/01 16:28:12 1.5 @@ -1,8 +1,7 @@ package org.semanticmoby.ref.servlets; -import org.semanticmoby.graph.MOBYService; - -import org.semanticmoby.parser.Parser; +import org.semanticmoby.graph.MOBYResource; +import org.semanticmoby.graph.Parser; import org.semanticmoby.ref.tools.*; @@ -26,15 +25,15 @@ // Read the invocation graph from the MOBY.GRAPH_PARAMETER_NAME // parameter and parse it into a MOBYGraph object // - String graphString = + String graphString = ParamReader.getParameter(MOBY.GRAPH_PARAMETER_NAME, request); - Parser parser = + Parser parser = Parser.forString(graphString, Parser.LANGUAGE_RDF_XML); - MOBYService service = parser.parseService(); + MOBYResource resource = parser.parseResource(); InvocationBroker broker = new InvocationBroker(this, request, response); - broker.buildOutputGUI(service); + broker.buildOutputGUI(resource); } catch (Throwable t) { t.printStackTrace(); From gss at pub.open-bio.org Tue Nov 1 16:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCaU009699@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets/example Modified Files: HelloWorldServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example HelloWorldServlet.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/10/28 04:12:27 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/01 16:28:12 1.6 @@ -32,11 +32,11 @@ } - protected void handleRequest(MOBYService service) { + protected void handleRequest(MOBYResource resource) { try { - MOBYGraph graph = (MOBYGraph) service.getOperatesOn().next(); + MOBYGraph graph = (MOBYGraph) resource.getOperatesOn().next(); MOBYSubject subject = (MOBYSubject) graph.getHasMapping(); From gss at pub.open-bio.org Tue Nov 1 16:28:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 11:28:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511011628.jA1GSCGF009610@pub.open-bio.org> gss Tue Nov 1 11:28:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv9543/src/org/semanticmoby/ref/servlets/dev Modified Files: MOBYGraphValidationServlet.java ResourceListServlet.java Log Message: Changes to reflect change of name from Service to Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev MOBYGraphValidationServlet.java,1.4,1.5 ResourceListServlet.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/MOBYGraphValidationServlet.java 2005/11/01 16:28:12 1.5 @@ -4,9 +4,6 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.parser.NonCanonicalException; -import org.semanticmoby.parser.Parser; - import org.semanticmoby.ref.servlets.BaseServlet; import org.semanticmoby.servlet.*; @@ -35,7 +32,7 @@ baseModel.read(reader, null); Parser parser = new Parser(baseModel); - parser.parseService(); + parser.parseResource(); out.println("Model is canonical"); } catch (ParameterException e) { =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/10/28 04:12:26 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/01 16:28:12 1.2 @@ -29,7 +29,7 @@ Model dbModel = manager.openDBModel(); int count = 0; StmtIterator it = - dbModel.listStatements(null, RDF.type, MOBY.Service); + dbModel.listStatements(null, RDF.type, MOBY.Resource); while (it.hasNext()) { From gss at pub.open-bio.org Wed Nov 2 00:29:07 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Tue, 1 Nov 2005 19:29:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020029.jA20T7iY011446@pub.open-bio.org> gss Tue Nov 1 19:29:07 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv11421/src/org/semanticmoby/graph Modified Files: Parser.java Log Message: (adf) Added comments about things we might want to resolve later s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/10/31 17:23:27 1.1 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2 @@ -268,6 +268,8 @@ // Since the resource is a MOBY Graph, it should have exactly one // hasMapping property that leads to its mapping subgraph. // + // TODO: adf wonders if the constraint that there is exactly one + // hasMapping property is necessary Statement hasMappingStmt = model.listStatements(res, MOBY.hasMapping, (RDFNode) null).nextStatement(); @@ -275,7 +277,7 @@ return new MOBYGraph(model, typeStmt, hasMappingStmt, parseHasMapping(hasMappingObject)); - } else { + } else if (isDataStructure(res)) { // Throw an exception if it is also a graph // if (isGraph(res)) { @@ -304,6 +306,10 @@ // of the collection depends on the type of the passed resource // return collectionFor(res, subgraphs); + } else { + throw new NonCanonicalException( + "A resource was found to be neither a Graph " + + "nor Data Structure", model); } } From senger at pub.open-bio.org Wed Nov 2 06:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6u2012212@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv12193/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.45,1.46 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/10/27 04:15:23 1.45 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/02 06:39:05 1.46 @@ -1,3 +1,9 @@ +2005-11-02 Martin Senger + + * Changed method equals() in MobyService. + + * Add Comparator interface/implementation to MobyService. + 2005-10-26 Martin Senger * Add Comparator interface/implementtaion to MobyServiceType. From senger at pub.open-bio.org Wed Nov 2 06:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d66H012252@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java DataTypesTree.java NamespacesTree.java RegistryModel.java RegistryPanel.java ServiceTypesTree.java Added Files: ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard ServicesBoard.java,NONE,1.1 ServicesTree.java,NONE,1.1 CommonTree.java,1.9,1.10 DataTypesTree.java,1.6,1.7 NamespacesTree.java,1.1,1.2 RegistryModel.java,1.11,1.12 RegistryPanel.java,1.15,1.16 ServiceTypesTree.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/10/28 11:30:37 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/02 06:39:06 1.10 @@ -55,14 +55,23 @@ protected final static String AC_EXPAND = "ac-expand"; protected final static String AC_COLLAPSE = "ac-collapse"; protected final static String AC_RELOAD = "ac-reload"; + protected final static String AC_NSORT = "ac-nsort"; + protected final static String AC_ASORT = "ac-asort"; // some shared constants - final static protected int SORTED_BY_NAME = 0; - final static protected int SORTED_BY_AUTHORITY = 1; + final static protected int SORTED_BY_NAME = 0; + final static protected int SORTED_BY_AUTHORITY = 1; + final static protected int SORTED_UNUSUAL = 9; + // all higher numbers indicates an unusual sorting order that we + // will not keep in case of reloading + final static protected int SORTED_BY_SERVICE_TYPE = 11; + final static protected int SORTED_BY_INPUT_DATA = 12; + final static protected int SORTED_BY_OUTPUT_DATA = 13; // tree components protected JPopupMenu popup; protected String lastSearchText = ""; + protected int lastSorted = SORTED_BY_NAME; // shared icons static protected Icon searchIcon; @@ -70,6 +79,11 @@ static protected Icon menuExpandIcon, menuExpandIconDis; static protected Icon menuCollapseIcon, menuCollapseIconDis; static protected Icon menuReloadIcon, menuReloadIconDis; + static protected Icon smallNIcon, smallNIconDis; + static protected Icon smallAIcon, smallAIconDis; + static protected Icon smallTIcon, smallTIconDis; + static protected Icon smallIIcon, smallIIconDis; + static protected Icon smallOIcon, smallOIconDis; protected String rootNode; @@ -212,6 +226,22 @@ if (menuReloadIconDis == null) menuReloadIconDis = SwingUtils.createIcon ("images/smallReload_dis.gif", Dashboard.class); + + if (smallNIcon == null) smallNIcon = loadIcon ("images/smallN.gif"); + if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallN_dis.gif"); + if (smallAIcon == null) smallAIcon = loadIcon ("images/smallA.gif"); + if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallA_dis.gif"); + if (smallTIcon == null) smallTIcon = loadIcon ("images/smallT.gif"); + if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallT_dis.gif"); + if (smallIIcon == null) smallIIcon = loadIcon ("images/smallI.gif"); + if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); + if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); + if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + } + + // + private Icon loadIcon (String path) { + return SwingUtils.createIcon (path, Dashboard.class); } /********************************************************************* @@ -312,6 +342,25 @@ } /********************************************************************* + * Adding sorting items to the popup menu. + ********************************************************************/ + protected void addSortingItems() { + popup.addSeparator(); + popup.add + (createMenuItem (new AbstractAction ("Sort by names") { + public void actionPerformed (ActionEvent e) { + update (lastSorted = SORTED_BY_NAME, null); + } + }, AC_NSORT, smallNIcon, smallNIconDis)); + popup.add + (createMenuItem (new AbstractAction ("Sort by authorities") { + public void actionPerformed (ActionEvent e) { + update (lastSorted = SORTED_BY_AUTHORITY, null); + } + }, AC_ASORT, smallAIcon, smallAIconDis)); + } + + /********************************************************************* * Collapse all nodes, starting from the root.

      ********************************************************************/ protected void collapse() { @@ -389,7 +438,8 @@ Enumeration en = root.depthFirstEnumeration(); while (en.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)en.nextElement(); - if (toBeHighlighted.contains (node.getUserObject().toString())) { +// if (toBeHighlighted.contains (node.getUserObject().toString())) { + if (toBeHighlighted.contains ( ((CommonNode)node.getUserObject()).getValue())) { makeVisible (new TreePath (tModel.getPathToRoot (node))); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/10/28 11:30:37 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/02 06:39:06 1.7 @@ -46,8 +46,6 @@ org.apache.commons.logging.LogFactory.getLog (DataTypesTree.class); // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; protected final static String AC_HASA = "ac-hasa"; protected final static String AC_DEPR = "ac-depr"; @@ -56,7 +54,6 @@ CommonConsole console; MobyDataType[] dataTypes = null; - int lastSorted = SORTED_BY_NAME; boolean showBadGuys = false; boolean showMembers = false; JCheckBoxMenuItem deprecatedBox; @@ -83,21 +80,7 @@ ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - deprecatedBox.setEnabled (true); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - deprecatedBox.setEnabled (false); - } - }, AC_ASORT)); + addSortingItems(); popup.addSeparator(); JCheckBoxMenuItem showBox = new JCheckBoxMenuItem ("Show HAS/HASA members"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.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/service/dashboard/NamespacesTree.java 2005/10/28 13:39:09 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/02 06:39:06 1.2 @@ -45,16 +45,11 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (NamespacesTree.class); - // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; - // remembered from constructor RegistryModel registryModel; CommonConsole console; MobyNamespace[] namespaces = null; - int lastSorted = SORTED_BY_NAME; MobyException updateException = null; final static String NAMESPACES_ACCESS_ERROR = @@ -73,24 +68,11 @@ } /********************************************************************* - * Adding data types tree specific menu items to a - * right-click-popup. + * ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - } - }, AC_ASORT)); + addSortingItems(); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/10/28 13:39:09 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/02 06:39:06 1.12 @@ -13,6 +13,7 @@ import org.biomoby.shared.NoSuccessException; import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyServiceType; +import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.CentralAll; import org.biomoby.client.CentralDigestCachedImpl; @@ -46,6 +47,7 @@ Hashtable dataTypesTable = new Hashtable(); Hashtable serviceTypesTable = new Hashtable(); Hashtable namespacesTable = new Hashtable(); + Hashtable servicesTable = new Hashtable(); private static final String MSG_REG_PENDING_CURATION = "Registration reports 'Pending curation'...\n" + @@ -183,13 +185,13 @@ public void registerServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); - try { - worker.registerServiceType (serviceType); - } catch (PendingCurationException e) { - throw new MobyException (MSG_REG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.registerServiceType (serviceType); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -198,13 +200,13 @@ public void unRegisterServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); - try { - worker.unregisterServiceType (serviceType); - } catch (PendingCurationException e) { - throw new MobyException (MSG_UNREG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.unregisterServiceType (serviceType); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -269,13 +271,13 @@ public void registerNamespace (MobyNamespace namespace) throws MobyException { initWorker(); - try { - worker.registerNamespace (namespace); - } catch (PendingCurationException e) { - throw new MobyException (MSG_REG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.registerNamespace (namespace); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -284,13 +286,13 @@ public void unRegisterNamespace (MobyNamespace namespace) throws MobyException { initWorker(); - try { - worker.unregisterNamespace (namespace); - } catch (PendingCurationException e) { - throw new MobyException (MSG_UNREG_PENDING_CURATION); - } catch (NoSuccessException e) { - throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); - } +// try { +// worker.unregisterNamespace (namespace); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } } /********************************************************************* @@ -345,6 +347,94 @@ /********************************************************************* * + * Dealing with Moby Services. + * + ********************************************************************/ + + + /********************************************************************* + * + ********************************************************************/ + public void registerService (MobyService service) + throws MobyException { + initWorker(); +// try { +// worker.registerService (service); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_REG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_REG_NO_SUCCESS + e.getMessage()); +// } + } + + /********************************************************************* + * + ********************************************************************/ + public void unRegisterService (MobyService service) + throws MobyException { + initWorker(); +// try { +// worker.unregisterService (service); +// } catch (PendingCurationException e) { +// throw new MobyException (MSG_UNREG_PENDING_CURATION); +// } catch (NoSuccessException e) { +// throw new MobyException (MSG_UNREG_NO_SUCCESS + e.getMessage()); +// } + } + + /********************************************************************* + * Fetch services (from a cache or from a registry). When done, + * signal that services are updated. If an initiator is known (not + * null), signal, who asked for it, as well. + ********************************************************************/ + public synchronized MobyService[] getServices (Object initiator) + throws MobyException { + initWorker(); + if (initiator != null) + fireEvent (initiator, AUTHORITIES_RESET, "", null); + MobyService[] services = worker.getServices(); + servicesTable = new Hashtable(); + for (int i = 0; i < services.length; i++) + servicesTable.put (services[i].getUniqueName(), + services[i]); + if (initiator != null) + fireEvent (initiator, AUTHORITIES_UPDATED, "", services); + return services; + } + + /********************************************************************* + * + ********************************************************************/ + public MobyService getService (String combinedServiceName) + throws MobyException { + if (combinedServiceName == null) + return null; + MobyService[] services = getServices (null); + return (MobyService)servicesTable.get (combinedServiceName); + } + + /********************************************************************* + * Return a HashSet filled with names of services that have + * somewhere given 'searchText'. Add case-insensitivity to the + * regular expression in 'searchText'. + ********************************************************************/ + public HashSet findInServices (String searchText) + throws MobyException { + HashSet found = new HashSet(); + MobyService[] services = getServices (null); + if (! searchText.startsWith ("(?i)")) + searchText = "(?i)" + searchText; + Pattern pattern = Pattern.compile (searchText); + for (int i = 0; i < services.length; i++) { + if (pattern.matcher (services[i].toString()).find()) + found.add (services[i].getUniqueName()); + } + return found; + } + + + /********************************************************************* + * * The rest... * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/10/28 13:39:09 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/02 06:39:06 1.16 @@ -119,7 +119,6 @@ console.setAppendMode (false); // ontology trees - ServicesTree servicesTree = new ServicesTree(); DataTypesBoard dataTypesBoard = new DataTypesBoard (registryModel, console, @@ -135,9 +134,15 @@ console, propertyChannel); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); + ServicesBoard servicesBoard = + new ServicesBoard (registryModel, + console, + propertyChannel); + servicesBoard.updateTree (CommonTree.SORTED_BY_NAME); + // split it into moving panels JSplitPane split1 = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, - servicesTree.scrollable(), + servicesBoard, dataTypesBoard); split1.setResizeWeight (0.5); split1.setContinuousLayout (true); @@ -318,35 +323,6 @@ /************************************************************************** * **************************************************************************/ - class ServicesTree extends CommonTree { - public ServicesTree() { - super ("Services"); - } - } - - - /************************************************************************** - * - **************************************************************************/ - class ServiceTypesTree extends CommonTree { - public ServiceTypesTree() { - super ("Service Types"); - } - } - - - /************************************************************************** - * - **************************************************************************/ - class NamespacesTree extends CommonTree { - public NamespacesTree() { - super ("Namespaces"); - } - } - - /************************************************************************** - * - **************************************************************************/ public String getName() { return "Registry Browser"; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.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/service/dashboard/ServiceTypesTree.java 2005/10/28 13:39:09 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/02 06:39:06 1.3 @@ -46,16 +46,11 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (ServiceTypesTree.class); - // action commands for popup menu items - protected final static String AC_NSORT = "ac-nsort"; - protected final static String AC_ASORT = "ac-asort"; - // remembered from constructor RegistryModel registryModel; CommonConsole console; MobyServiceType[] serviceTypes = null; - int lastSorted = SORTED_BY_NAME; MobyException updateException = null; final static String SERVICE_TYPES_ACCESS_ERROR = @@ -74,24 +69,11 @@ } /********************************************************************* - * Adding data types tree specific menu items to a - * right-click-popup. + * ********************************************************************/ protected void createPopups (String title) { super.createPopups (title); - popup.addSeparator(); - popup.add - (createMenuItem (new AbstractAction ("Sort by names") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_NAME, null); - } - }, AC_NSORT)); - popup.add - (createMenuItem (new AbstractAction ("Sort by authorities") { - public void actionPerformed (ActionEvent e) { - update (lastSorted = SORTED_BY_AUTHORITY, null); - } - }, AC_ASORT)); + addSortingItems(); } /********************************************************************* From senger at pub.open-bio.org Wed Nov 2 06:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6sl012267@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/service/dashboard/images Added Files: smallA.gif smallA_dis.gif smallI.gif smallI_dis.gif smallN.gif smallN_dis.gif smallO.gif smallO_dis.gif smallT.gif smallT_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallA.gif,NONE,1.1 smallA_dis.gif,NONE,1.1 smallI.gif,NONE,1.1 smallI_dis.gif,NONE,1.1 smallN.gif,NONE,1.1 smallN_dis.gif,NONE,1.1 smallO.gif,NONE,1.1 smallO_dis.gif,NONE,1.1 smallT.gif,NONE,1.1 smallT_dis.gif,NONE,1.1 From senger at pub.open-bio.org Wed Nov 2 06:39:06 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 2 Nov 2005 01:39:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511020639.jA26d6QY012291@pub.open-bio.org> senger Wed Nov 2 01:39:06 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv12193/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java MobyService.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.3,1.4 MobyService.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/09/22 16:07:09 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/02 06:39:06 1.4 @@ -78,6 +78,15 @@ return true; } + public MobyDataType getDataType() { + synchronized (elements) { + if (elements.size() > 0) + return ((MobyPrimaryDataSimple)elements.firstElement()).getDataType(); + else + return null; + } + } + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/09/22 16:07:09 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/02 06:39:06 1.8 @@ -9,6 +9,7 @@ import org.tulsoft.shared.UUtils; +import java.util.Comparator; import java.util.Enumeration; import java.util.Vector; @@ -24,7 +25,8 @@ * @version $Id$ */ -public class MobyService { +public class MobyService + implements Comparable { /** * A dummy name used for MobyService instances that do not have @@ -57,6 +59,18 @@ protected Vector primaryOutputs = new Vector(); /************************************************************************** + * Implementing Comparable interface. + *************************************************************************/ + public int compareTo (Object obj) { + return getUniqueName().compareToIgnoreCase ( ((MobyService)obj).getUniqueName() ); + } + + public boolean equals (Object obj) { + if (obj == null) return false; + return getUniqueName().equals ( ((MobyService)obj).getUniqueName() ); + } + + /************************************************************************** * Default constructor. *************************************************************************/ public MobyService() { @@ -299,9 +313,10 @@ } } + // some historical reasons for this method... public boolean equals (MobyService anotherOne) { - if (anotherOne == null) return false; - return this.name.equals (anotherOne.getName()); + if (anotherOne == null) return false; + return equals ((Object)anotherOne); } public String toString() { @@ -336,8 +351,32 @@ return new String (buf); } + /************************************************************************** + * It combines this service name and its authority name. It is + * used also in {@link #equals} and {@link #compareTo} methods.

      + * + * TBD: The authority should be checked that it does not contain + * character sequence 'space followed by a left parenthesis'. + *************************************************************************/ public String toShortString() { return name + " (" + authority + ")"; } + /************************************************************************** + * Create a comparator for case-insensitive sorting of services by + * their authorities. + *************************************************************************/ + public static Comparator getAuthorityComparator() { + return new Comparator() { + public int compare (Object o1, Object o2) { + String a1 = ((MobyService)o1).getAuthority(); + String a2 = ((MobyService)o2).getAuthority(); + int compared = (a1).compareToIgnoreCase ((String)a2); + if (compared == 0) + return ( ((MobyService)o1).getName().compareToIgnoreCase ( ((MobyService)o2).getName() ) ); + else + return compared; + } + }; + } } From senger at pub.open-bio.org Thu Nov 3 08:38:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 3 Nov 2005 03:38:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511030838.jA38ceGL018463@pub.open-bio.org> senger Thu Nov 3 03:38:40 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv18397/src/main/org/biomoby/service/dashboard/images Added Files: smallRegister.gif smallRegister_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallRegister.gif,NONE,1.1 smallRegister_dis.gif,NONE,1.1 From senger at pub.open-bio.org Thu Nov 3 15:21:57 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 3 Nov 2005 10:21:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031521.jA3FLvns020067@pub.open-bio.org> senger Thu Nov 3 10:21:57 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv20017/src/main/org/biomoby/shared Modified Files: MobyService.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyService.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/02 06:39:06 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyService.java 2005/11/03 15:21:57 1.9 @@ -16,7 +16,7 @@ /** * A container representing a service. But do not be too excited - * this is not a real service but only its definition as it appears in - * the BioMoby regustry.

      + * the BioMoby registry.

      * * This container is used mainly to register a new service in a * Moby registry, and to find registered services later.

      From senger at pub.open-bio.org Thu Nov 3 15:21:57 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 3 Nov 2005 10:21:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031521.jA3FLvqQ020048@pub.open-bio.org> senger Thu Nov 3 10:21:57 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20017/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java DashboardProperties.java NOTES RegistrationPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.12,1.13 DashboardProperties.java,1.9,1.10 NOTES,1.15,1.16 RegistrationPanel.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 08:38:39 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 15:21:57 1.13 @@ -94,6 +94,8 @@ // re-use "style" components protected static final Insets BREATH_TOP = new Insets (10,0,0,0); + protected static final Insets BREATH_TOP_LEFT = new Insets (10,10,0,0); + protected static final Insets BREATH_LEFT = new Insets (0,10,0,0); protected static final Font MSG_AREA_FONT = new Font ("Courier", Font.PLAIN, 10); protected static final Font TITLE_FONT = new Font ("Serif", Font.BOLD, 20); protected static final Color TITLE_FGCOLOR = new Color (12, 55, 241); @@ -213,7 +215,8 @@ JCheckBox box = new JCheckBox (label, isSelected); if (mnemonic > 0) box.setMnemonic (mnemonic); - box.addItemListener (listener); + if (listener != null) + box.addItemListener (listener); box.setFocusPainted (false); return box; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 08:38:39 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 15:21:57 1.10 @@ -58,6 +58,16 @@ static final String DP_REG_ST_ISA = "dp-reg-st-isa"; static final String DP_REG_ST_COPY_BY_SELECT = "dp-reg-st-cbs"; // type: Boolean + static final String DP_REG_S_NAME = "dp-reg-s-name"; + static final String DP_REG_S_AUTH = "dp-reg-s-auth"; + static final String DP_REG_S_EMAIL = "dp-reg-s-email"; + static final String DP_REG_S_DESC = "dp-reg-s-desc"; + static final String DP_REG_S_URL = "dp-reg-s-url"; + static final String DP_REG_S_RDF_URL = "dp-reg-s-rdf-url"; + static final String DP_REG_S_RDF_PATH = "dp-reg-s-rdf-path"; + static final String DP_USE_SIGNATURE = "dp-use-signature"; // type: Boolean + static final String DP_USE_AUTHORITATIVE = "dp-use-auth"; // type: Boolean + /** A filename containing Java properties that configure the dashboard. */ static final String DASHBOARD_PROPERTIES_FILE = "dashboard.properties"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 08:38:39 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 15:21:57 1.16 @@ -1,3 +1,8 @@ +* show/store XML sent to register this service + (a place for using it other time?) + +* how to squeeze too long combo boxes into smaller place ? + * registration: selecting an authority is really propagated to the text fields? (Do for data type registration the same as was done for Namespace registration.) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 08:38:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 15:21:57 1.7 @@ -13,6 +13,7 @@ import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyServiceType; +import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; @@ -73,7 +74,8 @@ static final String COPY_BY_SELECT_NS = "ns-copy-by-select"; static final String COPY_BY_SELECT_ST = "st-copy-by-select"; static final String COPY_BY_SELECT_DT = "dt-copy-by-select"; - static final String COPY_BY_SELECT_S = "s-copy-by-select"; + static final String USE_SIGNATURE = "use-signature"; + static final String USE_AUTHORITATIVE = "use-authoritative"; // associated model working behind the scenes RegistryModel registryModel; @@ -86,14 +88,18 @@ JButton sRegisterButton; CommonConsole console; - JTextFieldWithHistory dtName, nsName, stName; - JTextFieldWithHistory dtAuth, nsAuth, stAuth; - JTextFieldWithHistory dtEmail, nsEmail, stEmail; - JTextArea dtDescArea, nsDescArea, stDescArea; + JTextFieldWithHistory dtName, nsName, stName, sName; + JTextFieldWithHistory dtAuth, nsAuth, stAuth, sAuth; + JTextFieldWithHistory dtEmail, nsEmail, stEmail, sEmail; + JTextArea dtDescArea, nsDescArea, stDescArea, sDescArea; JLabel stISA; + JLabel sType, labelSigURL, labelRDFPath; + JTextFieldWithHistory sURL, sSigURL; + JFileChooserWithHistory localRDFFile; + JCheckBox useAuth; - MobyException dtException, nsException, stException; - MobyException dtUnregException, nsUnregException, stUnregException; + MobyException dtException, nsException, stException, sException; + MobyException dtUnregException, nsUnregException, stUnregException, sUnregException; // shared icons protected static Icon menuAddISAIcon, menuAddISAIconDis; @@ -126,6 +132,12 @@ final static String SERVICE_TYPE_UNREG_PROLOGUE = "An error occured when trying to unregister a service type.\n\n"; + final static String SERVICE_PROLOGUE = + "An error occured when trying to register a new service.\n\n"; + + final static String SERVICE_UNREG_PROLOGUE = + "An error occured when trying to unregister a service.\n\n"; + /********************************************************************* * Default constructor. ********************************************************************/ @@ -306,11 +318,173 @@ protected JPanel getServiceRegistration() { JPanel p = new JPanel (new GridBagLayout()); - SwingUtils.addComponent (p, new JLabel ("Not Yet Implemented"), 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + + // text fields to define new service + JLabel labelSName = new JLabel ("Service name"); + sName = createText (null, "serviceName", DP_REG_S_NAME); + JLabel labelSAuth = new JLabel ("Authority"); + sAuth = createText (null, "serviceAuth", DP_REG_S_AUTH); + JLabel labelSEmail = new JLabel ("Contact email"); + sEmail = createText (null, "serviceEmail", DP_REG_S_EMAIL); + JLabel labelSURL = new JLabel ("Service endpoint - URL"); + sURL = createText (null, "serviceURL", DP_REG_S_URL); + boolean usingAuth = getPrefValue (USE_AUTHORITATIVE, true); + useAuth = + createCheckBox ("authoritative", usingAuth, KeyEvent.VK_A, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + onAuth (e.getStateChange() == ItemEvent.SELECTED); + } + }); + onAuth (usingAuth); + + // group of fields for RDF signature + labelSigURL = new JLabel ("RDF endpoint - signature URL"); + sSigURL = createText (null, "signatureURL", DP_REG_S_RDF_URL); + labelRDFPath = new JLabel ("Where to store RDF document"); + String defValue = + System.getProperty ("java.io.tmpdir") + + System.getProperty ("file.separator") + + "service.rdf"; + localRDFFile = createFileSelector ("File name for RDF service signature", + "Select", + defValue, + "localRDFFile", + DP_REG_S_RDF_PATH); + boolean usingSignature = getPrefValue (USE_SIGNATURE, false); + JCheckBox useSignature = + createCheckBox ("Use RDF signature", usingSignature, KeyEvent.VK_R, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + onUseRDFSignature (e.getStateChange() == ItemEvent.SELECTED); + } + }); + onUseRDFSignature (usingSignature); + + JPanel pRDF = createTitledPanel ("Service RDF Signature"); + SwingUtils.addComponent (pRDF, useSignature, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (pRDF, labelSigURL, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (pRDF, sSigURL, 0, 2, 1, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (pRDF, labelRDFPath, 0, 3, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (pRDF, localRDFFile, 0, 4, 1, 1, HORI, NWEST, 1.0, 0.0); + + // service type + JPanel serviceType = new JPanel (new GridBagLayout()); + JLabel labelST = new JLabel ("Service type: "); + sType = new JLabel (""); + SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + + // put together service fields + JPanel defs = new JPanel (new GridBagLayout()); + SwingUtils.addComponent (defs, labelSName, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sName, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, useAuth, 1, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_LEFT); + SwingUtils.addComponent (defs, labelSAuth, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sAuth, 0, 3, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, labelSEmail, 0, 4, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sEmail, 0, 5, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, labelSURL, 0, 6, 2, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (defs, sURL, 0, 7, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (defs, pRDF, 0, 8, 2, 1, HORI, NWEST, 1.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (defs, serviceType, 0, 9, 2, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + + // description + sDescArea = new JTextArea(); + JPanel sDesc = createCustomTextArea ("Description", null, "serviceDesc", DP_REG_S_DESC, + sDescArea); + + // a tree with all service types + ServiceTypesBoard stBoard = + new ServiceTypesBoard (registryModel, + console, + propertyChannel, + new CustomServiceTypesTree2 (registryModel, console)); + stBoard.updateTree (CommonTree.SORTED_BY_NAME); + + JPanel main = createTitledPanel ("New Service"); + SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); + SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + + // sub-panels for input/output data + JTabbedPane dataPane = new JTabbedPane(); + dataPane.addTab ("Primary Inputs", getPrimaryInputs()); + dataPane.addTab ("Secondary Inputs", getSecondaryInputs()); + dataPane.addTab ("Outputs", getOutputs()); + + // split data defs and service fields + JSplitPane split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, + main, + dataPane); + split.setResizeWeight (0.3); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + + // registration button + sRegisterButton = + createButton (" Register Service ", + "Register a new service in a Biomoby registry", + KeyEvent.VK_S, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + onRegisterService(); + } + }); + sRegisterButton.setIcon (registerIcon); + sRegisterButton.setDisabledIcon (registerIconDis); + + // put it together + SwingUtils.addComponent (p, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + SwingUtils.addComponent (p, sRegisterButton, 0, 1, 1, 1, NONE, CENTER, 0.0, 0.0); return p; } /************************************************************************** + * + **************************************************************************/ + protected void onUseRDFSignature (boolean enabled) { + sSigURL.setEnabled (enabled); + labelSigURL.setEnabled (enabled); + localRDFFile.setEnabled (enabled); + labelRDFPath.setEnabled (enabled); + setPrefValue (USE_SIGNATURE, enabled); + propertyChannel.put (DP_USE_SIGNATURE, new Boolean (enabled).toString()); + } + + /************************************************************************** + * + **************************************************************************/ + protected void onAuth (boolean enabled) { + setPrefValue (USE_AUTHORITATIVE, enabled); + propertyChannel.put (DP_USE_AUTHORITATIVE, new Boolean (enabled).toString()); + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getPrimaryInputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getSecondaryInputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** + * + **************************************************************************/ + protected JPanel getOutputs() { + JPanel p = new JPanel (new GridBagLayout()); + return p; + } + + /************************************************************************** * Panel to register a namespace and a service type. **************************************************************************/ protected JPanel getOtherRegistration() { @@ -728,6 +902,75 @@ /************************************************************************** * **************************************************************************/ + public void onRegisterService() { + sRegisterButton.setEnabled (false); + sException = null; + final SwingWorker worker = new SwingWorker() { + public Object construct() { + try { + String value = sName.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Service name is still missing. Please fill it first."); + return null; + } + MobyService service = new MobyService (value); + + value = sAuth.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have an authority.\n" + + "Please fill it."); + return null; + } + service.setAuthority (value); + + value = sEmail.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have a contact person.\n" + + "Please fill in an email address."); + return null; + } + service.setEmailContact (value); + + value = sDescArea.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must have a description.\n" + + "Please fill in the most detailed one."); + return null; + } + service.setDescription (value); + + value = sType.getText(); + if (UUtils.isEmpty (value)) { + sException = new MobyException ("Every service must belong to an existing service type.\n" + + "Please select a type from available service types."); + return null; + } + service.setType (value); + + console.setText ("Service to be registered:\n" + + "-------------------------\n" + service.toString()); + registryModel.registerService (service); + console.setText ("\nRegistration successful!\n\n"); + + } catch (MobyException e) { + sException = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (sException != null) + error (SERVICE_PROLOGUE, sException); + sRegisterButton.setEnabled (true); + } + }; + worker.start(); + } + + /************************************************************************** + * + **************************************************************************/ public String getName() { return "Biomoby Registration"; } @@ -1235,4 +1478,48 @@ } + + /************************************************************************** + * + * Customized tree of service types - use for service registration + * + **************************************************************************/ + protected class CustomServiceTypesTree2 + extends ServiceTypesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomServiceTypesTree2 (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected service type to the service fields. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) + sType.setText (nodeObject.getValue()); + } + } } From mwilkinson at pub.open-bio.org Thu Nov 3 16:39:42 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Thu, 3 Nov 2005 11:39:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511031639.jA3Gdgsn021261@pub.open-bio.org> mwilkinson Thu Nov 3 11:39:42 EST 2005 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl In directory pub.open-bio.org:/tmp/cvs-serv21242 Modified Files: ConstructingYourService.html Log Message: fixed a URL typo and added a link to the register service tutorial moby-live/Docs/MOBY-S_API/Perl ConstructingYourService.html,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html 2005/09/28 00:24:26 1.3 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/ConstructingYourService.html 2005/11/03 16:39:42 1.4 @@ -27,7 +27,7 @@

    • Does an appropriate service type term already exist in the Service Ontology? You need to register your new service type in +href="RegisterServiceType.html">register your new service type in the MOBY-S service ontology.
    • Do the namespaces that you are going to use in your objects @@ -39,7 +39,7 @@
    If all object types, service types, and namespaces already exist in -the ontology then you are ready to set up your service. +the ontology then you are ready to set up your service. Once you have finished setting it up following the guidelines below, you will then need to Register your service for it to become visible on the MOBY Central registry. In Perl, MOBY-S services are currently limited to SOAP over HTTP; the name of the method call (i.e. the SOAP Action header) is the same as @@ -340,5 +340,9 @@ return ($dbh); } + + +When you have finished writing your service, test it (link coming soon!) and then Register it. - \ No newline at end of file + + From gss at pub.open-bio.org Thu Nov 3 22:31:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:31:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MV0aK022160@pub.open-bio.org> gss Thu Nov 3 17:31:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv22135/src/org/semanticmoby/graph Modified Files: MOBYResource.java Log Message: Added inputURI, outputURI s-moby/ref-impl/core/src/org/semanticmoby/graph MOBYResource.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/10/31 17:24:54 1.4 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/11/03 22:31:00 1.5 @@ -24,18 +24,30 @@ private Statement nameStmt; /** - * A one line description of the provider; stored in the + * A one line description of the resource; stored in the * MOBY.oneLineDescription property */ private Statement oneLineDescriptionStmt; /** * A URI at which more information can be retrieved about the - * provider; stored in the MOBY.moreInfoURI property + * resource; stored in the MOBY.moreInfoURI property */ private Statement aboutURIStmt; /** + * A URI that can be accessed to get a page for an end user to fill in + * information for this resource; stored in the MOBY.inputURI property + */ + private Statement inputURIStmt; + + /** + * A URI that can be accessed to display this resource; stored in the + * MOBY.outputURI property + */ + private Statement outputURIStmt; + + /** * The MOBYGraphNode objects that this Resource operates on (instances of * either MOBYCollection or MOBYGraph), each keyed by the statement that * links this resource's URI to it via a hasMapping property @@ -92,13 +104,21 @@ * Constructor for creating an instance from existing RDF statements, as * is the case when parsing an existing model. */ - MOBYResource(Model jenaModel, Statement definingStmt, - Statement nameStmt, Statement oneLineDescriptionStmt, - Statement aboutURIStmt, Map operatesOnGraphs) { + MOBYResource(Model jenaModel, + Statement definingStmt, + Statement nameStmt, + Statement oneLineDescriptionStmt, + Statement aboutURIStmt, + Statement inputURIStmt, + Statement outputURIStmt, + Map operatesOnGraphs) { super(jenaModel, definingStmt); + this.nameStmt = nameStmt; this.oneLineDescriptionStmt = oneLineDescriptionStmt; this.aboutURIStmt = aboutURIStmt; + this.inputURIStmt = inputURIStmt; + this.outputURIStmt = outputURIStmt; for (Iterator it = operatesOnGraphs.keySet().iterator(); it.hasNext();) { Statement operatesOnStmt = (Statement) it.next(); @@ -191,7 +211,9 @@ * Return a descriptive name for the provider. */ public String getName() { - return (nameStmt == null) ? "" : nameStmt.getObject().toString(); + return (nameStmt == null) + ? null + : nameStmt.getObject().toString(); } /** @@ -199,7 +221,7 @@ */ public String getOneLineDescription() { return (oneLineDescriptionStmt == null) - ? "" + ? null : oneLineDescriptionStmt.getObject().toString(); } @@ -209,11 +231,30 @@ */ public String getAboutURI() { return (aboutURIStmt == null) - ? "" + ? null : aboutURIStmt.getObject().toString(); } /** + * Return a URI that can be accessed to get a page for an end user + * to fill in information for this resource + */ + public String getInputURI() { + return (inputURIStmt == null) + ? null + : inputURIStmt.getObject().toString(); + } + + /** + * Return a URI that can be accessed to display this resource + */ + public String getOutputURI() { + return (outputURIStmt == null) + ? null + : outputURIStmt.getObject().toString(); + } + + /** * Serialize the underlying model as RDF/XML to the given output stream */ public void serialize(OutputStream out) { From gss at pub.open-bio.org Thu Nov 3 22:31:18 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:31:18 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MVIOi022198@pub.open-bio.org> gss Thu Nov 3 17:31:18 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph In directory pub.open-bio.org:/tmp/cvs-serv22173/src/org/semanticmoby/graph Modified Files: Parser.java Log Message: Parse inputURI and outputURI s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/03 22:31:18 1.3 @@ -198,7 +198,6 @@ // exception if any are missing // Statement nameStmt = model.getProperty(headResource, MOBY.name); - if (nameStmt == null) { throw new NonCanonicalException("Missing " + MOBY.name + " property", model); @@ -206,18 +205,16 @@ Statement oneLineDescriptionStmt = model.getProperty(headResource, MOBY.oneLineDescription); - if (oneLineDescriptionStmt == null) { throw new NonCanonicalException("Missing " + MOBY.oneLineDescription + " property", model); } + // Consider aboutURI, inputURI, and outputURI to be optional + // Statement aboutURIStmt = model.getProperty(headResource, MOBY.aboutURI); - - if (aboutURIStmt == null) { - throw new NonCanonicalException("Missing " + MOBY.aboutURI + - " property", model); - } + Statement inputURIStmt = model.getProperty(headResource, MOBY.inputURI); + Statement outputURIStmt = model.getProperty(headResource, MOBY.outputURI); // A resource can have multiple operatesOn properties, each of // which leads to a subgraph. Parse each of these subgraphs. @@ -236,8 +233,14 @@ // Create and return a new Resource object using the resource URI, name, // oneLineDescription, aboutURI, and collection of operatesOn subgraphs // - return new MOBYResource(model, typeStmt, nameStmt, - oneLineDescriptionStmt, aboutURIStmt, operatesOn); + return new MOBYResource(model, + typeStmt, + nameStmt, + oneLineDescriptionStmt, + aboutURIStmt, + inputURIStmt, + outputURIStmt, + operatesOn); } /** From gss at pub.open-bio.org Thu Nov 3 22:31:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:31:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032231.jA3MVgOi022236@pub.open-bio.org> gss Thu Nov 3 17:31:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv22211/src/org/semanticmoby/vocabulary Modified Files: MOBY.java Log Message: Added inputURI and outputURI; formatting s-moby/ref-impl/core/src/org/semanticmoby/vocabulary MOBY.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/10/27 22:22:09 1.4 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/03 22:31:42 1.5 @@ -19,30 +19,50 @@ * value is a serialized RDF/XML graph. */ public final static String GRAPH_PARAMETER_NAME = "graph"; - public static final Resource Resource = resource(getURI(), "Resource"); - public static final Resource Graph = resource(getURI(), "Graph"); - public static final Resource Subject = resource(getURI(), "Subject"); - public static final Resource Object = resource(getURI(), "Object"); - public static final Property name = property(getURI(), "name"); + + public static final Resource Resource = + resource(getURI(), "Resource"); + + public static final Resource Graph = + resource(getURI(), "Graph"); + + public static final Resource Subject = + resource(getURI(), "Subject"); + + public static final Resource Object = + resource(getURI(), "Object"); + + public static final Property name = + property(getURI(), "name"); + public static final Property oneLineDescription = property(getURI(), "oneLineDescription"); - public static final Property aboutURI = + + public static final Property aboutURI = property(getURI(), "aboutURI"); - public static final Property inputURI = + + public static final Property inputURI = property(getURI(), "inputURI"); - public static final Property outputURI = + + public static final Property outputURI = property(getURI(), "outputURI"); - public static final Property operatesOn = + + public static final Property operatesOn = property(getURI(), "operatesOn"); - public static final Property hasMapping = + + public static final Property hasMapping = property(getURI(), "hasMapping"); - public static final Property mapsTo = + + public static final Property mapsTo = property(getURI(), "mapsTo"); + public static final Property lastModifiedDate = property(getURI(), "lastModifiedDate"); - public static final Property Property = + + public static final Property Property = property(getURI(), "Property"); - public static final Property keyword = + + public static final Property keyword = property(getURI(), "keyword"); public static String getURI() { @@ -50,15 +70,11 @@ return "http://www.semanticmoby.org/ontologies/core/"; } - public static String getNsPrefix() { - return "moby"; } - public static void addNsPrefix(Model model) { - model.setNsPrefix(getNsPrefix(), getURI()); } } From gss at pub.open-bio.org Thu Nov 3 22:32:25 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:32:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032232.jA3MWPcH022274@pub.open-bio.org> gss Thu Nov 3 17:32:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22249/src/org/semanticmoby/ref/servlets Modified Files: BaseServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets BaseServlet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java 2005/10/09 01:11:21 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/BaseServlet.java 2005/11/03 22:32:25 1.5 @@ -4,12 +4,8 @@ import org.semanticmoby.ref.tools.*; -import org.semanticmoby.servlet.*; - import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 22:32:38 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:32:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032232.jA3MWc6x022312@pub.open-bio.org> gss Thu Nov 3 17:32:38 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22287/src/org/semanticmoby/ref/servlets Modified Files: DiscoveryServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets DiscoveryServlet.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/03 03:22:54 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/DiscoveryServlet.java 2005/11/03 22:32:38 1.8 @@ -1,8 +1,5 @@ package org.semanticmoby.ref.servlets; -import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.rdql.*; - import org.semanticmoby.graph.*; import org.semanticmoby.ref.tools.*; @@ -11,8 +8,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 22:33:05 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MX5Z9022350@pub.open-bio.org> gss Thu Nov 3 17:33:05 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22325/src/org/semanticmoby/ref/servlets Modified Files: KeywordSearchServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets KeywordSearchServlet.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/03 03:22:54 1.9 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/KeywordSearchServlet.java 2005/11/03 22:33:05 1.10 @@ -5,14 +5,11 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.ref.tools.*; import org.semanticmoby.ref.tools.db.*; import org.semanticmoby.ref.tools.db.DBConnection; import org.semanticmoby.tools.Util; -import org.semanticmoby.vocabulary.MOBY; - import java.io.*; import java.sql.*; @@ -54,7 +51,7 @@ sessionData = (SessionData) request.getSession().getAttribute("sessionData"); - DBConnection db = new DBConnection(); + DBConnection db = new DBConnection(getServletContext().getRealPath("/")); StorageManager mgr = new StorageManager(); ModelRDB model = (ModelRDB) mgr.openDBModel(); @@ -84,11 +81,8 @@ String uri = result.getString(1); row.add(uri); - System.out.println(" ##### 1 #####"); MOBYResource resource = resourceAt(uri, model); - System.out.println(" ##### 2 #####"); String name = resource.getName(); - System.out.println(" ##### 3 #####"); row.add(name); String description = resource.getOneLineDescription(); From gss at pub.open-bio.org Thu Nov 3 22:33:24 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:24 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXONi022388@pub.open-bio.org> gss Thu Nov 3 17:33:24 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22363/src/org/semanticmoby/ref/servlets Modified Files: ResourceInvestigationServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets ResourceInvestigationServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java 2005/11/03 03:22:54 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/ResourceInvestigationServlet.java 2005/11/03 22:33:23 1.3 @@ -2,17 +2,10 @@ import org.apache.commons.logging.*; -import org.semanticmoby.graph.*; - import org.semanticmoby.ref.tools.*; -import org.semanticmoby.ref.tools.db.*; - -import org.semanticmoby.servlet.*; import java.io.*; -import java.util.logging.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 22:33:34 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:34 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXYbl022426@pub.open-bio.org> gss Thu Nov 3 17:33:34 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets In directory pub.open-bio.org:/tmp/cvs-serv22401/src/org/semanticmoby/ref/servlets Modified Files: SqlQueryServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets SqlQueryServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java 2005/10/28 04:12:26 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/SqlQueryServlet.java 2005/11/03 22:33:34 1.3 @@ -1,17 +1,7 @@ package org.semanticmoby.ref.servlets; -import org.semanticmoby.graph.*; - -import org.semanticmoby.ref.tools.*; - -import org.semanticmoby.vocabulary.MOBY; - import java.io.*; -import java.sql.*; - -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 22:33:47 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:33:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032233.jA3MXlOr022464@pub.open-bio.org> gss Thu Nov 3 17:33:47 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv22439/src/org/semanticmoby/ref/servlets/dev Modified Files: ResourceListServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev ResourceListServlet.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/01 16:28:12 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/ResourceListServlet.java 2005/11/03 22:33:47 1.3 @@ -10,8 +10,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; From gss at pub.open-bio.org Thu Nov 3 22:34:14 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:34:14 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032234.jA3MYExg022502@pub.open-bio.org> gss Thu Nov 3 17:34:14 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example In directory pub.open-bio.org:/tmp/cvs-serv22477/src/org/semanticmoby/ref/servlets/example Modified Files: HelloWorldServlet.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example HelloWorldServlet.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/01 16:28:12 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/example/HelloWorldServlet.java 2005/11/03 22:34:14 1.7 @@ -2,18 +2,12 @@ import org.semanticmoby.graph.*; -import org.semanticmoby.ref.servlets.*; - import org.semanticmoby.servlet.*; import java.io.*; -import java.util.*; - -import javax.servlet.*; import javax.servlet.http.*; - public class HelloWorldServlet extends AbstractMobyServlet { /** From gss at pub.open-bio.org Thu Nov 3 22:34:31 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:34:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032234.jA3MYVcT022540@pub.open-bio.org> gss Thu Nov 3 17:34:31 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22515/src/org/semanticmoby/ref/tools Modified Files: DiscoveryQuery.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools DiscoveryQuery.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/DiscoveryQuery.java 2005/11/03 22:34:31 1.8 @@ -5,7 +5,6 @@ import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.rdql.*; import com.hp.hpl.jena.shared.*; -import com.hp.hpl.jena.util.iterator.*; import com.hp.hpl.jena.vocabulary.RDF; import org.semanticmoby.graph.*; @@ -16,10 +15,6 @@ import org.semanticmoby.vocabulary.*; -import java.io.*; - -import java.text.*; - import java.util.*; From gss at pub.open-bio.org Thu Nov 3 22:35:07 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZ7sl022580@pub.open-bio.org> gss Thu Nov 3 17:35:07 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22555/src/org/semanticmoby/ref/tools Modified Files: InvocationBroker.java Log Message: Use getInputURI and getOutputURI on Resource s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/01 16:28:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java 2005/11/03 22:35:07 1.7 @@ -1,7 +1,6 @@ package org.semanticmoby.ref.tools; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; import org.apache.commons.httpclient.*; @@ -13,8 +12,6 @@ import java.io.*; -import java.util.*; - import javax.servlet.*; import javax.servlet.http.*; @@ -109,7 +106,7 @@ // try { - String inputURI = getInputURI(resource); + String inputURI = resource.getInputURI(); if (inputURI == null) { @@ -165,7 +162,7 @@ Parser parser = new Parser(model); MOBYResource resultsResource = parser.parseResource(); - String outputURI = getOutputURI(resultsResource); + String outputURI = resultsResource.getOutputURI(); if (outputURI == null) { @@ -249,49 +246,6 @@ dispatcher.forward(request, response); } - - private String getInputURI(MOBYResource resource) { - - try { - - Model model = resource.getJenaModel(); - Statement stmt = - model.getProperty(resource.getResource(), MOBY.inputURI); - - if (stmt != null) { - - return stmt.getString(); - } else { - - return null; - } - } catch (Throwable t) { - - t.printStackTrace(); - - return null; - } - } - - - private String getOutputURI(MOBYResource resource) { - - try { - - Model model = resource.getJenaModel(); - Statement stmt = - model.getProperty(resource.getResource(), MOBY.outputURI); - - return stmt.getString(); - } catch (Throwable t) { - - t.printStackTrace(); - - return null; - } - } - - public void buildInputGUI(MOBYResource resource) { // error message @@ -316,6 +270,6 @@ private boolean requiresInputs(MOBYResource resource) { - return getInputURI(resource) != null; + return resource.getInputURI() != null; } } From gss at pub.open-bio.org Thu Nov 3 22:35:19 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:19 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZJ4n022618@pub.open-bio.org> gss Thu Nov 3 17:35:19 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22593/src/org/semanticmoby/ref/tools Modified Files: KeywordFinder.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordFinder.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordFinder.java 2005/11/03 22:35:19 1.8 @@ -1,7 +1,6 @@ package org.semanticmoby.ref.tools; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; import com.hp.hpl.jena.vocabulary.*; import org.semanticmoby.graph.*; From gss at pub.open-bio.org Thu Nov 3 22:35:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZgSh022656@pub.open-bio.org> gss Thu Nov 3 17:35:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22631/src/org/semanticmoby/ref/tools Modified Files: KeywordList.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordList.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/01 16:28:11 1.4 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/KeywordList.java 2005/11/03 22:35:42 1.5 @@ -1,10 +1,7 @@ package org.semanticmoby.ref.tools; -import com.hp.hpl.jena.rdf.model.*; - import java.util.*; - public class KeywordList { private Set resourceKeywords = new HashSet(); From gss at pub.open-bio.org Thu Nov 3 22:35:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:35:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032235.jA3MZtoc022694@pub.open-bio.org> gss Thu Nov 3 17:35:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv22669/src/org/semanticmoby/ref/tools Modified Files: URIInvestigator.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools URIInvestigator.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/01 16:28:11 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java 2005/11/03 22:35:55 1.8 @@ -1,7 +1,5 @@ package org.semanticmoby.ref.tools; -import com.hp.hpl.jena.rdf.model.Model; - import org.apache.commons.httpclient.util.*; import org.apache.commons.logging.*; From gss at pub.open-bio.org Thu Nov 3 22:36:25 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:36:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MaPCh022732@pub.open-bio.org> gss Thu Nov 3 17:36:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv22707/src/org/semanticmoby/ref/tools/db Modified Files: DBConnection.java Log Message: Removed unused imports; use path relative to web root s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db DBConnection.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/01 16:28:12 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/DBConnection.java 2005/11/03 22:36:25 1.3 @@ -1,18 +1,11 @@ package org.semanticmoby.ref.tools.db; -import java.awt.*; -import java.awt.event.*; - import java.io.*; import java.sql.*; import java.util.*; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.event.*; - /** * @@ -20,13 +13,14 @@ */ public class DBConnection { + private static String webrootPath; public static final int INSERT = 0; public static final int UPDATE = 1; public static final int DELETE = 2; public static final int OTHER = 3; public static String propsFileName = - "../webapps/ROOT/WEB-INF/smoby.properties"; - public static String logFileName = "../logs/smoby.dblog"; + "/WEB-INF/smoby.properties"; + public static String logFileName = "/WEB-INF/smoby.dblog"; public static String dbUserId = "postgres"; public static String dbPassword = "postgres"; public static String dbRepositoryName = "smoby-dev"; @@ -56,7 +50,8 @@ * @param logFileName The name (including path) of the log file to create * for this application. */ - public DBConnection() { + public DBConnection(String webroot) { + webrootPath = webroot; try { startLog(); loadDBProperties(); @@ -123,7 +118,7 @@ try { - File logFile = new File(logFileName); + File logFile = new File(webrootPath + File.separator + logFileName); if (logFile.exists()) { @@ -145,13 +140,13 @@ void loadDBProperties() { try { - + String propsFilePath = webrootPath + File.separator + propsFileName; logMsg(" "); - logMsg("loading database properties from " + propsFileName + + logMsg("loading database properties from " + propsFilePath + " ..."); dbProps = new Properties(); - dbProps.load(new FileInputStream(propsFileName)); + dbProps.load(new FileInputStream(propsFilePath)); if (dbProps.getProperty("DB_USER_ID") != null) { @@ -224,6 +219,7 @@ */ public static void saveDBProperties() { + String propFilePath = webrootPath + File.separator + propsFileName; try { String header = "# Semantic Moby Database Properties"; @@ -241,7 +237,7 @@ dbProps.setProperty("DB_URL", dbUrl); logMsg(" DB_URL = " + dbUrl + "\n"); - dbProps.store(new FileOutputStream(propsFileName), header); + dbProps.store(new FileOutputStream(propFilePath), header); logMsg("finished"); logMsg(" "); From gss at pub.open-bio.org Thu Nov 3 22:36:40 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:36:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MaeVG022770@pub.open-bio.org> gss Thu Nov 3 17:36:39 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv22745/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/01 16:28:12 1.7 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/03 22:36:39 1.8 @@ -2,8 +2,6 @@ import com.hp.hpl.jena.db.*; import com.hp.hpl.jena.rdf.model.*; -import com.hp.hpl.jena.shared.*; -import com.hp.hpl.jena.vocabulary.*; import org.semanticmoby.graph.*; From gss at pub.open-bio.org Thu Nov 3 22:36:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:36:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032236.jA3MatZl022808@pub.open-bio.org> gss Thu Nov 3 17:36:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example In directory pub.open-bio.org:/tmp/cvs-serv22783/src/org/semanticmoby/ref/vocabulary/example Modified Files: Hello.java Log Message: Removed unused imports s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example Hello.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java 2005/10/28 04:12:27 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/vocabulary/example/Hello.java 2005/11/03 22:36:55 1.4 @@ -1,6 +1,5 @@ package org.semanticmoby.ref.vocabulary.example; -import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*; import org.semanticmoby.vocabulary.*; From gss at pub.open-bio.org Thu Nov 3 22:37:12 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:37:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032237.jA3MbCmX022842@pub.open-bio.org> gss Thu Nov 3 17:37:12 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv22813/WebRoot/examples/hello Modified Files: hello-world.rdf hello-world.n3 Log Message: Changed outputURI s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello hello-world.rdf,1.5,1.6 hello-world.n3,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/10/28 04:08:39 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/03 22:37:11 1.6 @@ -11,10 +11,11 @@ - + VPIN Hello World resource Simple example of a VPIN resource + http://www.semanticmoby.org/examples/hello-world http://www.semanticmoby.org/examples/display-hello-world =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/10/28 04:08:39 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/03 22:37:11 1.6 @@ -10,7 +10,8 @@ a moby:Resource, exterms:GreetingResource ; moby:name "VPIN Hello World resource" ; moby:oneLineDescription "Simple example of a VPIN resource" ; - moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world-results" ; + moby:aboutURI "http://www.semanticmoby.org/examples/hello-world" ; + moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world" ; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Thu Nov 3 22:37:30 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Thu, 3 Nov 2005 17:37:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511032237.jA3MbU6m022884@pub.open-bio.org> gss Thu Nov 3 17:37:29 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core In directory pub.open-bio.org:/tmp/cvs-serv22847/WebRoot/ontologies/core Modified Files: operatesOn.n3 Resource Resource.n3 operatesOn Log Message: Ontology changes s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core operatesOn.n3,1.2,1.3 Resource,1.1,1.2 Resource.n3,1.1,1.2 operatesOn,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn.n3 2005/11/03 22:37:29 1.3 @@ -6,5 +6,8 @@ moby:operatesOn a owl:ObjectProperty ; - rdfs:domain moby:Service ; - rdfs:range moby:Graph . + rdfs:domain moby:Resource ; + rdfs:range [ + a owl:Class ; + owl:unionOf (moby:Graph rdf:List rdf:Bag rdf:Seq rdf:Alt) + ] . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource 2005/11/03 22:37:29 1.2 @@ -9,7 +9,7 @@ 1 - + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Resource.n3 2005/11/03 22:37:29 1.2 @@ -4,7 +4,7 @@ @prefix rdf: . @prefix owl: . -moby:Service +moby:Resource a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/03 22:37:29 1.3 @@ -1,12 +1,36 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file From gss at pub.open-bio.org Fri Nov 4 17:45:06 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 4 Nov 2005 12:45:06 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511041745.jA4Hj6rG027213@pub.open-bio.org> gss Fri Nov 4 12:45:06 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet In directory pub.open-bio.org:/tmp/cvs-serv27186/src/org/semanticmoby/servlet Modified Files: AbstractMobyServlet.java Log Message: When responding to GET or POST, set content type of response to application/RDF+XML s-moby/ref-impl/core/src/org/semanticmoby/servlet AbstractMobyServlet.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java 2005/10/31 17:24:54 1.5 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/servlet/AbstractMobyServlet.java 2005/11/04 17:45:06 1.6 @@ -37,6 +37,7 @@ // Write everything from the reader to the writer // + response.setContentType("application/rdf+xml"); PrintWriter writer = response.getWriter(); String line; @@ -76,13 +77,11 @@ protected BufferedReader getFileReader(String fileName) { try { - - return new BufferedReader(new InputStreamReader(getServletContext() - .getResourceAsStream(fileName))); + return new BufferedReader( + new InputStreamReader( + getServletContext().getResourceAsStream(fileName))); } catch (Throwable t) { - t.printStackTrace(); - return null; } } @@ -134,6 +133,7 @@ // Send the graph back in response // + response.setContentType("application/rdf+xml"); resource.serialize(out); } catch (Throwable t) { From gss at pub.open-bio.org Sat Nov 5 00:46:33 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 4 Nov 2005 19:46:33 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511050046.jA50kXCX028368@pub.open-bio.org> gss Fri Nov 4 19:46:33 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv28343/WebRoot/developer Modified Files: dev-tools.jsp Log Message: Fixed URIs s-moby/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.jsp,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/04 20:39:40 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/05 00:46:33 1.4 @@ -13,7 +13,7 @@ Convert a Graph to a Different Format -
    + Paste a graph, select its input format, and press "Convert Graph" to convert to the other format @@ -48,61 +48,6 @@
    -
    - -

    - List All Statements in the S-MOBY Metadata Repository -

    - -
    - - - -
    - -
    - -

    - Validate an OWL Graph using Jena -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see what type of - OWL the graph represents - - - -
    -
    - - - -
    - -
    - -

    - Validate an OWL Graph for MOBY Canonical Form -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see if it is MOBY - canonical form - - - -
    -
    - - - -
    - -
    - <%@ include file="/footer.jsp" %> From gss at pub.open-bio.org Sat Nov 5 00:47:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 4 Nov 2005 19:47:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511050047.jA50l08r028398@pub.open-bio.org> gss Fri Nov 4 19:47:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv28373/WebRoot/developer Modified Files: index.jsp Log Message: Changed wording to omit validation s-moby/ref-impl/semanticmoby.org/WebRoot/developer index.jsp,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp 2005/11/04 20:39:40 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/index.jsp 2005/11/05 00:47:00 1.6 @@ -13,17 +13,6 @@ - - - - From senger at pub.open-bio.org Sat Nov 5 17:51:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 12:51:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp4ib001464@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/service/dashboard/images Added Files: magentaDiamond.gif smallAddData.gif smallAddData_dis.gif smallDone.gif smallEdit.gif smallEdit_dis.gif smallInfo.gif smallPage.gif smallPageStar.gif smallTrash.gif smallTrash_gis.gif smallTree.gif small_yellow.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images magentaDiamond.gif,NONE,1.1 smallAddData.gif,NONE,1.1 smallAddData_dis.gif,NONE,1.1 smallDone.gif,NONE,1.1 smallEdit.gif,NONE,1.1 smallEdit_dis.gif,NONE,1.1 smallInfo.gif,NONE,1.1 smallPage.gif,NONE,1.1 smallPageStar.gif,NONE,1.1 smallTrash.gif,NONE,1.1 smallTrash_gis.gif,NONE,1.1 smallTree.gif,NONE,1.1 small_yellow.gif,NONE,1.1 From senger at pub.open-bio.org Sat Nov 5 17:51:05 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 12:51:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp5FN001483@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/02 06:39:06 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/05 17:51:04 1.5 @@ -87,6 +87,13 @@ } } + public void setDataType (MobyDataType dataType) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).setDataType (dataType); + } + } + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: From senger at pub.open-bio.org Sat Nov 5 17:51:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 12:51:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511051751.jA5Hp4LY001449@pub.open-bio.org> senger Sat Nov 5 12:51:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1394/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java CommonTree.java Dashboard.java DataTypesTree.java NOTES NamespacesTree.java RegistrationPanel.java RegistryPanel.java ServiceTypesTree.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.13,1.14 CommonTree.java,1.11,1.12 Dashboard.java,1.10,1.11 DataTypesTree.java,1.8,1.9 NOTES,1.16,1.17 NamespacesTree.java,1.3,1.4 RegistrationPanel.java,1.7,1.8 RegistryPanel.java,1.16,1.17 ServiceTypesTree.java,1.4,1.5 ServicesTree.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/03 15:21:57 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/05 17:51:04 1.14 @@ -17,6 +17,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.JSplitPane; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -406,6 +407,32 @@ } /********************************************************************* + * Split two components horizontaly with given weight. Add some + * common style. + ********************************************************************/ + protected JSplitPane hSplit (Component a, Component b, double weight) { + JSplitPane split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, + a, b); + split.setResizeWeight (0.5); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + return split; + } + + /********************************************************************* + * Split two components vertically with given weight. Add some + * common style. + ********************************************************************/ + protected JSplitPane vSplit (Component a, Component b, double weight) { + JSplitPane split = new JSplitPane (JSplitPane.VERTICAL_SPLIT, + a, b); + split.setResizeWeight (0.5); + split.setContinuousLayout (true); + split.setOneTouchExpandable (true); + return split; + } + + /********************************************************************* * ********************************************************************/ protected String getPrefValue (String key, =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/03 08:38:39 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 17:51:04 1.12 @@ -84,6 +84,7 @@ static protected Icon smallTIcon, smallTIconDis; static protected Icon smallIIcon, smallIIconDis; static protected Icon smallOIcon, smallOIconDis; + static protected Icon sLeafIcon, stLeafIcon, dtLeafIcon, nsLeafIcon; protected String rootNode; @@ -123,11 +124,18 @@ loadIcons(); } - // + /********************************************************************* + * + ********************************************************************/ class CommonTreeCellRenderer extends DefaultTreeCellRenderer { HashSet toBeHighlighted; + Icon leafImage; + + public void setLeafIcon (Icon icon) { + leafImage = icon; + } public void setToBeHighlighted (HashSet toBeHighlighted) { this.toBeHighlighted = toBeHighlighted; @@ -160,9 +168,9 @@ setText (rootNode); } - // TBD: whale icon? -// if (leaf) -// ((JLabel)c).setIcon (icons [COMPUTER]); + // some icons + if (leaf) + ((JLabel)c).setIcon (leafImage); // do highlight @@ -176,6 +184,14 @@ } /********************************************************************* + * + ********************************************************************/ + public void setLeafIcon (Icon icon) { + CommonTreeCellRenderer r = (CommonTreeCellRenderer)getCellRenderer(); + r.setLeafIcon (icon); + } + + /********************************************************************* * Put this tree in a scrollable pane. ********************************************************************/ public JScrollPane scrollable() { @@ -237,6 +253,11 @@ if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + + if (nsLeafIcon == null) nsLeafIcon = loadIcon ("images/small_yellow.gif"); + if (stLeafIcon == null) stLeafIcon = loadIcon ("images/magentaDiamond.gif"); + if (sLeafIcon == null) sLeafIcon = loadIcon ("images/console.gif"); + if (dtLeafIcon == null) dtLeafIcon = loadIcon ("images/smallPage.gif"); } // =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/10/28 11:30:37 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/05 17:51:04 1.11 @@ -23,10 +23,12 @@ import javax.swing.text.html.HTMLDocument; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; +import javax.swing.SwingUtilities; import java.awt.GridBagLayout; import java.awt.Font; import java.awt.Color; +import java.awt.Insets; import java.awt.Dimension; import java.beans.PropertyChangeListener; @@ -115,7 +117,15 @@ JFrame frame = SwingUtils.createMainFrame (getComponent (propertyChannel), getName()); addMenuBar (frame); - SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); +// SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); + SwingUtils.showMainFrame (frame, new Dimension (1000, 800)); + } + + /************************************************************************** + * + **************************************************************************/ + public Dimension getPreferredSize() { + return new Dimension (800, 640); } /************************************************************************** @@ -211,9 +221,10 @@ ProgressView.monitor.destroy(); // put it all together + Insets BREATH = new Insets (5,5,5,5); SwingUtils.addComponent (p, header, 0, 0, 1, 1, AbstractPanel.HORI, AbstractPanel.NWEST, 1.0, 0.0); SwingUtils.addComponent (p, tabbedPane, 0, 1, 1, 1, AbstractPanel.BOTH, AbstractPanel.NWEST, 1.0, 1.0); - SwingUtils.addComponent (p, statusBar, 0, 2, 1, 1, AbstractPanel.HORI, AbstractPanel.WEST, 1.0, 0.0); + SwingUtils.addComponent (p, statusBar, 0, 2, 1, 1, AbstractPanel.HORI, AbstractPanel.WEST, 1.0, 0.0, BREATH); return p; } @@ -261,6 +272,7 @@ class StatusBar extends JLabel implements PropertyChangeListener { DateFormat df = DateFormat.getTimeInstance(); + Icon myIcon; public StatusBar (String text) { super (text); } @@ -272,6 +284,11 @@ if (prop.equalsIgnoreCase (DP_STATUS_MSG)) setText ("[" + df.format (new Date()) + "] " + value.toString()); } + public Icon getIcon() { + if (myIcon == null) + myIcon = SwingUtils.createIcon ("images/smallDone.gif", Dashboard.class); + return myIcon; + } } /************************************************************************** @@ -302,7 +319,13 @@ public static void main (String[] args) { if (args.length > 0 && args[0].equals ("-nop")) Dashboard.useLoadMonitor = false; - new Dashboard().show(); + + // schedule a job for the event-dispatching thread + SwingUtilities.invokeLater (new Runnable() { + public void run() { + new Dashboard().show(); + } + }); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/03 08:38:39 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/05 17:51:04 1.9 @@ -72,6 +72,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Data Types Menu"); + setLeafIcon (dtLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/03 15:21:57 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/05 17:51:04 1.17 @@ -1,3 +1,8 @@ +* better initial dimension of the whole dashboard +* too much empty space in the dashboard title... + (perhaps to move the icon somewhere else - like a "splash panel") + +--- * show/store XML sent to register this service (a place for using it other time?) @@ -125,8 +130,6 @@ * Icons: - better icon for AddHAS (with a small star) ? small icons to buttons - ? graphics to trees - - small icon to the status bar * alltools2: - JTextFieldWithHistory should remember also an empty value ("") @@ -134,4 +137,4 @@ ? use FileSystemView in file choosers * BUG: not sure why so many (repeated) changes from the actionlistener in JFieldTextWithHistory - + * SwingUtils can be simplified (closeOnExit etc.) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/03 08:38:39 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/05 17:51:04 1.4 @@ -65,6 +65,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Namespaces Menu"); + setLeafIcon (nsLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/03 15:21:57 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 17:51:04 1.8 @@ -17,6 +17,10 @@ import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; +import org.biomoby.shared.MobyData; +import org.biomoby.shared.MobyPrimaryDataSimple; +import org.biomoby.shared.MobyPrimaryDataSet; +import org.biomoby.shared.MobySecondaryData; import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; @@ -33,17 +37,32 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JComboBox; import javax.swing.JPopupMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.AbstractAction; import javax.swing.JComponent; +import javax.swing.DefaultListModel; +import javax.swing.DefaultComboBoxModel; +import javax.swing.DefaultCellEditor; import javax.swing.text.html.HTMLDocument; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; +import javax.swing.table.AbstractTableModel; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableCellRenderer; +import javax.swing.table.TableCellEditor; +import javax.swing.table.TableColumn; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.AbstractCellEditor; +import javax.swing.BorderFactory; +import javax.swing.border.Border; import java.awt.GridBagLayout; import java.awt.Font; +import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -98,6 +117,9 @@ JFileChooserWithHistory localRDFFile; JCheckBox useAuth; + JTable table; + PrimaryDataTableModel tableModel; + MobyException dtException, nsException, stException, sException; MobyException dtUnregException, nsUnregException, stUnregException, sUnregException; @@ -107,6 +129,9 @@ protected static Icon menuAddHASIcon, menuAddHASIconDis; protected static Icon menuUnregisterIcon, menuUnregisterIconDis; protected static Icon registerIcon, registerIconDis; + protected static Icon addDataIcon, addDataIconDis; + protected static Icon editDataIcon, editDataIconDis; + protected static Icon deleteDataIcon, trashIcon; // some texts final static String DATA_TYPE_PROLOGUE = @@ -174,6 +199,20 @@ registerIcon = loadIcon ("images/smallRegister.gif"); if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); + + if (addDataIcon == null) + addDataIcon = loadIcon ("images/smallAddData.gif"); + if (addDataIconDis == null) + addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); + + if (editDataIcon == null) + editDataIcon = loadIcon ("images/smallEdit.gif"); + if (editDataIconDis == null) + editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); + + if (deleteDataIcon == null) deleteDataIcon = loadIcon ("images/smallRemove.gif"); + if (trashIcon == null) trashIcon = loadIcon ("images/smallTrash.gif"); + } /************************************************************************** @@ -464,10 +503,351 @@ * **************************************************************************/ protected JPanel getPrimaryInputs() { - JPanel p = new JPanel (new GridBagLayout()); + + JPanel p = createTitledPanel (""); + + tableModel = new PrimaryDataTableModel(); + table = new JTable (tableModel); + + // set renderers for buttons column + TableColumn buttonColumn = + table.getColumnModel().getColumn (PrimaryDataTableModel.COL_BUTTON); + if (trashIcon != null) + buttonColumn.setMaxWidth (trashIcon.getIconWidth() + 15); + buttonColumn.setCellRenderer (new ButtonRenderer()); + buttonColumn.setCellEditor (new ButtonEditor()); + buttonColumn.setHeaderRenderer (new TableCellRenderer() { + public Component getTableCellRendererComponent + (JTable table, Object value, boolean isSelected, + boolean hasFocus, int row, int column) { + return (JComponent)value; + } + }); + JButton headerButton = new JButton ("", trashIcon); + headerButton.setToolTipText ("Click in this column to remove data from this service"); + buttonColumn.setHeaderValue (headerButton); + + // set renderers for namespaces column + TableColumn nsColumn = + table.getColumnModel().getColumn (PrimaryDataTableModel.COL_NAMESPACE); + nsColumn.setCellRenderer (new NamespaceRenderer()); + nsColumn.setCellEditor (new NamespaceEditor()); + + JScrollPane tablePane = new JScrollPane (table); + + // an add button + JButton addButton = + createButton (" Add new data ", + "Add new data to the service definition", + KeyEvent.VK_A, + new ActionListener() { + public void actionPerformed (ActionEvent e) { + onAddData(); + } + }); + addButton.setIcon (addDataIcon); + addButton.setDisabledIcon (addDataIconDis); + + // a tree with all already existing data types + DataTypesBoard dataTypesBoard = + new DataTypesBoard (registryModel, + console, + propertyChannel, + new CustomDataTypesSimplestTree (registryModel, console)); + dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); + + // a tree with all already existing namespaces + NamespacesBoard namespacesBoard = + new NamespacesBoard (registryModel, + console, + propertyChannel, + new CustomNamespacesSimplestTree (registryModel, console)); + namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); + + // split the trees + JSplitPane split = hSplit (dataTypesBoard, namespacesBoard, 0.5); + + // put it together + SwingUtils.addComponent (p, addButton, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, tablePane, 0, 1, 1, 1, BOTH, NWEST, 1.0, 0.3, BREATH_TOP); + SwingUtils.addComponent (p, split, 0, 2, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); return p; } + + private Vector data = new Vector(); + + /************************************************************************** + * + **************************************************************************/ + protected void onAddData() { + data.addElement (new MobyPrimaryDataSimple ("")); + + int rowCount = tableModel.getRowCount(); + tableModel.fireTableRowsInserted (rowCount-1, rowCount-1); + } + + /************************************************************************** + * + **************************************************************************/ + class DeleteRowButton extends JButton { + int rowToDelete = -1; + public DeleteRowButton() { + super(); + setText (""); + setIcon (deleteDataIcon); + setToolTipText ("Remove this data from this service"); + setFocusPainted (false); + addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + if (rowToDelete >= 0) { + tableModel.removeRow (rowToDelete); + } + } + }); + } + public void setRowToDelete (int row) { + rowToDelete = row; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ButtonRenderer extends DeleteRowButton + implements TableCellRenderer { + public ButtonRenderer() { + setOpaque (true); + } + public Component getTableCellRendererComponent (JTable table, + Object value, + boolean isSelected, + boolean hasFocus, + int row, int column) { + return this; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ButtonEditor extends AbstractCellEditor + implements TableCellEditor { + public Object getCellEditorValue() { + return null; + } + public Component getTableCellEditorComponent (JTable table, + Object value, + boolean isSelected, + int row, int column) { + DeleteRowButton button = new DeleteRowButton(); + button.setRowToDelete (row); + return button; + } + } + + /************************************************************************** + * + **************************************************************************/ + class NamespaceRenderer extends DefaultTableCellRenderer { + + public NamespaceRenderer() { + setOpaque (true); + } + protected void setValue (Object value) { + if (value == null) { + setText (""); + return; + } + MobyPrimaryDataSimple simple = null; + if (value instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)value; + } else if (value instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + MobyNamespace[] nss = simple.getNamespaces(); + if (nss.length == 0) + setText (""); + else if (nss.length == 1) + setText (nss[0].getName()); + else + setText (nss.length + " chosen"); + } + } + } + + /************************************************************************** + * + **************************************************************************/ + class NamespaceEditor extends AbstractCellEditor + implements TableCellEditor { + DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); + + public Object getCellEditorValue() { + return null; + } + + public Component getTableCellEditorComponent (JTable table, + Object value, + boolean isSelected, + int row, int column) { + + JComboBox comboBox = new JComboBox (comboModel); + comboBox.setOpaque (true); + + MobyPrimaryDataSimple simple = null; + if (value instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)value; + } else if (value instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + MobyNamespace[] nss = simple.getNamespaces(); + comboModel.removeAllElements(); + for (int i = 0; i < nss.length; i++) { + comboModel.addElement (nss[i].getName()); + } + } + return comboBox; + } + } + + /************************************************************************** + * + **************************************************************************/ + class PrimaryDataTableModel extends AbstractTableModel { + public final static int COL_BUTTON = 0; + public final static int COL_ARTICLE = 1; + public final static int COL_DATATYPE = 2; + public final static int COL_IN_SET = 3; + public final static int COL_NAMESPACE = 4; + + private String[] columnNames = new String[] { + "Remove", + "Article name", + "Data Type", + "In Set", + "Namespaces" }; + + private Class[] columnClasses = new Class[] { + Integer.class, + String.class, + String.class, + Boolean.class, + MobyData.class }; + + public int getColumnCount() { + return columnNames.length; + } + + public int getRowCount() { + return data.size(); + } + + public String getColumnName (int col) { + return columnNames [col]; + } + + public Class getColumnClass (int col) { + return columnClasses [col]; + } + + private String getDataTypeName (MobyData data) { + if (data == null) return ""; + MobyDataType dataType = null; + if (data instanceof MobyPrimaryDataSimple) + dataType = ((MobyPrimaryDataSimple)data).getDataType(); + else if (data instanceof MobyPrimaryDataSet) + dataType = ((MobyPrimaryDataSet)data).getDataType(); + if (dataType == null) return ""; + String name = dataType.getName(); + return (name == null ? "" : name); + } + + private void setDataTypeName (MobyData data, String name) { + if (data == null) return; + MobyDataType dataType = new MobyDataType (name); + if (data instanceof MobyPrimaryDataSimple) + ((MobyPrimaryDataSimple)data).setDataType (dataType); + else if (data instanceof MobyPrimaryDataSet) + ((MobyPrimaryDataSet)data).setDataType (dataType); + } + + public Object getValueAt (int row, int col) { + try { + MobyData d = (MobyData)data.elementAt (row); + switch (col) { + case COL_BUTTON: return new Integer (row); + case COL_ARTICLE: return d.getName(); + case COL_DATATYPE: return getDataTypeName (d); + case COL_IN_SET: return new Boolean (d instanceof MobyPrimaryDataSet); + case COL_NAMESPACE: return d; + } + } catch (Exception e) { } + return ""; + } + + public void setValueAt (Object value, int row, int col) { + // TBD: I do not know why this method is called after a + // last row has been deleted - so the 'row' is actually + // out of bounds; but if other than last row is deleted + // things work fine... (that's why i put here try{} but I + // am not happy about it + try { + MobyData d = (MobyData)data.elementAt (row); + switch (col) { + case COL_ARTICLE: + d.setName (value.toString()); + break; + case COL_DATATYPE: + setDataTypeName (d, value.toString()); + break; + case COL_IN_SET: + if ( ((Boolean)value).booleanValue() ) { + // change data to a collection (if necessary) + if (d instanceof MobyPrimaryDataSimple) { + MobyPrimaryDataSet set = new MobyPrimaryDataSet (d.getName()); + set.addElement ((MobyPrimaryDataSimple)d); + synchronized (data) { + data.removeElementAt (row); + data.insertElementAt (set, row); + } + } + } else { + // change data to a simple (if necessary) + if (d instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = + ((MobyPrimaryDataSet)d).getElements(); + if (simples.length > 0) { + simples[0].setName (d.getName()); + synchronized (data) { + data.removeElementAt (row); + data.insertElementAt (simples[0], row); + } + } + } + } + break; + } + fireTableCellUpdated (row, col); + } catch (Exception e) { } + } + + public void removeRow (int row) { + data.removeElementAt (row); + fireTableRowsDeleted (row, row); + } + + public boolean isCellEditable (int row, int col) { + return (col != COL_DATATYPE); + } + } + /************************************************************************** * **************************************************************************/ @@ -1522,4 +1902,123 @@ sType.setText (nodeObject.getValue()); } } + + + /************************************************************************** + * + * Customized tree of data types - use for service registration + * + **************************************************************************/ + protected class CustomDataTypesSimplestTree + extends DataTypesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomDataTypesSimplestTree (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeFromPopups (AC_HASA); + removeFromPopups (AC_DEPR); + removeSeparatorAfter (AC_ASORT); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected data type to the data table. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_DATA_TYPE) { + int[] rows = table.getSelectedRows(); + for (int i = 0; i < rows.length; i++) { + String value = nodeObject.getValue(); + table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); + Object article = table.getValueAt (rows[i],PrimaryDataTableModel.COL_ARTICLE); + if (article == null || UUtils.isEmpty (article.toString())) + table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_ARTICLE); + } + } + } + } + + /************************************************************************** + * + * Customized tree of namespaces - use for service registration + * + **************************************************************************/ + protected class CustomNamespacesSimplestTree + extends NamespacesTree { + + /********************************************************************* + * Construtor + ********************************************************************/ + public CustomNamespacesSimplestTree (RegistryModel model, + CommonConsole console) { + super (model, console); + } + + /********************************************************************* + * + ********************************************************************/ + protected void createPopups (String title) { + super.createPopups (title); + removeFromPopups (AC_RELOAD); + removeSeparatorAfter (AC_COLLAPSE); + } + + /********************************************************************* + * + ********************************************************************/ + protected void setEnabledPopup (boolean enabled) { + super.setEnabledPopup (enabled); + selected (null); + } + + /********************************************************************* + * Copy selected namespace to the data table. + ********************************************************************/ + protected void selected (DefaultMutableTreeNode node) { + if (node == null) return; + CommonNode nodeObject = (CommonNode)node.getUserObject(); + if (nodeObject.getType() == CommonNode.NODE_NAMESPACE) { + int[] rows = table.getSelectedRows(); + for (int i = 0; i < rows.length; i++) { + String value = nodeObject.getValue(); +// table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); + Object data = table.getValueAt (rows[i],PrimaryDataTableModel.COL_NAMESPACE); + MobyPrimaryDataSimple simple = null; + if (data instanceof MobyPrimaryDataSimple) { + simple = (MobyPrimaryDataSimple)data; + } else if (data instanceof MobyPrimaryDataSet) { + MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)data).getElements(); + if (simples.length > 0) + simple = simples[0]; + } + if (simple != null) { + simple.addNamespace (new MobyNamespace (value)); + tableModel.fireTableCellUpdated (rows[i], PrimaryDataTableModel.COL_NAMESPACE); + } + } + } + } + } + } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/02 06:39:06 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 17:51:04 1.17 @@ -81,6 +81,9 @@ JLabel labelCacheDir; CommonConsole console; + // shared icons + protected static Icon infoIcon, infoIconDis; + /********************************************************************* * Default constructor. ********************************************************************/ @@ -88,6 +91,14 @@ super(); } + /********************************************************************* + * Load shared icons. + ********************************************************************/ + protected void loadIcons() { + super.loadIcons(); + if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + } + /************************************************************************** * **************************************************************************/ @@ -289,6 +300,8 @@ onCacheInfo(); } }); +// infoButton.setIcon (infoIcon); + JButton updateButton = createButton (" Update ", "Update local cache from Biomoby registry", =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/03 08:38:39 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/05 17:51:04 1.5 @@ -66,6 +66,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Service Types Menu"); + setLeafIcon (stLeafIcon); } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.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/service/dashboard/ServicesTree.java 2005/11/02 06:39:06 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/05 17:51:04 1.2 @@ -75,6 +75,7 @@ this.registryModel = registryModel; this.console = console; createPopups ("Services Menu"); + setLeafIcon (sLeafIcon); } /********************************************************************* From senger at pub.open-bio.org Sat Nov 5 20:14:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 15:14:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511052014.jA5KEncD001879@pub.open-bio.org> senger Sat Nov 5 15:14:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1852/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java RegistrationPanel.java RegistryPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonTree.java,1.12,1.13 RegistrationPanel.java,1.8,1.9 RegistryPanel.java,1.17,1.18 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 17:51:04 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 20:14:49 1.13 @@ -243,16 +243,16 @@ menuReloadIconDis = SwingUtils.createIcon ("images/smallReload_dis.gif", Dashboard.class); - if (smallNIcon == null) smallNIcon = loadIcon ("images/smallN.gif"); - if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallN_dis.gif"); - if (smallAIcon == null) smallAIcon = loadIcon ("images/smallA.gif"); - if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallA_dis.gif"); - if (smallTIcon == null) smallTIcon = loadIcon ("images/smallT.gif"); - if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallT_dis.gif"); - if (smallIIcon == null) smallIIcon = loadIcon ("images/smallI.gif"); - if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallI_dis.gif"); - if (smallOIcon == null) smallOIcon = loadIcon ("images/smallO.gif"); - if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallO_dis.gif"); + if (smallNIcon == null) smallNIcon = loadIcon ("images/smallSortAZ.gif"); + if (smallNIconDis == null) smallNIconDis = loadIcon ("images/smallSortAZ_dis.gif"); + if (smallAIcon == null) smallAIcon = loadIcon ("images/smallAuth.gif"); + if (smallAIconDis == null) smallAIconDis = loadIcon ("images/smallAuth_dis.gif"); + if (smallTIcon == null) smallTIcon = loadIcon ("images/smallInher.gif"); + if (smallTIconDis == null) smallTIconDis = loadIcon ("images/smallInher_dis.gif"); + if (smallIIcon == null) smallIIcon = loadIcon ("images/smallImport.gif"); + if (smallIIconDis == null) smallIIconDis = loadIcon ("images/smallImport_dis.gif"); + if (smallOIcon == null) smallOIcon = loadIcon ("images/smallExport.gif"); + if (smallOIconDis == null) smallOIconDis = loadIcon ("images/smallExport_dis.gif"); if (nsLeafIcon == null) nsLeafIcon = loadIcon ("images/small_yellow.gif"); if (stLeafIcon == null) stLeafIcon = loadIcon ("images/magentaDiamond.gif"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 17:51:04 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 20:14:49 1.9 @@ -190,15 +190,11 @@ if (menuAddHASIconDis == null) menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); - if (menuUnregisterIcon == null) - menuUnregisterIcon = loadIcon ("images/smallUnregister.gif"); - if (menuUnregisterIconDis == null) - menuUnregisterIconDis = loadIcon ("images/smallUnregister_dis.gif"); - - if (registerIcon == null) - registerIcon = loadIcon ("images/smallRegister.gif"); - if (registerIconDis == null) - registerIconDis = loadIcon ("images/smallRegister_dis.gif"); + if (menuUnregisterIcon == null) menuUnregisterIcon = loadIcon ("images/smallTrash.gif"); + if (menuUnregisterIconDis == null) menuUnregisterIconDis = loadIcon ("images/smallTrash_dis.gif"); + + if (registerIcon == null) registerIcon = loadIcon ("images/smallRegister.gif"); + if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); if (addDataIcon == null) addDataIcon = loadIcon ("images/smallAddData.gif"); @@ -697,6 +693,7 @@ JComboBox comboBox = new JComboBox (comboModel); comboBox.setOpaque (true); + createPopups ("Namespace Menu", comboBox); MobyPrimaryDataSimple simple = null; if (value instanceof MobyPrimaryDataSimple) { @@ -2021,4 +2018,57 @@ } } + + + + protected JPopupMenu popup; + + /********************************************************************* + * Create a popup object with common items. Subclasses can (and + * usually do) add more items, or re-created the whole popup.

    + * + * @param title is given to the popups + ********************************************************************/ + protected void createPopups (String title, JComponent component) { + System.out.println ("POPUP"); + popup = new JPopupMenu (title); + popup.add + (CommonTree.createMenuItem (new AbstractAction ("Remove") { + public void actionPerformed (ActionEvent e) { + } + }, "R", trashIcon, trashIcon)); + + // add listener to this tree to bring up popup menus + MouseListener popupListener = new PopupListener(); + component.addMouseListener (popupListener); + } + + class PopupListener extends MouseAdapter { + public void mousePressed (MouseEvent e) { + maybeShowPopup (e); + } + public void mouseReleased (MouseEvent e) { + maybeShowPopup (e); + } + private void maybeShowPopup (MouseEvent e) { + System.out.println ("ME: " + e); + if (e.isPopupTrigger() && popup.isEnabled()) { + popup.show (e.getComponent(), + e.getX(), e.getY()); + } + } + } + + + + + + + + + + + + + } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 17:51:04 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/05 20:14:49 1.18 @@ -82,7 +82,9 @@ CommonConsole console; // shared icons - protected static Icon infoIcon, infoIconDis; + protected static Icon defaultsIcon; + protected static Icon reloadIcon; + protected static Icon infoIcon, updateIcon, eraseIcon; /********************************************************************* * Default constructor. @@ -96,7 +98,11 @@ ********************************************************************/ protected void loadIcons() { super.loadIcons(); - if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + if (defaultsIcon == null) defaultsIcon = loadIcon ("images/smallUndo.gif"); + if (reloadIcon == null) reloadIcon = loadIcon ("images/smallReload.gif"); + if (infoIcon == null) infoIcon = loadIcon ("images/smallInfo.gif"); + if (updateIcon == null) updateIcon = loadIcon ("images/smallSynch.gif"); + if (eraseIcon == null) eraseIcon = loadIcon ("images/smallTrash.gif"); } /************************************************************************** @@ -247,6 +253,7 @@ onReloadAll(); } }); + reloadAllButton.setIcon (reloadIcon); JButton defaultsButton = createButton (" Restore defaults ", "Fill the text fields above with the default values", @@ -256,6 +263,8 @@ onDefaults(); } }); + defaultsButton.setIcon (defaultsIcon); + JPanel buttonPanel = createButtonPanel (new JButton[] { reloadAllButton, defaultsButton }); JPanel rLocation = createTitledPanel ("Biomoby registry location"); @@ -300,7 +309,7 @@ onCacheInfo(); } }); -// infoButton.setIcon (infoIcon); + infoButton.setIcon (infoIcon); JButton updateButton = createButton (" Update ", @@ -311,6 +320,7 @@ onCacheUpdate(); } }); + updateButton.setIcon (updateIcon); JButton eraseButton = createButton (" Erase ", "Remove everything from the local cache", @@ -320,6 +330,7 @@ onCacheErase(); } }); + eraseButton.setIcon (eraseIcon); JPanel buttonPanel = createButtonPanel (new JButton[] { infoButton, updateButton, eraseButton }); From senger at pub.open-bio.org Sat Nov 5 20:14:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 5 Nov 2005 15:14:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511052014.jA5KEnLa001917@pub.open-bio.org> senger Sat Nov 5 15:14:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv1852/src/main/org/biomoby/service/dashboard/images Modified Files: smallInfo.gif smallRegister.gif smallRegister_dis.gif Added Files: smallAuth.gif smallAuth_dis.gif smallExport.gif smallExport_dis.gif smallImport.gif smallImport_dis.gif smallInher.gif smallInher_dis.gif smallSortAZ.gif smallSortAZ_dis.gif smallSynch.gif smallSynch_dis.gif smallTrash_dis.gif smallUndo.gif smallUndo_dis.gif Removed Files: smallA.gif smallA_dis.gif smallI.gif smallI_dis.gif smallN.gif smallN_dis.gif smallO.gif smallO_dis.gif smallT.gif smallT_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallAuth.gif,NONE,1.1 smallAuth_dis.gif,NONE,1.1 smallExport.gif,NONE,1.1 smallExport_dis.gif,NONE,1.1 smallImport.gif,NONE,1.1 smallImport_dis.gif,NONE,1.1 smallInher.gif,NONE,1.1 smallInher_dis.gif,NONE,1.1 smallSortAZ.gif,NONE,1.1 smallSortAZ_dis.gif,NONE,1.1 smallSynch.gif,NONE,1.1 smallSynch_dis.gif,NONE,1.1 smallTrash_dis.gif,NONE,1.1 smallUndo.gif,NONE,1.1 smallUndo_dis.gif,NONE,1.1 smallInfo.gif,1.1,1.2 smallRegister.gif,1.1,1.2 smallRegister_dis.gif,1.1,1.2 smallA.gif,1.1,NONE smallA_dis.gif,1.1,NONE smallI.gif,1.1,NONE smallI_dis.gif,1.1,NONE smallN.gif,1.1,NONE smallN_dis.gif,1.1,NONE smallO.gif,1.1,NONE smallO_dis.gif,1.1,NONE smallT.gif,1.1,NONE smallT_dis.gif,1.1,NONE =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif 2005/11/05 17:51:04 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallInfo.gif: diff failed =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif 2005/11/03 08:38:40 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister.gif: diff failed =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif 2005/11/03 08:38:40 1.1 and /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif 2005/11/05 20:14:49 1.2 differ rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/smallRegister_dis.gif: diff failed rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallA.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallA_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallI.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallI_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallN.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallN_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallO.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallO_dis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallT.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallT_dis.gif,v: No such file or directory From senger at pub.open-bio.org Sun Nov 6 05:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 00:31:35 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZ7q003429@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv3367/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSimple.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSimple.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/09/22 16:07:09 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 05:31:35 1.6 @@ -100,6 +100,20 @@ return true; } + public void removeNamespace (String namespaceName) { + removeNamespace (new MobyNamespace (namespaceName)); + } + + public void removeNamespace (MobyNamespace value) { + for (Enumeration en = namespaces.elements(); en.hasMoreElements(); ) { + if (en.nextElement().equals (value)) { + namespaces.removeElement (value); + return; + } + } + } + + /************************************************************************** * Convert this instance into XML. * The XML will look like this: From senger at pub.open-bio.org Sun Nov 6 05:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 00:31:35 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZOm003386@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv3367/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.46,1.47 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/02 06:39:05 1.46 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 05:31:34 1.47 @@ -1,3 +1,14 @@ +2005-11-06 Martin Senger + + * Added test for not to duplicate same namespaces in + MobyPrimaryData. + + * Added new class MobyPrimaryData in between MobyData and + MobyPrimaryDataSimple/Set - helps better distinguished between + primary and secondary data. + + * Added removeNamespace() to MobyPrimaryDataSimple. + 2005-11-02 Martin Senger * Changed method equals() in MobyService. From senger at pub.open-bio.org Sun Nov 6 05:31:35 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 00:31:35 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511060531.jA65VZRB003409@pub.open-bio.org> senger Sun Nov 6 00:31:35 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv3367/src/main/org/biomoby/service/dashboard Modified Files: NOTES RegistrationPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,1.17,1.18 RegistrationPanel.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/05 17:51:04 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/06 05:31:35 1.18 @@ -127,9 +127,6 @@ * The same, after de-registration * Then make the reg/unreg real... -* Icons: - - better icon for AddHAS (with a small star) - ? small icons to buttons * alltools2: - JTextFieldWithHistory should remember also an empty value ("") =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/05 20:14:49 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/06 05:31:35 1.10 @@ -38,12 +38,14 @@ import javax.swing.JTextArea; import javax.swing.JTabbedPane; import javax.swing.JTable; +import javax.swing.JList; import javax.swing.JComboBox; import javax.swing.JPopupMenu; import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; import javax.swing.AbstractAction; import javax.swing.JComponent; +import javax.swing.ListCellRenderer; import javax.swing.DefaultListModel; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultCellEditor; @@ -59,6 +61,8 @@ import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; import javax.swing.border.Border; +import javax.swing.event.PopupMenuListener; +import javax.swing.event.PopupMenuEvent; import java.awt.GridBagLayout; import java.awt.Font; @@ -175,20 +179,15 @@ ********************************************************************/ protected void loadIcons() { super.loadIcons(); - if (menuAddISAIcon == null) - menuAddISAIcon = loadIcon ("images/smallAddISA.gif"); - if (menuAddISAIconDis == null) - menuAddISAIconDis = loadIcon ("images/smallAddISA_dis.gif"); + + if (menuAddISAIcon == null) menuAddISAIcon = loadIcon ("images/smallAddISA.gif"); + if (menuAddISAIconDis == null) menuAddISAIconDis = loadIcon ("images/smallAddISA_dis.gif"); - if (menuAddHASAIcon == null) - menuAddHASAIcon = loadIcon ("images/smallAddHASA.gif"); - if (menuAddHASAIconDis == null) - menuAddHASAIconDis = loadIcon ("images/smallAddHASA_dis.gif"); + if (menuAddHASAIcon == null) menuAddHASAIcon = loadIcon ("images/smallAddHASA.gif"); + if (menuAddHASAIconDis == null) menuAddHASAIconDis = loadIcon ("images/smallAddHASA_dis.gif"); - if (menuAddHASIcon == null) - menuAddHASIcon = loadIcon ("images/smallAddHAS.gif"); - if (menuAddHASIconDis == null) - menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); + if (menuAddHASIcon == null) menuAddHASIcon = loadIcon ("images/smallAddHAS.gif"); + if (menuAddHASIconDis == null) menuAddHASIconDis = loadIcon ("images/smallAddHAS_dis.gif"); if (menuUnregisterIcon == null) menuUnregisterIcon = loadIcon ("images/smallTrash.gif"); if (menuUnregisterIconDis == null) menuUnregisterIconDis = loadIcon ("images/smallTrash_dis.gif"); @@ -196,19 +195,14 @@ if (registerIcon == null) registerIcon = loadIcon ("images/smallRegister.gif"); if (registerIconDis == null) registerIconDis = loadIcon ("images/smallRegister_dis.gif"); - if (addDataIcon == null) - addDataIcon = loadIcon ("images/smallAddData.gif"); - if (addDataIconDis == null) - addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); - - if (editDataIcon == null) - editDataIcon = loadIcon ("images/smallEdit.gif"); - if (editDataIconDis == null) - editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); + if (addDataIcon == null) addDataIcon = loadIcon ("images/smallAddData.gif"); + if (addDataIconDis == null) addDataIconDis = loadIcon ("images/smallAddData_dis.gif"); + + if (editDataIcon == null) editDataIcon = loadIcon ("images/smallEdit.gif"); + if (editDataIconDis == null) editDataIconDis = loadIcon ("images/smallEdit_dis.gif"); if (deleteDataIcon == null) deleteDataIcon = loadIcon ("images/smallRemove.gif"); if (trashIcon == null) trashIcon = loadIcon ("images/smallTrash.gif"); - } /************************************************************************** @@ -675,12 +669,59 @@ } } - /************************************************************************** + /************************************************************************** * **************************************************************************/ class NamespaceEditor extends AbstractCellEditor implements TableCellEditor { + + // this is what is diplay when some namespaces are present DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); + JComboBox comboBox; + + // used when there are no namespaces (so a combo box is useless) + DefaultTableCellRenderer defaultRenderer = new DefaultTableCellRenderer(); + + // remember where this combo box is located it (we will need + // it to fire 'table update' when we remove some namespaces) + JTable table; + int row, col; + + // remember where the displayed namespaces come from + MobyPrimaryDataSimple lastSimple = null; + + public NamespaceEditor() { + defaultRenderer.setText (""); + comboBox = new JComboBox (comboModel); + comboBox.setOpaque (true); + comboBox.setRenderer (new ComboBoxRenderer()); + comboBox.addActionListener (new ActionListener() { + public void actionPerformed (ActionEvent e) { + if ( (e.getModifiers() & ActionEvent.CTRL_MASK) > 0) { + JComboBox cb = (JComboBox)e.getSource(); + Object selectedItem = cb.getSelectedItem(); + if (selectedItem != null) { + String namespace = selectedItem.toString(); + if (lastSimple != null) { + lastSimple.removeNamespace (namespace); + ((AbstractTableModel)table.getModel()).fireTableCellUpdated (row, col); + + } + } + } + // make the renderer reappear + fireEditingStopped(); + } + }); + comboBox.addPopupMenuListener (new PopupMenuListener() { + public void popupMenuCanceled (PopupMenuEvent e) { + // make the renderer reappear + fireEditingStopped(); + } + public void popupMenuWillBecomeVisible (PopupMenuEvent e) {} + public void popupMenuWillBecomeInvisible (PopupMenuEvent e) {} + }); + } public Object getCellEditorValue() { return null; @@ -689,28 +730,63 @@ public Component getTableCellEditorComponent (JTable table, Object value, boolean isSelected, - int row, int column) { + int row, int col) { - JComboBox comboBox = new JComboBox (comboModel); - comboBox.setOpaque (true); - createPopups ("Namespace Menu", comboBox); + // remember (used when a namespace is being deleted) + this.table = table; + this.row = row; + this.col = col; - MobyPrimaryDataSimple simple = null; + // fill combo box with the current namespaces + lastSimple = null; if (value instanceof MobyPrimaryDataSimple) { - simple = (MobyPrimaryDataSimple)value; + lastSimple = (MobyPrimaryDataSimple)value; } else if (value instanceof MobyPrimaryDataSet) { MobyPrimaryDataSimple[] simples = ((MobyPrimaryDataSet)value).getElements(); if (simples.length > 0) - simple = simples[0]; + lastSimple = simples[0]; } - if (simple != null) { - MobyNamespace[] nss = simple.getNamespaces(); - comboModel.removeAllElements(); - for (int i = 0; i < nss.length; i++) { - comboModel.addElement (nss[i].getName()); + if (lastSimple != null) { + MobyNamespace[] nss = lastSimple.getNamespaces(); + if (nss.length > 0) { + comboModel.removeAllElements(); + for (int i = 0; i < nss.length; i++) + comboModel.addElement (nss[i].getName()); + return comboBox; } } - return comboBox; + return defaultRenderer; + } + } + + /************************************************************************** + * + **************************************************************************/ + class ComboBoxRenderer extends JLabel + implements ListCellRenderer { + + public ComboBoxRenderer() { + setOpaque (true); + setIcon (trashIcon); + } + + public Component getListCellRendererComponent (JList list, + Object value, + int index, + boolean isSelected, + boolean cellHasFocus) { + if (isSelected) { + setBackground (list.getSelectionBackground()); + setForeground (list.getSelectionForeground()); + if (index > -1) + list.setToolTipText ("To remove a namespce, hold CTRL and select it"); + + } else { + setBackground (list.getBackground()); + setForeground (list.getForeground()); + } + setText (value == null ? "" : value.toString()); + return this; } } @@ -1999,7 +2075,6 @@ int[] rows = table.getSelectedRows(); for (int i = 0; i < rows.length; i++) { String value = nodeObject.getValue(); -// table.setValueAt (value, rows[i], PrimaryDataTableModel.COL_DATATYPE); Object data = table.getValueAt (rows[i],PrimaryDataTableModel.COL_NAMESPACE); MobyPrimaryDataSimple simple = null; if (data instanceof MobyPrimaryDataSimple) { @@ -2017,58 +2092,4 @@ } } } - - - - - protected JPopupMenu popup; - - /********************************************************************* - * Create a popup object with common items. Subclasses can (and - * usually do) add more items, or re-created the whole popup.

    - * - * @param title is given to the popups - ********************************************************************/ - protected void createPopups (String title, JComponent component) { - System.out.println ("POPUP"); - popup = new JPopupMenu (title); - popup.add - (CommonTree.createMenuItem (new AbstractAction ("Remove") { - public void actionPerformed (ActionEvent e) { - } - }, "R", trashIcon, trashIcon)); - - // add listener to this tree to bring up popup menus - MouseListener popupListener = new PopupListener(); - component.addMouseListener (popupListener); - } - - class PopupListener extends MouseAdapter { - public void mousePressed (MouseEvent e) { - maybeShowPopup (e); - } - public void mouseReleased (MouseEvent e) { - maybeShowPopup (e); - } - private void maybeShowPopup (MouseEvent e) { - System.out.println ("ME: " + e); - if (e.isPopupTrigger() && popup.isEnabled()) { - popup.show (e.getComponent(), - e.getX(), e.getY()); - } - } - } - - - - - - - - - - - - - } From senger at pub.open-bio.org Sun Nov 6 16:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNniP013637@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv13600/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/10/27 08:55:48 1.3 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/06 16:23:49 1.4 @@ -1,3 +1,3 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel -org.biomoby.service.dashboard.DebuggingPanel +#org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Sun Nov 6 16:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNo70013750@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/shared Modified Files: MobyPrimaryDataSet.java MobyPrimaryDataSimple.java MobySecondaryData.java Added Files: MobyPrimaryData.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyPrimaryData.java,NONE,1.1 MobyPrimaryDataSet.java,1.5,1.6 MobyPrimaryDataSimple.java,1.6,1.7 MobySecondaryData.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/05 17:51:04 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2005/11/06 16:23:50 1.6 @@ -24,7 +24,7 @@ */ public class MobyPrimaryDataSet - extends MobyData { + extends MobyPrimaryData { protected Vector elements = new Vector(); // elemenst are of type MobyPrimaryDataSimple @@ -74,10 +74,11 @@ elements.addElement (value); } - public boolean isPrimary() { - return true; - } - + /************************************************************************** + * Return a data type of the first element of this collection + * (according the Biomoby API, however, all elements should have + * the same data type). + *************************************************************************/ public MobyDataType getDataType() { synchronized (elements) { if (elements.size() > 0) @@ -87,6 +88,11 @@ } } + /************************************************************************** + * Set given data type to all elements of this collection + * (according the Biomoby API all elements should have the same + * data type). + *************************************************************************/ public void setDataType (MobyDataType dataType) { synchronized (elements) { for (Enumeration en = elements.elements(); en.hasMoreElements(); ) @@ -95,6 +101,59 @@ } /************************************************************************** + * Return namespaces of the first element of this collection. + *************************************************************************/ + public MobyNamespace[] getNamespaces() { + synchronized (elements) { + if (elements.size() > 0) + return ((MobyPrimaryDataSimple)elements.firstElement()).getNamespaces(); + else + return new MobyNamespace[] {}; + } + } + + /************************************************************************** + * Set given namespaces of all elements of this collection. + *************************************************************************/ + public void setNamespaces (MobyNamespace[] value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).setNamespaces (value); + } + } + + /************************************************************************** + * Add given namespace of all elements of this collection. + *************************************************************************/ + public void addNamespace (MobyNamespace value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).addNamespace (value); + } + } + + /************************************************************************** + * Remove given namespace (defined by its name) from all elements + * of this collection. + *************************************************************************/ + public void removeNamespace (String namespaceName) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).removeNamespace (namespaceName); + } + } + + /************************************************************************** + * Remove given namespace from all elements of this collection. + *************************************************************************/ + public void removeNamespace (MobyNamespace value) { + synchronized (elements) { + for (Enumeration en = elements.elements(); en.hasMoreElements(); ) + ((MobyPrimaryDataSimple)en.nextElement()).removeNamespace (value); + } + } + + /************************************************************************** * Convert this instance to the XML. * The XML will look like this: * =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 05:31:35 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSimple.java 2005/11/06 16:23:50 1.7 @@ -26,7 +26,7 @@ */ public class MobyPrimaryDataSimple - extends MobyData { + extends MobyPrimaryData { protected Vector namespaces = new Vector(); // elements are of type MobyNamespace protected MobyDataType dataType; @@ -72,48 +72,71 @@ } } + /************************************************************************** + * + *************************************************************************/ public MobyDataType getDataType() { return dataType; } + + /************************************************************************** + * + *************************************************************************/ public void setDataType (MobyDataType value) { dataType = value; } + /************************************************************************** + * Return all namespaces defined in this data container. + *************************************************************************/ public MobyNamespace[] getNamespaces() { MobyNamespace[] result = new MobyNamespace [namespaces.size()]; namespaces.copyInto (result); return result; } + + /************************************************************************** + * Replace all existing namespaces (if any) by a new array of + * namespaces. Do not accept duplicates (same names). + *************************************************************************/ public void setNamespaces (MobyNamespace[] value) { if (value == null) { namespaces.clear(); } else { for (int i = 0; i < value.length; i++) - namespaces.addElement (value[i]); + addNamespace (value[i]); } } - public void addNamespace (MobyNamespace value) { - namespaces.addElement (value); - } - public boolean isPrimary() { - return true; + /************************************************************************** + * Add one namespace to already existing ones (but only if a + * namespace of the same name does not exist yet). + *************************************************************************/ + public void addNamespace (MobyNamespace value) { + synchronized (namespaces) { + if (! namespaces.contains (value)) + namespaces.addElement (value); + } } + /************************************************************************** + * Remove namespace given by its name. + *************************************************************************/ public void removeNamespace (String namespaceName) { removeNamespace (new MobyNamespace (namespaceName)); } + /************************************************************************** + * Remove given namespace. + *************************************************************************/ public void removeNamespace (MobyNamespace value) { - for (Enumeration en = namespaces.elements(); en.hasMoreElements(); ) { - if (en.nextElement().equals (value)) { - namespaces.removeElement (value); - return; - } + synchronized (namespaces) { + int index = namespaces.indexOf (value); + if (index > -1) + namespaces.remove (index); } } - /************************************************************************** * Convert this instance into XML. * The XML will look like this: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java 2005/09/22 16:07:09 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobySecondaryData.java 2005/11/06 16:23:50 1.5 @@ -26,7 +26,7 @@ public class MobySecondaryData extends MobyData { - protected String dataType = "STRING"; + protected String dataType = "String"; protected String defaultValue = ""; protected int minimumValue = Integer.MIN_VALUE; protected int maximumValue = Integer.MAX_VALUE; From senger at pub.open-bio.org Sun Nov 6 16:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNofh013772@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/shared/datatypes Modified Files: MobyObject.java Log Message: moby-live/Java/src/main/org/biomoby/shared/datatypes MobyObject.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.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/shared/datatypes/MobyObject.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/datatypes/MobyObject.java 2005/11/06 16:23:50 1.2 @@ -133,7 +133,7 @@ * * @return a jDom - * element that can be easily incorporated into bigger a XML + * element that can be easily incorporated into a bigger XML * document *************************************************************************/ public Element toXML() { From senger at pub.open-bio.org Sun Nov 6 16:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNnpp013657@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/10/27 04:15:23 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31 @@ -1316,28 +1316,50 @@ /************************************************************************* * *************************************************************************/ + public String getRegisterServiceXML (MobyService service) { + return + "" + + "" + service.getCategory() + "" + + "" + service.getName() + "" + + "" + service.getType() + "" + + "" + service.getAuthority() + "" + + "" + service.getSignatureURL() + "" + + "" + service.getURL() + "" + + "" + service.getEmailContact() + "" + + "" + (service.isAuthoritative() ? "1" : "0") + "" + + "" + + "" + + buildPrimaryInputTag (service) + + buildSecondaryInputTag (service) + + buildOutputTag (service) + + ""; + } + + /************************************************************************* + * + *************************************************************************/ public void registerService (MobyService service) throws MobyException, NoSuccessException, PendingCurationException { String result = (String)doCall ("registerService", - new Object[] { - "" + - "" + service.getCategory() + "" + - "" + service.getName() + "" + - "" + service.getType() + "" + - "" + service.getAuthority() + "" + - "" + service.getSignatureURL() + "" + - "" + service.getURL() + "" + - "" + service.getEmailContact() + "" + - "" + (service.isAuthoritative() ? "1" : "0") + "" + - "" + - "" + - buildPrimaryInputTag (service) + - buildSecondaryInputTag (service) + - buildOutputTag (service) + - "" - }); + new Object[] { getRegisterServiceXML (service) }); +// "" + +// "" + service.getCategory() + "" + +// "" + service.getName() + "" + +// "" + service.getType() + "" + +// "" + service.getAuthority() + "" + +// "" + service.getSignatureURL() + "" + +// "" + service.getURL() + "" + +// "" + service.getEmailContact() + "" + +// "" + (service.isAuthoritative() ? "1" : "0") + "" + +// "" + +// "" + +// buildPrimaryInputTag (service) + +// buildSecondaryInputTag (service) + +// buildOutputTag (service) + +// "" +// }); String[] registered = checkRegistration (result, service); service.setId (registered [0]); service.setRDF (registered [1]); From senger at pub.open-bio.org Sun Nov 6 16:23:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNnjo013619@pub.open-bio.org> senger Sun Nov 6 11:23:49 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv13600/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.47,1.48 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 05:31:34 1.47 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 16:23:49 1.48 @@ -1,5 +1,12 @@ +2005-11-07 Martin Senger + + * Change default data type in MobySecondaryData from STRING to + String. + 2005-11-06 Martin Senger + * Added method getRegisterServiceXML() to CentralIMpl. + * Added test for not to duplicate same namespaces in MobyPrimaryData. From senger at pub.open-bio.org Sun Nov 6 16:23:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:23:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061623.jA6GNoFF013723@pub.open-bio.org> senger Sun Nov 6 11:23:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv13600/src/main/org/biomoby/service/dashboard/images Added Files: smallLog.gif smallLog_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallLog.gif,NONE,1.1 smallLog_dis.gif,NONE,1.1 From senger at pub.open-bio.org Sun Nov 6 16:47:10 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:10 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlAmB013890@pub.open-bio.org> senger Sun Nov 6 11:47:10 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/client Modified Files: GraphsServlet.java Log Message: moby-live/Java/src/main/org/biomoby/client GraphsServlet.java,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/10/27 04:15:23 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/06 16:47:10 1.14 @@ -44,7 +44,6 @@ import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; -import java.util.Map; import java.util.Properties; import java.util.Vector; From senger at pub.open-bio.org Sun Nov 6 16:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBdR013910@pub.open-bio.org> senger Sun Nov 6 11:47:10 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/registry/rdfagent/test Modified Files: RDFAgentTestSuite.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/test RDFAgentTestSuite.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.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/test/RDFAgentTestSuite.java 2005/09/12 18:21:13 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.java 2005/11/06 16:47:10 1.2 @@ -75,7 +75,6 @@ if (connection == null) connection = createConnection(); - String locationOldRDFDoc = ""; // perform the update try { Statement stmt = connection.createStatement(); @@ -303,7 +302,6 @@ public void performInitForTests() { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; println("#### Test 0a ####"); println("Initializing the agent with 0a.rdf"); switchTestRDFDocuments(createRdfDocumentURLString("0a.rdf")); @@ -328,8 +326,6 @@ public void performTest1() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test one ####"); println("Initializing the agent with 1.rdf"); switchTestRDFDocuments(createRdfDocumentURLString("1.rdf")); From senger at pub.open-bio.org Sun Nov 6 16:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlB8Z013929@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service Modified Files: BaseService.java Log Message: moby-live/Java/src/main/org/biomoby/service BaseService.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java 2005/09/04 13:45:37 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/BaseService.java 2005/11/06 16:47:11 1.4 @@ -13,7 +13,6 @@ import org.tulsoft.shared.GException; import org.biomoby.shared.MobyException; -import org.biomoby.shared.parser.MobyParser; import org.biomoby.shared.parser.MobyPackage; import org.biomoby.shared.parser.MobyJob; From senger at pub.open-bio.org Sun Nov 6 16:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlB4Q014004@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java BuildDataTypeTree.java CommonDataTable.java CommonTree.java Dashboard.java DashboardProperties.java DataTypesBoard.java DataTypesTree.java DebuggingPanel.java JProgressBarWithCancel.java NamespacesBoard.java NamespacesTree.java PrimaryDataTable.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.14,1.15 BuildDataTypeTree.java,1.4,1.5 CommonDataTable.java,1.1,1.2 CommonTree.java,1.13,1.14 Dashboard.java,1.11,1.12 DashboardProperties.java,1.10,1.11 DataTypesBoard.java,1.6,1.7 DataTypesTree.java,1.10,1.11 DebuggingPanel.java,1.1,1.2 JProgressBarWithCancel.java,1.2,1.3 NamespacesBoard.java,1.1,1.2 NamespacesTree.java,1.5,1.6 PrimaryDataTable.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/05 17:51:04 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/06 16:47:11 1.15 @@ -21,22 +21,16 @@ import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JTextField; import javax.swing.JTextArea; -import javax.swing.JComboBox; import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import javax.swing.JComponent; -import javax.swing.SwingConstants; import javax.swing.border.Border; -import javax.swing.border.TitledBorder; import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; import javax.swing.Box; import javax.swing.BoxLayout; -import javax.swing.filechooser.FileFilter; import javax.swing.text.html.HTMLDocument; import java.awt.Component; @@ -45,7 +39,6 @@ import java.awt.Insets; import java.awt.Font; import java.awt.Color; -import java.awt.Dimension; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.ItemListener; @@ -54,7 +47,6 @@ import java.io.File; import java.util.prefs.Preferences; -import java.util.Map; /** * WORK IN PROGRESS.

    =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/10/26 08:05:18 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/06 16:47:11 1.5 @@ -17,13 +17,11 @@ import javax.swing.JTree; import javax.swing.JPanel; -import javax.swing.JTextField; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.Icon; import javax.swing.JPopupMenu; import javax.swing.JOptionPane; -import javax.swing.JMenuItem; import javax.swing.ToolTipManager; import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; @@ -31,10 +29,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreeSelectionModel; import javax.swing.tree.TreePath; -import javax.swing.event.TreeSelectionListener; -import javax.swing.event.TreeSelectionEvent; import javax.swing.SwingUtilities; -import javax.swing.BoxLayout; import java.awt.Component; import java.awt.Font; @@ -48,13 +43,9 @@ import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.border.TitledBorder; -import javax.swing.border.CompoundBorder; -import javax.swing.border.EmptyBorder; -import javax.swing.border.EtchedBorder; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; -import java.util.HashSet; import java.util.Enumeration; /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.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/service/dashboard/CommonDataTable.java 2005/11/06 16:23:49 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/06 16:47:11 1.2 @@ -8,34 +8,19 @@ package org.biomoby.service.dashboard; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyNamespace; -import org.biomoby.shared.MobyPrimaryData; -import org.biomoby.shared.MobyPrimaryDataSimple; -import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; - import org.tulsoft.tools.gui.SwingUtils; -import javax.swing.JLabel; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JScrollPane; import javax.swing.JTable; -import javax.swing.JList; -import javax.swing.JComboBox; import javax.swing.JComponent; -import javax.swing.ListCellRenderer; -import javax.swing.DefaultComboBoxModel; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; import javax.swing.table.JTableHeader; -import javax.swing.table.DefaultTableCellRenderer; import javax.swing.AbstractCellEditor; -import javax.swing.event.PopupMenuListener; -import javax.swing.event.PopupMenuEvent; import java.awt.Component; import java.awt.event.ActionEvent; @@ -136,7 +121,6 @@ protected JTableHeader createDefaultTableHeader() { return new JTableHeader (columnModel) { public String getToolTipText (MouseEvent e) { - String tip = null; java.awt.Point p = e.getPoint(); int index = columnModel.getColumnIndexAtX (p.x); int realIndex = =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/05 20:14:49 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/06 16:47:11 1.14 @@ -8,7 +8,6 @@ package org.biomoby.service.dashboard; -import org.tulsoft.shared.UUtils; import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JTree; @@ -28,7 +27,6 @@ import javax.swing.tree.TreePath; import javax.swing.event.TreeSelectionListener; import javax.swing.event.TreeSelectionEvent; -import javax.swing.SwingUtilities; import java.awt.Component; import java.awt.Font; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/05 17:51:04 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/06 16:47:11 1.12 @@ -33,12 +33,10 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeSupport; import java.util.Vector; import java.util.Enumeration; import java.util.Properties; -import java.util.Hashtable; import java.util.Date; import java.net.URL; import java.text.DateFormat; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/03 15:21:57 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/06 16:47:11 1.11 @@ -8,11 +8,6 @@ package org.biomoby.service.dashboard; -import javax.swing.JLabel; -import javax.swing.text.html.HTMLDocument; -import javax.swing.Icon; -import javax.swing.JComponent; - /** * A list of names of most/all recognized properties that can be fired * by dashboard panels, and a list of names of Java properties that =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/06 16:23:49 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/06 16:47:11 1.7 @@ -11,7 +11,6 @@ import org.biomoby.shared.MobyDataType; import org.biomoby.shared.event.NotificationEvent; import org.biomoby.shared.event.Notifier; -import org.tulsoft.shared.UUtils; /** * This is a simple graphical widget combining together a tree (a =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:23:49 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:47:11 1.11 @@ -15,14 +15,10 @@ import org.biomoby.service.generator.DataTypesGenerator; import org.tulsoft.shared.UUtils; -import javax.swing.JMenuItem; import javax.swing.JCheckBoxMenuItem; -import javax.swing.JProgressBar; -import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; -import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -268,9 +264,6 @@ void addMembers (DefaultMutableTreeNode node, MobyDataType dataType) { MobyRelationship[] rels = dataType.getChildren(); for (int i = 0; i < rels.length; i++) { - String memberName = rels[i].getName(); - String memberType = rels[i].getDataTypeName(); - int memberRel = rels[i].getRelationshipType(); node.add (new DefaultMutableTreeNode (new MemberNode (rels[i]))); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.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/service/dashboard/DebuggingPanel.java 2005/10/27 08:55:48 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/06 16:47:11 1.2 @@ -16,14 +16,11 @@ import javax.swing.JTextField; import javax.swing.Icon; import javax.swing.JComponent; -import javax.swing.text.html.HTMLDocument; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Map; - /** * A debugging panel.

    * =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/JProgressBarWithCancel.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/service/dashboard/JProgressBarWithCancel.java 2005/10/22 01:38:04 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/JProgressBarWithCancel.java 2005/11/06 16:47:11 1.3 @@ -28,9 +28,7 @@ import java.awt.GridBagLayout; import java.awt.GridBagConstraints; -import java.awt.Dimension; import java.awt.Insets; -import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.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/service/dashboard/NamespacesBoard.java 2005/10/28 13:39:09 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/06 16:47:11 1.2 @@ -11,7 +11,6 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.event.NotificationEvent; import org.biomoby.shared.event.Notifier; -import org.tulsoft.shared.UUtils; /** * This is a simple graphical widget combining together a tree (a =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:23:49 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:47:11 1.6 @@ -9,27 +9,14 @@ package org.biomoby.service.dashboard; import org.biomoby.shared.MobyException; -import org.biomoby.shared.Central; import org.biomoby.shared.MobyNamespace; -import org.biomoby.shared.MobyRelationship; -import org.biomoby.service.generator.DataTypesGenerator; import org.tulsoft.shared.UUtils; -import javax.swing.JMenuItem; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JProgressBar; -import javax.swing.AbstractAction; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; -import java.awt.event.ActionEvent; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; - import java.util.HashMap; import java.util.HashSet; -import java.util.Enumeration; -import java.util.Vector; /** * A component showing and manipulating a tree of namespaces =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.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/service/dashboard/PrimaryDataTable.java 2005/11/06 16:23:49 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/06 16:47:11 1.2 @@ -13,25 +13,16 @@ import org.biomoby.shared.MobyPrimaryData; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; - -import org.tulsoft.tools.gui.SwingUtils; import javax.swing.JLabel; -import javax.swing.Icon; -import javax.swing.JButton; -import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JList; import javax.swing.JComboBox; -import javax.swing.JComponent; import javax.swing.ListCellRenderer; import javax.swing.DefaultComboBoxModel; import javax.swing.table.AbstractTableModel; -import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableColumn; -import javax.swing.table.JTableHeader; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.AbstractCellEditor; import javax.swing.event.PopupMenuListener; @@ -40,9 +31,6 @@ import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; - -import java.util.Vector; /** * A swing JTable that collects definitions of primary data (input or From senger at pub.open-bio.org Sun Nov 6 16:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBij014048@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared Modified Files: CentralAll.java Log Message: moby-live/Java/src/main/org/biomoby/shared CentralAll.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/CentralAll.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/shared/CentralAll.java 2005/10/22 01:38:04 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/CentralAll.java 2005/11/06 16:47:11 1.3 @@ -6,8 +6,6 @@ package org.biomoby.shared; -import org.biomoby.shared.event.Notifier; - /** * A common interface to the classical features of a MobyRegistry (as * expressed in {@link Central}) and to the cumulated (digested) From senger at pub.open-bio.org Sun Nov 6 16:47:11 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:11 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlBmP014027@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/service/generator Modified Files: DataTypesGenerator.java Generator.java Log Message: moby-live/Java/src/main/org/biomoby/service/generator DataTypesGenerator.java,1.2,1.3 Generator.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.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/service/generator/DataTypesGenerator.java 2005/09/24 17:51:52 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/DataTypesGenerator.java 2005/11/06 16:47:11 1.3 @@ -452,8 +452,6 @@ if (isTrue (props.get (GPROP_NOGRAPHS))) return false; - boolean graphCreated = false; - MobyDataType[] subTree = FilterDataTypes.getSubTree (dataType, allDataTypes); if (spaceForImageMap != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/Generator.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/service/generator/Generator.java 2005/09/04 13:45:38 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/Generator.java 2005/11/06 16:47:11 1.3 @@ -11,23 +11,14 @@ import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; import org.tulsoft.tools.external.Executor; -import org.tulsoft.tools.servlets.Html; -import org.tulsoft.tools.servlets.HtmlConstants; import org.biomoby.shared.MobyException; -import org.biomoby.shared.Central; import org.biomoby.shared.CentralAll; -import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.Utils; -import org.biomoby.shared.parser.MobyTags; import org.biomoby.client.CentralDigestCachedImpl; -import org.biomoby.client.Graphviz; - import java.util.Properties; import java.util.HashMap; -import java.util.Date; import java.util.regex.Pattern; import java.io.File; From senger at pub.open-bio.org Sun Nov 6 16:47:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlCO5014069@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared/data Modified Files: MobyDataBoolean.java Log Message: moby-live/Java/src/main/org/biomoby/shared/data MobyDataBoolean.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.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/shared/data/MobyDataBoolean.java 2005/08/04 14:05:34 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.java 2005/11/06 16:47:11 1.2 @@ -1,7 +1,6 @@ package org.biomoby.shared.data; import org.biomoby.shared.MobyDataType; -import org.biomoby.shared.MobyNamespace; /** * A class representing a MOBY Boolean primitive. @@ -115,7 +114,6 @@ } public String toXML(){ - MobyNamespace[] ns = getNamespaces(); if(xmlMode == MobyDataInstance.SERVICE_XML_MODE){ return "" + value + ""; } From senger at pub.open-bio.org Sun Nov 6 16:47:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 6 Nov 2005 11:47:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511061647.jA6GlCWl014091@pub.open-bio.org> senger Sun Nov 6 11:47:11 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv13871/src/main/org/biomoby/shared/event Modified Files: NotificationEvent.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event NotificationEvent.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java 2005/10/28 11:30:37 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/NotificationEvent.java 2005/11/06 16:47:11 1.6 @@ -8,7 +8,6 @@ package org.biomoby.shared.event; -import org.tulsoft.shared.UUtils; import java.util.EventObject; /** From senger at pub.open-bio.org Mon Nov 7 07:03:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773oKk016556@pub.open-bio.org> senger Mon Nov 7 02:03:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/service/generator Modified Files: ServicesGenerator.java Log Message: moby-live/Java/src/main/org/biomoby/service/generator ServicesGenerator.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/ServicesGenerator.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/service/generator/ServicesGenerator.java 2005/09/04 13:45:38 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/generator/ServicesGenerator.java 2005/11/07 07:03:50 1.3 @@ -15,10 +15,8 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyPrimaryDataSimple; import org.biomoby.shared.MobyPrimaryDataSet; -import org.biomoby.shared.MobySecondaryData; import org.biomoby.shared.Utils; import org.biomoby.shared.CentralAll; -import org.biomoby.shared.parser.MobyTags; import org.biomoby.shared.parser.MobyParser; import org.biomoby.shared.datatypes.MapDataTypesIfc; @@ -28,7 +26,6 @@ import org.biomoby.client.Graphviz; import org.tulsoft.tools.servlets.Html; -import org.tulsoft.tools.servlets.HtmlConstants; import java.util.Properties; import java.util.Iterator; @@ -582,8 +579,6 @@ if (isTrue (props.get (GPROP_NOGRAPHS))) return false; - boolean graphCreated = false; - ServicesEdge[] edges = ServiceConnections.build (allDataTypes, allServices); edges = FilterServices.filter (edges, null, new String[] { serviceName }, 1); From senger at pub.open-bio.org Mon Nov 7 07:03:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773oDq016575@pub.open-bio.org> senger Mon Nov 7 02:03:50 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/shared Modified Files: Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared Utils.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/08/26 06:27:04 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/07 07:03:50 1.7 @@ -7,9 +7,6 @@ package org.biomoby.shared; -import org.apache.axis.AxisFault; -import javax.xml.namespace.QName; - import java.util.HashSet; import java.io.PrintWriter; import java.io.BufferedWriter; From senger at pub.open-bio.org Mon Nov 7 07:03:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773nCU016457@pub.open-bio.org> senger Mon Nov 7 02:03:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.31,1.32 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32 @@ -1344,22 +1344,6 @@ String result = (String)doCall ("registerService", new Object[] { getRegisterServiceXML (service) }); -// "" + -// "" + service.getCategory() + "" + -// "" + service.getName() + "" + -// "" + service.getType() + "" + -// "" + service.getAuthority() + "" + -// "" + service.getSignatureURL() + "" + -// "" + service.getURL() + "" + -// "" + service.getEmailContact() + "" + -// "" + (service.isAuthoritative() ? "1" : "0") + "" + -// "" + -// "" + -// buildPrimaryInputTag (service) + -// buildSecondaryInputTag (service) + -// buildOutputTag (service) + -// "" -// }); String[] registered = checkRegistration (result, service); service.setId (registered [0]); service.setRDF (registered [1]); @@ -1371,9 +1355,22 @@ fileout.println (registered [1]); fileout.close(); } catch (IOException e) { - throw new MobyException ("Failed to save RDF in '" + fileRDF.getAbsolutePath() + "'. " + - e.toString() + - "\nReturned RDF:\n" + registered [1]); + StringBuffer buf = new StringBuffer (100); + buf.append ("Failed to save RDF in '"); + buf.append (fileRDF.getAbsolutePath() + "'. "); + buf.append (e.toString()); + try { + File tmpFile = File.createTempFile (service.getName() + "-", ".rdf"); + PrintStream fileout = new PrintStream (new FileOutputStream (tmpFile)); + fileout.println (registered [1]); + fileout.close(); + buf.append ("\nReturned RDF file was therefore stored in: "); + buf.append (tmpFile.getAbsolutePath()); + } catch (IOException e2) { + buf.append ("\nEven saving in a temporary file failed: "); + buf.append (e2.toString()); + } + throw new MobyException (buf.toString()); } } } From senger at pub.open-bio.org Mon Nov 7 07:03:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:03:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070703.jA773n0W016476@pub.open-bio.org> senger Mon Nov 7 02:03:49 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/registry/rdfagent/test Modified Files: RDFAgentTestSuite.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/test RDFAgentTestSuite.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.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/test/RDFAgentTestSuite.java 2005/11/06 16:47:10 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/test/RDFAgentTestSuite.java 2005/11/07 07:03:49 1.3 @@ -353,8 +353,6 @@ public void performTest2() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test two ####"); println("Adding another simple output DNASequence(myDNASequence) with no namespace."); println("Changing the signature url to point to 2.rdf"); @@ -371,8 +369,6 @@ public void performTest3() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test three ####"); println("Adding another simple input DNASequence(myDNASequence) with no namespace."); println("Changing the signature url to point to 3.rdf"); @@ -389,8 +385,6 @@ public void performTest4() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test four ####"); println("Modified the simple output 'myString' to be called 'myNewString'."); println("Changing the signature url to point to 4.rdf"); @@ -407,8 +401,6 @@ public void performTest5() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test five ####"); println("Modified the simple input 'myDNASequence' to be called 'myNewDNASequence'."); println("Changing the signature url to point to 5.rdf"); @@ -425,8 +417,6 @@ public void performTest6() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test six ####"); println("Modified the simple output 'myDNASequence' contain a namespace EC\nand I removed the namespace from the simple output 'myNewString'."); println("Changing the signature url to point to 6.rdf"); @@ -443,8 +433,6 @@ public void performTest7() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seven ####"); println("Swapped the input 'myNewString' with the output 'myKeyword'."); println("Changing the signature url to point to 7.rdf"); @@ -461,8 +449,6 @@ public void performTest8() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eight ####"); println("removed the simple output 'myKeyword'."); println("Changing the signature url to point to 8.rdf"); @@ -479,8 +465,6 @@ public void performTest9() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test nine ####"); println("Removed the very last simple output 'myDNASequence'."); println("Changing the signature url to point to 9.rdf"); @@ -497,8 +481,6 @@ public void performTest10() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test ten ####"); println("removed the simple input 'myNewDNASequence'."); println("Changing the signature url to point to 10.rdf"); @@ -515,8 +497,6 @@ public void performTest11() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eleven ####"); println("Added a simple output of type BasicGFFSequenceFeature and articlename 'myGFF'."); println("Changing the signature url to point to 11.rdf"); @@ -533,8 +513,6 @@ public void performTest12() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twelve ####"); println("appended a 'blah blah blah' to the description."); println("Changing the signature url to point to 12.rdf"); @@ -551,8 +529,6 @@ public void performTest13() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirteen ####"); println("changed the contact email address to be kawas7 at yahoo.com"); println("Changing the signature url to point to 13.rdf"); @@ -569,8 +545,6 @@ public void performTest14() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fourteen ####"); println("Chagned the service type to be analysis."); println("Changing the signature url to point to 14.rdf"); @@ -587,8 +561,6 @@ public void performTest15() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fifteen ####"); println("added a secondary input, called pseudocount of type integer with a\nmin/max of (-)2147483648 and a default value of 9"); println("Changing the signature url to point to 15.rdf"); @@ -605,8 +577,6 @@ public void performTest16() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test sixteen ####"); println("Added a duplicate secondary input as in test 15 called 'second'"); println("Changing the signature url to point to 16.rdf"); @@ -623,8 +593,6 @@ public void performTest17() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen ####"); println("removed the simple output 'myGFF'."); println("Changing the signature url to point to 17.rdf"); @@ -641,8 +609,6 @@ public void performTest17a() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen a ####"); println("Removed the last remaining simple input.\nTHIS SHOULD NOT WORK!"); println("Changing the signature url to point to 17a.rdf"); @@ -659,8 +625,6 @@ public void performTest17b() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test seventeen b ####"); println("Changed the pre-existing simple input to be an input of datatype Integer called myInt with no namespace declared."); println("Changing the signature url to point to 17b.rdf"); @@ -677,8 +641,6 @@ public void performTest18() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test eighteen ####"); println("removed the secondary input 'pseudocount'. Note that there is an mobyPred:produces element that contains an empty bag."); println("Changing the signature url to point to 18.rdf"); @@ -695,8 +657,6 @@ public void performTest19() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test nineteen ####"); println("Added another secondary input that handles floats."); println("The name is 'expectation_value' and is of type Float.\nNo min/max, but an enumeration of the 8 values(.0001,.01,.001,.1,10,.000001,.00001,1\nand a default of 10.0."); @@ -714,8 +674,6 @@ public void performTest20() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty ####"); println("Added an enum value to expectation value of 101.1."); println("Changing the signature url to point to 20.rdf"); @@ -732,8 +690,6 @@ public void performTest21() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-one ####"); println("changed the default value of expectation_value to be 47.2"); println("Changing the signature url to point to 21.rdf"); @@ -750,8 +706,6 @@ public void performTest22() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-two ####"); println("removed all enums except 101.1 from the secondary input 'expectation_value'"); println("Changing the signature url to point to 22.rdf"); @@ -768,8 +722,6 @@ public void performTest23() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-three ####"); println("added a min value to the secondary input expectation value of .000001"); println("Changing the signature url to point to 23.rdf"); @@ -786,8 +738,6 @@ public void performTest24() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-four ####"); println("added a max value to the secondary input expectation_value of 885858.01."); println("Changing the signature url to point to 24.rdf"); @@ -804,8 +754,6 @@ public void performTest25() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-five ####"); println("removed the max value from the secondary input expectation_value."); println("Changing the signature url to point to 25.rdf"); @@ -822,8 +770,6 @@ public void performTest26() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-six ####"); println("changed the datatype of the secondary input expecation_value to be String."); println("Changing the signature url to point to 26.rdf"); @@ -840,8 +786,6 @@ public void performTest27() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-seven ####"); println("removed the min value from the secondary input 'expectation_value'."); println("Changing the signature url to point to 27.rdf"); @@ -858,8 +802,6 @@ public void performTest28() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-eight ####"); println("removed the secondary input 'expectation_value'"); println("Changing the signature url to point to 28.rdf"); @@ -876,8 +818,6 @@ public void performTest29() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test twenty-nine ####"); println("removing the last secondary input 'second'"); println("Changing the signature url to point to 29.rdf"); @@ -894,8 +834,6 @@ public void performTest30() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty ####"); println("Adding a simple output called 'Jim', of type DNASequence, and ns EBI"); println("Changing the signature url to point to 30.rdf"); @@ -912,8 +850,6 @@ public void performTest31() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-one ####"); println("Added an output collection, 'myOutputCollection', containing a simple "); println("Changing the signature url to point to 31.rdf"); @@ -930,8 +866,6 @@ public void performTest32() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-two ####"); println("Added to the output collection, 'myOutputCollection', a simple "); println("Changing the signature url to point to 32.rdf"); @@ -948,8 +882,6 @@ public void performTest33() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-three ####"); println("Modified the simple output DNASequence is now an object, ns = EC and articlename JimIII>"); println("Changing the signature url to point to 33.rdf"); @@ -966,8 +898,6 @@ public void performTest34() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-four ####"); println("Modified the simple output object: added another ns to object EMBL, and added a ns, EC, to 'myNewString' contained in the output collection."); println("Changing the signature url to point to 34.rdf"); @@ -984,8 +914,6 @@ public void performTest35() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-five ####"); println("Modified the output collection: added another ns, EC, to the GO_Term"); println("Changing the signature url to point to 35.rdf"); @@ -1020,8 +948,6 @@ public void performTest37() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-seven ####"); println("Cloned the output collection and placed it as an input. Article Name is myInputCollection."); println("Changing the signature url to point to 37.rdf"); @@ -1038,8 +964,6 @@ public void performTest38() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-eight ####"); println("Removed the output collection 'myOutputCollection'"); println("Changing the signature url to point to 38.rdf"); @@ -1056,8 +980,6 @@ public void performTest39() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test thirty-nine ####"); println("Removed the last output collection."); println("Changing the signature url to point to 39.rdf"); @@ -1074,8 +996,6 @@ public void performTest40() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty ####"); println("Removed Go_Term from myInputCollection."); println("Changing the signature url to point to 40.rdf"); @@ -1092,8 +1012,6 @@ public void performTest41() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-one ####"); println("Changed the name of the simple and changed its type (myOldString, Object) in the collection input.\nALso added a new ns EMBL.\nThe simple input 'myNewString' has a new ns EC."); println("Changing the signature url to point to 41.rdf"); @@ -1110,8 +1028,6 @@ public void performTest42() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-two ####"); println("Added a simple to the input collection "); println("Changing the signature url to point to 42.rdf"); @@ -1128,8 +1044,6 @@ public void performTest43a() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-three a####"); println("Cloning the input collection and adding it as input twice with articleName myClonedCollection and no article name."); println("Changing the signature url to point to 43a.rdf"); @@ -1146,8 +1060,6 @@ public void performTest43() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-three ####"); println("Removed myOldString from the input collection. TODO more tests with 43a as starting point"); println("Changing the signature url to point to 43.rdf"); @@ -1164,8 +1076,6 @@ public void performTest44() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-four ####"); println("Removed a ns (EMBL) from the simple in the input collection."); println("Changing the signature url to point to 44.rdf"); @@ -1182,8 +1092,6 @@ public void performTest45() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-five ####"); println("Removed the last remaining ns from the simple in the input collection"); println("Changing the signature url to point to 45.rdf"); @@ -1200,8 +1108,6 @@ public void performTest46() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-six ####"); println("Removed the article name of the simple in the collection."); println("Changing the signature url to point to 46.rdf"); @@ -1218,8 +1124,6 @@ public void performTest47() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-seven ####"); println("Removed the articlename from the input collection."); println("Changing the signature url to point to 47.rdf"); @@ -1236,8 +1140,6 @@ public void performTest48() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-eight ####"); println("Removed the simple input. All that is left is the collection."); println("Changing the signature url to point to 48.rdf"); @@ -1254,8 +1156,6 @@ public void performTest49() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test forty-nine ####"); println("Removed the last remaining input."); println("Changing the signature url to point to 49.rdf"); @@ -1272,8 +1172,6 @@ public void performTest50() throws TestException { /* all variable used should be declared here */ String signatureUrlLocation = ""; - String name = ""; - ServSignature service = null; println("#### Test fifty ####"); println("Added an input collection containing a datatype GFF2."); println("Changing the signature url to point to 50.rdf"); From senger at pub.open-bio.org Mon Nov 7 07:07:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 02:07:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511070707.jA777PBK016646@pub.open-bio.org> senger Mon Nov 7 02:07:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv16628/src/main/org/biomoby/service/dashboard/images Removed Files: smallTrash_gis.gif smallUnregister.gif smallUnregister_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallTrash_gis.gif,1.1,NONE smallUnregister.gif,1.1,NONE smallUnregister_dis.gif,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallTrash_gis.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallUnregister.gif,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/smallUnregister_dis.gif,v: No such file or directory From senger at pub.open-bio.org Mon Nov 7 17:14:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 12:14:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511071714.jA7HElJf018916@pub.open-bio.org> senger Mon Nov 7 12:14:46 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv18815/src/main/org/biomoby/service/dashboard/images Added Files: smallFromDoc.gif smallFromDoc_dis.gif smallToDoc.gif smallToDoc_dis.gif smallZoomIn.gif smallZoomIn_dis.gif smallZoomOut.gif smallZoomOut_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallFromDoc.gif,NONE,1.1 smallFromDoc_dis.gif,NONE,1.1 smallToDoc.gif,NONE,1.1 smallToDoc_dis.gif,NONE,1.1 smallZoomIn.gif,NONE,1.1 smallZoomIn_dis.gif,NONE,1.1 smallZoomOut.gif,NONE,1.1 smallZoomOut_dis.gif,NONE,1.1 From kawas at pub.open-bio.org Mon Nov 7 23:59:14 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon, 7 Nov 2005 18:59:14 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511072359.jA7NxEkH024932@pub.open-bio.org> kawas Mon Nov 7 18:59:14 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv24911/org/biomoby/client/rdf/vocabulary Added Files: ServiceDescriptionPredicates.java Log Message: new service instance predicates. moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary ServiceDescriptionPredicates.java,NONE,1.1 From senger at pub.open-bio.org Tue Nov 8 00:01:44 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:01:44 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080001.jA801irH024999@pub.open-bio.org> senger Mon Nov 7 19:01:43 EST 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv24984 Added Files: fetaEngine.jar Log Message: jars-archive/current fetaEngine.jar,NONE,1.1 From kawas at pub.open-bio.org Tue Nov 8 00:02:08 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Mon, 7 Nov 2005 19:02:08 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080002.jA80282F025053@pub.open-bio.org> kawas Mon Nov 7 19:02:08 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv25028/org/biomoby/registry/rdfagent/verifier Modified Files: ServiceDescrParser.java Log Message: java 1.4 fix moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier ServiceDescrParser.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/07 22:47:06 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/08 00:02:08 1.11 @@ -261,7 +261,6 @@ while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - System.out.println(":" + s.toString()); StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); StmtIterator outs = r.listProperties(FetaModelRDF.outputParameter); while (ins.hasNext()) { @@ -475,7 +474,7 @@ while (enumerations.hasNext()) { enums+=enumerations.nextStatement().getLiteral().getValue().toString()+","; } - if (enums.contains(",")) + if (enums.indexOf(",") > 0) enums= enums.substring(0, enums.lastIndexOf(",")); else enums = null; From senger at pub.open-bio.org Tue Nov 8 00:06:55 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:06:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080006.jA806t6b025119@pub.open-bio.org> senger Mon Nov 7 19:06:55 EST 2005 Update of /home/repository/moby/moby-live/Java/xmls In directory pub.open-bio.org:/tmp/cvs-serv25100 Modified Files: libraries.xml Log Message: moby-live/Java/xmls libraries.xml,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/10/12 11:17:59 1.7 +++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/08 00:06:55 1.8 @@ -12,6 +12,7 @@ + @@ -50,6 +51,7 @@ + @@ -111,6 +113,7 @@ + From mwilkinson at pub.open-bio.org Tue Nov 8 00:16:47 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Mon, 7 Nov 2005 19:16:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080016.jA80Gltk025221@pub.open-bio.org> mwilkinson Mon Nov 7 19:16:47 EST 2005 Update of /home/repository/moby/moby-live/Perl In directory pub.open-bio.org:/tmp/cvs-serv25202 Modified Files: MANIFEST Log Message: updating MANIFEST with new debugYourScript filename moby-live/Perl MANIFEST,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MANIFEST,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Perl/MANIFEST 2004/07/28 23:00:09 1.12 +++ /home/repository/moby/moby-live/Perl/MANIFEST 2005/11/08 00:16:47 1.13 @@ -25,7 +25,7 @@ MOBY/Adaptor/moby/queryapi.pm MOBY/Adaptor/moby/queryapi/mysql.pm t/Client-Central.t -scripts/debugYourService +scripts/DebugYourService.pl scripts/MOBY-Central.pl scripts/Services.cgi scripts/testMOBYCentral_v05.pl From senger at pub.open-bio.org Tue Nov 8 00:34:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:34:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080034.jA80YPVU025286@pub.open-bio.org> senger Mon Nov 7 19:34:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.32,1.33 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33 @@ -1151,8 +1151,7 @@ /************************************************************************* * *************************************************************************/ - public void registerDataType (MobyDataType dataType) - throws MobyException, NoSuccessException, PendingCurationException { + public String getRegisterDataTypeXML (MobyDataType dataType) { // build the ISA tag (expressing hierarchy of data types) String[] names = dataType.getParentNames(); @@ -1184,23 +1183,31 @@ } } + return + "" + + "" + dataType.getName() + "" + + "" + + "" + + "" + new String (buf) + + "" + + "" + new String (buf2) + + "" + + "" + new String (buf3) + + "" + + "" + dataType.getAuthority() + "" + + "" + dataType.getEmailContact() + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ + public void registerDataType (MobyDataType dataType) + throws MobyException, NoSuccessException, PendingCurationException { + String result = (String)doCall ("registerObjectClass", - new Object[] { - "" + - "" + dataType.getName() + "" + - "" + - "" + - "" + new String (buf) + - "" + - "" + new String (buf2) + - "" + - "" + new String (buf3) + - "" + - "" + dataType.getAuthority() + "" + - "" + dataType.getEmailContact() + "" + - "" - }); + new Object[] { getRegisterDataTypeXML (dataType) }); dataType.setId (checkRegistration (result, dataType)[0]); } @@ -1222,8 +1229,7 @@ /************************************************************************* * *************************************************************************/ - public void registerServiceType (MobyServiceType serviceType) - throws MobyException, NoSuccessException, PendingCurationException { + public String getRegisterServiceTypeXML (MobyServiceType serviceType) { // build the ISA tag (expressing hierarchy of service types) String[] names = serviceType.getParentNames(); @@ -1235,35 +1241,30 @@ buf.append ("\n"); } + return + "" + + "" + serviceType.getName() + "" + + "" + serviceType.getEmailContact() + "" + + "" + serviceType.getAuthority() + "" + + "" + + "" + + "" + new String (buf) + + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ + public void registerServiceType (MobyServiceType serviceType) + throws MobyException, NoSuccessException, PendingCurationException { + String result = (String)doCall ("registerServiceType", - new Object[] { - "" + - "" + serviceType.getName() + "" + - "" + serviceType.getEmailContact() + "" + - "" + serviceType.getAuthority() + "" + - "" + - "" + - "" + new String (buf) + - "" + - "" - }); + new Object[] { getRegisterServiceTypeXML (serviceType) }); serviceType.setId (checkRegistration (result, serviceType)[0]); } -// -// NewServiceType -// your_name at contact.address.com -// Your.URI.here -// -// -// -// -// ExistingServiceType -// ExistingServiceType -// -// - /************************************************************************* * *************************************************************************/ @@ -1282,19 +1283,25 @@ /************************************************************************* * *************************************************************************/ + public String getRegisterNamespaceXML (MobyNamespace namespace) { + return + "" + + "" + namespace.getName() + "" + + "" + namespace.getEmailContact() + "" + + "" + namespace.getAuthority() + "" + + "" + + "" + + ""; + } + + /************************************************************************* + * + *************************************************************************/ public void registerNamespace (MobyNamespace namespace) throws MobyException, NoSuccessException, PendingCurationException { String result = (String)doCall ("registerNamespace", - new Object[] { - "" + - "" + namespace.getName() + "" + - "" + namespace.getEmailContact() + "" + - "" + namespace.getAuthority() + "" + - "" + - "" + - "" - }); + new Object[] { getRegisterNamespaceXML (namespace) }); namespace.setId (checkRegistration (result, namespace)[0]); } From senger at pub.open-bio.org Tue Nov 8 00:34:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 7 Nov 2005 19:34:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511080034.jA80YPjE025317@pub.open-bio.org> senger Mon Nov 7 19:34:25 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/service/dashboard Modified Files: RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationDataTypeSubPanel.java,1.2,1.3 RegistrationNamespaceSubPanel.java,1.2,1.3 RegistrationServiceTypeSubPanel.java,1.2,1.3 RegistryModel.java,1.14,1.15 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.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/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/08 00:34:25 1.3 @@ -234,8 +234,8 @@ registryModel.registerDataType (dataType); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterDataTypeXML (dataType); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterDataTypeXML (dataType); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.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/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/08 00:34:25 1.3 @@ -207,8 +207,8 @@ registryModel.registerNamespace (namespace); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterNamespaceXML (namespace); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterNamespaceXML (namespace); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.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/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/07 17:14:46 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/08 00:34:25 1.3 @@ -221,8 +221,8 @@ registryModel.registerServiceType (serviceType); console.setText ("\nRegistration successful!\n\n"); } else { -// String xml = registryModel.getRegisterServiceTypeXML (serviceType); -// console.setText ("\n" + xml + "\n"); + String xml = registryModel.getRegisterServiceTypeXML (serviceType); + console.setText ("\n" + xml + "\n"); } } catch (MobyException e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/07 07:03:49 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/08 00:34:25 1.15 @@ -108,6 +108,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterDataTypeXML (MobyDataType dataType) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterDataTypeXML (dataType); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterDataType (MobyDataType dataType) throws MobyException { initWorker(); @@ -195,6 +204,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterServiceTypeXML (MobyServiceType serviceType) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterServiceTypeXML (serviceType); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterServiceType (MobyServiceType serviceType) throws MobyException { initWorker(); @@ -281,6 +299,15 @@ /********************************************************************* * ********************************************************************/ + public String getRegisterNamespaceXML (MobyNamespace namespace) + throws MobyException { + initWorker(); + return ((CentralDigestCachedImpl)worker).getRegisterNamespaceXML (namespace); + } + + /********************************************************************* + * + ********************************************************************/ public void unRegisterNamespace (MobyNamespace namespace) throws MobyException { initWorker(); From senger at pub.open-bio.org Wed Nov 9 05:29:38 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TcB2030374@pub.open-bio.org> senger Wed Nov 9 00:29:38 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.33,1.34 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/09 05:29:38 1.34 @@ -1500,8 +1500,10 @@ /************************************************************************** * *************************************************************************/ - public void setDebug (boolean debug) { - this.debug = debug; + public boolean setDebug (boolean enabled) { + boolean oldMode = debug; + debug = enabled; + return oldMode; } /************************************************************************** From senger at pub.open-bio.org Wed Nov 9 05:29:38 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TcEq030355@pub.open-bio.org> senger Wed Nov 9 00:29:38 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv30336/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.48,1.49 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/06 16:23:49 1.48 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/09 05:29:38 1.49 @@ -1,3 +1,10 @@ +2005-11-08 Martin Senger + + * Added methods getRegister[...]XML() to CentralImpl. + + * Changed return value of setDebug() in Central.java (now ir + return the previous debug mode). + 2005-11-07 Martin Senger * Change default data type in MobySecondaryData from STRING to @@ -5,7 +12,7 @@ 2005-11-06 Martin Senger - * Added method getRegisterServiceXML() to CentralIMpl. + * Added method getRegisterServiceXML() to CentralImpl. * Added test for not to duplicate same namespaces in MobyPrimaryData. From senger at pub.open-bio.org Wed Nov 9 05:29:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TdBr030462@pub.open-bio.org> senger Wed Nov 9 00:29:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/shared Modified Files: Central.java Log Message: moby-live/Java/src/main/org/biomoby/shared Central.java,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java 2005/10/27 04:15:23 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java 2005/11/09 05:29:39 1.14 @@ -408,10 +408,14 @@ throws MobyException; /************************************************************************** - * Ask the implementation to create more verbose logs or messages about - * what is going on. The behaviour is completely implementation dependent. + * Ask the implementation to create more verbose logs or messages + * about what is going on. The behaviour is completely + * implementation dependent.

    + * + * @param enabled true if debug mode should be enabled, false otherwise + * @return the previous value of the debug mode *************************************************************************/ - void setDebug (boolean debug); + boolean setDebug (boolean debug); /************************************************************************** * Set whether the server responses should cached or not to speedup From senger at pub.open-bio.org Wed Nov 9 05:29:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 00:29:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511090529.jA95TdGl030442@pub.open-bio.org> senger Wed Nov 9 00:29:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv30336/src/main/org/biomoby/service/dashboard/images Added Files: register2.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images register2.gif,NONE,1.1 From senger at pub.open-bio.org Wed Nov 9 16:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWkU032215@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory pub.open-bio.org:/tmp/cvs-serv32177/src/Clients/help Modified Files: CacheRegistryClient_usage.txt Log Message: moby-live/Java/src/Clients/help CacheRegistryClient_usage.txt,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/09/22 16:07:08 1.4 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/09 16:23:32 1.5 @@ -42,6 +42,16 @@ -fill-t ... ditto as -fill but only for service types -fill-n ... ditto as -fill but only for namespaces + -update ... update the current cache with data from the + given Moby registry + (note that this does not influence data from + other Moby registries stored in the same + -cachedir directory) + -update-d ... ditto as -update but only for data types + -update-s ... ditto as -update but only for services + -update-t ... ditto as -update but only for service types + -update-n ... ditto as -update but only for namespaces + -remove ... remove the current cache of the given Moby registry (again it does not influence data from other Moby registries stored in the same @@ -51,7 +61,9 @@ -remove-t ...ditto as -remove but only for service types -remove-n ...ditto as -remove but only for namespaces - -q ... quiet mode + -q ... quiet mode (prints only errors) + (default) ... prints events what is happenning (to a log) + -v ... verbose mode (prints also decorations) [Note: You can also use -argsfile to read arguments from a file. See details in src/Client/help/argsfile.example.] From senger at pub.open-bio.org Wed Nov 9 16:23:33 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:33 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWHF032305@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/shared/event Modified Files: Notifier.java Added Files: LogListener.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event LogListener.java,NONE,1.1 Notifier.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/10/28 13:39:09 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/09 16:23:32 1.7 @@ -55,7 +55,6 @@ static final int NAMESPACES_UPDATED = 30; static final int AUTHORITIES_UPDATED = 31; - static final int SIGNAL_CANCEL_DATA_TYPES = 1; static final int SIGNAL_CANCEL_SERVICE_TYPES = 2; static final int SIGNAL_CANCEL_SERVICES = 3; From senger at pub.open-bio.org Wed Nov 9 16:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWiW032196@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv32177/src/Clients Modified Files: CacheRegistryClient.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/10/27 04:15:23 1.5 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/09 16:23:32 1.6 @@ -1,13 +1,17 @@ // CacheRegistryClient.java -// A command-line client dealing with a registry cache. // -// senger at ebi.ac.uk -// November 2004 +// Created: November 2004 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger at gmail.com). // import org.biomoby.shared.*; import org.biomoby.client.*; +import org.biomoby.shared.event.LogListener; +import org.biomoby.shared.event.Notifier; + import org.tulsoft.tools.BaseCmdLine; import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; @@ -26,7 +30,7 @@ * org.biomoby.client.CentralDigestCachedImpl CentralDigestCachedImpl} * - which is a real caching worker.

    * - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ @@ -70,14 +74,17 @@ System.exit (1); } - verbose = !cmd.hasOption ("-q"); - // where is a Moby registry CentralAll worker = new CentralDigestCachedImpl (cmd.getParam ("-e"), cmd.getParam ("-uri"), cacheDir); CentralDigestCachedImpl castWorker = (CentralDigestCachedImpl)worker; + + // how much to show + verbose = cmd.hasOption ("-v"); + if (! cmd.hasOption ("-q")) + ((Notifier)castWorker).addNotificationListener (new LogListener()); if (cmd.hasOption ("-debug")) { worker.setDebug (true); @@ -126,6 +133,26 @@ } // + // update the cache + // + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-d")) { + decorationLn ("Updating data types..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-s")) { + decorationLn ("Updating services..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-t")) { + decorationLn ("Updating service types..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + } + if (cmd.hasOption ("-update") || cmd.hasOption ("-update-n")) { + decorationLn ("Updating namespaces..."); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + } + + // // remove the cache // if (cmd.hasOption ("-remove") || cmd.hasOption ("-remove-d")) { @@ -171,10 +198,10 @@ * Print 'msg' but only if in verbose mode *************************************************************************/ static void decoration (String msg) { - if (verbose) System.out.print (msg); + if (verbose) System.out.print (msg); } static void decorationLn (String msg) { - if (verbose) System.out.println (msg); + if (verbose) System.out.println (msg); } } From senger at pub.open-bio.org Wed Nov 9 16:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWiT032236@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/10/27 04:15:23 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/09 16:23:32 1.12 @@ -23,6 +23,7 @@ import java.io.PrintWriter; import java.util.Iterator; import java.util.Map; +import java.util.HashSet; import java.util.TreeMap; import java.util.Vector; import java.util.Arrays; @@ -51,6 +52,9 @@ extends CentralDigestImpl implements CentralAll { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (CentralDigestCachedImpl.class); + // filename for a list of cached entities protected static final String LIST_FILE = "__L__I__S__T__"; @@ -132,7 +136,7 @@ * was initiated for). Otherwise 'id' indicates which part of the * cache that will be removed.

    * - * @param id should be either null, or one of the fillowing: + * @param id should be either null, or one of the following: * {@link #CACHE_PART_DATATYPES}, {@link #CACHE_PART_SERVICES}, * {@link #CACHE_PART_SERVICETYPES}, and {@link * #CACHE_PART_NAMESPACES}. @@ -156,9 +160,42 @@ } } } catch (MobyException e) { - // TBD: keep this here at least for some time (until we - // have proper logging perhaps) - System.err.println ("Removing cache failed: " + e.getMessage()); + log.error ("Removing cache failed: " + e.getMessage()); + } + } + + /************************************************************************* + * Update the indicated part of the cache. If 'id' is null it + * updates the whole cache (for that Moby registry this instance + * was initiated for).

    + * + * Updates means to fetch a new list of entities, compare it with + * existing entities in the cache (only by name, not by contents), + * fetch the missing ones and remove the redundant ones.

    + * + * @param id should be either null, or one of the following: + * {@link #CACHE_PART_DATATYPES}, {@link #CACHE_PART_SERVICES}, + * {@link #CACHE_PART_SERVICETYPES}, and {@link + * #CACHE_PART_NAMESPACES}. + * + *************************************************************************/ + public void updateCache (String id) + throws MobyException { + if (cacheDir != null) { + initCache(); + if (id == null || id.equals (CACHE_PART_SERVICES)) { + remove (servicesCache, LIST_FILE); + fillServicesCache(); + } else if (id == null || id.equals (CACHE_PART_DATATYPES)) { + remove (dataTypesCache, LIST_FILE); + fillDataTypesCache(); + } else if (id == null || id.equals (CACHE_PART_SERVICETYPES)) { + remove (serviceTypesCache, LIST_FILE); + fillServiceTypesCache(); + } else if (id == null || id.equals (CACHE_PART_NAMESPACES)) { + remove (namespacesCache, LIST_FILE); + fillNamespacesCache(); + } } } @@ -291,6 +328,15 @@ } } + // remove a file from a cache + protected void remove (File cache, String name) { + File file = new File (cache, name); + // do not throw here an exception because a missing file + // can be a legitimate status (e.g. for LIST_FILE when we + // are updating) + file.delete(); + } + /************************************************************************** * Read a cached file *************************************************************************/ @@ -332,34 +378,95 @@ return true; } - /************************************************************************** - * Load data types from a moby registry into local cache. If it is - * interrupted (by a callback signal) it removes what was already - * put into this cache and returns false. Otherwise returns - * true. It raises an exception if it cannot fill the cache (from - * some other reasons). +// /************************************************************************** +// * Load data types from a moby registry into local cache. If it is +// * interrupted (by a callback signal) it removes what was already +// * put into this cache and returns false. Otherwise returns +// * true. It raises an exception if it cannot fill the cache (from +// * some other reasons). +// *************************************************************************/ +// protected boolean fillDataTypesCache() +// throws MobyException { +// try { +// fireEvent (DATA_TYPES_START); +// String typesAsXML = getDataTypeNamesAsXML(); +// store (dataTypesCache, LIST_FILE, typesAsXML); +// Map types = createDataTypeNamesFromXML (typesAsXML); +// fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); +// for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { +// Map.Entry entry = (Map.Entry)it.next(); +// String name = (String)entry.getKey(); +// fireEvent (DATA_TYPE_LOADING, name); +// String xml = getDataTypeAsXML (name); +// store (dataTypesCache, name, xml); +// fireEvent (DATA_TYPE_LOADED, name); +// if (stopDT) { +// removeFromCache (CACHE_PART_DATATYPES); +// return false; +// } +// } +// return true; +// } catch (Exception e) { +// throw new MobyException (formatException (e)); +// } finally { +// fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); +// stopDT = false; +// } +// } + + /************************************************************************** + * Update data types from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE *************************************************************************/ protected boolean fillDataTypesCache() throws MobyException { try { fireEvent (DATA_TYPES_START); String typesAsXML = getDataTypeNamesAsXML(); - store (dataTypesCache, LIST_FILE, typesAsXML); + remove (dataTypesCache, LIST_FILE); Map types = createDataTypeNamesFromXML (typesAsXML); fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = dataTypesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (dataTypesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String name = (String)entry.getKey(); - fireEvent (DATA_TYPE_LOADING, name); - String xml = getDataTypeAsXML (name); - store (dataTypesCache, name, xml); - fireEvent (DATA_TYPE_LOADED, name); - if (stopDT) { - removeFromCache (CACHE_PART_DATATYPES); - return false; + if ( ! currentFiles.contains (name)) { + // missing file: fetch it from a registry + fireEvent (DATA_TYPE_LOADING, name); + String xml = getDataTypeAsXML (name); + store (dataTypesCache, name, xml); + fireEvent (DATA_TYPE_LOADED, name); + if (stopDT) { + return false; + } } + currentFiles.remove (name); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (dataTypesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (dataTypesCache, LIST_FILE, typesAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -397,27 +504,59 @@ } } - // + /************************************************************************** + * Update service types from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE + *************************************************************************/ protected boolean fillServiceTypesCache() throws MobyException { try { fireEvent (SERVICE_TYPES_START); String typesAsXML = getServiceTypesAsXML(); - store (serviceTypesCache, LIST_FILE, typesAsXML); + remove (serviceTypesCache, LIST_FILE); MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = serviceTypesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (serviceTypesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files for (int i = 0 ; i < types.length; i++) { String name = types[i].getName(); - fireEvent (SERVICE_TYPE_LOADING, name); - String xml = getServiceTypeRelationshipsAsXML (name, false); - store (serviceTypesCache, name, xml); - fireEvent (SERVICE_TYPE_LOADED, name); - if (stopST) { - removeFromCache (CACHE_PART_SERVICETYPES); - return false; + if ( ! currentFiles.contains (name)) { + // missing file: fetch it from a registry + fireEvent (SERVICE_TYPE_LOADING, name); + String xml = getServiceTypeRelationshipsAsXML (name, false); + store (serviceTypesCache, name, xml); + fireEvent (SERVICE_TYPE_LOADED, name); + if (stopST) { + log.warn ("Service types cache not fully updated"); + return false; + } } + currentFiles.remove (name); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (serviceTypesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (serviceTypesCache, LIST_FILE, typesAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -426,6 +565,34 @@ } } +// protected boolean fillServiceTypesCache() +// throws MobyException { +// try { +// fireEvent (SERVICE_TYPES_START); +// String typesAsXML = getServiceTypesAsXML(); +// store (serviceTypesCache, LIST_FILE, typesAsXML); +// MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); +// fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); +// for (int i = 0 ; i < types.length; i++) { +// String name = types[i].getName(); +// fireEvent (SERVICE_TYPE_LOADING, name); +// String xml = getServiceTypeRelationshipsAsXML (name, false); +// store (serviceTypesCache, name, xml); +// fireEvent (SERVICE_TYPE_LOADED, name); +// if (stopST) { +// removeFromCache (CACHE_PART_SERVICETYPES); +// return false; +// } +// } +// return true; +// } catch (Exception e) { +// throw new MobyException (formatException (e)); +// } finally { +// fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); +// stopST = false; +// } +// } + // protected boolean fillNamespacesCache() throws MobyException { @@ -458,6 +625,12 @@ // get a list file (with all data type names) String xmlList = getListFile (dataTypesCache); + if (xmlList == null) { + initCache(); + if (! fillDataTypesCache()) + // callback stopped filling + return new TreeMap(); + } return createDataTypeNamesFromXML (xmlList); } } @@ -513,6 +686,12 @@ // get a list file (with all service names) String xmlList = getListFile (servicesCache); + if (xmlList == null) { + initCache(); + if (! fillServicesCache()) + // callback stopped filling + return new TreeMap(); + } return createServiceNamesByAuthorityFromXML (xmlList); } } @@ -568,6 +747,10 @@ // get a list file (with all namespaces) String xmlList = getListFile (namespacesCache); + if (xmlList == null) { + initCache(); + fillNamespacesCache(); + } return createNamespacesFromXML (xmlList); } } @@ -583,12 +766,17 @@ if (isCacheEmpty (serviceTypesCache)) { initCache(); if (! fillServiceTypesCache()) - // callback stopped filling + // a callback stopped filling return new MobyServiceType[] {}; } // get a list file (with all service type names) String xmlList = getListFile (serviceTypesCache); + if (xmlList == null) { + if (! fillServiceTypesCache()) + // a callback stopped filling + return new MobyServiceType[] {}; + } MobyServiceType[] types = createServiceTypesFromXML (xmlList); // add details about relationship to get full service types @@ -606,13 +794,15 @@ } /************************************************************************** - * + * A LIST_FILE is a TOC of a cache object (each cache part has its + * own LIST_FILE). Read it and return it. If it does not exist, + * return null. *************************************************************************/ protected static String getListFile (File cache) throws MobyException { File listFile = new File (cache, LIST_FILE); if (! listFile.exists()) - throw new MobyException ("Corrupted cache '" + cache + "': Missing a LIST file."); + return null; return load (listFile); } From senger at pub.open-bio.org Wed Nov 9 16:23:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 9 Nov 2005 11:23:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511091623.jA9GNWkk032284@pub.open-bio.org> senger Wed Nov 9 11:23:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv32177/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java NOTES RegistrationPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java RegistryPanel.java ServiceTypesBoard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.18,1.19 NOTES,1.20,1.21 RegistrationPanel.java,1.14,1.15 RegistrationServiceTypeSubPanel.java,1.4,1.5 RegistryModel.java,1.16,1.17 RegistryPanel.java,1.20,1.21 ServiceTypesBoard.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 05:29:38 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 16:23:32 1.19 @@ -404,7 +404,7 @@ clearButton.setFocusPainted (false); clearButton.setMargin (new Insets (0,0,0,0)); clearButton.setContentAreaFilled (false); - clearButton.setToolTipText ("Clear text area"); + clearButton.setToolTipText ("Clear " + title.toLowerCase() + " text area"); clearButton.addActionListener (new ActionListener() { public void actionPerformed (ActionEvent e) { area.requestFocusInWindow(); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/07 17:14:46 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/09 16:23:32 1.21 @@ -1,15 +1,14 @@ +* after unregistration, fill the form with just unregistered entity - + so it is easier to update it and register again * better initial dimension of the whole dashboard * too much empty space in the dashboard title... (perhaps to move the icon somewhere else - like a "splash panel") --- -* show/store XML sent to register this service - (a place for using it other time?) - * how to squeeze too long combo boxes into smaller place ? -*introduce perhaps preferred/minimal/maximal sizes into text fields? +* introduce perhaps preferred/minimal/maximal sizes into text fields? * registration: selecting an authority is really propagated to the text fields? (Do for data type registration the same as was done for @@ -130,6 +129,8 @@ * The same, after de-registration * Then make the reg/unreg real... +* log4j.configuration property - works only from Ant... add it to the + cmd-line clients, as well * alltools2: - JTextFieldWithHistory should remember also an empty value ("") =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 05:29:38 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 16:23:32 1.15 @@ -284,7 +284,7 @@ error ("An error occured when trying to register a new entity.\n\n", exception); registerButton.setEnabled (true); - showXMLButton.setEnabled (true); + fromXMLButton.setEnabled (true); maybeDisableVerbose (bag); console.setAppendMode (oldAppendMode); } @@ -299,6 +299,13 @@ throws MobyException { } + /************************************************************************** + * Should be overwritten by sub-panels. + **************************************************************************/ + protected void updateCache() + throws MobyException { + } + /********************************************************************* * ********************************************************************/ @@ -321,6 +328,8 @@ console.setText (registryModel.callRegistry (myMethodName, xmlFile)); console.setText ("\n"); + updateCache(); + } catch (MobyException e) { exception = e; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 16:23:32 1.5 @@ -200,6 +200,7 @@ serviceType.toString() + "\n"); registryModel.registerServiceType (serviceType); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterServiceTypeXML (serviceType); console.setText ("\n" + xml + "\n"); @@ -208,6 +209,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateServiceTypesCache(); + } + + /************************************************************************** * * Customized tree of service types - has different popup menus etc... * @@ -352,6 +363,7 @@ console.setText ("Service type to be unregistered: " + name + "\n"); registryModel.unRegisterServiceType (serviceType); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 05:29:38 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 16:23:32 1.17 @@ -48,6 +48,8 @@ org.apache.commons.logging.LogFactory.getLog (RegistryModel.class); CentralAll worker; + CentralDigestCachedImpl castWorker; + boolean useCache = true; Hashtable dataTypesTable = new Hashtable(); Hashtable serviceTypesTable = new Hashtable(); @@ -262,6 +264,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateServiceTypesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + fireEvent (Notifier.SERVICE_TYPES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadServiceTypesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES); + fireEvent (Notifier.SERVICE_TYPES_UPDATED, "", null); + } + + /********************************************************************* * Fetch service types (from a cache or from a registry). When done, * signal that service types are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -505,7 +528,7 @@ /********************************************************************* * - * The rest... + * Dealing with local cache. * ********************************************************************/ @@ -521,6 +544,12 @@ /********************************************************************* * + * The rest... + * + ********************************************************************/ + + /********************************************************************* + * ********************************************************************/ protected void initWorker() throws MobyException { @@ -554,6 +583,7 @@ maybeNewCacheDir); ((Notifier)worker).addNotificationListeners (nls); } + castWorker = (CentralDigestCachedImpl)worker; } /************************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/07 07:03:49 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/09 16:23:32 1.21 @@ -12,11 +12,16 @@ import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.JFileChooserWithHistory; +import org.biomoby.shared.MobyException; +import org.biomoby.shared.event.Notifier; +import org.biomoby.client.CentralDigestCachedImpl; + import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.JSplitPane; import javax.swing.JComponent; @@ -40,10 +45,13 @@ public class RegistryPanel extends AbstractPanel { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (RegistryPanel.class); + // names of user preferences keys static final String USE_CACHE = "use-cache"; - // associated model working behind the scenes + // associated model working behind the scene RegistryModel registryModel; // components that are used from more methods @@ -53,6 +61,8 @@ JLabel labelCacheDir; CommonConsole console; + JCheckBox bServices, bDataTypes, bNamespaces, bServiceTypes, bAll; + // shared icons protected static Icon defaultsIcon; protected static Icon reloadIcon; @@ -142,6 +152,37 @@ /************************************************************************** * **************************************************************************/ + private JPanel createCacheDialog (String introText) { + JPanel p = new JPanel (new GridBagLayout()); + JLabel start = new JLabel (introText); + + bServices = createCheckBox ("Services", false, KeyEvent.VK_S, null); + bDataTypes = createCheckBox ("Data types", false, KeyEvent.VK_D, null); + bNamespaces = createCheckBox ("Namespaces", false, KeyEvent.VK_N, null); + bServiceTypes = createCheckBox ("Service types", false, KeyEvent.VK_T, null); + bAll = createCheckBox ("All", false, KeyEvent.VK_A, + new ItemListener() { + public void itemStateChanged (ItemEvent e) { + boolean enabled = (e.getStateChange() != ItemEvent.SELECTED); + bServices.setEnabled (enabled); + bDataTypes.setEnabled (enabled); + bNamespaces.setEnabled (enabled); + bServiceTypes.setEnabled (enabled); + } + }); + // put it together + SwingUtils.addComponent (p, start, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bServices, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + SwingUtils.addComponent (p, bDataTypes, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bNamespaces, 0, 3, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bServiceTypes, 0, 4, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (p, bAll, 0, 5, 1, 1, NONE, NWEST, 0.0, 0.0, BREATH_TOP); + return p; + } + + /************************************************************************** + * + **************************************************************************/ public void onDefaults() { registryURL.setText (registryModel.getDefaultRegistryEndpoint()); registryNS.setText (registryModel.getDefaultRegistryNamespace()); @@ -159,10 +200,84 @@ public void onCacheErase() { } + final static String UPDATE_LABEL = + "Update or reload your local cache
    " + + "for the entities selected below.

    " + + + "Update is faster than reload but
    " + + "it may not reflect changes in the
    " + + "contents of the entities.

    " + + + "Reload is slower than update but it
    " + + "guarantees that the full contents
    " + + "of all cached entities is up to date.

    "; + /************************************************************************** * **************************************************************************/ public void onCacheUpdate() { + JPanel p = createCacheDialog (UPDATE_LABEL); + String[] buttons = new String[] { "Update", "Reload", "Cancel"}; + int selected = + JOptionPane.showOptionDialog (null, p, + "Update/Reload local cache", + JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE, + confirmIcon, + buttons, + null); + boolean toReload; + if (selected == 0) + toReload = false; // 'update' selected + else if (selected == 1) + toReload = true; // 'reload' selected + else + return; // cancelled + + boolean all = bAll.isSelected(); + if (all || bServices.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES, toReload); + if (all || bDataTypes.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES, toReload); + if (all || bNamespaces.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES, toReload); + if (all || bServiceTypes.isSelected()) + updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES, toReload); + } + + /************************************************************************** + * + **************************************************************************/ + private void updateCache (String cachePart, boolean reload) { + final String myCachePart = cachePart; + final boolean myReload = reload; + final SwingWorker worker = new SwingWorker() { + MobyException exception = null; + public Object construct() { + try { + if (myReload) { + registryModel.reloadServiceTypesCache(); + } else { + registryModel.updateServiceTypesCache(); + } + } catch (MobyException e) { + exception = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (log.isDebugEnabled()) + log.debug (myReload ? "Reload of " : "Update of " + myCachePart + " finished"); + if (exception != null) + error ("An error occured when filling/updating the cache.\n\n", + exception); + } + + }; + worker.start(); + } /************************************************************************** @@ -184,8 +299,8 @@ JLabel labelRegistryNS = new JLabel("Namespace (URI)"); registryNS = createText (null, "registryNamespace", DP_REGISTRY_NAMESPACE); JButton reloadAllButton = - createButton (" Reload all ", - "Reload all ontology trees from the Biomoby registry", + createButton (" Reload ", + "Reload fully some or all ontology trees from the Biomoby registry", KeyEvent.VK_R, new ActionListener() { public void actionPerformed (ActionEvent e) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/09 16:23:32 1.4 @@ -88,12 +88,14 @@ case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); +// log.info ("RESET initiator: " + initiator + ", this tree: " + tree); if (tree == initiator) channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: initiator = event.getSource(); +// log.info ("UPDATED initiator: " + initiator + ", this tree: " + tree); if (tree != initiator) { // someone else (of this instance) initiated request // for updating service types - so we need to update our From senger at pub.open-bio.org Thu Nov 10 08:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVAE003844@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv3825/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.49,1.50 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/09 05:29:38 1.49 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/10 08:54:31 1.50 @@ -1,3 +1,7 @@ +2005-11-10 Martin Senger + + * Added method getParentName() to MobyServiceType + 2005-11-08 Martin Senger * Added methods getRegister[...]XML() to CentralImpl. From senger at pub.open-bio.org Thu Nov 10 08:54:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sW3X004003@pub.open-bio.org> senger Thu Nov 10 03:54:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/shared Modified Files: MobyDataType.java MobyServiceType.java Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyDataType.java,1.11,1.12 MobyServiceType.java,1.4,1.5 Utils.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/10/28 07:58:08 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/11/10 08:54:32 1.12 @@ -154,6 +154,20 @@ return names; } } + + /** + * Return the first parent name (at the moment the only one set + * and used, anyway. This is a convenient method to {@link + * #getParentNames}.

    + * + * @return parent name, or an empty string if there is no parent + * set + */ + public String getParentName() { + String[] names = getParentNames(); + return (names.length == 0 ? "" : names[0]); + } + /** * @see #getParentNames * @param value is a set of parent names (usually just one name, =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java 2005/10/28 11:30:37 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyServiceType.java 2005/11/10 08:54:32 1.5 @@ -83,6 +83,11 @@ description = (value == null ? "" : value); } + public String getParentName() { + String[] names = getParentNames(); + return (names.length == 0 ? "" : names[0]); + } + public String[] getParentNames() { synchronized (parentNames) { String[] names = new String [parentNames.length]; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/07 07:03:50 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/10 08:54:32 1.8 @@ -106,6 +106,25 @@ } /************************************************************************* + * Give back an elapsed time (given in milllis) in a human + * readable form.

    + * + * @param millis is a time interval in milliseconds + * @return formatted, human-readable, time + *************************************************************************/ + public static String ms2Human (long millis) { + StringBuffer buf = new StringBuffer (100); + long seconds = millis / 1000; + long minutes = seconds / 60; + long hours = minutes / 60; + long days = hours / 24; + if (days > 0) + buf.append (days + " days and "); + buf.append ((hours % 24) + ":" + (minutes % 60) + ":" + (seconds % 60) + "." + (millis % 1000)); + return new String (buf); + } + + /************************************************************************* * Return just the last part of the LSID identifier. An example of * an LSID identifier as used by and returned from the Moby * registry is urn:lsid:biomoby.org:objectclass:object. From senger at pub.open-bio.org Thu Nov 10 08:54:32 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:32 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sW1J003976@pub.open-bio.org> senger Thu Nov 10 03:54:32 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/service/dashboard Modified Files: CommonTree.java Dashboard.java DashboardProperties.java DataTypesBoard.java NOTES NamespacesBoard.java RegistrationDataTypeSubPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryModel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonTree.java,1.14,1.15 Dashboard.java,1.13,1.14 DashboardProperties.java,1.13,1.14 DataTypesBoard.java,1.8,1.9 NOTES,1.21,1.22 NamespacesBoard.java,1.3,1.4 RegistrationDataTypeSubPanel.java,1.4,1.5 RegistrationServiceSubPanel.java,1.3,1.4 RegistrationServiceTypeSubPanel.java,1.5,1.6 RegistryModel.java,1.17,1.18 RegistryPanel.java,1.21,1.22 ServiceTypesBoard.java,1.4,1.5 ServiceTypesTree.java,1.7,1.8 ServicesBoard.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/06 16:47:11 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 08:54:31 1.15 @@ -57,6 +57,7 @@ protected final static String AC_ASORT = "ac-asort"; // some shared constants + final static protected int SORTED_AS_PREVIOUSLY = -1; final static protected int SORTED_BY_NAME = 0; final static protected int SORTED_BY_AUTHORITY = 1; final static protected int SORTED_UNUSUAL = 9; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/07 17:14:46 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 08:54:31 1.14 @@ -116,8 +116,14 @@ JFrame frame = SwingUtils.createMainFrame (getComponent (propertyChannel), getName()); addMenuBar (frame); -// SwingUtils.showMainFrame (frame, dashboard.getPreferredSize()); - SwingUtils.showMainFrame (frame, new Dimension (1000, 800)); + + Dimension screenSize = frame.getToolkit().getScreenSize(); + double myWidth = Math.min (screenSize.getWidth(), 1100); + double myHeight = Math.min (screenSize.getHeight(), 900); + Dimension mySize = new Dimension(); + mySize.setSize (myWidth, myHeight); + + SwingUtils.showMainFrame (frame, mySize); } /************************************************************************** @@ -266,7 +272,8 @@ * the bottom of a dashboard). **************************************************************************/ protected StatusBar getStatusBar() { - return new StatusBar ("Status: Work in progress"); + return new StatusBar + ("Dashboard is ready. Fasten your seat belts - it's going to be a bumpy ride."); } class StatusBar extends JLabel implements PropertyChangeListener { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/09 05:29:38 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 08:54:31 1.14 @@ -63,6 +63,7 @@ static final String DP_REG_S_XML_PATH = "dp-reg-s-xml-path"; static final String DP_USE_SIGNATURE = "dp-use-signature"; // type: Boolean static final String DP_USE_AUTHORITATIVE = "dp-use-auth"; // type: Boolean + static final String DP_REG_S_TYPE = "dp-reg-s-type"; static final String DP_REG_VERBOSE = "dp-reg-verbose"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/07 17:14:46 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/10 08:54:31 1.9 @@ -99,7 +99,8 @@ // for updating data types - so we need to update our // own tree - using for that data types included in // this event - tree.update (-1, (MobyDataType[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyDataType[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/09 16:23:32 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 08:54:31 1.22 @@ -1,10 +1,28 @@ +* More testing: + - interrupting loading + - different order of panels + - loading without caching + - changing cache... + +* MAJOR BUG: synchronization problem when starting; revised it! + - perhaps singletons for registry model and for workers there + +* BUG: still sometimes a bug by reloading the cache - + NullPointerException reported in a dialog window - difficult to + reproduce it... but it is somewhere there :-( + +* WARN: How would an authority with characters 'http://' cope as a + cache name? Can it happen? + * after unregistration, fill the form with just unregistered entity - so it is easier to update it and register again -* better initial dimension of the whole dashboard * too much empty space in the dashboard title... (perhaps to move the icon somewhere else - like a "splash panel") +* log warning if the 'notified' is not called from the event-dispatch + queue + --- * how to squeeze too long combo boxes into smaller place ? @@ -19,8 +37,6 @@ * BUG: When 'no-use-chache' then changing sorting also reloads; which is bad I think -* Reload ... does it ignore cache? - TODO generally: --------------- @@ -35,26 +51,19 @@ ? select a part of an error message and highlight it in red? ? HELP (in a Dashboard Menu) + - starting panel/splash screen - helps from panels - About - credits - add dynamically a URL from dashboard.properties... -* change onMethods() to be protected or even private... - ? improve API javadoc of all these Central*Impl ? start to work on/think of the RDF-based cache TODO for cache: --------------- -* poor-man update: keep what's there but add what is not there - (and perhaps delete what should not be there) - but do not - check any age of existing -* getInfo() method -* corresponding changes with command-line clients for cache - implementations -* remove memory-caching from CentralImpl -* graphics by default: yes for datatyeps and no for services +? remove memory-caching from CentralImpl +? graphics by default: yes for datatyeps and no for services General options (available from the menu) --------------- @@ -63,12 +72,6 @@ * language ( => use proper ResourceBundler...) -Registry panel --------------- - -* finish all buttons - - Registration panel ------------------ @@ -123,12 +126,6 @@ - the BuildDataTypeTree is sometimes damaged (after adding a member node); not sure how to reproduce it - ! finish all the caching stuff (separate scrap of paper) - -* After registration, update cache, update list -* The same, after de-registration -* Then make the reg/unreg real... - * log4j.configuration property - works only from Ant... add it to the cmd-line clients, as well =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/10 08:54:31 1.4 @@ -99,7 +99,8 @@ // for updating namespaces - so we need to update our // own tree - using for that namespaces included in // this event - tree.update (-1, (MobyNamespace[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyNamespace[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 08:54:31 1.5 @@ -327,7 +327,10 @@ /********************************************************************* * Called when a tree node is selected, or deselected (in * which case 'node' is null). If a data type name is - * selected, enable few popup menu items, otherwise disable them. + * selected, enable few popup menu items, otherwise disable + * them. Then copy the contents of this data type to a + * console, and additional (if indicated in the + * propertyChannel) to the newly built data type fields. ********************************************************************/ protected void selected (DefaultMutableTreeNode node) { if (node == null) { @@ -366,6 +369,7 @@ dtAuth.setText (dataType.getAuthority()); dtEmail.setText (dataType.getEmailContact()); dtDescArea.setText (dataType.getDescription()); + buildTree.setParent (dataType.getParentName()); } } else if (isAuthority) { if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/09 05:29:38 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 08:54:31 1.4 @@ -59,6 +59,7 @@ // names of user preferences keys static final String USE_SIGNATURE = "use-signature"; static final String USE_AUTHORITATIVE = "use-authoritative"; + static final String REG_S_TYPE = "reg-s-type"; static final String REG_S_FROM_XML = "reg-service-from-xml-file"; // components that are used from more methods @@ -142,7 +143,7 @@ // service type JPanel serviceType = new JPanel (new GridBagLayout()); JLabel labelST = new JLabel ("Service type: "); - sType = new JLabel (""); + sType = new JLabel (getPrefValue (REG_S_TYPE, "")); SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); @@ -585,8 +586,12 @@ protected void selected (DefaultMutableTreeNode node) { if (node == null) return; CommonNode nodeObject = (CommonNode)node.getUserObject(); - if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) - sType.setText (nodeObject.getValue()); + if (nodeObject.getType() == CommonNode.NODE_SERVICE_TYPE) { + String value = nodeObject.getValue(); + sType.setText (value); + setPrefValue (REG_S_TYPE, value); + propertyChannel.put (DP_REG_S_TYPE, value); + } } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/09 16:23:32 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 08:54:31 1.6 @@ -312,6 +312,7 @@ stAuth.setText (serviceType.getAuthority()); stEmail.setText (serviceType.getEmailContact()); stDescArea.setText (serviceType.getDescription()); + stISA.setText (serviceType.getParentName()); } } else if (isAuthority) { if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/09 16:23:32 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryModel.java 2005/11/10 08:54:31 1.18 @@ -32,9 +32,9 @@ import java.io.IOException; /** - * A real worker that supplies all data to the {@link - * RegistryPanel}. It accesses a Biomoby registry (or a local cache) - * to get data.

    + * A real worker that supplies all data from a Biomoby registry (or + * from a local cache) to various panels, especially to the {@link + * RegistryPanel} and the {@link RegistrationPanel}.

    * * @author Martin Senger * @version $Id$ @@ -47,6 +47,14 @@ private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog (RegistryModel.class); + // Biomoby parts: reflects the same what from is in + // CentralDigestCachedImpl for cache parts - but here more + // conveniently as integers + public static final int PART_SERVICES = 1; + public static final int PART_DATA_TYPES = 2; + public static final int PART_SERVICE_TYPES = 4; + public static final int PART_NAMESPACES = 8; + CentralAll worker; CentralDigestCachedImpl castWorker; @@ -168,6 +176,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateDataTypesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + fireEvent (Notifier.DATA_TYPES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadDataTypesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES); + fireEvent (Notifier.DATA_TYPES_UPDATED, "", null); + } + + /********************************************************************* * Fetch data types (from a cache or from a registry). When done, * signal that data types are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -380,6 +409,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateNamespacesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + fireEvent (Notifier.NAMESPACES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadNamespacesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES); + fireEvent (Notifier.NAMESPACES_UPDATED, "", null); + } + + /********************************************************************* * Fetch namespaces (from a cache or from a registry). When done, * signal that namespaces are updated. If an initiator is known * (not null), signal, who asked for it, as well. @@ -476,6 +526,27 @@ } /********************************************************************* + * + ********************************************************************/ + public void updateServicesCache() + throws MobyException { + initWorker(); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + fireEvent (Notifier.AUTHORITIES_UPDATED, "", null); + } + + /********************************************************************* + * + ********************************************************************/ + public void reloadServicesCache() + throws MobyException { + initWorker(); + castWorker.removeFromCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + castWorker.updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES); + fireEvent (Notifier.AUTHORITIES_UPDATED, "", null); + } + + /********************************************************************* * Fetch services (from a cache or from a registry). When done, * signal that services are updated. If an initiator is known (not * null), signal, who asked for it, as well. @@ -544,6 +615,20 @@ /********************************************************************* * + ********************************************************************/ + public String getCacheInfoFormatted() + throws MobyException { + initWorker(); + StringBuffer buf = new StringBuffer (500); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_DATATYPES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_NAMESPACES)); + buf.append (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES)); + return new String (buf); + } + + /********************************************************************* + * * The rest... * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/09 16:23:32 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/10 08:54:31 1.22 @@ -14,7 +14,6 @@ import org.biomoby.shared.MobyException; import org.biomoby.shared.event.Notifier; -import org.biomoby.client.CentralDigestCachedImpl; import javax.swing.JPanel; import javax.swing.JLabel; @@ -62,6 +61,12 @@ CommonConsole console; JCheckBox bServices, bDataTypes, bNamespaces, bServiceTypes, bAll; + JButton infoButton, updateButton, eraseButton; + + DataTypesBoard dataTypesBoard; + ServiceTypesBoard serviceTypesBoard; + NamespacesBoard namespacesBoard; + ServicesBoard servicesBoard; // shared icons protected static Icon defaultsIcon; @@ -108,25 +113,21 @@ console.setAppendMode (false); // ontology trees - DataTypesBoard dataTypesBoard = - new DataTypesBoard (registryModel, - console, - propertyChannel); + dataTypesBoard = new DataTypesBoard (registryModel, + console, + propertyChannel); dataTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); - ServiceTypesBoard serviceTypesBoard = - new ServiceTypesBoard (registryModel, - console, - propertyChannel); + serviceTypesBoard = new ServiceTypesBoard (registryModel, + console, + propertyChannel); serviceTypesBoard.updateTree (CommonTree.SORTED_BY_NAME); - NamespacesBoard namespacesBoard = - new NamespacesBoard (registryModel, - console, - propertyChannel); + namespacesBoard = new NamespacesBoard (registryModel, + console, + propertyChannel); namespacesBoard.updateTree (CommonTree.SORTED_BY_NAME); - ServicesBoard servicesBoard = - new ServicesBoard (registryModel, - console, - propertyChannel); + servicesBoard = new ServicesBoard (registryModel, + console, + propertyChannel); servicesBoard.updateTree (CommonTree.SORTED_BY_NAME); // split it into moving panels @@ -144,9 +145,23 @@ } /************************************************************************** - * + * It updates all lists. Each tree is responsible to reload itself + * in a separate thread. + **************************************************************************/ + protected void onReloadAll() { + dataTypesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + serviceTypesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + namespacesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + servicesBoard.updateTree (CommonTree.SORTED_AS_PREVIOUSLY); + } + + /************************************************************************** + * Replace text fields that define location of a Biomoby registry + * with a default location. **************************************************************************/ - public void onReloadAll() { + protected void onDefaults() { + registryURL.setText (registryModel.getDefaultRegistryEndpoint()); + registryNS.setText (registryModel.getDefaultRegistryNamespace()); } /************************************************************************** @@ -183,21 +198,53 @@ /************************************************************************** * **************************************************************************/ - public void onDefaults() { - registryURL.setText (registryModel.getDefaultRegistryEndpoint()); - registryNS.setText (registryModel.getDefaultRegistryNamespace()); - } + protected void onCacheInfo() { - /************************************************************************** - * - **************************************************************************/ - public void onCacheInfo() { + final JLabel contents = new JLabel(); + final String[] buttons = new String[] { "Copy to console", "Done"}; + propertyChannel.fire (DP_STATUS_MSG, "Retrieving cach info..."); + infoButton.setEnabled (false); + + final SwingWorker worker = new SwingWorker() { + MobyException exception = null; + String info = null; + public Object construct() { + try { + info = registryModel.getCacheInfoFormatted(); + } catch (MobyException e) { + exception = e; + } + return null; // not used here + } + + // runs on the event-dispatching thread. + public void finished() { + if (exception == null) + contents.setText ("

    " + info + "
    "); + else + contents.setText ("Sorry, I could not retrieve any info...
    " + + "I think that the problem is actually here:

    " +
    +					  exception.getMessage() +
    +					  "
    "); + if (JOptionPane.showOptionDialog (null, contents, + "Info on local cache", + JOptionPane.YES_NO_OPTION, + JOptionPane.PLAIN_MESSAGE, + confirmIcon, + buttons, + null) == 0) + console.setText (info); + propertyChannel.fire (DP_STATUS_MSG, "Done"); + infoButton.setEnabled (true); + } + }; + worker.start(); } /************************************************************************** * **************************************************************************/ - public void onCacheErase() { + protected void onCacheErase() { } final static String UPDATE_LABEL = @@ -215,7 +262,7 @@ /************************************************************************** * **************************************************************************/ - public void onCacheUpdate() { + protected void onCacheUpdate() { JPanel p = createCacheDialog (UPDATE_LABEL); String[] buttons = new String[] { "Update", "Reload", "Cancel"}; int selected = @@ -234,31 +281,53 @@ else return; // cancelled + // update each cache part in a separate (and concurrent) thread boolean all = bAll.isSelected(); if (all || bServices.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICES, toReload); + updateCache (RegistryModel.PART_SERVICES, toReload); if (all || bDataTypes.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_DATATYPES, toReload); + updateCache (RegistryModel.PART_DATA_TYPES, toReload); if (all || bNamespaces.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_NAMESPACES, toReload); + updateCache (RegistryModel.PART_NAMESPACES, toReload); if (all || bServiceTypes.isSelected()) - updateCache (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES, toReload); + updateCache (RegistryModel.PART_SERVICE_TYPES, toReload); } /************************************************************************** * **************************************************************************/ - private void updateCache (String cachePart, boolean reload) { - final String myCachePart = cachePart; + private void updateCache (int cachePart, boolean reload) { + final int myCachePart = cachePart; final boolean myReload = reload; final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { try { - if (myReload) { - registryModel.reloadServiceTypesCache(); - } else { - registryModel.updateServiceTypesCache(); + switch (myCachePart) { + case RegistryModel.PART_SERVICES: + if (myReload) + registryModel.reloadServicesCache(); + else + registryModel.updateServicesCache(); + break; + case RegistryModel.PART_DATA_TYPES: + if (myReload) + registryModel.reloadDataTypesCache(); + else + registryModel.updateDataTypesCache(); + break; + case RegistryModel.PART_SERVICE_TYPES: + if (myReload) + registryModel.reloadServiceTypesCache(); + else + registryModel.updateServiceTypesCache(); + break; + case RegistryModel.PART_NAMESPACES: + if (myReload) + registryModel.reloadNamespacesCache(); + else + registryModel.updateNamespacesCache(); + break; } } catch (MobyException e) { exception = e; @@ -269,7 +338,7 @@ // runs on the event-dispatching thread. public void finished() { if (log.isDebugEnabled()) - log.debug (myReload ? "Reload of " : "Update of " + myCachePart + " finished"); + log.debug (myReload ? "Reload of " : "Update of part " + myCachePart + " finished"); if (exception != null) error ("An error occured when filling/updating the cache.\n\n", exception); @@ -286,6 +355,8 @@ protected void onUseCache (boolean enabled) { cacheDir.setEnabled (enabled); labelCacheDir.setEnabled (enabled); + infoButton.setEnabled (enabled); + updateButton.setEnabled (enabled); setPrefValue (USE_CACHE, enabled); propertyChannel.put (DP_USE_CACHE, new Boolean (enabled).toString()); } @@ -299,8 +370,8 @@ JLabel labelRegistryNS = new JLabel("Namespace (URI)"); registryNS = createText (null, "registryNamespace", DP_REGISTRY_NAMESPACE); JButton reloadAllButton = - createButton (" Reload ", - "Reload fully some or all ontology trees from the Biomoby registry", + createButton (" Reload all lists ", + "Reload all ontology trees from a Biomoby registry, or from the cache", KeyEvent.VK_R, new ActionListener() { public void actionPerformed (ActionEvent e) { @@ -353,8 +424,7 @@ DP_CACHE_DIR); cacheDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - onUseCache (usingCache); - JButton infoButton = + infoButton = createButton (" Info ", "Show current information about the local cache", KeyEvent.VK_I, @@ -365,7 +435,7 @@ }); infoButton.setIcon (infoIcon); - JButton updateButton = + updateButton = createButton (" Update ", "Update local cache from Biomoby registry", KeyEvent.VK_U, @@ -375,19 +445,21 @@ } }); updateButton.setIcon (updateIcon); - JButton eraseButton = - createButton (" Erase ", - "Remove everything from the local cache", - KeyEvent.VK_E, - new ActionListener() { - public void actionPerformed (ActionEvent e) { - onCacheErase(); - } - }); - eraseButton.setIcon (eraseIcon); +// eraseButton = +// createButton (" Erase ", +// "Remove everything from the local cache", +// KeyEvent.VK_E, +// new ActionListener() { +// public void actionPerformed (ActionEvent e) { +// onCacheErase(); +// } +// }); +// eraseButton.setIcon (eraseIcon); + JPanel buttonPanel = createButtonPanel (new JButton[] { infoButton, - updateButton, - eraseButton }); + updateButton }); +// eraseButton }); + onUseCache (usingCache); JPanel cLocation = createTitledPanel ("Local cache"); SwingUtils.addComponent (cLocation, useCache, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/09 16:23:32 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/10 08:54:31 1.5 @@ -88,20 +88,19 @@ case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); -// log.info ("RESET initiator: " + initiator + ", this tree: " + tree); if (tree == initiator) channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: initiator = event.getSource(); -// log.info ("UPDATED initiator: " + initiator + ", this tree: " + tree); if (tree != initiator) { // someone else (of this instance) initiated request // for updating service types - so we need to update our // own tree - using for that service types included in // this event - tree.update (-1, (MobyServiceType[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyServiceType[])event.getDetails()); } break; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/07 07:03:49 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/10 08:54:31 1.8 @@ -176,8 +176,9 @@ } /********************************************************************* - * Reload the tree from the Biomoby registry, ignoring (and - * updating) cache. + * Reload the tree from the Biomoby registry (or from the current + * cache). If you want to update also cache, use the cache buttons + * - they will invoke this method also after updating the cache. ********************************************************************/ protected void reload() { update (lastSorted, null); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 08:54:31 1.4 @@ -99,7 +99,8 @@ // for updating services - so we need to update our // own tree - using for that services included in this // event - tree.update (-1, (MobyService[])event.getDetails()); + tree.update (CommonTree.SORTED_AS_PREVIOUSLY, + (MobyService[])event.getDetails()); } break; } From senger at pub.open-bio.org Thu Nov 10 08:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVPI003882@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory pub.open-bio.org:/tmp/cvs-serv3825/src/Clients/help Modified Files: CacheRegistryClient_usage.txt Log Message: moby-live/Java/src/Clients/help CacheRegistryClient_usage.txt,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/09 16:23:32 1.5 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CacheRegistryClient_usage.txt 2005/11/10 08:54:31 1.6 @@ -19,19 +19,6 @@ (default: http://mobycentral.icapture.ubc.ca/MOBY/Central) where are: - -age ... print date when the cache was created - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty'); - format: dow mon dd hh:mm:ss zzz yyyy - -agediff ... print how old is cache - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty') - -rawage ... print date when the cache was created - (or print nothing if the cache is empty; - - in verbose mode print 'cache is empty'); - format: number of milliseconds since the standard base - time known as "the epoch" (January 1, 1970, 00:00:00 GMT) - -fill ... remove the current cache and reread all data from the given Moby registry and cache them (note that this does not influence data from @@ -61,6 +48,12 @@ -remove-t ...ditto as -remove but only for service types -remove-n ...ditto as -remove but only for namespaces + -info ... print info on all part of the cache + -info-d ...ditto as -info but only for data types + -info-s ...ditto as -info but only for services + -info-t ...ditto as -info but only for service types + -info-n ...ditto as -info but only for namespaces + -q ... quiet mode (prints only errors) (default) ... prints events what is happenning (to a log) -v ... verbose mode (prints also decorations) From senger at pub.open-bio.org Thu Nov 10 08:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVLW003863@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv3825/src/Clients Modified Files: CacheRegistryClient.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/09 16:23:32 1.6 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/10 08:54:31 1.7 @@ -91,24 +91,6 @@ } // - // how old is the current cache? - // - if (cmd.hasOption ("-age") || cmd.hasOption ("-rawage") || cmd.hasOption ("-agediff")) { - decorationLn ("Cache age for " + worker.getRegistryEndpoint() + ":"); - long age = castWorker.getCacheAge(); - if (age < 0) - decorationLn ("(cache is empty)"); - else { - if (cmd.hasOption ("-age")) - System.out.println (new Date (age).toString()); - if (cmd.hasOption ("-agediff")) - System.out.println (ms2Human (new Date().getTime() - age)); - if (cmd.hasOption ("-ageraw")) - System.out.println (age); - } - } - - // // [re-]fill the cache // if (cmd.hasOption ("-fill") || cmd.hasOption ("-fill-d")) { @@ -172,6 +154,30 @@ decorationLn ("Cache for namespaces removed."); } + // + // cache info + // + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-d")) { + decorationLn ("Cache for data types..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_DATATYPES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-s")) { + decorationLn ("Cache for service authorities..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-t")) { + decorationLn ("Cache for service types..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_SERVICETYPES)); + } + if (cmd.hasOption ("-info") || cmd.hasOption ("-info-n")) { + decorationLn ("Cache for namespaces..."); + System.out.println + (castWorker.getCacheInfoFormatted (CentralDigestCachedImpl.CACHE_PART_NAMESPACES)); + } + } catch (Exception e) { System.err.println ("===ERROR==="); e.printStackTrace(); @@ -180,21 +186,6 @@ } /************************************************************************* - * Give me an elapsed time (given in milllis) in a human readable form. - *************************************************************************/ - public static String ms2Human (long millis) { - StringBuffer buf = new StringBuffer (100); - long seconds = millis / 1000; - long minutes = seconds / 60; - long hours = minutes / 60; - long days = hours / 24; - if (days > 0) - buf.append (days + " days and "); - buf.append ((hours % 24) + ":" + (minutes % 60) + ":" + (seconds % 60) + "." + (millis % 1000)); - return new String (buf); - } - - /************************************************************************* * Print 'msg' but only if in verbose mode *************************************************************************/ static void decoration (String msg) { From senger at pub.open-bio.org Thu Nov 10 08:54:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 03:54:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511100854.jAA8sVDg003901@pub.open-bio.org> senger Thu Nov 10 03:54:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv3825/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.12,1.13 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/09 16:23:32 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/10 08:54:31 1.13 @@ -1,7 +1,9 @@ // CentralDigestCachedImpl.java // -// senger at ebi.ac.uk -// September 2004 +// Created: September 2004 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger at gmail.com). // package org.biomoby.client; @@ -13,6 +15,7 @@ import org.biomoby.shared.MobyService; import org.biomoby.shared.MobyServiceType; import org.biomoby.shared.NoSuccessException; +import org.biomoby.shared.Utils; import java.io.BufferedOutputStream; import java.io.BufferedReader; @@ -28,6 +31,8 @@ import java.util.Vector; import java.util.Arrays; import java.util.Comparator; +import java.util.Properties; +import java.util.Date; /** * An implementation of {@link org.biomoby.shared.CentralAll}, @@ -44,7 +49,7 @@ * This class can be used also without caching - just instantiate it * with 'cacheDir' set to null in the constructor.

    * - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ @@ -70,6 +75,16 @@ /** An ID used in {@link #removeFromCache} indicating namespaces part. */ public static final String CACHE_PART_NAMESPACES = "c4"; + // TBD: this will go to cache interface later, probably + // names of properties returned by getCacheInfo() + public static final String CACHE_PROP_NAME = "cache-name"; + public static final String CACHE_PROP_COUNT = "cache-count"; + public static final String CACHE_PROP_OLDEST = "cache-oldest"; + public static final String CACHE_PROP_YOUNGEST = "cache-youngest"; + public static final String CACHE_PROP_SIZE = "cache-size"; + public static final String CACHE_PROP_LOCATION = "cache-loc"; + public static final String CACHE_PROP_REGISTRY_URL = "cache-reg-url"; + // cache location private String cacheDir; // as defined in the constructor protected File dataTypesCache; @@ -193,7 +208,6 @@ remove (serviceTypesCache, LIST_FILE); fillServiceTypesCache(); } else if (id == null || id.equals (CACHE_PART_NAMESPACES)) { - remove (namespacesCache, LIST_FILE); fillNamespacesCache(); } } @@ -378,42 +392,6 @@ return true; } -// /************************************************************************** -// * Load data types from a moby registry into local cache. If it is -// * interrupted (by a callback signal) it removes what was already -// * put into this cache and returns false. Otherwise returns -// * true. It raises an exception if it cannot fill the cache (from -// * some other reasons). -// *************************************************************************/ -// protected boolean fillDataTypesCache() -// throws MobyException { -// try { -// fireEvent (DATA_TYPES_START); -// String typesAsXML = getDataTypeNamesAsXML(); -// store (dataTypesCache, LIST_FILE, typesAsXML); -// Map types = createDataTypeNamesFromXML (typesAsXML); -// fireEvent (DATA_TYPES_COUNT, new Integer (types.size())); -// for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) { -// Map.Entry entry = (Map.Entry)it.next(); -// String name = (String)entry.getKey(); -// fireEvent (DATA_TYPE_LOADING, name); -// String xml = getDataTypeAsXML (name); -// store (dataTypesCache, name, xml); -// fireEvent (DATA_TYPE_LOADED, name); -// if (stopDT) { -// removeFromCache (CACHE_PART_DATATYPES); -// return false; -// } -// } -// return true; -// } catch (Exception e) { -// throw new MobyException (formatException (e)); -// } finally { -// fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); -// stopDT = false; -// } -// } - /************************************************************************** * Update data types from a moby registry: * - get a new LIST_FILE (but do not put it into the cache yet) @@ -475,27 +453,59 @@ } } + /************************************************************************** + * Update services from a moby registry: + * - get a new LIST_FILE (but do not put it into the cache yet) + * if failed do nothing (except reporting it) + * - remove LIST_FILE + * - compare contents of new LIST_FILE with file names in the cache + * and remove them, or fetched missing ones + * if success add there new LIST_FILE + *************************************************************************/ protected boolean fillServicesCache() throws MobyException { try { fireEvent (AUTHORITIES_START); String byAuthorityAsXML = getServiceNamesByAuthorityAsXML(); - store (servicesCache, LIST_FILE, byAuthorityAsXML); + remove (servicesCache, LIST_FILE); Map authorities = createServiceNamesByAuthorityFromXML (byAuthorityAsXML); + + // list of current files in this cache + HashSet currentFiles = new HashSet(); + File[] list = servicesCache.listFiles(); + if (list == null) + throw new MobyException (MSG_CACHE_NOT_DIR (servicesCache)); + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) + currentFiles.add (list[i].getName()); + } + + // iterate over LIST_FILE and fetch missing files fireEvent (AUTHORITIES_COUNT, new Integer (authorities.size())); for (Iterator it = authorities.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String authority = (String)entry.getKey(); - fireEvent (AUTHORITY_LOADING, authority); - String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); - store (servicesCache, authority, xml); - fireEvent (AUTHORITY_LOADED, authority); - if (stopS) { - removeFromCache (CACHE_PART_SERVICES); - return false; + if ( ! currentFiles.contains (authority)) { + // missing file: fetch it from a registry + fireEvent (AUTHORITY_LOADING, authority); + String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); + store (servicesCache, authority, xml); + fireEvent (AUTHORITY_LOADED, authority); + if (stopS) { + return false; + } } + currentFiles.remove (authority); } + + // remove files that are not any more needed + for (Iterator it = currentFiles.iterator(); it.hasNext(); ) + remove (servicesCache, (String)it.next()); + + // finally, put there the new LIST_FILE + store (servicesCache, LIST_FILE, byAuthorityAsXML); return true; + } catch (Exception e) { throw new MobyException (formatException (e)); } finally { @@ -565,35 +575,10 @@ } } -// protected boolean fillServiceTypesCache() -// throws MobyException { -// try { -// fireEvent (SERVICE_TYPES_START); -// String typesAsXML = getServiceTypesAsXML(); -// store (serviceTypesCache, LIST_FILE, typesAsXML); -// MobyServiceType[] types = createServiceTypesFromXML (typesAsXML); -// fireEvent (SERVICE_TYPES_COUNT, new Integer (types.length)); -// for (int i = 0 ; i < types.length; i++) { -// String name = types[i].getName(); -// fireEvent (SERVICE_TYPE_LOADING, name); -// String xml = getServiceTypeRelationshipsAsXML (name, false); -// store (serviceTypesCache, name, xml); -// fireEvent (SERVICE_TYPE_LOADED, name); -// if (stopST) { -// removeFromCache (CACHE_PART_SERVICETYPES); -// return false; -// } -// } -// return true; -// } catch (Exception e) { -// throw new MobyException (formatException (e)); -// } finally { -// fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); -// stopST = false; -// } -// } - - // + /************************************************************************** + * Update namespaces from a moby registry - this easier than with + * other entities: just get a new LIST_FILE. + *************************************************************************/ protected boolean fillNamespacesCache() throws MobyException { try { @@ -901,4 +886,100 @@ } } + /************************************************************************** + * Return as many properties describing the given part of a cache + * as possible. The key used for returned properties are publicly + * available from this class but other may be returned as well.

    + * + * @return properties describing a cache + * @param id is a part of cache to be described, or null if the + * whole cache should be described (this may return different kind + * of properties than for individual cache parts) + **************************************************************************/ + public Properties getCacheInfo (String id) { + Properties result = new Properties(); + result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint()); + result.put (CACHE_PROP_COUNT, new Integer (0)); + if (cacheDir == null) return result; + String realName = null; + try { + File thisPart = null; + if (CACHE_PART_SERVICES.equals (id)) { + thisPart = servicesCache; + realName = "Cache for Services (authorities)"; + } else if (CACHE_PART_DATATYPES.equals (id)) { + thisPart = dataTypesCache; + realName = "Cache for Data Types"; + } else if (CACHE_PART_SERVICETYPES.equals (id)) { + thisPart = serviceTypesCache; + realName = "Cache for Service Types"; + } else if (CACHE_PART_NAMESPACES.equals (id)) { + thisPart = namespacesCache; + realName = "Cache for Namespaces"; + } + if (thisPart == null) return result; + result.put (CACHE_PROP_NAME, realName); + + File[] list = thisPart.listFiles(); + if (list == null) return result; + result.put (CACHE_PROP_LOCATION, thisPart.getAbsolutePath()); + int realCount = 0; + long realSize = 0; + long ageOfYoungest = -1; + long ageOfOldest = Long.MAX_VALUE; + for (int i = 0; i < list.length; i++) { + if (! ignored (list[i])) { + realCount++; + realSize += list[i].length(); + long age = list[i].lastModified(); + ageOfYoungest = Math.max (ageOfYoungest, age); + ageOfOldest = Math.min (ageOfOldest, age); + } + } + result.put (CACHE_PROP_COUNT, new Integer (realCount)); + result.put (CACHE_PROP_SIZE, new Long (realSize)); + if (ageOfYoungest > 0) + result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest)); + if (ageOfOldest < Long.MAX_VALUE) + result.put (CACHE_PROP_OLDEST, new Long (ageOfOldest)); + + } catch (Exception e) { + log.error ("Getting cache info failed: " + e.toString()); + } + return result; + } + + public String getCacheInfoFormatted (String id) { + Properties props = getCacheInfo (id); + StringBuffer buf = new StringBuffer(); + buf.append (props.getProperty (CACHE_PROP_NAME) + "\n"); + add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL)); + add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); + Object value = props.get (CACHE_PROP_OLDEST); + if (value != null) { + long age = ((Long)value).longValue(); + add (buf, "Oldest entry created", new Date (age)); + add (buf, "Oldest entry has age", Utils.ms2Human (new Date().getTime() - age)); + } + value = props.get (CACHE_PROP_YOUNGEST); + if (value != null) { + long age = ((Long)value).longValue(); + add (buf, "Youngest entry created", new Date (age)); + add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age)); + } + add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); + add (buf, "Location", props.get (CACHE_PROP_LOCATION)); + return new String (buf); + } + + private void add (StringBuffer buf, String name, Object value) { + if (value != null) { + buf.append ("\t"); + buf.append (name); + buf.append ("\t"); + buf.append (value.toString()); + buf.append ("\n"); + } + } + } From senger at pub.open-bio.org Thu Nov 10 14:32:43 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 10 Nov 2005 09:32:43 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101432.jAAEWhGc005019@pub.open-bio.org> senger Thu Nov 10 09:32:42 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv4952/src/main/org/biomoby/service/dashboard Modified Files: BuildDataTypeTree.java CommonDataTable.java CommonTree.java Dashboard.java DashboardProperties.java NOTES RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard BuildDataTypeTree.java,1.5,1.6 CommonDataTable.java,1.3,1.4 CommonTree.java,1.15,1.16 Dashboard.java,1.14,1.15 DashboardProperties.java,1.14,1.15 NOTES,1.22,1.23 RegistrationDataTypeSubPanel.java,1.5,1.6 RegistrationNamespaceSubPanel.java,1.4,1.5 RegistrationPanel.java,1.15,1.16 RegistrationServiceSubPanel.java,1.4,1.5 RegistrationServiceTypeSubPanel.java,1.6,1.7 ServicesBoard.java,1.4,1.5 ServicesTree.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/06 16:47:11 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/BuildDataTypeTree.java 2005/11/10 14:32:42 1.6 @@ -152,20 +152,22 @@ // make member nodes richer if (row > 1) { - MemberNode member = (MemberNode)((DefaultMutableTreeNode)value).getUserObject(); - MobyRelationship rel = member.getRelationship(); - cellBorder.setTitle (MobyRelationship.type2str (rel.getRelationshipType())); - dataTypeName.setText (member.getValue()); - articleName.setText (rel.getName()); - if (rel.getRelationshipType() == Central.iHASA) - cellPanel.setBackground (new Color (255, 255, 204)); - else - cellPanel.setBackground (new Color (204, 255, 204)); - return cellPanel; - } else { - return super.getTreeCellRendererComponent (tree, value, selected, - expanded, leaf, row, hasFocus); + Object aNode = ((DefaultMutableTreeNode)value).getUserObject(); + if (aNode instanceof MemberNode) { + MemberNode member = (MemberNode)aNode; + MobyRelationship rel = member.getRelationship(); + cellBorder.setTitle (MobyRelationship.type2str (rel.getRelationshipType())); + dataTypeName.setText (member.getValue()); + articleName.setText (rel.getName()); + if (rel.getRelationshipType() == Central.iHASA) + cellPanel.setBackground (new Color (255, 255, 204)); + else + cellPanel.setBackground (new Color (204, 255, 204)); + return cellPanel; + } } + return super.getTreeCellRendererComponent (tree, value, selected, + expanded, leaf, row, hasFocus); } } @@ -209,6 +211,23 @@ } /********************************************************************* + * + ********************************************************************/ + public void addMember (MobyRelationship child) { + MemberNode newNode = new MemberNode (child); + nameNode.add (new DefaultMutableTreeNode (newNode)); + updateTree(); + } + + /********************************************************************* + * + ********************************************************************/ + public void removeAllChildren() { + nameNode.removeAllChildren(); + updateTree(); + } + + /********************************************************************* * Load all menu icons. ********************************************************************/ protected void loadIcons() { @@ -358,10 +377,16 @@ * Draw/update this tree. ********************************************************************/ protected void updateTree() { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); - tModel.reload(); - propertyChannel.put (DP_REG_DT_TREE, extractFromTree()); - expand(); + + SwingUtilities.invokeLater (new Runnable() { + public void run() { + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + tModel.reload(); + propertyChannel.put (DP_REG_DT_TREE, extractFromTree()); + expand(); + } + }); + } /********************************************************************* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/10 14:32:42 1.4 @@ -10,6 +10,7 @@ import org.tulsoft.tools.gui.SwingUtils; +import org.biomoby.shared.MobyData; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JScrollPane; @@ -80,6 +81,13 @@ /********************************************************************* * ********************************************************************/ + public void setData (MobyData[] newData) { + tableModel.setData (newData); + } + + /********************************************************************* + * + ********************************************************************/ protected void createItself() { loadIcons(); @@ -212,6 +220,22 @@ abstract public void addEmptyData(); + /************************************************************************** + * Used to fill the table programatically. It clear the whole + * table a put given data there. + **************************************************************************/ + public void setData (MobyData[] newData) { + synchronized (this) { + int rowCount = getRowCount(); + int colCount = getColumnCount(); + for (int i = 0; i < rowCount; i++) + removeRow (i); + for (int i = 0; i < newData.length; i++) + data.addElement (newData[i]); + fireTableDataChanged(); + } + } + public Vector getData() { return data; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 08:54:31 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 14:32:42 1.16 @@ -72,6 +72,8 @@ protected String lastSearchText = ""; protected int lastSorted = SORTED_BY_NAME; + protected PropertyChannel propertyChannel; + // shared icons static protected Icon searchIcon; static protected Icon menuSearchIcon, menuSearchIconDis; @@ -123,6 +125,13 @@ loadIcons(); } + /************************************************************************** + * Keep shared storage of properties updated in various panels. + **************************************************************************/ + public void setPropertyChannel (PropertyChannel propertyChannel) { + this.propertyChannel = propertyChannel; + } + /********************************************************************* * ********************************************************************/ @@ -450,6 +459,7 @@ ********************************************************************/ protected void highlightAndJumpTo (HashSet toBeHighlighted) { + setSelectionPath (null); CommonTreeCellRenderer r = (CommonTreeCellRenderer)getCellRenderer(); r.setToBeHighlighted (toBeHighlighted); collapse (); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 08:54:31 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 14:32:42 1.15 @@ -60,8 +60,8 @@ protected JTabbedPane tabbedPane; protected Color bgcolor; protected DashboardPanel[] panels; - protected PropertyChannel propertyChannel; protected static Properties dashboardProperties; + protected PropertyChannel propertyChannel; static { try { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 08:54:31 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/10 14:32:42 1.15 @@ -20,7 +20,6 @@ public interface DashboardProperties { // names of properties used in property change events - static final String DP_LOG_MSG = "log-msg"; static final String DP_STATUS_MSG = "status-msg"; static final String DP_SERVICE_NAME = "dp-service-name"; static final String DP_DATATYPE_NAME = "dp-datatype-name"; @@ -37,21 +36,18 @@ static final String DP_REG_DT_AUTH = "dp-reg-dt-auth"; static final String DP_REG_DT_EMAIL = "dp-reg-dt-email"; static final String DP_REG_DT_DESC = "dp-reg-dt-desc"; - static final String DP_REG_DT_COPY_BY_SELECT = "dp-reg-dt-cbs"; // type: Boolean static final String DP_REG_DT_TREE = "dp-reg-dt-tree"; // type: MobyDataType static final String DP_REG_NS_NAME = "dp-reg-ns-name"; static final String DP_REG_NS_AUTH = "dp-reg-ns-auth"; static final String DP_REG_NS_EMAIL = "dp-reg-ns-email"; static final String DP_REG_NS_DESC = "dp-reg-ns-desc"; - static final String DP_REG_NS_COPY_BY_SELECT = "dp-reg-ns-cbs"; // type: Boolean static final String DP_REG_ST_NAME = "dp-reg-st-name"; static final String DP_REG_ST_AUTH = "dp-reg-st-auth"; static final String DP_REG_ST_EMAIL = "dp-reg-st-email"; static final String DP_REG_ST_DESC = "dp-reg-st-desc"; static final String DP_REG_ST_ISA = "dp-reg-st-isa"; - static final String DP_REG_ST_COPY_BY_SELECT = "dp-reg-st-cbs"; // type: Boolean static final String DP_REG_S_NAME = "dp-reg-s-name"; static final String DP_REG_S_AUTH = "dp-reg-s-auth"; @@ -67,6 +63,8 @@ static final String DP_REG_VERBOSE = "dp-reg-verbose"; + static final String DP_S_SELECTED = "dp-s-selected"; // type: MobyService + /** A filename containing Java properties that configure the dashboard. */ static final String DASHBOARD_PROPERTIES_FILE = "dashboard.properties"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 08:54:31 1.22 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 14:32:42 1.23 @@ -1,3 +1,6 @@ +* FWK005 parse may not be called while parsing. + - probably when too many network request together +--- * More testing: - interrupting loading - different order of panels @@ -11,6 +14,8 @@ NullPointerException reported in a dialog window - difficult to reproduce it... but it is somewhere there :-( +* BUG: the BuildDataTree does not paint itself always well + * WARN: How would an authority with characters 'http://' cope as a cache name? Can it happen? @@ -138,3 +143,5 @@ * SwingUtils can be simplified (closeOnExit etc.) - JFileChooserWithHistory - its method getSelectedFile() should reflect also what is entered in the text field; also it can have getText()? + - colors in JComboBox: +http://forum.java.sun.com/thread.jspa?threadID=670356&messageID=3920606 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 08:54:31 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 14:32:42 1.6 @@ -11,6 +11,7 @@ import org.biomoby.shared.Central; import org.biomoby.shared.MobyException; import org.biomoby.shared.MobyDataType; +import org.biomoby.shared.MobyRelationship; import org.biomoby.shared.parser.MobyTags; import org.biomoby.service.generator.DataTypesGenerator; @@ -110,19 +111,17 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_DT, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectDT (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_DT_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, dataTypesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); - SwingUtils.addComponent (board, copyBySelect, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); + SwingUtils.addComponent (board, copyBySelect, 0, 1, 1, 1, NONE, NWEST, 0.0, 0.0); // a tree with a new data type buildTree = new BuildDataTypeTree (propertyChannel); @@ -159,7 +158,6 @@ **************************************************************************/ protected void onCopyBySelectDT (boolean enabled) { setPrefValue (COPY_BY_SELECT_DT, enabled); - propertyChannel.put (DP_REG_DT_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -215,44 +213,6 @@ } } -// /************************************************************************** -// * -// **************************************************************************/ -// public void onRegisterFromXML (File file) { -// final File xmlFile = file; -// dtRegisterButton.setEnabled (false); -// dtFromXMLButton.setEnabled (false); -// dtException = null; -// final SwingWorker worker = new SwingWorker() { -// boolean oldAppendMode; -// StatusBag bag; -// public Object construct() { -// try { -// bag = maybeEnableVerbose(); -// oldAppendMode = console.setAppendMode (true); -// console.setText ("Registering data type from raw XML:\n" + -// "-----------------------------------\n"); -// console.setText (registryModel.callRegistry ("registerDataType", xmlFile)); -// console.setText ("\n"); -// } catch (MobyException e) { -// dtException = e; -// } -// return null; // not used here -// } - -// // runs on the event-dispatching thread. -// public void finished() { -// if (dtException != null) -// error (DATA_TYPE_PROLOGUE, dtException); -// dtRegisterButton.setEnabled (true); -// dtFromXMLButton.setEnabled (true); -// maybeDisableVerbose (bag); -// console.setAppendMode (oldAppendMode); -// } -// }; -// worker.start(); -// } - /************************************************************************** * * Customized tree of data types - has different popup menus... @@ -360,19 +320,23 @@ return dataType; // not used here } - // runs on the event-dispatching thread. + // runs on the event-dispatching thread public void finished() { if (dataType != null) { console.setText (dataType.toString()); - if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { dtName.setText (dataType.getName()); dtAuth.setText (dataType.getAuthority()); dtEmail.setText (dataType.getEmailContact()); dtDescArea.setText (dataType.getDescription()); buildTree.setParent (dataType.getParentName()); + buildTree.removeAllChildren(); + MobyRelationship[] children = dataType.getChildren(); + for (int i = 0; i < children.length; i++) + buildTree.addMember (children[i]); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_DT_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) dtAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/09 05:29:38 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/10 14:32:42 1.5 @@ -100,15 +100,13 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_NS, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectNS (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_NS_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, namespacesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); @@ -145,7 +143,6 @@ **************************************************************************/ protected void onCopyBySelectNS (boolean enabled) { setPrefValue (COPY_BY_SELECT_NS, enabled); - propertyChannel.put (DP_REG_NS_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -269,14 +266,14 @@ public void finished() { if (namespace != null) { console.setText (namespace.toString() + "\n"); - if (propertyChannel.getBoolean (DP_REG_NS_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { nsName.setText (namespace.getName()); nsAuth.setText (namespace.getAuthority()); nsEmail.setText (namespace.getEmailContact()); nsDescArea.setText (namespace.getDescription()); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_NS_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) nsAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/09 16:23:32 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/10 14:32:42 1.16 @@ -17,6 +17,7 @@ import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JComponent; +import javax.swing.JCheckBox; import javax.swing.JFileChooser; import javax.swing.JButton; @@ -53,6 +54,7 @@ // components that are used from more methods protected CommonConsole console; protected JButton registerButton, showXMLButton, fromXMLButton; + protected JCheckBox copyBySelect; // shared icons protected static Icon menuAddISAIcon, menuAddISAIconDis; @@ -117,7 +119,6 @@ public JComponent getComponent (PropertyChannel propertyChannel) { setPropertyChannel (propertyChannel); registryModel = createRegistryModel(); - if (pComponent != null) return pComponent; // console panel =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 14:32:42 1.5 @@ -33,6 +33,7 @@ import javax.swing.JComponent; import javax.swing.JFileChooser; import javax.swing.Box; +import javax.swing.SwingUtilities; import javax.swing.tree.DefaultMutableTreeNode; import java.awt.GridBagLayout; @@ -42,7 +43,8 @@ import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; - +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeEvent; import java.io.File; import java.io.IOException; @@ -54,13 +56,15 @@ */ public class RegistrationServiceSubPanel - extends RegistrationPanel { + extends RegistrationPanel + implements PropertyChangeListener { // names of user preferences keys static final String USE_SIGNATURE = "use-signature"; static final String USE_AUTHORITATIVE = "use-authoritative"; static final String REG_S_TYPE = "reg-s-type"; static final String REG_S_FROM_XML = "reg-service-from-xml-file"; + static final String COPY_BY_SELECT_S = "s-copy-by-select"; // components that are used from more methods JTextFieldWithHistory sName, sAuth, sEmail, sURL, sSigURL; @@ -88,6 +92,7 @@ setPropertyChannel (propertyChannel); registryModel = createRegistryModel(); this.console = console; + this.propertyChannel.addPropertyChangeListener (this); JPanel p = new JPanel (new GridBagLayout()); @@ -147,6 +152,11 @@ SwingUtils.addComponent (serviceType, labelST, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (serviceType, sType, 1, 0, 1, 1, NONE, NWEST, 0.0, 0.0); + // copy-by-select + copyBySelect = + createCheckBox ("Copy here when selected in browser panel", + false, KeyEvent.VK_C, null); + // put together service fields JPanel defs = new JPanel (new GridBagLayout()); SwingUtils.addComponent (defs, labelSName, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); @@ -175,9 +185,10 @@ stBoard.updateTree (CommonTree.SORTED_BY_NAME); JPanel main = createTitledPanel ("New Service"); - SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); - SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); - SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + SwingUtils.addComponent (main, defs, 0, 0, 2, 1, HORI, NWEST, 1.0, 0.0); + SwingUtils.addComponent (main, sDesc, 0, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP); + SwingUtils.addComponent (main, stBoard, 1, 1, 1, 1, BOTH, NWEST, 1.0, 1.0, BREATH_TOP_LEFT); + SwingUtils.addComponent (main, copyBySelect, 0, 2, 2, 1, NONE, NWEST, 0.0, 0.0); // sub-panels for input/output data JTabbedPane dataPane = new JTabbedPane(); @@ -227,6 +238,49 @@ } /************************************************************************** + * Here we get notified when somebody somewhere select a service. Used to + * update this service fields - if it is enabled by COPY_BY_SELECT field. + **************************************************************************/ + public void propertyChange (PropertyChangeEvent event) { + if (copyBySelect == null || + ! copyBySelect.isSelected()) return; // copy not expected/allowed + String prop = event.getPropertyName(); + if (prop == null) return; // no interest in non-specific changes + Object obj = event.getNewValue(); + if (obj == null || ! (obj instanceof MobyService)) return; + final MobyService service = (MobyService)obj; + + // finally... + if (DP_S_SELECTED.equals (prop)) { + SwingUtilities.invokeLater (new Runnable() { + public void run() { + onFillService (service); + } + }); + } + } + + /************************************************************************** + * + **************************************************************************/ + protected void onFillService (MobyService service) { + sName.setText (service.getName()); + sAuth.setText (service.getAuthority()); + sEmail.setText (service.getEmailContact()); + sURL.setText (service.getURL()); + sSigURL.setText (service.getSignatureURL()); + sDescArea.setText (service.getDescription()); + useAuth.setEnabled (service.isAuthoritative()); + sType.setText (service.getType()); + String value = service.getPathToRDF(); + if (UUtils.notEmpty (value)) + localRDFFile.getTextField().setText (service.getPathToRDF()); + primInTable.setData (service.getPrimaryInputs()); + primOutTable.setData (service.getPrimaryOutputs()); + secTable.setData (service.getSecondaryInputs()); + } + + /************************************************************************** * **************************************************************************/ protected void onUseRDFSignature (boolean enabled) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 08:54:31 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 14:32:42 1.7 @@ -107,15 +107,13 @@ // allow to copy selected service types to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_ST, false); - JCheckBox copyBySelect = + copyBySelect = createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_O, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectST (e.getStateChange() == ItemEvent.SELECTED); } }); - propertyChannel.put (DP_REG_ST_COPY_BY_SELECT, - new Boolean (usingCopyBySelect).toString()); JPanel board = new JPanel (new GridBagLayout()); SwingUtils.addComponent (board, serviceTypesBoard, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); @@ -152,7 +150,6 @@ **************************************************************************/ protected void onCopyBySelectST (boolean enabled) { setPrefValue (COPY_BY_SELECT_ST, enabled); - propertyChannel.put (DP_REG_ST_COPY_BY_SELECT, new Boolean (enabled).toString()); } /************************************************************************** @@ -307,7 +304,7 @@ public void finished() { if (serviceType != null) { console.setText (serviceType.toString() + "\n"); - if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) { + if (copyBySelect.isSelected()) { stName.setText (serviceType.getName()); stAuth.setText (serviceType.getAuthority()); stEmail.setText (serviceType.getEmailContact()); @@ -315,7 +312,7 @@ stISA.setText (serviceType.getParentName()); } } else if (isAuthority) { - if (propertyChannel.getBoolean (DP_REG_ST_COPY_BY_SELECT, false)) + if (copyBySelect.isSelected()) stAuth.setText (nodeObject.getValue()); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 14:32:42 1.5 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/07 07:03:49 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/10 14:32:42 1.5 @@ -419,8 +419,10 @@ // runs on the event-dispatching thread. public void finished() { - if (service != null) + if (service != null) { + propertyChannel.fire (DashboardProperties.DP_S_SELECTED, service); console.setText (service.toString()); + } } }; worker.start(); From kawas at pub.open-bio.org Thu Nov 10 16:03:02 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:03:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101603.jAAG32oB005624@pub.open-bio.org> kawas Thu Nov 10 11:03:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv5603/org/biomoby/client/rdf/vocabulary Added Files: FetaVocabulary.java Log Message: put all properties and resources used in a file so that we dont have to worry about using the Feta.jar file moby-live/Java/src/main/org/biomoby/client/rdf/vocabulary FetaVocabulary.java,NONE,1.1 From kawas at pub.open-bio.org Thu Nov 10 16:09:07 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:09:07 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101609.jAAG97H8005730@pub.open-bio.org> kawas Thu Nov 10 11:09:07 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util In directory pub.open-bio.org:/tmp/cvs-serv5705/org/biomoby/registry/rdfagent/util Modified Files: Log.java Log Message: modified the logger so that only one file is created. when the agent ran, a different log file was created for each iteration of the agent and each log file contained its current iteration as well as the future iterations. moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Log.java,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java 2005/04/16 14:32:47 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Log.java 2005/11/10 16:09:07 1.5 @@ -10,14 +10,18 @@ public class Log { static Logger logger; - + private static boolean isInit = false; public static void start() { - - logger = Logger.getLogger("org.biomoby.registry.rdfagent"); + logger = Logger.getLogger("org.biomoby.registry.rdfagent"); + // following ensures that only one log file is created. + if (isInit) { + return; + } + isInit = true; try { String logFile = Constants.RDFagentHome+Constants.SV_LOGFILE_PATH; - FileHandler fh = new FileHandler(logFile); + FileHandler fh = new FileHandler(logFile, true); fh.setFormatter(new SimpleFormatter()); logger.addHandler(fh); } catch (IOException e) { From kawas at pub.open-bio.org Thu Nov 10 16:09:57 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:09:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101609.jAAG9uUL005760@pub.open-bio.org> kawas Thu Nov 10 11:09:56 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util In directory pub.open-bio.org:/tmp/cvs-serv5735/org/biomoby/registry/rdfagent/util Modified Files: Report.java Log Message: added a clear method that erases the old report moby-live/Java/src/main/org/biomoby/registry/rdfagent/util Report.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java 2005/09/29 20:14:11 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util/Report.java 2005/11/10 16:09:56 1.9 @@ -26,9 +26,9 @@ public class Report { - static ArrayList mr = null; + private static ArrayList mr = null; - static ArrayList ds = null; + private static ArrayList ds = null; public static void add(String line) { @@ -57,7 +57,7 @@ StringBuffer mes1 = new StringBuffer(); for (int i = 0; i < mr.size(); i++) { - mes1.append(mr.get(i).toString() + "\n"); + mes1.append(mr.get(i).toString() + System.getProperty("line.separator")); } message += mes1; } @@ -66,7 +66,7 @@ StringBuffer mes2 = new StringBuffer(); for (int i = 0; i < ds.size(); i++) { - mes2.append(ds.get(i).toString() + "\n"); + mes2.append(ds.get(i).toString() + System.getProperty("line.separator")); } message += mes2; } @@ -137,6 +137,96 @@ mr = null; } } + + public static void send(String signURL, String email) { + + String message = ""; + + if (mr != null) { + + StringBuffer mes1 = new StringBuffer(); + + for (int i = 0; i < mr.size(); i++) { + mes1.append(mr.get(i).toString() + System.getProperty("line.separator")); + } + message += mes1; + } + if (ds != null) { + + StringBuffer mes2 = new StringBuffer(); + + for (int i = 0; i < ds.size(); i++) { + mes2.append(ds.get(i).toString() + System.getProperty("line.separator")); + } + message += mes2; + } + + if (Constants.MB_MAIL_SERVER != null + || !Constants.MB_MAIL_SERVER.equals("") + || Constants.MB_MAIL_PRGM != null + || !Constants.MB_MAIL_PRGM.equals("")) { + + String to = ""; + to = email; + + if (to.equals("")) { + to = "edward.kawas at gmail.com"; + + } + String subject = "The RDFagent Report"; + Log.info("email message is\n" + message); + if (Constants.MB_MAIL_PRGM != null + || !Constants.MB_MAIL_PRGM.equals("")) + try { + + //String cmd ="echo \"" + message.toString() + "\" | "+ + // Constants.MB_MAIL_PRGM+ " -s 'The RDFagent Report :-(' '" + // + "markw at illuminae.com"+ "'"; + String cmd = "echo \"" + message.toString() + "\" | " + + Constants.MB_MAIL_PRGM + + " -s 'The RDFagent Report :-(' '" + to + "'"; + File file = new File("_script_.sh"); + FileWriter fw = new FileWriter(file); + fw.write(_shellScriptHeader + cmd); + fw.close(); + + Process p = Runtime.getRuntime().exec( + "chmod +x _script_.sh"); + p.waitFor(); + p = Runtime.getRuntime().exec("./_script_.sh"); + InputStream stderr = p.getErrorStream(); + InputStreamReader isr = new InputStreamReader(stderr); + BufferedReader br = new BufferedReader(isr); + String line = null; + while ((line = br.readLine()) != null) { + + } + p.waitFor(); + Log.info("_script_.sh has " + + ((file.delete()) ? "" : "not ") + "been deleted" + + System.getProperty("line.separator") + + "The exit value of the spawned process was : " + + p.exitValue()); + } catch (IOException e) { + e.printStackTrace(); + Log.severe("Could not send message using cmd line mail to " + + to); + Report + .doWrite("Could not send message using cmd line mail to " + + to); + // use this only as a last resort + if (Constants.MB_MAIL_SERVER != null + || !Constants.MB_MAIL_SERVER.equals("")) + Communicator.sendMail(to, subject, message.toString(), + Constants.MB_FROM); + } catch (InterruptedException e) { + e.printStackTrace(); + } + //Communicator.sendMail(to,subject,message.toString(),Constants.MB_FROM); + ds = null; + mr = null; + } + } public static void createFile(String fileName) { try { @@ -197,5 +287,10 @@ private final static String _shellScriptHeader = "#!/bin/sh" + System.getProperty("line.separator"); + public static void clear() { + ds = null; + mr = null; + } + } From kawas at pub.open-bio.org Thu Nov 10 16:11:45 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:11:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101611.jAAGBjn6005838@pub.open-bio.org> kawas Thu Nov 10 11:11:45 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv5813/org/biomoby/registry/rdfagent/verifier Modified Files: Main.java Log Message: added logic to enable the ability to provide a url that contains service descriptions and have the agent populate your registry with them modified the logic of reporting moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Main.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java 2005/08/04 12:58:41 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Main.java 2005/11/10 16:11:45 1.6 @@ -15,115 +15,126 @@ /** * @author Nina Opushneva * - * + * */ public class Main { - public static void main(String[] args) { - StringBuffer failedServices = new StringBuffer(); - Log.start(); - - String report = Constants.RDFagentHome + Constants.SV_REPORT_PATH; - Report.createFile(report); - - Date now = new Date(); - - Report - .doWrite("****************************************************************************************"); - Report.doWrite(" START MOBY RDFAGENT REPORT " - + now.toString()); - Report - .doWrite("****************************************************************************************"); - - Report.add(" RDFAGENT REPORT " + now.toString()); - Report - .add("****************************************************************************************"); - - Hashtable serviceList = new Hashtable(); - String signURL = ""; - Calendar c = Calendar.getInstance(); - - if (args.length == 0) { - - String delfile = Constants.RDFagentHome + Constants.SV_DELFILE_PATH; - Report.createFile(delfile); - - // DataMngr.delServiceSetByURL(signURL); - - String url_path = Constants.RDFagentHome - + Constants.SV_SIGN_URL_PATH; - - String filename = url_path + "_" + c.get(Calendar.DAY_OF_MONTH) - + "_" + c.get(Calendar.MONTH); - Report.createFile(filename); - serviceList = DataMngr.getServices(filename); - /* - * }else if (args[0].equals("list")){ serviceList = - * Communicator.readFromFile(args[1]); - * - * }else if (args[0].equals("sign")){ - */ - } else { - - signURL = args[0]; - serviceList = DataMngr.getServicesByURL(signURL); - } - - Enumeration list = serviceList.keys(); - while (list.hasMoreElements()) { - String ob = list.nextElement().toString(); - String val = serviceList.get(ob).toString(); - signURL = ob; - String servNames = val; - - Model model = Communicator.getServiceRDF(servNames, signURL); - - if (model.isEmpty()) { - Log.info("Model " + signURL + " is empty"); - failedServices.append("__PATTERN__" + signURL); // something unique - // that urls shouldnt - // have - } else { - Report.add(" "); - Report.add("List of the processed services:"); - ServiceDescrParser sdParser = new ServiceDescrParser(model); - sdParser.getValidRDF(servNames, signURL); - - } - exit(failedServices.toString()); - failedServices = new StringBuffer(); - } - // } - if (args.length != 0) { - // TODO this line sends email - //Report.send(signURL); - } - //exit(failedServices.toString()); - } - - public static void exit(String signURL) { - DBConnector.closeConnection(); - - Log.stop(); - Date now = new Date(); - Report.doWrite(" STOP MOBY RDFAGENT REPORT " - + now.toString()); - Report.add(" STOP MOBY RDFAGENT REPORT " - + now.toString()); - - Report - .doWrite("****************************************************************************************"); - - String[] failedURLs = signURL.split("__PATTERN__"); - for (int i = 0; i < failedURLs.length; i++) { - if (!failedURLs[i].equals("")) { - Log - .info("Sending an email to the individual identified by the following signature URL: " - + failedURLs[i]); - Report.send(failedURLs[i]); - } - } + public static void main(String[] args) { + StringBuffer failedServices = new StringBuffer(); + Log.start(); + Date now = new Date(); + Hashtable serviceList = new Hashtable(); + String signURL = ""; + String report = Constants.RDFagentHome + Constants.SV_REPORT_PATH; + Report.createFile(report); + + Calendar c = Calendar.getInstance(); + + if (args.length == 0) { + Report + .doWrite("****************************************************************************************"); + Report.doWrite(" START MOBY RDFAGENT REPORT " + + now.toString()); + Report + .doWrite("****************************************************************************************"); + + Report + .add(" RDFAGENT REPORT " + + now.toString()); + Report + .add("****************************************************************************************"); + String delfile = Constants.RDFagentHome + Constants.SV_DELFILE_PATH; + Report.createFile(delfile); + + // DataMngr.delServiceSetByURL(signURL); + + String url_path = Constants.RDFagentHome + + Constants.SV_SIGN_URL_PATH; + + String filename = url_path + "_" + c.get(Calendar.DAY_OF_MONTH) + + "_" + c.get(Calendar.MONTH); + Report.createFile(filename); + serviceList = DataMngr.getServices(filename); + /* + * }else if (args[0].equals("list")){ serviceList = + * Communicator.readFromFile(args[1]); + * + * }else if (args[0].equals("sign")){ + */ + } else if (args.length == 1){ + signURL = args[0]; + Log.info("Getting services from " + signURL); + // serviceList = DataMngr.getServicesByURL(signURL); + Model model = Communicator.getServiceRDF("", signURL); + Report.clear(); + if (model.isEmpty()) { + Log.info("Model " + signURL + " is empty"); + // not important + } else { + ServiceDescrParser sdParser = new ServiceDescrParser(model); + sdParser.addServicesFromRdfDocument(signURL, Constants.MB_ADMIN_EMAIL); + + } + Report.clear(); + return; + + } else { + Log.severe("Incorrect usage of the agent. Please enter a url where services can be found as a parameter or run the agent without parameters."); + return; + + } + + Enumeration list = serviceList.keys(); + while (list.hasMoreElements()) { + String ob = list.nextElement().toString(); + String val = serviceList.get(ob).toString(); + signURL = ob; + String servNames = val; + + Model model = Communicator.getServiceRDF(servNames, signURL); + + if (model.isEmpty()) { + Log.info("Model " + signURL + " is empty"); + failedServices.append("__PATTERN__" + signURL); // something + // unique + // that urls shouldnt + // have + } else { + Report.add(" "); + Report.add("List of the processed services:"); + ServiceDescrParser sdParser = new ServiceDescrParser(model); + sdParser.getValidRDF(servNames, signURL); + + } + exit(failedServices.toString()); + failedServices = new StringBuffer(); + } + Report.clear(); + } + + public static void exit(String signURL) { + DBConnector.closeConnection(); + + Log.stop(); + Date now = new Date(); + Report.doWrite(" STOP MOBY RDFAGENT REPORT " + + now.toString()); + Report.add(" STOP MOBY RDFAGENT REPORT " + + now.toString()); + + Report + .doWrite("****************************************************************************************"); + + String[] failedURLs = signURL.split("__PATTERN__"); + for (int i = 0; i < failedURLs.length; i++) { + if (!failedURLs[i].equals("")) { + Log + .info("Sending an email to the individual identified by the following signature URL: " + + failedURLs[i]); + Report.send(failedURLs[i]); + } + } - //System.exit(0); - } + // System.exit(0); + } } \ No newline at end of file From kawas at pub.open-bio.org Thu Nov 10 16:12:02 2005 From: kawas at pub.open-bio.org (Eddie Kawas) Date: Thu, 10 Nov 2005 11:12:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511101612.jAAGC2aT005868@pub.open-bio.org> kawas Thu Nov 10 11:12:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv5843/org/biomoby/registry/rdfagent/verifier Modified Files: ServiceDescrParser.java Log Message: some bug fixes moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier ServiceDescrParser.java,1.11,1.12 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/08 00:02:08 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/ServiceDescrParser.java 2005/11/10 16:12:01 1.12 @@ -5,14 +5,12 @@ import java.util.Iterator; import java.util.Vector; +import org.biomoby.client.rdf.vocabulary.FetaVocabulary; import org.biomoby.client.rdf.vocabulary.ServiceDescriptionPredicates; -import org.biomoby.registry.rdfagent.util.Constants; import org.biomoby.registry.rdfagent.util.Log; import org.biomoby.registry.rdfagent.util.Report; import org.biomoby.registry.rdfagent.util.XMLBuilder; -import uk.ac.man.cs.img.fetaEngine.commons.FetaModelRDF; - import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ResIterator; import com.hp.hpl.jena.rdf.model.Resource; @@ -37,7 +35,7 @@ int n = 0; int[] ver = { 0, 0, 0, 0, 0, 0, 0, 0 }; - private String[] vers = { "authority uri", "category","contact email","url","service type","service name","authoritative value","signature url" }; + private String[] vers = { "authority uri", "category","contact email","url","service type","service name","description","authoritative value" }; ServiceDescrParser(Model serviceDescrMd) { @@ -69,7 +67,7 @@ // get the set of RDF with the same signatureURL - ResIterator iter = servDescrMd.listSubjectsWithProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy")); + ResIterator iter = servDescrMd.listSubjectsWithProperty(FetaVocabulary.providedBy); while (iter.hasNext()) { String resource = iter.next().toString(); // an LSID Hashtable servSign = new Hashtable(); @@ -93,8 +91,15 @@ servError += 1; String msg = "A bad Input or Output structure for the service <" + servName + ">. "; - String msg1 = "The service have not processed"; + String msg1 = "The service has not been processed"; Report.doWrite(msg + msg1); + Log.info(msg + msg1); + // added - should tell provider that service wasnt well. + Report.add(msg); + Report.add(msg1); + // send a message to service provider stating that service was removed + Report.send(signURL); + // end added } else { DataMngr.processService(servSign, servInp, servOut, servName, auth_URI, signURL); @@ -140,18 +145,11 @@ deletedServ.addElement(servName); String msg = "The service < " + servName - + " > was not found in the RDF file. The service was deregistered from MOBYCENTRAL Registry"; + + " > was either missing or incorrectly represented in the RDF document. The service was deregistered from MOBYCENTRAL Registry."; Report.doWrite(msg); Report.add(msg); - - if (Constants.MB_MAIL_SERVER != null - || !Constants.MB_MAIL_SERVER.equals("")) { - String to = DataMngr.getContactEmail(signURL); - Communicator.sendMail(to, Constants.SP_SUBJECT, msg, - Constants.MB_FROM); - // send message to the service provider - that service was - // deregistered - } + // send a message to service provider stating that service was removed + Report.send(signURL); } } int del = deletedServ.size(); @@ -180,6 +178,103 @@ } /** + * get a provider's RDF file by signatureURL, and check if every of service + * RDF is valid MOBY + * + * @param signURL - + * the URL of resource (signatureURL) + * + */ + + public void addServicesFromRdfDocument(String signURL, String email) { + String servNames = ""; + String res = ""; + int amount = 0; + int validMoby = 0; + int servError = 0; + Vector resources = new Vector(); // the list of services at given URL + // (including new services) + String auth_URI = ""; + String servName = ""; + Vector deletedServ = new Vector(); // the list of deleted services from + // database + + // get the set of RDF with the same signatureURL + + ResIterator iter = servDescrMd.listSubjectsWithProperty(FetaVocabulary.providedBy); + while (iter.hasNext()) { + Report + .add("****************************************************************************************"); + Report.add(" START MOBY RDFAGENT REPORT "); + Report + .add("****************************************************************************************"); + String resource = iter.next().toString(); // an LSID + Hashtable servSign = new Hashtable(); + amount += 1; + servSign = getServSignature(resource); + + if (!servSign.isEmpty()) { // a valid MOBY RDF + servName = servSign.get("servicename").toString(); + servNames+=servName+","; + auth_URI = servSign.get("authURI").toString(); + resources.addElement(servName); + + Hashtable servInp = new Hashtable(); + servInp = getInput(resource); + Hashtable servOut = new Hashtable(); + servOut = getOutput(resource); + + ver = new int[]{0,0,0,0,0,0,0,0}; + if (servInp.containsValue("error") + | servOut.containsValue("error")) { + servError += 1; + String msg = "A bad Input or Output structure for the service <" + + servName + ">. "; + String msg1 = "The service has not been processed"; + Report.add(msg); + Report.add(msg1); + Report + .add("======================================================================================="); + Report.add(" END MOBY RDFAGENT REPORT "); + Report + .add("======================================================================================="); + Log.info(msg); + Log.info((msg1)); + Report.doWrite(msg); + Report.doWrite(msg1); + Report.send(signURL, email); + } else { + // set the email address to be the admin since it doesnt make sense to swallow services and to make someone else curate them + //servSign.put("contact_email", email); + DataMngr.processService(servSign, servInp, servOut, + servName, auth_URI, signURL); + } + } else { + validMoby += 1; // a not valid MOBY RDF + } + Report.clear(); + } + + String[] result = servNames.split(","); + + Report + .add("----------------------------------------------------------------------------------------"); + Report.add(" "); + Report.add("Expected services for given URL " + result.length); + + Report.add("In fact = " + amount); + Report.add("notValidMoby services or with a bad structure = " + + (servError + validMoby)); + Report.add(" "); + + // Report.add("notValidMoby services or with a bad structure = + // "+(servError+validMoby)); + + Log + .info("======================================================================="); + } + + /** * get service Signature data for the service * * @param resource - @@ -194,6 +289,7 @@ Resource si = servDescrMd.getResource(resource); + Report.clear(); Report .doWrite("----------------------------------------------------------------------------------------"); Report @@ -209,9 +305,9 @@ // hash *should* contain the following keys: // authURI, category, contact_email, url, service_type_uri, servicename, authoritative, signatureURL - if (si.hasProperty(FetaModelRDF.hasServiceType)) { + if (si.hasProperty(FetaVocabulary.hasServiceType)) { ver[4] = 1; // set flag to indicate that we have the property - String serviceType = si.getProperty(FetaModelRDF.hasServiceType).getObject().toString(); + String serviceType = si.getProperty(FetaVocabulary.hasServiceType).getObject().toString(); sign.put("service_type_uri", "urn:lsid:biomoby.org:servicetype:"+serviceType); } @@ -221,8 +317,8 @@ sign.put("category", category); } - if (si.hasProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy"))) { - Resource org = (Resource)si.getProperty(servDescrMd.getProperty(FetaModelRDF.getURI()+"providedBy")).getObject(); + if (si.hasProperty(FetaVocabulary.providedBy)) { + Resource org = (Resource)si.getProperty(FetaVocabulary.providedBy).getObject(); if (org.hasProperty(DC.publisher)) { ver[0] = 1;// set flag to indicate that we have the property String authorityURI = org.getProperty(DC.publisher).getObject().toString(); @@ -234,35 +330,35 @@ sign.put("contact_email", email); } if (org.hasProperty(ServiceDescriptionPredicates.authoritative)) { - ver[6] = 1;// set flag to indicate that we have the property + ver[7] = 1;// set flag to indicate that we have the property String authoritative = org.getProperty(ServiceDescriptionPredicates.authoritative).getObject().toString(); sign.put("authoritative", ((authoritative.equalsIgnoreCase("true")) ? "authoritative" : "non-authoritative")); } } - - if (si.hasProperty(FetaModelRDF.locationURI)) { + + if (si.hasProperty(FetaVocabulary.locationURI)) { ver[3] = 1; // set flag to indicate that we have the property - String url = si.getProperty(FetaModelRDF.locationURI).getObject().toString(); + String url = si.getProperty(FetaVocabulary.locationURI).getObject().toString(); sign.put("URL", url); } - if (si.hasProperty(FetaModelRDF.hasServiceDescriptionLocation)) { - ver[7] = 1; // set flag to indicate that we have the property - String signatureURL = si.getProperty(FetaModelRDF.hasServiceDescriptionLocation).getObject().toString(); - sign.put("signatureURL", signatureURL); + if (si.hasProperty(FetaVocabulary.hasServiceDescriptionText)) { + ver[6] = 1; // set flag to indicate that we have the property + String description = si.getProperty(FetaVocabulary.hasServiceDescriptionText).getObject().toString(); + sign.put("description", description); } - if (si.hasProperty(FetaModelRDF.hasServiceNameText)) { + if (si.hasProperty(FetaVocabulary.hasServiceNameText)) { ver[5] = 1; // set flag to indicate that we have the property - String name = si.getProperty(FetaModelRDF.hasServiceNameText).getObject().toString(); + String name = si.getProperty(FetaVocabulary.hasServiceNameText).getObject().toString(); sign.put("servicename", name); } // check for the inputs (moby says at least one input/output) - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); - StmtIterator outs = r.listProperties(FetaModelRDF.outputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.inputParameter); + StmtIterator outs = r.listProperties(FetaVocabulary.outputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary <- doesnt count @@ -284,7 +380,7 @@ Report .doWrite("THE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); Report - .add("THE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); + .add("\tTHE RDF IS NOT VALID MOBY RDF: one or more MOBY descriptors are absent. " + vers[vn] + " is definitely absent."); sign.clear(); break; //TODO should we break? if we dont, wont we know what is wrong completely with our service? } @@ -293,7 +389,7 @@ Report .doWrite("THE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); Report - .add("THE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); + .add("\nTHE RDF IS NOT VALID MOBY RDF: Input and Output are absent "); Log .info("THE RDF IS NOT VALID MOBY RDF - Inputs and Outputs are absent"); sign.clear(); @@ -327,30 +423,30 @@ Hashtable input = new Hashtable(); Resource si = servDescrMd.getResource(resource); - if (si.hasProperty(FetaModelRDF.hasOperation)) + if (si.hasProperty(FetaVocabulary.hasOperation)) try { - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.inputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.inputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary - if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("simpleParameter")) { + if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("simpleParameter")) { // we have a simple // make sure that object type and article name exist Hashtable siminp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid simple input found in " + resource +". Missing moby object type."); - Report.add("Invalid simple input found in " + resource +". Missing moby object type."); + Report.add("\tInvalid simple input found in " + resource +". Missing moby object type."); Log.info("Invalid simple input found in " + resource +". Missing moby object type."); simple = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid simple input found in " + resource +". Missing an article name."); - Report.add("Invalid simple input found in " + resource +". Missing an article name."); + Report.add("\tInvalid simple input found in " + resource +". Missing an article name."); Log.info("Invalid simple input found in " + resource +". Missing an article name."); simple = "error"; break; @@ -362,8 +458,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid simple input found in " + resource +". Empty article name."); + Report.add("\tInvalid simple input found in " + resource +". Empty article name."); + Log.info("Invalid simple input found in " + resource +". Empty article name."); + simple = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -385,20 +487,20 @@ if (namespaces != null) siminp.put("namespace_type_uris", namespaces); input.put("siminp"+ sin++, siminp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("collectionParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("collectionParameter")) { // we have a collection // make sure that object type and article name exist Hashtable colinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid collection input found in " + resource +". Missing moby object type."); - Report.add("Invalid collection input found in " + resource +". Missing moby object type."); + Report.add("\tInvalid collection input found in " + resource +". Missing moby object type."); Log.info("Invalid collection input found in " + resource +". Missing moby object type."); collection = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); - Report.add("Invalid collection input found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection input found in " + resource +". Missing an article name."); Log.info("Invalid collection input found in " + resource +". Missing an article name."); collection = "error"; break; @@ -410,8 +512,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection input found in " + resource +". Missing an article name."); + Log.info("Invalid collection input found in " + resource +". Missing an article name."); + collection = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -429,22 +537,23 @@ namespaces = namespaces.substring(0, namespaces.lastIndexOf(",")); } colinp.put("col_articleName",articlename); - colinp.put("namespace_type_uris", namespaces); + if (namespaces != null) + colinp.put("namespace_type_uris", namespaces); colinp.put("object_type_uri", datatype); input.put("colinp"+cin++, colinp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("secondaryParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("secondaryParameter")) { // we have a secondary Hashtable secinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.datatype)) { Report.doWrite("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); - Report.add("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); + Report.add("\tInvalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); Log.info("Invalid secondary input found in " + resource +". Missing moby datatype (one of String, Float, Integer, DateTime)."); secondary = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid secondary input found in " + resource +". Missing an article name."); - Report.add("Invalid secondary input found in " + resource +". Missing an article name."); + Report.add("\tInvalid secondary input found in " + resource +". Missing an article name."); Log.info("Invalid secondary input found in " + resource +". Missing an article name."); secondary = "error"; break; @@ -454,13 +563,20 @@ if (datatype.indexOf("#") > 0) datatype = datatype.substring(datatype.indexOf("#")+1); // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getLiteral().getValue().toString(); + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getLiteral().getValue().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid secondary input found in " + resource +". Empty article name."); + Report.add("\tInvalid secondary input found in " + resource +". Empty article name."); + Log.info("Invalid secondary input found in " + resource +". Empty article name."); + secondary = "error"; + break; + } String defaultValue = null; String min = null; String max = null; String enums = null; - if (parameter.hasProperty(FetaModelRDF.hasDefaultValue)) { - defaultValue = parameter.getProperty(FetaModelRDF.hasDefaultValue).getLiteral().getValue().toString(); + if (parameter.hasProperty(FetaVocabulary.hasDefaultValue)) { + defaultValue = parameter.getProperty(FetaVocabulary.hasDefaultValue).getLiteral().getValue().toString(); } if (parameter.hasProperty(ServiceDescriptionPredicates.max)) { max = parameter.getProperty(ServiceDescriptionPredicates.max).getLiteral().getValue().toString(); @@ -533,30 +649,30 @@ Hashtable output = new Hashtable(); Resource si = servDescrMd.getResource(resource); - if (si.hasProperty(FetaModelRDF.hasOperation)) + if (si.hasProperty(FetaVocabulary.hasOperation)) try { - StmtIterator sit = si.listProperties(FetaModelRDF.hasOperation); + StmtIterator sit = si.listProperties(FetaVocabulary.hasOperation); while (sit.hasNext()) { Statement s = sit.nextStatement(); Resource r = (Resource) s.getObject(); - StmtIterator ins = r.listProperties(FetaModelRDF.outputParameter); + StmtIterator ins = r.listProperties(FetaVocabulary.outputParameter); while (ins.hasNext()) { Resource parameter = (Resource)ins.nextStatement().getObject(); // if object type is null, then we have a secondary - if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("simpleParameter")) { + if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("simpleParameter")) { // we have a simple // make sure that object type and article name exist Hashtable siminp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { Report.doWrite("Invalid simple output found in " + resource +". Missing moby object type."); - Report.add("Invalid simple output found in " + resource +". Missing moby object type."); + Report.add("\tInvalid simple output found in " + resource +". Missing moby object type."); Log.info("Invalid simple output found in " + resource +". Missing moby object type."); simple = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ Report.doWrite("Invalid simple output found in " + resource +". Missing an article name."); - Report.add("Invalid simple output found in " + resource +". Missing an article name."); + Report.add("\tInvalid simple output found in " + resource +". Missing an article name."); Log.info("Invalid simple output found in " + resource +". Missing an article name."); simple = "error"; break; @@ -568,8 +684,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid simple output found in " + resource +". Empty article name."); + Report.add("\tInvalid simple output found in " + resource +". Empty article name."); + Log.info("Invalid simple output found in " + resource +". Empty article name."); + simple = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -591,21 +713,21 @@ if (namespaces != null) siminp.put("namespace_type_uris", namespaces); output.put("simout"+ so++, siminp); - } else if (parameter.getProperty(this.servDescrMd.getProperty(FetaModelRDF.getURI()+"hasParameterType")).getObject().toString().endsWith("collectionParameter")) { + } else if (parameter.getProperty(FetaVocabulary.hasParameterType).getObject().toString().endsWith("collectionParameter")) { // we have a collection // make sure that object type and article name exist Hashtable colinp = new Hashtable(); if (!parameter.hasProperty(ServiceDescriptionPredicates.object_type)) { - Report.doWrite("Invalid collection input found in " + resource +". Missing moby object type."); - Report.add("Invalid collection input found in " + resource +". Missing moby object type."); - Log.info("Invalid collection input found in " + resource +". Missing moby object type."); + Report.doWrite("Invalid collection output found in " + resource +". Missing moby object type."); + Report.add("\tInvalid collection output found in " + resource +". Missing moby object type."); + Log.info("Invalid collection output found in " + resource +". Missing moby object type."); collection = "error"; break; } - if (!parameter.hasProperty(FetaModelRDF.hasParameterNameText)){ - Report.doWrite("Invalid collection input found in " + resource +". Missing an article name."); - Report.add("Invalid collection input found in " + resource +". Missing an article name."); - Log.info("Invalid collection input found in " + resource +". Missing an article name."); + if (!parameter.hasProperty(FetaVocabulary.hasParameterNameText)){ + Report.doWrite("Invalid collection output found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection output found in " + resource +". Missing an article name."); + Log.info("Invalid collection output found in " + resource +". Missing an article name."); collection = "error"; break; } @@ -616,8 +738,14 @@ datatype = "urn:lsid:biomoby.org:objectclass:" + datatype; // extract the article name - String articlename = parameter.getProperty(FetaModelRDF.hasParameterNameText).getObject().toString(); - + String articlename = parameter.getProperty(FetaVocabulary.hasParameterNameText).getObject().toString(); + if (articlename.equals("")){ + Report.doWrite("Invalid collection output found in " + resource +". Missing an article name."); + Report.add("\tInvalid collection output found in " + resource +". Missing an article name."); + Log.info("Invalid collection output found in " + resource +". Missing an article name."); + collection = "error"; + break; + } // check for namespaces StringBuffer sb = new StringBuffer(); String namespaces = null; @@ -635,7 +763,8 @@ namespaces = namespaces.substring(0, namespaces.lastIndexOf(",")); } colinp.put("col_articleName",articlename); - colinp.put("namespace_type_uris", namespaces); + if (namespaces != null) + colinp.put("namespace_type_uris", namespaces); colinp.put("object_type_uri", datatype); output.put("colout"+ co++, colinp); } else { From senger at pub.open-bio.org Fri Nov 11 08:34:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:34:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110834.jAB8Yd4C008108@pub.open-bio.org> senger Fri Nov 11 03:34:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv8089/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/06 16:23:49 1.4 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/11 08:34:39 1.5 @@ -1,3 +1,4 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel +org.biomoby.service.dashboard.GeneratorPanel #org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Fri Nov 11 08:34:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:34:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110834.jAB8YdjI008143@pub.open-bio.org> senger Fri Nov 11 03:34:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv8089/src/main/org/biomoby/service/dashboard Modified Files: NOTES PrimaryDataTable.java RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceSubPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,1.23,1.24 PrimaryDataTable.java,1.3,1.4 RegistrationDataTypeSubPanel.java,1.6,1.7 RegistrationNamespaceSubPanel.java,1.5,1.6 RegistrationServiceSubPanel.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/10 14:32:42 1.23 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/11 08:34:39 1.24 @@ -28,6 +28,11 @@ * log warning if the 'notified' is not called from the event-dispatch queue +* confirmation before registering; separate "load from XML" and + "register" perhaps? - or having actuallt there an editor that allows + to change the XMl and then to click its button "register" + + --- * how to squeeze too long combo boxes into smaller place ? @@ -56,6 +61,7 @@ ? select a part of an error message and highlight it in red? ? HELP (in a Dashboard Menu) + - contextual help ? - starting panel/splash screen - helps from panels - About @@ -145,3 +151,46 @@ what is entered in the text field; also it can have getText()? - colors in JComboBox: http://forum.java.sun.com/thread.jspa?threadID=670356&messageID=3920606 +--- +public static void main(String args[]) +> { +> JComponent jc; +> JFrame f = new JFrame(); +> JPanel background = new JPanel( ), content = new JPanel( ); +> content.setLayout( new BorderLayout( ) ); +> content.add( jc = new JButton("FourthButton"), BorderLayout.WEST ); +> // you can comment lines like jc.setOpaque(false), in order to not see +> the background on the components ;) +> jc.setOpaque( false ); +> content.add( jc = new JButton("SecondButton"), BorderLayout.NORTH ); +> jc.setOpaque( false ); +> content.add( jc = new JButton("ThirdButton"), BorderLayout.SOUTH ); +> jc.setOpaque( false ); +> content.add( jc = new JButton("FivethButton"), BorderLayout.EAST ); +> jc.setOpaque( false ); +> content.setOpaque( false ); +> +> background.setLayout( new BorderLayout( ) ); +> background.add( new JLabel( new ImageIcon("background.gif") ), +> BorderLayout.CENTER ); +> +> f.getRootPane().setGlassPane( content ); +> f.getRootPane().getGlassPane().setVisible( true ); +> f.setContentPane( background ); +> f.setSize( 500, 300 ); +> f.setVisible( true ); +> } + + +problms with registration panel: + - no auto update after reg/unreg srevice, and data type + - after reload old files stayed (21.sep in data types) + - datetime was in cache but cannot make it into tree, why? + +right-click - if nothing selected, it should take what is under te + mouse (selected first), otherwise it is annoying + +serach should be propagated to all (same-kinds) trees in all panels + +wrap automatically text in descriptions fields + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/07 17:14:46 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/11 08:34:39 1.4 @@ -256,7 +256,7 @@ "Remove", "Article name", "Data Type", - "In Set", + "Set", "Namespaces" }; columnClasses = new Class[] { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/10 14:32:42 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/11 08:34:39 1.7 @@ -207,6 +207,7 @@ dataType.toString()); registryModel.registerDataType (dataType); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterDataTypeXML (dataType); console.setText ("\n" + xml + "\n"); @@ -214,6 +215,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateDataTypesCache(); + } + + /************************************************************************** * * Customized tree of data types - has different popup menus... * @@ -404,6 +415,7 @@ console.setText ("Data type to be unregistered: " + dataTypeName + "\n"); registryModel.unRegisterDataType (dataType); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { dtUnregException = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/11 08:34:39 1.6 @@ -182,6 +182,8 @@ namespace.toString()); registryModel.registerNamespace (namespace); console.setText ("\nRegistration successful!\n\n"); + updateCache(); + } else { String xml = registryModel.getRegisterNamespaceXML (namespace); console.setText ("\n" + xml + "\n"); @@ -189,6 +191,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateNamespacesCache(); + } + + /************************************************************************** * * Customized tree of namespaces - has different popup menus etc... * @@ -303,6 +315,7 @@ console.setText ("Namespace to be unregistered: " + name + "\n"); registryModel.unRegisterNamespace (namespace); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/11 08:34:39 1.6 @@ -502,6 +502,7 @@ service.toString()); registryModel.registerService (service); console.setText ("\nRegistration successful!\n\n"); + updateCache(); } else { String xml = registryModel.getRegisterServiceXML (service); console.setText ("\n" + xml + "\n"); @@ -582,6 +583,7 @@ service.getName() + "\n"); registryModel.unRegisterService (service); console.setText ("\nUnregistration successful!\n\n"); + updateCache(); } catch (MobyException e) { exception = e; @@ -602,6 +604,16 @@ } /************************************************************************** + * This is separated here because the registration from XML is + * done in the super-class (RegistrationPanel), but the update + * must be done here, in sub-class. + **************************************************************************/ + protected void updateCache() + throws MobyException { + registryModel.updateServicesCache(); + } + + /************************************************************************** * * Customized tree of service types - use for service registration * From senger at pub.open-bio.org Fri Nov 11 08:35:58 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:35:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110835.jAB8Zww5008208@pub.open-bio.org> senger Fri Nov 11 03:35:58 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv8193/src/main/org/biomoby/service/dashboard Added Files: AntModel.java GeneratorPanel.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,NONE,1.1 GeneratorPanel.java,NONE,1.1 From senger at pub.open-bio.org Fri Nov 11 08:35:58 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Fri, 11 Nov 2005 03:35:58 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511110835.jAB8ZwOc008223@pub.open-bio.org> senger Fri Nov 11 03:35:58 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv8193/src/main/org/biomoby/service/dashboard/images Added Files: bricks.gif smallClass.gif smallClass2.gif smallClass2_dis.gif smallClass_dis.gif smallGenJ.gif smallGenJ_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images bricks.gif,NONE,1.1 smallClass.gif,NONE,1.1 smallClass2.gif,NONE,1.1 smallClass2_dis.gif,NONE,1.1 smallClass_dis.gif,NONE,1.1 smallGenJ.gif,NONE,1.1 smallGenJ_dis.gif,NONE,1.1 From gss at pub.open-bio.org Fri Nov 11 20:59:55 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 11 Nov 2005 15:59:55 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511112059.jABKxt40010331@pub.open-bio.org> gss Fri Nov 11 15:59:55 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build In directory pub.open-bio.org:/tmp/cvs-serv10306/build Modified Files: .cvsignore Log Message: Added ROOT.war to .cvsignore s-moby/ref-impl/semanticmoby.org/build .cvsignore,1.2,1.3 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore 2005/09/21 23:07:16 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/build/.cvsignore 2005/11/11 20:59:55 1.3 @@ -1,2 +1,3 @@ semanticmoby.org.war javadoc +ROOT.war From senger at pub.open-bio.org Sat Nov 12 16:43:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhlxL013007@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv12988/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.50,1.51 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/10 08:54:31 1.50 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/12 16:43:47 1.51 @@ -1,3 +1,11 @@ +2005-11-12 Martin Senger + + * Changed MobyException to use initCause() and log.debug to better + indicate what happened and where. + + * Fixed CentralImpl: it is not anymore vulnerable to a different + types of results coming back from biomoby registry. + 2005-11-10 Martin Senger * Added method getParentName() to MobyServiceType From senger at pub.open-bio.org Sat Nov 12 16:43:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhmOT013142@pub.open-bio.org> senger Sat Nov 12 11:43:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/shared Modified Files: MobyException.java Log Message: moby-live/Java/src/main/org/biomoby/shared MobyException.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyException.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/shared/MobyException.java 2005/04/20 21:42:09 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyException.java 2005/11/12 16:43:48 1.3 @@ -1,28 +1,34 @@ // MobyException.java // -// senger at ebi.ac.uk -// February 2003 +// Created: February 2003 +// +// This file is a component of the BioMoby project. +// Copyright Martin Senger (martin.senger at gmail.com). +// package org.biomoby.shared; +import java.io.StringWriter; +import java.io.PrintWriter; + /** A general exception which can be used as a wrapper * around other exceptions. Using this exception * simplifies the code (but on the other hand it makes it less * "type-safe" - which is usually not a problem when dealing * with exceptions). *

    - * @author Martin Senger + * @author Martin Senger * @version $Id$ */ public class MobyException extends Exception { + private static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog (MobyException.class); private static final long serialVersionUID = 3257853190165969203L; - /** @serial - */ - private Throwable theOriginalException = null; + /** @serial */ public MobyException () { super(); } /****************************************************************************** @@ -36,22 +42,36 @@ * It allows access to the original (wrapped) exception and its message. * * @param s message (or reason of) - * @param theOriginalException + * @param e original cause of this exception ******************************************************************************/ - public MobyException (String s, Throwable theOriginalException) { - super (s); - this.theOriginalException = theOriginalException; + public MobyException (String s, Throwable e) { + super (s, e); + if (e != null) { + boolean seriousError = + ( (e instanceof java.lang.NullPointerException) || + (e instanceof java.lang.ClassCastException) || + (e instanceof java.lang.ClassNotFoundException) ); + if (seriousError || log.isDebugEnabled()) { + StringWriter sw = new StringWriter (500); + e.printStackTrace (new PrintWriter (sw)); + if (seriousError) + log.error (sw.toString()); + else + log.debug (sw.toString()); + } + } } /****************************************************************************** * Retrieve the original exception. * + * @deprecated Use instead getCause() directly. + * * @return an original exception which was wrapped by this BiomonyException, or * null if there was no original exception involved ******************************************************************************/ public Throwable getOriginalException() { - return theOriginalException; + return getCause(); } } - From senger at pub.open-bio.org Sat Nov 12 16:43:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhlvU013035@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java CentralDigestImpl.java CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.13,1.14 CentralDigestImpl.java,1.9,1.10 CentralImpl.java,1.34,1.35 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/10 08:54:31 1.13 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/12 16:43:47 1.14 @@ -446,7 +446,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); stopDT = false; @@ -459,7 +459,10 @@ * if failed do nothing (except reporting it) * - remove LIST_FILE * - compare contents of new LIST_FILE with file names in the cache - * and remove them, or fetched missing ones + * and remove them, or fetched missing ones; + * in order to compare properly you need to read individual files + * and look if they really contain all services mentioned in the + * LIST_FILE * if success add there new LIST_FILE *************************************************************************/ protected boolean fillServicesCache() @@ -485,7 +488,31 @@ for (Iterator it = authorities.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); String authority = (String)entry.getKey(); - if ( ! currentFiles.contains (authority)) { + if (currentFiles.contains (authority)) { + MobyService[] servs = + extractServices (load (new File (servicesCache, authority))); + // compare names in 'services' (those are services we have in cache) + // with names in 'entry' (those are the ones we should have) + boolean theyAreEqual = true; + HashSet currentServices = new HashSet (servs.length); + for (int i = 0; i < servs.length; i++) + currentServices.add (servs[i].getName()); + String[] newServices = (String[])entry.getValue(); + for (int i = 0; i < newServices.length; i++) { + if (currentServices.contains (newServices[i])) { + currentServices.remove (newServices[i]); + } else { + theyAreEqual = false; + break; + } + } + if (currentServices.size() > 0) + theyAreEqual = false; + if (! theyAreEqual) + currentFiles.remove (authority); + } + + if (! currentFiles.contains (authority)) { // missing file: fetch it from a registry fireEvent (AUTHORITY_LOADING, authority); String xml = getServicesAsXML (new MobyService (MobyService.DUMMY_NAME, authority), null, true, true); @@ -494,8 +521,9 @@ if (stopS) { return false; } + } else { + currentFiles.remove (authority); } - currentFiles.remove (authority); } // remove files that are not any more needed @@ -507,7 +535,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopS ? AUTHORITIES_CANCELLED : AUTHORITIES_END); stopS = false; @@ -568,7 +596,7 @@ return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopST ? SERVICE_TYPES_CANCELLED :SERVICE_TYPES_END); stopST = false; @@ -587,7 +615,7 @@ store (namespacesCache, LIST_FILE, xml); return true; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (NAMESPACES_END); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2005/10/28 07:58:08 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestImpl.java 2005/11/12 16:43:47 1.10 @@ -99,7 +99,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopDT ? DATA_TYPES_CANCELLED : DATA_TYPES_END); stopDT = false; @@ -135,7 +135,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopST ? SERVICE_TYPES_CANCELLED : SERVICE_TYPES_END); stopST = false; @@ -188,7 +188,7 @@ return result; } catch (Exception e) { - throw new MobyException (formatException (e)); + throw new MobyException (formatException (e), e); } finally { fireEvent (stopS ? AUTHORITIES_CANCELLED : AUTHORITIES_END); stopS = false; @@ -199,7 +199,8 @@ * Do more for NullPointerException... *************************************************************************/ protected String formatException (Exception e) { - if (e instanceof java.lang.NullPointerException) { + if ( (e instanceof java.lang.NullPointerException) || + (e instanceof java.lang.ClassCastException) ) { StringBuffer buf = new StringBuffer(); buf.append (e.toString()); buf.append (DGUtils.stackTraceToString (e)); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/09 05:29:38 1.34 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/12 16:43:47 1.35 @@ -191,18 +191,18 @@ System.err.println (result + "\n"); System.err.println ("------------\n"); - return result; + return resultToString (result); } else { - return call.invoke (uri, method, parameters); + return resultToString (call.invoke (uri, method, parameters)); } } catch (AxisFault e) { throw new MobyException (AxisUtils.formatFault (e, endpoint.toString(), - (call == null ? null : call.getOperationName()))); + (call == null ? null : call.getOperationName())), e); } catch (Exception e) { - throw new MobyException (e.toString()); + throw new MobyException (e.toString(), e); // e.printStackTrace(); } } @@ -1467,7 +1467,7 @@ false) + "" }; - return (String) doCall ("findService", query); + return (String)doCall ("findService", query); } /************************************************************************** @@ -1480,6 +1480,14 @@ result = doCall (methodName, new Object[] { }); else result = doCall (methodName, new Object[] { inputXML }); + return (String)result; + } + + /************************************************************************** + * + *************************************************************************/ + protected static String resultToString (Object result) + throws MobyException { if (result == null) throw new MobyException ("Returned result is null."); if (result instanceof String) From senger at pub.open-bio.org Sat Nov 12 16:43:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 11:43:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121643.jACGhmO0013119@pub.open-bio.org> senger Sat Nov 12 11:43:47 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv12988/src/main/org/biomoby/service/dashboard Modified Files: AbstractPanel.java CommonTree.java DataTypesBoard.java DataTypesTree.java NOTES NamespacesBoard.java NamespacesTree.java PropertyChannel.java RegistrationDataTypeSubPanel.java RegistrationNamespaceSubPanel.java RegistrationServiceSubPanel.java RegistrationServiceTypeSubPanel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.19,1.20 CommonTree.java,1.16,1.17 DataTypesBoard.java,1.9,1.10 DataTypesTree.java,1.11,1.12 NOTES,1.24,1.25 NamespacesBoard.java,1.4,1.5 NamespacesTree.java,1.6,1.7 PropertyChannel.java,1.6,1.7 RegistrationDataTypeSubPanel.java,1.7,1.8 RegistrationNamespaceSubPanel.java,1.6,1.7 RegistrationServiceSubPanel.java,1.6,1.7 RegistrationServiceTypeSubPanel.java,1.7,1.8 RegistryPanel.java,1.22,1.23 ServiceTypesBoard.java,1.5,1.6 ServiceTypesTree.java,1.8,1.9 ServicesBoard.java,1.5,1.6 ServicesTree.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/09 16:23:32 1.19 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/11/12 16:43:47 1.20 @@ -371,6 +371,8 @@ else area.setText (initValue); area.setCaretPosition (0); + area.setLineWrap (true); + area.setWrapStyleWord (true); if (eventName != null) { final String eName = eventName; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/10 14:32:42 1.16 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/12 16:43:47 1.17 @@ -9,6 +9,7 @@ package org.biomoby.service.dashboard; import org.tulsoft.tools.gui.SwingUtils; +import org.tulsoft.shared.PrefsUtils; import javax.swing.JTree; import javax.swing.JLabel; @@ -67,9 +68,13 @@ final static protected int SORTED_BY_INPUT_DATA = 12; final static protected int SORTED_BY_OUTPUT_DATA = 13; + final static protected String PREF_KEY_SEARCH = "searchKey"; + // tree components protected JPopupMenu popup; - protected String lastSearchText = ""; + protected static String + lastSearchText = PrefsUtils.getNode (Dashboard.class).get (PREF_KEY_SEARCH, ""); + protected int lastSorted = SORTED_BY_NAME; protected PropertyChannel propertyChannel; @@ -449,11 +454,13 @@ searchIcon, null, lastSearchText); - if (result != null) + if (result != null) { lastSearchText = result; + PrefsUtils.getNode (Dashboard.class).put (PREF_KEY_SEARCH, lastSearchText); + } return result; } - + /********************************************************************* * ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/10 08:54:31 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/12 16:43:47 1.10 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.DATA_TYPE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.DATA_TYPE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.DATA_TYPES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.DATA_TYPES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/06 16:47:11 1.11 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/12 16:43:47 1.12 @@ -145,7 +145,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (DATA_TYPES_ACCESS_ERROR, updateException); if (dataTypes != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/11 08:34:39 1.24 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/12 16:43:47 1.25 @@ -1,3 +1,15 @@ +* Add Throwable.initCause() etc. into exception handling + +* Add Alt-x for quick changing panels + +* Why are not services sorted by name, the first time they appear in + Registry browser? + +* BUG: sort services tree by service types: parts of the tree are + empty (big gaps) + +* move various exceptions from being global to the swing workers + * FWK005 parse may not be called while parsing. - probably when too many network request together --- @@ -140,6 +152,8 @@ * log4j.configuration property - works only from Ant... add it to the cmd-line clients, as well +* use NDC (with log4j) when I understand it... (?) + * alltools2: - JTextFieldWithHistory should remember also an empty value ("") - combo box history is not updated if exit happened while focus is still in the text field @@ -183,14 +197,10 @@ problms with registration panel: - - no auto update after reg/unreg srevice, and data type - after reload old files stayed (21.sep in data types) - datetime was in cache but cannot make it into tree, why? right-click - if nothing selected, it should take what is under te mouse (selected first), otherwise it is annoying -serach should be propagated to all (same-kinds) trees in all panels - -wrap automatically text in descriptions fields =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/10 08:54:31 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/12 16:43:47 1.5 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.NAMESPACE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.NAMESPACE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.NAMESPACES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.NAMESPACES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/06 16:47:11 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/12 16:43:47 1.7 @@ -104,7 +104,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (NAMESPACES_ACCESS_ERROR, updateException); if (namespaces != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/10/28 11:30:37 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/12 16:43:47 1.7 @@ -8,6 +8,7 @@ package org.biomoby.service.dashboard; +import org.biomoby.shared.Utils; import org.tulsoft.shared.UUtils; import java.beans.PropertyChangeListener; @@ -188,9 +189,9 @@ if (source != null) { buf.append ("["); if (source instanceof DashboardPanel) - buf.append ( ((DashboardPanel)source).getName() ); + buf.append ( Utils.simpleClassName (((DashboardPanel)source).getName()) ); else - buf.append (source.getClass().getName()); + buf.append ( Utils.simpleClassName (source.getClass().getName()) ); buf.append ("] "); } buf.append (key); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/11 08:34:39 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java 2005/11/12 16:43:47 1.8 @@ -112,7 +112,7 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_DT, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, + createCheckBox ("Fill new Data Type when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectDT (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/11 08:34:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java 2005/11/12 16:43:47 1.7 @@ -101,7 +101,7 @@ // allow to copy selected namespace to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_NS, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_C, + createCheckBox ("Fill new Namespace when selected", usingCopyBySelect, KeyEvent.VK_C, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectNS (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/11 08:34:39 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceSubPanel.java 2005/11/12 16:43:47 1.7 @@ -154,7 +154,7 @@ // copy-by-select copyBySelect = - createCheckBox ("Copy here when selected in browser panel", + createCheckBox ("Fill new Service when selected in browser panel", false, KeyEvent.VK_C, null); // put together service fields =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/10 14:32:42 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java 2005/11/12 16:43:47 1.8 @@ -108,7 +108,7 @@ // allow to copy selected service types to the new one boolean usingCopyBySelect = getPrefValue (COPY_BY_SELECT_ST, false); copyBySelect = - createCheckBox ("Copy when selected", usingCopyBySelect, KeyEvent.VK_O, + createCheckBox ("Fill new Service Type when selected", usingCopyBySelect, KeyEvent.VK_O, new ItemListener() { public void itemStateChanged (ItemEvent e) { onCopyBySelectST (e.getStateChange() == ItemEvent.SELECTED); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/10 08:54:31 1.22 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/12 16:43:47 1.23 @@ -202,7 +202,7 @@ final JLabel contents = new JLabel(); final String[] buttons = new String[] { "Copy to console", "Done"}; - propertyChannel.fire (DP_STATUS_MSG, "Retrieving cach info..."); + propertyChannel.fire (DP_STATUS_MSG, "Retrieving cache info..."); infoButton.setEnabled (false); final SwingWorker worker = new SwingWorker() { @@ -338,7 +338,7 @@ // runs on the event-dispatching thread. public void finished() { if (log.isDebugEnabled()) - log.debug (myReload ? "Reload of " : "Update of part " + myCachePart + " finished"); + log.debug ( (myReload ? "Reload of " : "Update of part ") + myCachePart + " finished"); if (exception != null) error ("An error occured when filling/updating the cache.\n\n", exception); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/10 08:54:31 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/12 16:43:47 1.6 @@ -58,6 +58,7 @@ CommonTree customTree) { super (model, channel); tree = customTree; + tree.setPropertyChannel (channel); createItself(); this.model.addNotificationListener (this); } @@ -79,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.SERVICE_TYPE_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.SERVICE_TYPE_LOADED: addToProgressBar(); @@ -89,7 +90,7 @@ case Notifier.SERVICE_TYPES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/10 08:54:31 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/12 16:43:47 1.9 @@ -104,7 +104,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (SERVICE_TYPES_ACCESS_ERROR, updateException); if (serviceTypes != null) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/12 16:43:47 1.6 @@ -80,7 +80,7 @@ calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; case Notifier.AUTHORITY_LOADING: - channel.fire (DashboardProperties.DP_STATUS_MSG, event.getMessage()); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, event.getMessage()); break; case Notifier.AUTHORITY_LOADED: addToProgressBar(); @@ -90,7 +90,7 @@ case Notifier.AUTHORITIES_RESET: initiator = event.getSource(); if (tree == initiator) - channel.fire (DashboardProperties.DP_STATUS_MSG, "Done"); + channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.AUTHORITIES_UPDATED: =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/10 14:32:42 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/12 16:43:47 1.6 @@ -146,7 +146,6 @@ // runs on the event-dispatching thread. public void finished() { - log.debug ("Rendering started"); if (updateException != null) error (SERVICES_ACCESS_ERROR, updateException); if (services != null) { From senger at pub.open-bio.org Sat Nov 12 17:27:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 12 Nov 2005 12:27:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511121727.jACHRdDP013336@pub.open-bio.org> senger Sat Nov 12 12:27:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv13317/src/main/org/biomoby/service/dashboard Modified Files: Dashboard.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard Dashboard.java,1.15,1.16 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/10 14:32:42 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/12 17:27:39 1.16 @@ -119,7 +119,7 @@ Dimension screenSize = frame.getToolkit().getScreenSize(); double myWidth = Math.min (screenSize.getWidth(), 1100); - double myHeight = Math.min (screenSize.getHeight(), 900); + double myHeight = Math.min (screenSize.getHeight() - 25, 900); Dimension mySize = new Dimension(); mySize.setSize (myWidth, myHeight); @@ -218,6 +218,8 @@ tabbedPane.addTab (name, panels[i].getIcon(), panels[i].getComponent (propertyChannel)); + if (i < 10) + tabbedPane.setMnemonicAt (i, (0x30 + i + 1)); } StatusBar statusBar = getStatusBar(); propertyChannel.addPropertyChangeListener (statusBar); From gss at pub.open-bio.org Sun Nov 13 05:18:57 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Sun, 13 Nov 2005 00:18:57 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511130518.jAD5Iv33014613@pub.open-bio.org> gss Sun Nov 13 00:18:57 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images In directory pub.open-bio.org:/tmp/cvs-serv14576/WebRoot/images Modified Files: nsf.gif tigr.gif ncgr.gif cshl.gif Log Message: Updated logos for cshl, ncgr, nsf, and tigr s-moby/ref-impl/semanticmoby.org/WebRoot/images nsf.gif,1.1,1.2 tigr.gif,1.1,1.2 ncgr.gif,1.1,1.2 cshl.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/nsf.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/ncgr.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif 2005/11/13 05:18:57 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/cshl.gif: diff failed From gss at pub.open-bio.org Sun Nov 13 05:43:00 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Sun, 13 Nov 2005 00:43:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511130543.jAD5h0Pa014701@pub.open-bio.org> gss Sun Nov 13 00:43:00 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images In directory pub.open-bio.org:/tmp/cvs-serv14660/WebRoot/images Modified Files: iwis.gif iris.gif lis.gif tigr-gi.gif dragondb.gif Log Message: Added transparency s-moby/ref-impl/semanticmoby.org/WebRoot/images iwis.gif,1.1,1.2 iris.gif,1.1,1.2 lis.gif,1.1,1.2 tigr-gi.gif,1.1,1.2 dragondb.gif,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iwis.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/iris.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/lis.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/tigr-gi.gif: diff failed =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 Binary files /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif 2005/10/21 15:34:24 1.1 and /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif 2005/11/13 05:43:00 1.2 differ rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/images/dragondb.gif: diff failed From senger at pub.open-bio.org Tue Nov 15 03:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 14 Nov 2005 22:25:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpxY029936@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv29860/src/main/org/biomoby/client Modified Files: BaseClient.java Log Message: moby-live/Java/src/main/org/biomoby/client BaseClient.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java 2005/10/22 01:38:04 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseClient.java 2005/11/15 03:25:51 1.4 @@ -170,7 +170,7 @@ throw new MobyException ("Service endpoint '" + serviceEndpoint + "' is not a valid URL."); } catch (GException e) { - throw new MobyException (e.getMessage()); + throw new MobyException (e.getMessage(), e); } } From senger at pub.open-bio.org Tue Nov 15 03:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 14 Nov 2005 22:25:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpAW029897@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv29860/src/config Modified Files: run-any-client Log Message: moby-live/Java/src/config run-any-client,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/09/18 08:46:25 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/15 03:25:51 1.5 @@ -15,5 +15,6 @@ CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH "$@" From senger at pub.open-bio.org Tue Nov 15 03:25:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 14 Nov 2005 22:25:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511150325.jAF3PpZo029879@pub.open-bio.org> senger Mon Nov 14 22:25:51 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv29860 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.39,1.40 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- /home/repository/moby/moby-live/Java/build.xml 2005/10/28 07:58:08 1.39 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/15 03:25:50 1.40 @@ -99,11 +99,11 @@ - - --> + - - + - From senger at pub.open-bio.org Wed Nov 16 08:39:49 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dnin002079@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/shared/parser Modified Files: MobyJob.java Log Message: moby-live/Java/src/main/org/biomoby/shared/parser MobyJob.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/MobyJob.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/shared/parser/MobyJob.java 2005/08/26 06:27:05 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/MobyJob.java 2005/11/16 08:39:48 1.2 @@ -413,10 +413,6 @@ *

  • If it fails, try to find an unnamed Simple data element * matching just the data type.

    * - *

  • If it fails, and if here given 'name' is empty, try to - * find any Simple data element matching the data type. (I am - * not sure that this rule is what we want...)

    - * *

  • Return null.

    * * From senger at pub.open-bio.org Wed Nov 16 08:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dm7S002060@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/shared/event Modified Files: Notifier.java Log Message: moby-live/Java/src/main/org/biomoby/shared/event Notifier.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/09 16:23:32 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/event/Notifier.java 2005/11/16 08:39:48 1.8 @@ -109,9 +109,9 @@ * Call the notifier and signal that it can stop loading data (or * whatever it is doing).

    * - * @param signal identify what to stop doing (some usual values of - * this signal are defined elsewhere in this interface with names - * starting by SIGNAL_) + * @param callbackSignal identify what to stop doing (some usual + * values of this signal are defined elsewhere in this interface + * with names starting by SIGNAL_) ********************************************************************/ void callback (int callbackSignal); From senger at pub.open-bio.org Wed Nov 16 08:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dmQk001998@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv1965/src/Clients Added Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,NONE,1.1 From senger at pub.open-bio.org Wed Nov 16 08:40:53 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:40:53 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160840.jAG8eru4002138@pub.open-bio.org> senger Wed Nov 16 03:40:53 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv2123/src/Clients Added Files: TestAuth.java Log Message: moby-live/Java/src/Clients TestAuth.java,NONE,1.1 From senger at pub.open-bio.org Wed Nov 16 08:39:48 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Wed, 16 Nov 2005 03:39:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511160839.jAG8dmsk002022@pub.open-bio.org> senger Wed Nov 16 03:39:48 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv1965/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java PropertyChannel.java Added Files: ExitSecurityManager.java SimpleAnt.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard ExitSecurityManager.java,NONE,1.1 SimpleAnt.java,NONE,1.1 GeneratorPanel.java,1.2,1.3 PropertyChannel.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.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/service/dashboard/GeneratorPanel.java 2005/11/15 03:25:51 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/16 08:39:48 1.3 @@ -224,7 +224,7 @@ JPanel jMoby = createTitledPanel ("jMoby"); File currentDir = new File (System.getProperty ("user.dir")); - JLabel labelJMoby = new JLabel ("Directory with a local copy of jMoby"); + JLabel labelJMoby = new JLabel ("Directory with jMoby"); jmobyDir = createFileSelector ("Select directory with jMoby", "Select", currentDir.getAbsolutePath(), @@ -235,28 +235,28 @@ SwingUtils.addComponent (jMoby, labelJMoby, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); SwingUtils.addComponent (jMoby, jmobyDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); - // panel with output dirs - JPanel outputs = createTitledPanel ("Output locations"); +// // panel with output dirs +// JPanel outputs = createTitledPanel ("Output locations"); - JLabel labelOutput = new JLabel ("Output directory for generated code"); - outputDir = createFileSelector ("Select directory for generated code", - "Select", - new File (currentDir, "generated").getAbsolutePath(), - "generatedDirectory", - null); - outputDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - JLabel labelJavadoc = new JLabel ("Output directory for javadoc API"); - javadocDir = createFileSelector ("Select directory for generated javadoc", - "Select", - new File (currentDir, "docs/APIservices").getAbsolutePath(), - "apiDirectory", - null); - javadocDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); - - SwingUtils.addComponent (outputs, labelOutput, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent (outputs, outputDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); - SwingUtils.addComponent (outputs, labelJavadoc, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); - SwingUtils.addComponent (outputs, javadocDir, 0, 3, 1, 1, HORI, NWEST, 1.0, 0.0); +// JLabel labelOutput = new JLabel ("Output directory for generated code"); +// outputDir = createFileSelector ("Select directory for generated code", +// "Select", +// new File (currentDir, "generated").getAbsolutePath(), +// "generatedDirectory", +// null); +// outputDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); +// JLabel labelJavadoc = new JLabel ("Output directory for javadoc API"); +// javadocDir = createFileSelector ("Select directory for generated javadoc", +// "Select", +// new File (currentDir, "docs/APIservices").getAbsolutePath(), +// "apiDirectory", +// null); +// javadocDir.getFileChooser().setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); + +// SwingUtils.addComponent (outputs, labelOutput, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (outputs, outputDir, 0, 1, 1, 1, HORI, NWEST, 1.0, 0.0); +// SwingUtils.addComponent (outputs, labelJavadoc, 0, 2, 1, 1, NONE, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (outputs, javadocDir, 0, 3, 1, 1, HORI, NWEST, 1.0, 0.0); // all-in-one button bothButton = @@ -293,7 +293,7 @@ // put all together SwingUtils.addComponent (pComponent, split, 0, 0, 1, 7, BOTH, NWEST, 1.0, 1.0); SwingUtils.addComponent (pComponent, jMoby, 1, 0, 2, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent (pComponent, outputs, 1, 1, 2, 1, HORI, NWEST, 0.0, 0.0); +// SwingUtils.addComponent (pComponent, outputs, 1, 1, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, options, 1, 2, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, flavours, 1, 3, 2, 1, HORI, NWEST, 0.0, 0.0); SwingUtils.addComponent (pComponent, genData, 1, 4, 1, 1, HORI, NWEST, 0.0, 0.0); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/12 16:43:47 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/16 08:39:48 1.8 @@ -35,7 +35,7 @@ * can register and deregister PropertyChangeListeners, and it can * fire an event to them on behave of other objects. The other objects * either identify themselves (see method {@link - * #fire(Object,String,Object}), or use this channel for firing + * #fire(Object,String,Object)}), or use this channel for firing * anonymous messages (see method {@link #fire(String,Object)}) - in * which case the message source will be this class.

    * From fgibbons at pub.open-bio.org Wed Nov 16 14:51:49 2005 From: fgibbons at pub.open-bio.org (Frank Gibbons) Date: Wed, 16 Nov 2005 09:51:49 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511161451.jAGEpnjX003352@pub.open-bio.org> fgibbons Wed Nov 16 09:51:48 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY In directory pub.open-bio.org:/tmp/cvs-serv3327 Modified Files: CommonSubs.pm Log Message: - Ooops! EXPORT_OK contained 'collectionResponse' when it should have had 'complexResponse' moby-live/Perl/MOBY CommonSubs.pm,1.70,1.71 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/09/30 23:23:13 1.70 +++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2005/11/16 14:51:48 1.71 @@ -206,7 +206,7 @@ );# complexResponse is *not* here, but is in @EXPORT_OK -our @EXPORT_OK = ("collectionResponse", @{$EXPORT_TAGS{'all'}}); +our @EXPORT_OK = ("complexResponse", @{$EXPORT_TAGS{'all'}}); =head2 genericServiceInputParser From senger at pub.open-bio.org Thu Nov 17 13:04:25 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 17 Nov 2005 08:04:25 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511171304.jAHD4PG8011061@pub.open-bio.org> senger Thu Nov 17 08:04:24 EST 2005 Update of /home/repository/moby/jars-archive/current In directory pub.open-bio.org:/tmp/cvs-serv11046 Added Files: commons-io-1.0.jar Log Message: jars-archive/current commons-io-1.0.jar,NONE,1.1 From gss at pub.open-bio.org Fri Nov 18 18:28:42 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Fri, 18 Nov 2005 13:28:42 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511181828.jAIISgZS022541@pub.open-bio.org> gss Fri Nov 18 13:28:42 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev In directory pub.open-bio.org:/tmp/cvs-serv22515/src/org/semanticmoby/ref/servlets/dev Modified Files: RepositoryPrintServlet.java Log Message: Accept format parameter; print N3 by default s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev RepositoryPrintServlet.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java 2005/10/09 01:11:21 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/servlets/dev/RepositoryPrintServlet.java 2005/11/18 18:28:42 1.4 @@ -18,29 +18,37 @@ PrintWriter out = response.getWriter(); StorageManager manager = new StorageManager(); - + + String format = "N3"; + Model model = null; + try { - - Model model = manager.openDBModel(); + model = manager.openDBModel(); if (model.isEmpty()) { - out.println("The repository is empty"); } else { - - StmtIterator it = model.listStatements(); - - while (it.hasNext()) { - - out.println(it.nextStatement()); + String fmt = request.getParameter("format"); + if ("rdf".equalsIgnoreCase(fmt)) { + format = "RDF/XML-ABBREV"; + } else if ("nt".equalsIgnoreCase(fmt)) { + format = "N-TRIPLES"; } + model.write(out, format); } model.close(); } catch (StorageException e) { - e.printStackTrace(); throw new ServletException(e); + } finally { + if (model != null) { + try { + model.close(); + } catch (Throwable t) { + t.printStackTrace(); + } + } } } } From senger at pub.open-bio.org Sat Nov 19 11:11:12 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 06:11:12 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191111.jAJBBCHE024767@pub.open-bio.org> senger Sat Nov 19 06:11:12 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory pub.open-bio.org:/tmp/cvs-serv24749/help Log Message: Directory /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help added to the repository moby-live/Java/src/main/org/biomoby/service/dashboard/help - New directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help/RCS/directory,v: No such file or directory From senger at pub.open-bio.org Sat Nov 19 18:33:00 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:00 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX0gu025499@pub.open-bio.org> senger Sat Nov 19 13:33:00 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv25480 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.41,1.42 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/16 08:39:48 1.41 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/19 18:33:00 1.42 @@ -232,6 +232,7 @@ + From senger at pub.open-bio.org Sat Nov 19 18:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2n0025650@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/service/dashboard/images Added Files: registration.gif smallHelp.gif smallHelp_dis.gif smallPref.gif smallPref_dis.gif smallSelect.gif smallSelect_dis.gif Removed Files: registration.png Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images registration.gif,NONE,1.1 smallHelp.gif,NONE,1.1 smallHelp_dis.gif,NONE,1.1 smallPref.gif,NONE,1.1 smallPref_dis.gif,NONE,1.1 smallSelect.gif,NONE,1.1 smallSelect_dis.gif,NONE,1.1 registration.png,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images/RCS/registration.png,v: No such file or directory From senger at pub.open-bio.org Sat Nov 19 18:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2wT025695@pub.open-bio.org> senger Sat Nov 19 13:33:02 EST 2005 Update of /home/repository/moby/moby-live/Java/xmls In directory pub.open-bio.org:/tmp/cvs-serv25480/xmls Modified Files: libraries.xml Log Message: moby-live/Java/xmls libraries.xml,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/08 00:06:55 1.8 +++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2005/11/19 18:33:02 1.9 @@ -21,6 +21,7 @@ + @@ -60,6 +61,7 @@ + @@ -124,6 +126,7 @@ + From senger at pub.open-bio.org Sat Nov 19 18:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX17j025634@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/service/dashboard/help Added Files: Dashboard.html GeneratorPanel.html RegistrationPanel.html RegistryPanel.html Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/help Dashboard.html,NONE,1.1 GeneratorPanel.html,NONE,1.1 RegistrationPanel.html,NONE,1.1 RegistryPanel.html,NONE,1.1 From senger at pub.open-bio.org Sat Nov 19 18:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1OV025554@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard/org/biomoby/service/dashboard Added Files: dashboard.txt project.txt Log Message: moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,NONE,1.1 project.txt,NONE,1.1 From senger at pub.open-bio.org Sat Nov 19 18:33:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX2dG025671@pub.open-bio.org> senger Sat Nov 19 13:33:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared In directory pub.open-bio.org:/tmp/cvs-serv25480/src/main/org/biomoby/shared Modified Files: Utils.java Log Message: moby-live/Java/src/main/org/biomoby/shared Utils.java,1.8,1.9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/10 08:54:32 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Utils.java 2005/11/19 18:33:01 1.9 @@ -7,6 +7,9 @@ package org.biomoby.shared; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; + import java.util.HashSet; import java.io.PrintWriter; import java.io.BufferedWriter; @@ -16,7 +19,11 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; - +import java.io.OutputStreamWriter; +import java.io.ByteArrayOutputStream; +import java.nio.charset.Charset; +import java.net.URL; +import java.net.MalformedURLException; /** * This is a set of several utility methods which may be useful for @@ -144,17 +151,21 @@ /************************************************************************* * Find the resource with the given 'filename', read it and return - * it. A resource is some data (images, audio, text, etc) that can be - * accessed by class code in a way that is independent of the location - * of the code, typicallt such resource file sits anywhere on the CLASSPATH.

    + * it. A resource is some data (images, audio, text, etc) that can + * be accessed by class code in a way that is independent of the + * location of the code, typically such resource file sits + * anywhere on the CLASSPATH.

    * * @param filename of a resource is a '/'-separated path name that * identifies the resource + * * @param resourceOwner is any object whose class loader is used * to find and get the resource; typically one would put here * "this" when calling this method + * * @return contents of the resource, or null if the resource could * not be found + * * @throws MobyException if resource was found but an error * occured during its reading (IO problem, memory problem etc.) *************************************************************************/ @@ -193,9 +204,114 @@ } /************************************************************************* + * Work in progress.

    + * + * Slightly richer version of {@link + * #readResource(String,Object)}. It reads the resource using + * platform default encoding (which may be not what you + * want... something to be done better (TBD).

    + * + * @return contents of the resource, or null if the resource could + * not be found + * + * @throws IOException if resource was found but an error + * occured during its reading (IO problem, memory problem etc.) + *************************************************************************/ + public static String readResource (String path, Class c) + throws IOException { + + // path can be empty + if (path == null) return null; + + // seems that we are going to read something - so prepare a + // default encoding + String encoding = new OutputStreamWriter (new ByteArrayOutputStream()).getEncoding(); + // for 1.5: +// String encoding = Charset.defaultCharset().name(); + + // path can be absolute... + File file = new File (path); + if (file.isAbsolute()) + return FileUtils.readFileToString (file, encoding); + + // ...or consider it a resource and load it as a resource of + // the given class + InputStream is = null; + if (c != null) { + is = c.getClassLoader().getResourceAsStream (path); + if (is != null) + return IOUtils.toString (is, encoding); + + // ...or extend the path by the package name of the given + // class + String className = c.getName(); + int pkgEndIndex = className.lastIndexOf ('.'); + if (pkgEndIndex > 0) { + String packageName = className.substring (0, pkgEndIndex); + String newPath = packageName.replace ('.', '/') + "/" + path; + is = c.getClassLoader().getResourceAsStream (newPath); + if (is != null) + return IOUtils.toString (is, encoding); + } + } + + // ...or (finally) try some general class loader + is = Thread.currentThread().getContextClassLoader().getResourceAsStream (path); + if (is != null) + return IOUtils.toString (is, encoding); + + // sorry, I cannot do more + return null; + } + + /************************************************************************* + * Work in progress.

    + * + * Similar to {@link #readResource(String,Class)} but return just + * an URL of a resource, not the resource itself.

    + * + * @return URL of the resource, or null if the resource could not + * be found + *************************************************************************/ + public static URL getResourceURL (String path, Class c) { + + // path can be empty + if (path == null) return null; + + // path can be absolute... + File file = new File (path); + if (file.isAbsolute()) { + try { + return file.toURI().toURL(); + } catch (MalformedURLException e) { + return null; + } + } + + // ...or consider it a resource of the given class + URL url = null; + if (c != null) { + url = c.getClassLoader().getResource (path); + if (url != null) return url; + + // ...or extend the path by the package name of the given class + String className = c.getName(); + int pkgEndIndex = className.lastIndexOf ('.'); + if (pkgEndIndex > 0) { + String packageName = className.substring (0, pkgEndIndex); + String newPath = packageName.replace ('.', '/') + "/" + path; + url = c.getClassLoader().getResource (newPath); + if (url != null) return url; + } + } + + // ...or (finally) try some general class loader + return Thread.currentThread().getContextClassLoader().getResource (path); + } + + /************************************************************************* * Return just the last part of a Java class name (after the last - * dot). It is useful for displaying purposes (and when data do - * not have article names).

    + * dot). It is useful for displaying purposes.

    * * @param className whose last part is being looked for * @return the last part of 'className', or the whole 'className' if it does From senger at pub.open-bio.org Sat Nov 19 18:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1xR025518@pub.open-bio.org> senger Sat Nov 19 13:33:00 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard Modified Files: dashboard.properties Log Message: moby-live/Java/src/config/dashboard dashboard.properties,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties 2005/10/28 07:58:08 1.2 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/dashboard.properties 2005/11/19 18:33:00 1.3 @@ -30,4 +30,23 @@ # --- a name or a number of color that will be used to paint the # background of the dasboard header and its status bar at the bottom + dashboard.bgcolor = aliceblue + +# --- short description what a dashboard can do generally; usually it +# is more convenient to put the description in a file and to use the +# alternative property name; this text is treated as an HTML text + +#dashboard.description = +dashboard.description.file = org/biomoby/service/dashboard/dashboard.txt + +# --- short description of a project that uses this dashboard; usually +# it is more convenient to put the description in a file and to use +# the alternative property name; this text is treated as an HTML text + +#project.description = +project.description.file = org/biomoby/service/dashboard/project.txt + +# --- contact person, possibly with an email address +# (note that this text is not treated as HTML document) +dashboard.contact = Martin Senger From senger at pub.open-bio.org Sat Nov 19 18:33:01 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sat, 19 Nov 2005 13:33:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511191833.jAJIX1F7025538@pub.open-bio.org> senger Sat Nov 19 13:33:01 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services In directory pub.open-bio.org:/tmp/cvs-serv25480/src/config/dashboard/META-INF/services Modified Files: org.biomoby.service.dashboard.DashboardPanel Log Message: moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.service.dashboard.DashboardPanel,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/11 08:34:39 1.5 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services/org.biomoby.service.dashboard.DashboardPanel 2005/11/19 18:33:01 1.6 @@ -1,4 +1,4 @@ org.biomoby.service.dashboard.RegistryPanel org.biomoby.service.dashboard.RegistrationPanel org.biomoby.service.dashboard.GeneratorPanel -#org.biomoby.service.dashboard.DebuggingPanel +org.biomoby.service.dashboard.DebuggingPanel From senger at pub.open-bio.org Sun Nov 20 12:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpfl005036@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv4966/docs/images Modified Files: stylesheet.css Log Message: moby-live/Java/docs/images stylesheet.css,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/images/stylesheet.css,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/docs/images/stylesheet.css 2005/09/20 07:30:09 1.5 +++ /home/repository/moby/moby-live/Java/docs/images/stylesheet.css 2005/11/20 12:30:50 1.6 @@ -63,6 +63,10 @@ margin: 1em; } +.update { + background-color:#ccffcd; + } + pre.code { border: ridge; padding: 5px; background-color:#FFFF99; From senger at pub.open-bio.org Sun Nov 20 12:30:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUooY004993@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv4966 Modified Files: .cvsignore.template build-dev.bat build.bat Log Message: moby-live/Java .cvsignore.template,1.3,1.4 build-dev.bat,1.4,1.5 build.bat,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/.cvsignore.template,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/.cvsignore.template 2005/08/31 00:48:39 1.3 +++ /home/repository/moby/moby-live/Java/.cvsignore.template 2005/11/20 12:30:50 1.4 @@ -3,3 +3,4 @@ .classpath build build.properties +log4j.properties =================================================================== RCS file: /home/repository/moby/moby-live/Java/build-dev.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/build-dev.bat 2005/05/19 10:56:05 1.4 +++ /home/repository/moby/moby-live/Java/build-dev.bat 2005/11/20 12:30:50 1.5 @@ -1,38 +1,38 @@ - at echo off -REM $Id$ - -REM See comments in build-dev.sh. -REM ALSO: I do not understand Windows and do not develop on this platform. -REM Therefore, any improvements of this script are welcome. -REM Please do not hesitate and contact Martin Senger . - -REM Set-up JAVA_HOME -REM ---------------- - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=.\lib\ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set CP=%JAVA_HOME%\lib\tools.jar;%CP% - -REM Call Ant to do the building -REM --------------------------- -set JAVA=%JAVA_HOME%\bin\java -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end - - + at echo off +REM $Id$ + +REM See comments in build-dev.sh. +REM ALSO: I do not understand Windows and do not develop on this platform. +REM Therefore, any improvements of this script are welcome. +REM Please do not hesitate and contact Martin Senger . + +REM Set-up JAVA_HOME +REM ---------------- + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=.\lib\ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set CP=%JAVA_HOME%\lib\tools.jar;%CP% + +REM Call Ant to do the building +REM --------------------------- +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/build.bat 2005/05/19 10:56:05 1.4 +++ /home/repository/moby/moby-live/Java/build.bat 2005/11/20 12:30:50 1.5 @@ -1,38 +1,38 @@ - at echo off -REM $Id$ - -REM See comments in build.sh. -REM ALSO: I do not understand Windows and do not develop on this platform. -REM Therefore, any improvements of this script are welcome. -REM Please do not hesitate and contact Martin Senger . - -REM Set-up JAVA_HOME -REM ---------------- -REM Example: set JAVA_HOME=\development\jdk - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=.\lib\ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set CP=%JAVA_HOME%\lib\tools.jar;%CP% - -REM Call Ant to do the building -REM --------------------------- -set JAVA=%JAVA_HOME%\bin\java -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main -buildfile build.xml gather -%JAVA% -classpath %CP% -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end + at echo off +REM $Id$ + +REM See comments in build.sh. +REM ALSO: I do not understand Windows and do not develop on this platform. +REM Therefore, any improvements of this script are welcome. +REM Please do not hesitate and contact Martin Senger . + +REM Set-up JAVA_HOME +REM ---------------- +REM Example: set JAVA_HOME=\development\jdk + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=.\lib\ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set CP=%JAVA_HOME%\lib\tools.jar;%CP% + +REM Call Ant to do the building +REM --------------------------- +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main -buildfile build.xml gather +"%JAVA%" -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end From senger at pub.open-bio.org Sun Nov 20 12:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqTr005298@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema Modified Files: MElement.java Log Message: moby-live/Java/src/main/org/biomoby/shared/schema MElement.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.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/shared/schema/MElement.java 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.java 2005/11/20 12:30:52 1.2 @@ -1,173 +1,173 @@ -/* - * Created on Jun 17, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package org.biomoby.shared.schema; - -import java.util.Vector; - -/** - * @author Eddie - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class MElement { - // enumeration of types - /** - * A moby:String primitive type - */ - public static String STRING = "String"; - /** - * A moby:Integer primitive type - */ - public static String INTEGER = "Integer"; - /** - * A moby:Float primitive type - */ - public static String FLOAT = "Float"; - /** - * A moby:DateTime primitive type - */ - public static String DATA_TIME = "DataTime"; - - /** - * A moby data type that is not a primitive. - */ - public static String NON_PRIMITIVE = "NonPrimitiveType"; - - private String name = ""; - private String articleName = ""; - private Vector hasaMElements = new Vector(); - private Vector hasMElements = new Vector();; - private String description = ""; - private String type = ""; - - /** - * Default constructor. Name, etc need to be set. - */ - public MElement() { - } - - public MElement(String name) { - this.name = name; - } - - public MElement(String name, String articleName) { - this.name = name; - this.articleName = articleName; - } - - public String getArticleName() - { - return this.articleName; - } - public MElement(String name, String articleName, String description) { - this.name = name; - this.articleName = articleName; - this.description = description; - } - - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - /** - * @return Returns the type. - */ - public String getType() { - return type; - } - /** - * @param type The type to set. - */ - public void setType(String type) { - this.type = type; - } - /** - * @return Returns the hasaMElements. - */ - public Vector getHasaMElements() { - return hasaMElements; - } - /** - * @return Returns the hasMElements. - */ - public Vector getHasMElements() { - return hasMElements; - } - - public boolean addHasMElement(MElement element) { - return hasMElements.add(element); - } - - public boolean addHasaMElement(MElement element) { - return hasaMElements.add(element); - } - - public static boolean isPrimitive(String object) { - if (object.equals(MElement.STRING)) - return true; - if (object.equals(MElement.INTEGER)) - return true; - if (object.equals(MElement.FLOAT)) - return true; - if (object.equals(MElement.DATA_TIME)) - return true; - return false; - } - - /**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to - /*store MElement and articleNames;*/ - public int hashCode() - { - return this.name.hashCode(); - } - - - - public boolean equals(Object obj) - { - if(obj==null) - { - return false; - } - - if(obj instanceof MElement) - { - MElement mk=(MElement)obj; - - return (this.name).equalsIgnoreCase(mk.name); - } - return false; - } - - - public String toString() { - return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n"; -} -} - +/* + * Created on Jun 17, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.biomoby.shared.schema; + +import java.util.Vector; + +/** + * @author Eddie + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class MElement { + // enumeration of types + /** + * A moby:String primitive type + */ + public static String STRING = "String"; + /** + * A moby:Integer primitive type + */ + public static String INTEGER = "Integer"; + /** + * A moby:Float primitive type + */ + public static String FLOAT = "Float"; + /** + * A moby:DateTime primitive type + */ + public static String DATA_TIME = "DataTime"; + + /** + * A moby data type that is not a primitive. + */ + public static String NON_PRIMITIVE = "NonPrimitiveType"; + + private String name = ""; + private String articleName = ""; + private Vector hasaMElements = new Vector(); + private Vector hasMElements = new Vector();; + private String description = ""; + private String type = ""; + + /** + * Default constructor. Name, etc need to be set. + */ + public MElement() { + } + + public MElement(String name) { + this.name = name; + } + + public MElement(String name, String articleName) { + this.name = name; + this.articleName = articleName; + } + + public String getArticleName() + { + return this.articleName; + } + public MElement(String name, String articleName, String description) { + this.name = name; + this.articleName = articleName; + this.description = description; + } + + + /** + * @return Returns the description. + */ + public String getDescription() { + return description; + } + /** + * @param description The description to set. + */ + public void setDescription(String description) { + this.description = description; + } + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + /** + * @param name The name to set. + */ + public void setName(String name) { + this.name = name; + } + /** + * @return Returns the type. + */ + public String getType() { + return type; + } + /** + * @param type The type to set. + */ + public void setType(String type) { + this.type = type; + } + /** + * @return Returns the hasaMElements. + */ + public Vector getHasaMElements() { + return hasaMElements; + } + /** + * @return Returns the hasMElements. + */ + public Vector getHasMElements() { + return hasMElements; + } + + public boolean addHasMElement(MElement element) { + return hasMElements.add(element); + } + + public boolean addHasaMElement(MElement element) { + return hasaMElements.add(element); + } + + public static boolean isPrimitive(String object) { + if (object.equals(MElement.STRING)) + return true; + if (object.equals(MElement.INTEGER)) + return true; + if (object.equals(MElement.FLOAT)) + return true; + if (object.equals(MElement.DATA_TIME)) + return true; + return false; + } + + /**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to + /*store MElement and articleNames;*/ + public int hashCode() + { + return this.name.hashCode(); + } + + + + public boolean equals(Object obj) + { + if(obj==null) + { + return false; + } + + if(obj instanceof MElement) + { + MElement mk=(MElement)obj; + + return (this.name).equalsIgnoreCase(mk.name); + } + return false; + } + + + public String toString() { + return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n"; +} +} + From senger at pub.open-bio.org Sun Nov 20 12:30:53 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:53 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqlt005398@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/webapps In directory pub.open-bio.org:/tmp/cvs-serv4966/src/webapps Modified Files: deploy.bat Log Message: moby-live/Java/src/webapps deploy.bat,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/webapps/deploy.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/webapps/deploy.bat 2005/09/22 07:55:44 1.1 +++ /home/repository/moby/moby-live/Java/src/webapps/deploy.bat 2005/11/20 12:30:52 1.2 @@ -1,33 +1,33 @@ - at echo off -REM $Id$ - -REM Set-up JAVA_HOME -REM ---------------- - -if NOT "%JAVA_HOME%"=="" goto javadone -echo ======================================================= -echo Setup the JAVA_HOME environment variable. -echo Hint (for XP): Click Start -- Control Panel -- System. -echo Then click Advanced, then click "Environment Variables". -echo ======================================================== -goto end -:javadone - -REM Set-up ANT_HOME -REM --------------- -set ANT_HOME=ant_home - -REM Put Ant libraries in CLASSPATH -REM ------------------------------ -set CP= -for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i -set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" - -REM Call Ant -REM -------- -set "JAVA=%JAVA_HOME%\bin\java" -%JAVA% -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml - -:end - - + at echo off +REM $Id$ + +REM Set-up JAVA_HOME +REM ---------------- + +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + +REM Set-up ANT_HOME +REM --------------- +set ANT_HOME=ant_home + +REM Put Ant libraries in CLASSPATH +REM ------------------------------ +set CP= +for %%i in (%ANT_HOME%\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" + +REM Call Ant +REM -------- +set "JAVA=%JAVA_HOME%\bin\java" +%JAVA% -classpath "%CP%" -Dant.home=%ANT_HOME% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -buildfile build.xml + +:end + + From senger at pub.open-bio.org Sun Nov 20 12:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqsv005334@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema/example Modified Files: BasicGFFSequenceFeature.xml DNASequence.xml DnaSequenceHolderxsd.xml Object.xml String.xml Log Message: moby-live/Java/src/main/org/biomoby/shared/schema/example BasicGFFSequenceFeature.xml,1.1,1.2 DNASequence.xml,1.1,1.2 DnaSequenceHolderxsd.xml,1.1,1.2 Object.xml,1.1,1.2 String.xml,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/BasicGFFSequenceFeature.xml,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/shared/schema/example/BasicGFFSequenceFeature.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/BasicGFFSequenceFeature.xml 2005/11/20 12:30:52 1.2 @@ -1,27 +1,27 @@ - - - - - adf - aaaa - arrr - aaaaaa - wwww - gggg - 112 - 113 - - 3.14159E0 - - - aaa - aaasss - - - asss - aaat - - - - - + + + + + adf + aaaa + arrr + aaaaaa + wwww + gggg + 112 + 113 + + 3.14159E0 + + + aaa + aaasss + + + asss + aaat + + + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DNASequence.xml,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/shared/schema/example/DNASequence.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DNASequence.xml 2005/11/20 12:30:52 1.2 @@ -6,4 +6,4 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DnaSequenceHolderxsd.xml,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/shared/schema/example/DnaSequenceHolderxsd.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/DnaSequenceHolderxsd.xml 2005/11/20 12:30:52 1.2 @@ -1,41 +1,41 @@ - - - - Generating a XML Schema for the Moby object DnaSequenceHolder. Fri Aug 12 10:25:26 PDT 2005. Eddie and Lixin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Generating a XML Schema for the Moby object DnaSequenceHolder. Fri Aug 12 10:25:26 PDT 2005. Eddie and Lixin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/Object.xml,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/shared/schema/example/Object.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/Object.xml 2005/11/20 12:30:52 1.2 @@ -1,3 +1,3 @@ - + =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/String.xml,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/shared/schema/example/String.xml 2005/08/30 18:34:11 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/example/String.xml 2005/11/20 12:30:52 1.2 @@ -1,3 +1,3 @@ this is string - + From senger at pub.open-bio.org Sun Nov 20 12:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUq4V005376@pub.open-bio.org> senger Sun Nov 20 07:30:52 EST 2005 Update of /home/repository/moby/moby-live/Java/src/support In directory pub.open-bio.org:/tmp/cvs-serv4966/src/support Modified Files: run-any-client.bat run-cache-client.bat run-cmdline-client.bat run-digest-client.bat run-graphs-client.bat run-testing-central.bat Log Message: moby-live/Java/src/support run-any-client.bat,1.1,1.2 run-cache-client.bat,1.1,1.2 run-cmdline-client.bat,1.1,1.2 run-digest-client.bat,1.1,1.2 run-graphs-client.bat,1.1,1.2 run-testing-central.bat,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-any-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-any-client.bat 2003/11/08 00:27:24 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-any-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat 2004/12/05 22:28:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-cache-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat 2003/09/25 02:35:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-cmdline-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat 2004/12/05 22:28:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-digest-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat 2003/11/08 00:27:24 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-graphs-client.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat 2003/09/25 02:35:02 1.1 +++ /home/repository/moby/moby-live/Java/src/support/run-testing-central.bat 2005/11/20 12:30:52 1.2 @@ -1,6 +1,6 @@ - at echo off - -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i - -java -classpath %CP% TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i + +java -classpath %CP% TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 From senger at pub.open-bio.org Sun Nov 20 12:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUprg005190@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/registry/rdfagent/verifier Modified Files: InpOut.java Log Message: moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier InpOut.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/InpOut.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/verifier/InpOut.java 2004/10/28 17:55:43 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/InpOut.java 2005/11/20 12:30:51 1.2 @@ -1,61 +1,61 @@ -package org.biomoby.registry.rdfagent.verifier; - -/** - * @author Nina Opushneva - * - * This class represents the model data for an input or output. - * It is a value-object and has fine-grained getter and setter - * methods. - */ - -public class InpOut { - - - String objectTypeURI; - String namespaceTypeUris; - String articleName; - int serviceInstanceId; - - public InpOut() { - } - - public InpOut( String objectTypeURI, String namespaceTypeUris, String articleName, int serviceInstanceId) { - - this.serviceInstanceId = serviceInstanceId; - this.objectTypeURI = objectTypeURI; - this.namespaceTypeUris = namespaceTypeUris; - this.articleName = articleName; - - } - - public String getObjectTypeURI() { - return objectTypeURI; - } - public void setObjectTypeURI(String objectTypeURI) { - this.objectTypeURI = objectTypeURI; - } - - public String getNamespaceTypeUris() { - return namespaceTypeUris; - } - - public void setNamespaceTypeUris(String namespaceTypeUris) { - this.namespaceTypeUris = namespaceTypeUris; - } - - public String getArticleName() { - return articleName; - } - - public void setArticleName(String articleName) { - this.articleName = articleName; - } - - public int getserviceInstanceId() { - return serviceInstanceId; - } - - public void setserviceInstanceId(int serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } -} +package org.biomoby.registry.rdfagent.verifier; + +/** + * @author Nina Opushneva + * + * This class represents the model data for an input or output. + * It is a value-object and has fine-grained getter and setter + * methods. + */ + +public class InpOut { + + + String objectTypeURI; + String namespaceTypeUris; + String articleName; + int serviceInstanceId; + + public InpOut() { + } + + public InpOut( String objectTypeURI, String namespaceTypeUris, String articleName, int serviceInstanceId) { + + this.serviceInstanceId = serviceInstanceId; + this.objectTypeURI = objectTypeURI; + this.namespaceTypeUris = namespaceTypeUris; + this.articleName = articleName; + + } + + public String getObjectTypeURI() { + return objectTypeURI; + } + public void setObjectTypeURI(String objectTypeURI) { + this.objectTypeURI = objectTypeURI; + } + + public String getNamespaceTypeUris() { + return namespaceTypeUris; + } + + public void setNamespaceTypeUris(String namespaceTypeUris) { + this.namespaceTypeUris = namespaceTypeUris; + } + + public String getArticleName() { + return articleName; + } + + public void setArticleName(String articleName) { + this.articleName = articleName; + } + + public int getserviceInstanceId() { + return serviceInstanceId; + } + + public void setserviceInstanceId(int serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } +} From senger at pub.open-bio.org Sun Nov 20 12:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpC8005171@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/client Modified Files: BaseCmdLineClient.java CentralDigestCachedImpl.java CentralImpl.java GraphsServlet.java ServicesEdge.java Log Message: moby-live/Java/src/main/org/biomoby/client BaseCmdLineClient.java,1.4,1.5 CentralDigestCachedImpl.java,1.14,1.15 CentralImpl.java,1.35,1.36 GraphsServlet.java,1.14,1.15 ServicesEdge.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java 2005/10/12 11:36:59 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/BaseCmdLineClient.java 2005/11/20 12:30:51 1.5 @@ -297,12 +297,12 @@ } } - protected MobyObject createInstance (MobyObject obj) + protected MobyObject createInstance (MobyObject mobj) throws MobyException { try { - return (MobyObject)obj.getClass().newInstance(); + return (MobyObject)mobj.getClass().newInstance(); } catch (Exception e) { - throw new MobyException ("Cannot instantiate data type '" + obj.getClass().getName() + "'."); + throw new MobyException ("Cannot instantiate data type '" + mobj.getClass().getName() + "'."); } } @@ -351,14 +351,14 @@ /************************************************************************** * *************************************************************************/ - protected boolean createChildren (MobyObject obj) + protected boolean createChildren (MobyObject mobj) throws MobyException { boolean someChildrenCreated = false; try { HashMap methodsAndArticleNames = new HashMap(); HashMap methodsAndChildTypes = new HashMap(); HashMap methodNamesAndHowManyTimes = new HashMap(); - Class myClass = obj.getClass(); + Class myClass = mobj.getClass(); Field[] fields = myClass.getFields(); for (int i = 0; i < fields.length; i++) { String fieldName = fields[i].getName(); @@ -392,20 +392,20 @@ Class childType = (Class)entry.getValue(); int count = ( ((Integer)methodNamesAndHowManyTimes.get (method.getName())).intValue() ); while (count-- > 0) { - if (createOneChild (obj, method, childType, (String)methodsAndArticleNames.get (method))) + if (createOneChild (mobj, method, childType, (String)methodsAndArticleNames.get (method))) someChildrenCreated = true; } } } else { // this is a leaf that does not have any children... - if (obj.isPrimitiveType()) { + if (mobj.isPrimitiveType()) { // ...if it is a primitive type, we may ignore it if there is no more values - return setPrimitiveValue (obj, articleName); + return setPrimitiveValue (mobj, articleName); } else { // ...if it is an Object leaf, we always keep it // but id and namespaces are here like values for // primitives so filltem - setIdAndNamespace (obj); + setIdAndNamespace (mobj); return true; } } @@ -422,12 +422,12 @@ /************************************************************************** * *************************************************************************/ - boolean createOneChild (MobyObject parent, Method setMethod, Class childType, String articleName) + boolean createOneChild (MobyObject parent, Method setMethod, Class childType, String artName) throws MobyException { try { MobyObject child = createInstance (childType); if (child.isPrimitiveType()) { - if (setPrimitiveValue (child, articleName)) { + if (setPrimitiveValue (child, artName)) { setMethod.invoke (parent, new Object[] { child }); return true; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/12 16:43:47 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15 @@ -215,7 +215,7 @@ /** - * Create a cache directory from 'cacheDir' and 'registryId' if it + * Create a cache directory from 'cacheDirectory' and 'registryId' if it * does not exist yet. Make sure that it is writable. Return a * File representing created directory. * @@ -223,11 +223,11 @@ * cache is going to be created for. If null, an endpoint of a * default Moby registry is used. */ - protected File createCacheDir (String cacheDir, String registryId) + protected File createCacheDir (String cacheDirectory, String registryId) throws MobyException { if (registryId == null || registryId.equals ("")) registryId = CentralImpl.DEFAULT_ENDPOINT; - File cache = new File (cacheDir + fileSeparator + clean (registryId)); + File cache = new File (cacheDirectory + fileSeparator + clean (registryId)); try { if (! cache.exists()) if (! cache.mkdirs()) @@ -246,11 +246,13 @@ * Remove cache and all (but given in 'subCacheDirNames') its * subdirectories. */ - protected void removeCacheDir (String cacheDir, String registryId, String[] subCacheDirNames) + protected void removeCacheDir (String cacheDirectory, + String registryId, + String[] subCacheDirNames) throws MobyException { if (registryId == null || registryId.equals ("")) registryId = CentralImpl.DEFAULT_ENDPOINT; - File cache = new File (cacheDir + fileSeparator + clean (registryId)); + File cache = new File (cacheDirectory + fileSeparator + clean (registryId)); try { if (! cache.exists()) return; if (! cache.isDirectory()) @@ -263,7 +265,8 @@ for (int f = 0; f < files.length; f++) { if (files[f].isDirectory()) throw new MobyException ("Found a directory '" + files[f].getAbsolutePath() + "' where no directory should be"); - files[f].delete(); + if (! files[f].delete()) + log.error ("Can't delete file '" + files[f] + "'."); } cacheSubDir.delete(); } @@ -673,7 +676,8 @@ if (ignored (list[i])) continue; v.addElement (createDataTypeFromXML (load (list[i]), "-dummy-")); } catch (NoSuccessException e) { - System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); + log.error (MSG_CACHE_BAD_FILE (list[i], e)); + //System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); } } MobyDataType[] result = new MobyDataType [v.size()]; @@ -736,7 +740,7 @@ v.addElement (servs[j]); } } catch (MobyException e) { - System.err.println (MSG_CACHE_BAD_FILE (list[i], e)); + log.error (MSG_CACHE_BAD_FILE (list[i], e)); } } MobyService[] result = new MobyService [v.size()]; @@ -799,6 +803,7 @@ try { types[i].setParentNames (createServiceTypeRelationshipsFromXML (load (file))); } catch (MobyException e) { + log.error (MSG_CACHE_BAD_FILE (file, e)); System.err.println (MSG_CACHE_BAD_FILE (file, e)); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/12 16:43:47 1.35 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/20 12:30:51 1.36 @@ -154,7 +154,7 @@ dbf.setNamespaceAware(true); docBuilder = dbf.newDocumentBuilder(); } catch (Exception e) { - throw new MobyException ("Could not configure an XML parser: " + e); + throw new MobyException ("Could not configure an XML parser: " + e, e); } cache = new Hashtable(); @@ -241,7 +241,7 @@ try { document=docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } Element root = document.getDocumentElement(); @@ -465,12 +465,13 @@ *************************************************************************/ public MobyService[] extractServices (String xml) throws MobyException { - +// if (xmk == null) +// throw new MobyException () Document document = null; try { document = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Service"); @@ -677,7 +678,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceName"); @@ -723,7 +724,7 @@ try { document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); } catch (Exception e) { - throw new MobyException (e.toString()); + throw new MobyException (e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceName"); @@ -774,7 +775,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("serviceProvider"); @@ -832,7 +833,8 @@ Document document = null; try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e); + } NodeList list = document.getElementsByTagName ("serviceType"); if (list == null || list.getLength() == 0) @@ -888,7 +890,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getDocumentElement().getElementsByTagName ("Namespace"); @@ -960,7 +962,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Object"); @@ -1027,7 +1029,7 @@ try { document = docBuilder.parse(new ByteArrayInputStream (xmlSource.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("retrieveObjectDefinition"); @@ -1135,7 +1137,7 @@ // parse returned XML Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} Element service = document.getDocumentElement(); Node wsdl = service.getFirstChild(); @@ -1555,7 +1557,7 @@ Vector v = new Vector(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { @@ -1611,7 +1613,7 @@ Map results = new HashMap(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); @@ -1668,7 +1670,7 @@ Vector v = new Vector(); Document document = null; try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString());} + catch(Exception e){throw new MobyException(e.toString(), e);} NodeList list = document.getElementsByTagName ("Relationship"); @@ -1732,7 +1734,7 @@ try { document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); } catch (Exception e) { - throw new MobyException(e.toString()); + throw new MobyException(e.toString(), e); } NodeList list = document.getElementsByTagName ("Resource"); @@ -1771,7 +1773,7 @@ try { return url.openStream(); } catch (java.io.IOException e2) { - throw new MobyException (e2.toString()); + throw new MobyException (e2.toString(), e2); } } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/06 16:47:10 1.14 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/GraphsServlet.java 2005/11/20 12:30:51 1.15 @@ -1759,11 +1759,11 @@ * cached files starting from CACHE_DIR directory, otherwise we * store them inside this servlet context on the 'contextPath'. ********************************************************************/ - protected SimpleFileCache initCache (ServletContext context, + protected SimpleFileCache initCache (ServletContext sContext, String contextPath) { String cacheDir = (String)initParams.get (CACHE_DIR); if (UUtils.isEmpty (cacheDir)) { - return new ServletFileCache (context, contextPath); + return new ServletFileCache (sContext, contextPath); } else { String cacheURL = (String)initParams.get (CACHE_URL); return new FileCache (cacheDir, cacheURL); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java 2005/07/19 12:39:59 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServicesEdge.java 2005/11/20 12:30:51 1.7 @@ -219,9 +219,9 @@ /************************************************************************* * Checks if the given connection type is known. *************************************************************************/ - private boolean checkConnectionType (int connectionType) { - return (connectionType >= MIN_CONNECTION_TYPE && - connectionType <= MAX_CONNECTION_TYPE); + private boolean checkConnectionType (int conType) { + return (conType >= MIN_CONNECTION_TYPE && + conType <= MAX_CONNECTION_TYPE); } } From senger at pub.open-bio.org Sun Nov 20 12:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUpPB005131@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv4966/src/config Modified Files: RDFagent_config.xml run-any-client.bat run-cache-client.bat run-cmdline-client.bat run-dashboard run-dashboard.bat run-digest-client.bat run-generator.bat run-graphs-client.bat run-moby-parser.bat run-service.bat run-testing-central.bat Log Message: moby-live/Java/src/config RDFagent_config.xml,1.1,1.2 run-any-client.bat,1.5,1.6 run-cache-client.bat,1.3,1.4 run-cmdline-client.bat,1.4,1.5 run-dashboard,1.2,1.3 run-dashboard.bat,1.3,1.4 run-digest-client.bat,1.3,1.4 run-generator.bat,1.3,1.4 run-graphs-client.bat,1.3,1.4 run-moby-parser.bat,1.3,1.4 run-service.bat,1.3,1.4 run-testing-central.bat,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml 2004/10/28 17:54:02 1.1 +++ /home/repository/moby/moby-live/Java/src/config/RDFagent_config.xml 2005/11/20 12:30:51 1.2 @@ -1,32 +1,33 @@ - + - - - mwilkinson at mrl.ubc.ca - RDFagent warning - - mail.cbr.nrc.ca - - - rdf_agent at cbr.nrc.ca - - - RDFagent warning - Connect was refused with HTTP code - - - - com.mysql.jdbc.Driver - jdbc:mysql://localhost/mobycentral - mobycentral - moby - moby - 3306 - - /RDFagent.log - /RDFagent_report - /RDFagent_delServices - /RDFagent_signURLlist - 3 - + + + mwilkinson at mrl.ubc.ca + RDFagent warning + + mail.cbr.nrc.ca + + + rdf_agent at cbr.nrc.ca + + + RDFagent warning + Connect was refused with HTTP code + + + + com.mysql.jdbc.Driver + jdbc:mysql://localhost/mobycentral + mobycentral + moby + moby + 3306 + + /RDFagent.log + /RDFagent_report + /RDFagent_delServices + /RDFagent_signURLlist + 3 + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/09/21 05:26:18 1.5 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/20 12:30:51 1.6 @@ -1,13 +1,14 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% - -java -classpath "%CP%" %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% + +java -classpath "%CP%" %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-cache-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" CacheRegistryClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" CacheRegistryClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat 2005/09/21 05:26:18 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-cmdline-client.bat 2005/11/20 12:30:51 1.5 @@ -7,4 +7,4 @@ set CP=build\classes;%CP% set CP=build\Clients;%CP% -java -classpath "%CP%" MobyCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 +java -classpath "%CP%" MobyCmdLineClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/09/21 06:13:28 1.2 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/20 12:30:51 1.3 @@ -14,5 +14,6 @@ CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/09/21 06:13:28 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/20 12:30:51 1.4 @@ -1,14 +1,15 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% -set CP=build\lib\dashboard-config.jar;%CP% - -java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% +set CP=build\lib\dashboard-config.jar;%CP% + +java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-digest-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" MobyDigestClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" MobyDigestClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-generator.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-generator.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-generator.bat 2005/11/20 12:30:51 1.4 @@ -1,12 +1,12 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% - -java -classpath "%CP%" MosesGenerators %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% + +java -classpath "%CP%" MosesGenerators %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-graphs-client.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" MobyGraphs %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" MobyGraphs %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-moby-parser.bat 2005/11/20 12:30:51 1.4 @@ -1,11 +1,11 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% - -java -classpath "%CP%" TestingMobyParser %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% + +java -classpath "%CP%" TestingMobyParser %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-service.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-service.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-service.bat 2005/11/20 12:30:51 1.4 @@ -1,13 +1,13 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% -set CP=build\others\datatypes;%CP% -set CP=build\others\skeletons;%CP% -set CP=build\others\samples;%CP% - -java -classpath "%CP%" org.biomoby.client.BaseCmdLineClient %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% +set CP=build\others\datatypes;%CP% +set CP=build\others\skeletons;%CP% +set CP=build\others\samples;%CP% + +java -classpath "%CP%" org.biomoby.client.BaseCmdLineClient %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat 2005/09/21 05:26:18 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-testing-central.bat 2005/11/20 12:30:51 1.4 @@ -1,10 +1,10 @@ - at echo off - -set "PROJECT_HOME=@PROJECT_HOME@" -cd "%PROJECT_HOME%" -set CP= -for %%i in (lib\*.jar) do call cp.bat %%i -set CP=build\classes;%CP% -set CP=build\Clients;%CP% - -java -classpath "%CP%" TestingCentral %1 %2 %3 %4 %5 %6 %7 %8 %9 + at echo off + +set "PROJECT_HOME=@PROJECT_HOME@" +cd "%PROJECT_HOME%" +set CP= +for %%i in (lib\*.jar) do call cp.bat %%i +set CP=build\classes;%CP% +set CP=build\Clients;%CP% + +java -classpath "%CP%" TestingCentral %* From senger at pub.open-bio.org Sun Nov 20 12:30:51 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:51 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUp0g005060@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv4966/src/Clients Modified Files: CacheRegistryClient.java TestAntWorker.java Log Message: moby-live/Java/src/Clients CacheRegistryClient.java,1.7,1.8 TestAntWorker.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/10 08:54:31 1.7 +++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/11/20 12:30:51 1.8 @@ -16,8 +16,6 @@ import org.tulsoft.shared.FileUtils; import org.tulsoft.shared.GException; -import java.util.*; - /** * This is a command-line client creating (and removing) a cache of a * Moby registry. It allows to store locally (in a file system) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/16 08:39:48 1.1 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 12:30:51 1.2 @@ -12,16 +12,13 @@ import org.tulsoft.tools.gui.SwingUtils; -import org.apache.tools.ant.DefaultLogger; import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.ExitException; import org.apache.tools.ant.NoBannerLogger; import javax.swing.JFrame; import javax.swing.SwingUtilities; -import java.awt.Dimension; import java.util.Properties; import java.io.PrintStream; import java.io.OutputStream; From senger at pub.open-bio.org Sun Nov 20 12:30:52 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:52 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUqB9005279@pub.open-bio.org> senger Sun Nov 20 07:30:51 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/service/dashboard Modified Files: CommonBoard.java CommonDataTable.java CommonTree.java Dashboard.java DataTypesBoard.java DataTypesTree.java DebuggingPanel.java GeneratorPanel.java NamespacesBoard.java NamespacesTree.java PrimaryDataTable.java PropertyChannel.java RegistryPanel.java ServiceTypesBoard.java ServiceTypesTree.java ServicesBoard.java ServicesTree.java Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard CommonBoard.java,1.6,1.7 CommonDataTable.java,1.4,1.5 CommonTree.java,1.18,1.19 Dashboard.java,1.17,1.18 DataTypesBoard.java,1.10,1.11 DataTypesTree.java,1.12,1.13 DebuggingPanel.java,1.3,1.4 GeneratorPanel.java,1.4,1.5 NamespacesBoard.java,1.5,1.6 NamespacesTree.java,1.7,1.8 PrimaryDataTable.java,1.4,1.5 PropertyChannel.java,1.8,1.9 RegistryPanel.java,1.24,1.25 ServiceTypesBoard.java,1.6,1.7 ServiceTypesTree.java,1.9,1.10 ServicesBoard.java,1.6,1.7 ServicesTree.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java 2005/11/07 17:14:46 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonBoard.java 2005/11/20 12:30:51 1.7 @@ -42,8 +42,8 @@ extends JPanel implements NotificationListener { - private static org.apache.commons.logging.Log log = - org.apache.commons.logging.LogFactory.getLog (CommonBoard.class); +// private static org.apache.commons.logging.Log log = +// org.apache.commons.logging.LogFactory.getLog (CommonBoard.class); protected RegistryModel model; protected PropertyChannel channel; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/10 14:32:42 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonDataTable.java 2005/11/20 12:30:51 1.5 @@ -227,7 +227,6 @@ public void setData (MobyData[] newData) { synchronized (this) { int rowCount = getRowCount(); - int colCount = getColumnCount(); for (int i = 0; i < rowCount; i++) removeRow (i); for (int i = 0; i < newData.length; i++) =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/19 18:33:01 1.18 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/CommonTree.java 2005/11/20 12:30:51 1.19 @@ -156,17 +156,17 @@ public Component getTreeCellRendererComponent (JTree tree, java.lang.Object value, - boolean selected, + boolean isSelected, boolean expanded, boolean leaf, int row, - boolean hasFocus) { + boolean hasAFocus) { // // I will reuse the default rendering done by my parent, // except the change of an icon (for naming contexts) // - Component c = super.getTreeCellRendererComponent (tree, value, selected, - expanded, leaf, row, hasFocus); + Component c = super.getTreeCellRendererComponent (tree, value, isSelected, + expanded, leaf, row, hasAFocus); // add a tool-tip for the root node if (row == 0) { setToolTipText ("Right-click will show other options"); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/19 18:33:01 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/Dashboard.java 2005/11/20 12:30:51 1.18 @@ -143,6 +143,7 @@ * creates the GUI - but does not show it yet. **************************************************************************/ public Dashboard() { + log.debug ("----------------------- new dashboard start ------------------------"); loadIcons(); loadPanels(); propertyChannel = new PropertyChannel(); @@ -251,13 +252,10 @@ getName()); addMenuBar (frame); - Dimension screenSize = frame.getToolkit().getScreenSize(); - double myWidth = Math.min (screenSize.getWidth(), 1100); - double myHeight = Math.min (screenSize.getHeight() - 25, 900); - Dimension mySize = new Dimension(); - mySize.setSize (myWidth, myHeight); - - SwingUtils.showMainFrame (frame, mySize); + Dimension screenSize = frame.getToolkit().getScreenSize(); + int width = screenSize.width * 4 / 5; + int height = screenSize.height * 5 / 6; + SwingUtils.showMainFrame (frame, width, height); } /************************************************************************** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/12 16:43:47 1.10 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesBoard.java 2005/11/20 12:30:51 1.11 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.DATA_TYPES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_DATA_TYPES); insertProgressBar(); break; case Notifier.DATA_TYPES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.DATA_TYPES_END: case Notifier.DATA_TYPES_CANCELLED: case Notifier.DATA_TYPES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.DATA_TYPES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // some other instance of this class initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/12 16:43:47 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DataTypesTree.java 2005/11/20 12:30:51 1.13 @@ -49,11 +49,9 @@ RegistryModel registryModel; CommonConsole console; - MobyDataType[] dataTypes = null; boolean showBadGuys = false; boolean showMembers = false; JCheckBoxMenuItem deprecatedBox; - MobyException updateException = null; final static String DATA_TYPES_ACCESS_ERROR = "An error happened when accessing a list of available data types.\n\n" @@ -110,33 +108,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyDataType[] newDataTypes = (newData == null ? null : (MobyDataType[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyDataType[] dataTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newDataTypes); // get data types (unless you already have them) if (newDataTypes == null) { - log.debug ("Asking registry model to update"); dataTypes = registryModel.getDataTypes (source); } else { dataTypes = newDataTypes; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (dataTypes, MobyDataType.getAuthorityComparator()); - else - java.util.Arrays.sort (dataTypes); - } catch (MobyException e) { updateException = e; } @@ -165,7 +158,10 @@ worker.start(); } - void onUpdateDataTree (MobyDataType[] dataTypes) { + void onUpdateDataTree (MobyDataType[] theDataTypes) { + MobyDataType[] dataTypes = copy (theDataTypes); + java.util.Arrays.sort (dataTypes); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -199,8 +195,11 @@ } - void onUpdateDataTreeByAuth (MobyDataType[] dataTypes) { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + void onUpdateDataTreeByAuth (MobyDataType[] theDataTypes) { + MobyDataType[] dataTypes = copy (theDataTypes); + java.util.Arrays.sort (dataTypes, MobyDataType.getAuthorityComparator()); + + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist HashMap nodes = new HashMap (dataTypes.length); @@ -268,6 +267,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyDataType[] copy (MobyDataType[] s) { + synchronized (s) { + MobyDataType[] result = new MobyDataType [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/19 18:33:01 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DebuggingPanel.java 2005/11/20 12:30:51 1.4 @@ -14,7 +14,6 @@ import javax.swing.JLabel; import javax.swing.JButton; import javax.swing.JTextField; -import javax.swing.Icon; import javax.swing.JComponent; import java.awt.GridBagLayout; @@ -42,8 +41,8 @@ /************************************************************************** * **************************************************************************/ - public JComponent getComponent (PropertyChannel propertyChannel) { - setPropertyChannel (propertyChannel); + public JComponent getComponent (PropertyChannel newPropertyChannel) { + setPropertyChannel (newPropertyChannel); JPanel p = new JPanel (new GridBagLayout(), true); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/19 18:33:01 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/20 12:30:51 1.5 @@ -9,11 +9,9 @@ package org.biomoby.service.dashboard; import org.tulsoft.tools.gui.SwingUtils; -import org.tulsoft.tools.gui.JTextFieldWithHistory; import org.tulsoft.tools.gui.JFileChooserWithHistory; import org.biomoby.shared.MobyException; -import org.biomoby.shared.event.Notifier; import javax.swing.JPanel; import javax.swing.JLabel; @@ -23,7 +21,6 @@ import javax.swing.JRadioButton; import javax.swing.ButtonGroup; import javax.swing.JCheckBox; -import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.swing.JSplitPane; import javax.swing.JComponent; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/12 16:43:47 1.5 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesBoard.java 2005/11/20 12:30:51 1.6 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.NAMESPACES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_NAMESPACES); insertProgressBar(); break; case Notifier.NAMESPACES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.NAMESPACES_END: case Notifier.NAMESPACES_CANCELLED: case Notifier.NAMESPACES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.NAMESPACES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/12 16:43:47 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NamespacesTree.java 2005/11/20 12:30:51 1.8 @@ -36,9 +36,6 @@ RegistryModel registryModel; CommonConsole console; - MobyNamespace[] namespaces = null; - MobyException updateException = null; - final static String NAMESPACES_ACCESS_ERROR = "An error happened when accessing a list of available namespaces.\n\n" + ACCESS_ERROR_INTRO; @@ -69,33 +66,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyNamespace[] newNamespaces = (newData == null ? null : (MobyNamespace[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyNamespace[] namespaces = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newNamespaces); // get namespaces (unless you already have them) if (newNamespaces == null) { - log.debug ("Asking registry model to update"); namespaces = registryModel.getNamespaces (source); } else { namespaces = newNamespaces; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (namespaces, MobyNamespace.getAuthorityComparator()); - else - java.util.Arrays.sort (namespaces); - } catch (MobyException e) { updateException = e; } @@ -119,7 +111,10 @@ worker.start(); } - void onUpdateNamespacesTree (MobyNamespace[] namespaces) { + void onUpdateNamespacesTree (MobyNamespace[] theNamespaces) { + MobyNamespace[] namespaces = copy (theNamespaces); + java.util.Arrays.sort (namespaces); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -131,7 +126,10 @@ } - void onUpdateNamespacesTreeByAuth (MobyNamespace[] namespaces) { + void onUpdateNamespacesTreeByAuth (MobyNamespace[] theNamespaces) { + MobyNamespace[] namespaces = copy (theNamespaces); + java.util.Arrays.sort (namespaces, MobyNamespace.getAuthorityComparator()); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -158,6 +156,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyNamespace[] copy (MobyNamespace[] s) { + synchronized (s) { + MobyNamespace[] result = new MobyNamespace [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/11 08:34:39 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PrimaryDataTable.java 2005/11/20 12:30:51 1.5 @@ -165,15 +165,15 @@ return null; } - public Component getTableCellEditorComponent (JTable table, + public Component getTableCellEditorComponent (JTable aTable, Object value, boolean isSelected, - int row, int col) { + int aRow, int aCol) { // remember (used when a namespace is being deleted) - this.table = table; - this.row = row; - this.col = col; + this.table = aTable; + this.row = aRow; + this.col = aCol; // fill combo box with the current namespaces if (value == null) { @@ -288,9 +288,9 @@ return ""; } - private String getDataTypeName (MobyPrimaryData data) { - if (data == null) return ""; - MobyDataType dataType = data.getDataType(); + private String getDataTypeName (MobyPrimaryData theData) { + if (theData == null) return ""; + MobyDataType dataType = theData.getDataType(); if (dataType == null) return ""; String name = dataType.getName(); return (name == null ? "" : name); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/16 08:39:48 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PropertyChannel.java 2005/11/20 12:30:51 1.9 @@ -185,6 +185,8 @@ ********************************************************************/ protected void logDebug (Object source, String key, Object value) { + if (DashboardProperties.DP_STATUS_MSG.equals (key)) + return; StringBuffer buf = new StringBuffer (100); if (source != null) { buf.append ("["); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/19 18:33:01 1.24 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/11/20 12:30:51 1.25 @@ -13,7 +13,6 @@ import org.tulsoft.tools.gui.JFileChooserWithHistory; import org.biomoby.shared.MobyException; -import org.biomoby.shared.event.Notifier; import javax.swing.JPanel; import javax.swing.JLabel; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesBoard.java 2005/11/20 12:30:51 1.7 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.SERVICE_TYPES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_SERVICE_TYPES); insertProgressBar(); break; case Notifier.SERVICE_TYPES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.SERVICE_TYPES_END: case Notifier.SERVICE_TYPES_CANCELLED: case Notifier.SERVICE_TYPES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.SERVICE_TYPES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/12 16:43:47 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServiceTypesTree.java 2005/11/20 12:30:51 1.10 @@ -36,9 +36,6 @@ RegistryModel registryModel; CommonConsole console; - MobyServiceType[] serviceTypes = null; - MobyException updateException = null; - final static String SERVICE_TYPES_ACCESS_ERROR = "An error happened when accessing a list of available service types.\n\n" + ACCESS_ERROR_INTRO; @@ -69,33 +66,28 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyServiceType[] newServiceTypes = (newData == null ? null : (MobyServiceType[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyServiceType[] serviceTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newServiceTypes); // get service types (unless you already have them) if (newServiceTypes == null) { - log.debug ("Asking registry model to update"); serviceTypes = registryModel.getServiceTypes (source); } else { serviceTypes = newServiceTypes; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (serviceTypes, MobyServiceType.getAuthorityComparator()); - else - java.util.Arrays.sort (serviceTypes); - } catch (MobyException e) { updateException = e; } @@ -119,7 +111,10 @@ worker.start(); } - void onUpdateServiceTypesTree (MobyServiceType[] serviceTypes) { + void onUpdateServiceTypesTree (MobyServiceType[] theServiceTypes) { + MobyServiceType[] serviceTypes = copy (theServiceTypes); + java.util.Arrays.sort (serviceTypes); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -148,7 +143,10 @@ } - void onUpdateServiceTypesTreeByAuth (MobyServiceType[] serviceTypes) { + void onUpdateServiceTypesTreeByAuth (MobyServiceType[] theServiceTypes) { + MobyServiceType[] serviceTypes = copy (theServiceTypes); + java.util.Arrays.sort (serviceTypes, MobyServiceType.getAuthorityComparator()); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -175,6 +173,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyServiceType[] copy (MobyServiceType[] s) { + synchronized (s) { + MobyServiceType[] result = new MobyServiceType [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry (or from the current * cache). If you want to update also cache, use the cache buttons * - they will invoke this method also after updating the cache. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesBoard.java 2005/11/20 12:30:51 1.7 @@ -72,10 +72,14 @@ Object initiator; switch (event.getType()) { case Notifier.AUTHORITIES_START: + if (log.isDebugEnabled()) + log.debug (event.toString()); createProgressBar (Notifier.SIGNAL_CANCEL_SERVICES); insertProgressBar(); break; case Notifier.AUTHORITIES_COUNT: + if (log.isDebugEnabled()) + log.debug (event.toString()); if (event.getMessage() instanceof Integer) calibrateProgressBar ( ((Integer)event.getMessage()).intValue() ); break; @@ -88,12 +92,16 @@ case Notifier.AUTHORITIES_END: case Notifier.AUTHORITIES_CANCELLED: case Notifier.AUTHORITIES_RESET: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree == initiator) channel.fire (this, DashboardProperties.DP_STATUS_MSG, "Done"); removeProgressBar(); break; case Notifier.AUTHORITIES_UPDATED: + if (log.isDebugEnabled()) + log.debug (event.toString()); initiator = event.getSource(); if (tree != initiator) { // someone else (of this instance) initiated request =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/12 16:43:47 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/ServicesTree.java 2005/11/20 12:30:51 1.7 @@ -51,11 +51,6 @@ RegistryModel registryModel; CommonConsole console; - MobyService[] services = null; - MobyServiceType[] serviceTypes = null; - MobyDataType[] dataTypes = null; - MobyException updateException = null; - final static String SERVICES_ACCESS_ERROR = "An error happened when accessing a list of available services.\n\n" + ACCESS_ERROR_INTRO; @@ -104,33 +99,30 @@ ********************************************************************/ public void update (int howSorted, Object newData) { if (howSorted < 0) howSorted = lastSorted; - + lastSorted = howSorted; + setEnabledPopup (false); - updateException = null; final Object source = this; final int sorted = howSorted; final MobyService[] newServices = (newData == null ? null : (MobyService[])newData); final SwingWorker worker = new SwingWorker() { + MobyException updateException = null; + MobyService[] services = null; + MobyServiceType[] serviceTypes = null; + MobyDataType[] dataTypes = null; public Object construct() { try { - log.debug ("Tree updating started"); + if (log.isDebugEnabled()) + log.debug ("Tree update request. Sorted: " + sorted + ", Data: " + newServices); // get services (unless you already have them) if (newServices == null) { - log.debug ("Asking registry model to update"); services = registryModel.getServices (source); } else { services = newServices; } - // ...and sort them accordingly - if (sorted == SORTED_BY_AUTHORITY) - java.util.Arrays.sort - (services, MobyService.getAuthorityComparator()); - else - java.util.Arrays.sort (services); - // ...and perhaps add some other types if (sorted == SORTED_BY_SERVICE_TYPE) serviceTypes = registryModel.getServiceTypes (source); @@ -169,7 +161,10 @@ worker.start(); } - void onUpdateServicesTree (MobyService[] services) { + void onUpdateServicesTree (MobyService[] theServices) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -194,8 +189,11 @@ } - void onUpdateServicesTreeByAuth (MobyService[] services) { - DefaultTreeModel tModel = (DefaultTreeModel)getModel(); + void onUpdateServicesTreeByAuth (MobyService[] theServices) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services, MobyService.getAuthorityComparator()); + + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist HashMap nodes = new HashMap (services.length); @@ -220,8 +218,11 @@ tModel.reload(); } - void onUpdateServicesTreeByType (MobyService[] services, + void onUpdateServicesTreeByType (MobyService[] theServices, MobyServiceType[] serviceTypes) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -283,9 +284,12 @@ tModel.reload(); } - void onUpdateServicesTreeByData (MobyService[] services, + void onUpdateServicesTreeByData (MobyService[] theServices, MobyDataType[] dataTypes, int whatData) { + MobyService[] services = copy (theServices); + java.util.Arrays.sort (services); + DefaultTreeModel tModel = (DefaultTreeModel)getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)tModel.getRoot(); root.removeAllChildren(); // does not harm if no children exist @@ -361,6 +365,17 @@ } /********************************************************************* + * Make a private copy (of pointers) that will be used for sorting... + ********************************************************************/ + private MobyService[] copy (MobyService[] s) { + synchronized (s) { + MobyService[] result = new MobyService [s.length]; + System.arraycopy (s, 0, result, 0, s.length); + return result; + } + } + + /********************************************************************* * Reload the tree from the Biomoby registry, ignoring (and * updating) cache. ********************************************************************/ From senger at pub.open-bio.org Sun Nov 20 12:30:50 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 07:30:50 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201230.jAKCUoil005016@pub.open-bio.org> senger Sun Nov 20 07:30:50 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv4966/docs Modified Files: EclipseAndJMoby.html WindowsAndJMoby.html Log Message: moby-live/Java/docs EclipseAndJMoby.html,1.6,1.7 WindowsAndJMoby.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2005/09/21 07:56:55 1.6 +++ /home/repository/moby/moby-live/Java/docs/EclipseAndJMoby.html 2005/11/20 12:30:50 1.7 @@ -29,7 +29,7 @@ Because it was painful (I have yet to find a good reference guide for Eclipse) I would like to share my experiences here. Please feel free to add there yours, or correct my observations. Also, there are "more -ways to do" things in Eclipse (but not as many as in Perl ) so the steps described below may not represent the only way, and I do not claim that are the most efficient - but TGT (The Good Thing) is that they work.

    @@ -144,9 +144,7 @@

    Create a new project

    File -> New -> Project. Select Java -> Java Project. I could not find what is the -difference between selecting Java Project and Java -> -Java project. I always used the latter one.

    +class="step">Java -> Java Project.

    Type a project name (I use jMoby), check Create project from existing source, and type the @@ -188,17 +186,11 @@ We are doing this step now, before telling Eclipse where the libraries are (because we first need to have them in order to show them to -Eclipse, don't we?). But Eclipse already found some 3rd-party -libraries in jMoby and listed them in our project. These are, however, -from the included Ant, and we do not need them on the CLASSPATH when -we execute our programs. So remove them (before they mixed together -with the real 3rd-party libraries that we are going to add in a -minute): Right-click on the project name: (jMoby) --> Properties -> Java Build Path. Select tab Libraries, and remove from there everything except -JRE System Library.

    +Eclipse, don't we?). Eclipse already found some 3rd-party libraries in +jMoby and listed them in our project. These are from the included Ant +(they were not needed for jMoby programs until recently).

    -Then, it's time for our real libraries. Open an Ant view by Window -> Show View -> Ant. Then right-click and select Add Buildfiles. Select build.xml from jMoby. You can Hide @@ -377,7 +369,7 @@

    Martin Senger
    -Last modified: Wed Sep 21 15:07:18 2005 +Last modified: Sun Nov 20 19:53:57 2005
    =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html 2005/09/21 07:56:55 1.1 +++ /home/repository/moby/moby-live/Java/docs/WindowsAndJMoby.html 2005/11/20 12:30:50 1.2 @@ -139,6 +139,26 @@

    Too many command-line parameters

    +Update (November 2005): +
    + +I found that Windows actually understand a similar construct as UNIX +does: %* which is substituted with all arguments from the +command line: + +
    + at echo off
    +java Program %*
    +
    + +Therefore, this section would not be needed. But, as stated below, to +have a way how to use often used subset of command-line arguments from +a file is useful on its own, so I keep this section here.

    + +

    +End of Update

    + + I still know only how to pass maximum nine parameters to a Windows batch script (does anybody knows how to pass more?): @@ -240,7 +260,7 @@

    Martin Senger
    -Last modified: Wed Sep 21 16:47:24 2005 +Last modified: Sun Nov 20 20:05:06 2005
    From mwilkinson at pub.open-bio.org Sun Nov 20 15:45:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 10:45:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201545.jAKFjaCs005829@pub.open-bio.org> mwilkinson Sun Nov 20 10:45:35 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby In directory pub.open-bio.org:/tmp/cvs-serv5810/MOBY/Adaptor/moby Modified Files: queryapi.pm Log Message: added lsid retrieval to adaptor for getServiceNames call moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/08/31 22:28:22 1.30 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/11/20 15:45:35 1.31 @@ -50,12 +50,12 @@ =head2 new Title : new - Usage : my $MOBY = MOBY::Client::Central->new(Registries => \%regrefs) + Usage : my $MOBY = MOBY::Client::Central->new(%args) Function : connect to one or more MOBY-Central registries for searching Returns : MOBY::Client::Central object - Args : Registries - optional. - Notes : Each registry must have a different + Args : + Notes : =cut @@ -223,7 +223,7 @@ Title : driver Usage : my $un = $API->driver($arg) - Function : get/set string name of driver module (e.g. DBD::mySQL) + Function : get/set string name of DSI driver module (e.g. DBI:mySQL) Returns : String (driver) Args : String (driver) - optional. @@ -340,7 +340,6 @@ =cut - sub delete_collection_input{ die "delete_collection_input not implemented in adaptor\n"; } @@ -412,6 +411,7 @@ # # simple_output table functions # + =head2 query_simple_input Title : query_simple_input @@ -467,7 +467,6 @@ =cut - sub delete_simple_input{ die "delete_simple_input not implemented in adaptor\n"; } From mwilkinson at pub.open-bio.org Sun Nov 20 15:45:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 10:45:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201545.jAKFjaq1005848@pub.open-bio.org> mwilkinson Sun Nov 20 10:45:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi In directory pub.open-bio.org:/tmp/cvs-serv5810/MOBY/Adaptor/moby/queryapi Modified Files: mysql.pm Log Message: added lsid retrieval to adaptor for getServiceNames call moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.74,1.75 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/09/22 16:23:13 1.74 +++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/11/20 15:45:35 1.75 @@ -1260,7 +1260,7 @@ sub get_service_names{ my ($self, %args) = @_; my $dbh = $self->dbh; - my $statement = "select authority_uri, servicename from authority as a, service_instance as s where s.authority_id = a.authority_id"; + my $statement = "select authority_uri, servicename, lsid from authority as a, service_instance as s where s.authority_id = a.authority_id"; my @bindvalues = (); my $result = do_query($dbh, $statement, @bindvalues); From mwilkinson at pub.open-bio.org Sun Nov 20 16:05:05 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 11:05:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201605.jAKG55Ee005989@pub.open-bio.org> mwilkinson Sun Nov 20 11:05:05 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv5966/t Modified Files: Client-Central.t Client-Service.t Log Message: added lsid retrieval test for getServiceNames to teh test harness, also trying to figure out why client::service is failing tests moby-live/Perl/t Client-Central.t,1.42,1.43 Client-Service.t,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/09/16 16:36:39 1.42 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/20 16:05:05 1.43 @@ -475,6 +475,13 @@ ok(grep(/mysecondservice/, @serviceNames), "'mysecondservice' not found") or diag("retrieveServiceNames didn't return mysecondservice"); +$r = $C->retrieveServiceNames(as_lsid=>1); +isa_ok($r, "HASH", "Service Names Hash") or diag("retrieveServiceNames as lsid didn't return a hashref") ; +isa_ok($r->{$RegSmpl{authURI}}, 'ARRAY') or diag("retrieveServiceNames as lsid didn't return a hasref of arrayrefs"); +my @serviceNamesLSID = @{$r->{$RegSmpl{authURI}}}; +ok(grep(/urn\:lsid/, @serviceNamesLSID), "'myfirstservice' lsid not found") + or diag("retrieveServiceNames as LSID didn't return LSIDs"); + $r = $C->deregisterService( serviceName => $RegSmpl{serviceName}, authURI => $RegSmpl{authURI} ); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/09/16 16:38:47 1.5 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:05:05 1.6 @@ -37,7 +37,9 @@ my ($s, $r) = $C->findService( authURI => 'www.illuminae.com', name => 'getDragonLocusAlleles' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); +ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); my $wsdl = $C->retrieveService($$s[0]); +ok($wsdl =~ /WSDL/) or diag("retrieveService didn't return a WSDL file"); $service = MOBY::Client::Service->new (service => $wsdl); isa_ok($service, "MOBY::Client::Service") or diag("Expected new to return MOBY::Client::Service"); From mwilkinson at pub.open-bio.org Sun Nov 20 16:13:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 11:13:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201613.jAKGDNOt006068@pub.open-bio.org> mwilkinson Sun Nov 20 11:13:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv6049/MOBY/Client Modified Files: Central.pm Log Message: figured out why perl client code wasn't returning LSIDs moby-live/Perl/MOBY/Client Central.pm,1.126,1.127 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v retrieving revision 1.126 retrieving revision 1.127 diff -u -r1.126 -r1.127 --- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/09/27 16:21:04 1.126 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/20 16:13:23 1.127 @@ -1302,7 +1302,7 @@ =cut sub retrieveServiceNames { - my ($self, %args) = shift; + my ($self, %args) = @_; my $reg = $args{registry}; my $aslsid = $args{as_lsid}; From mwilkinson at pub.open-bio.org Sun Nov 20 16:15:30 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Sun, 20 Nov 2005 11:15:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201615.jAKGFUuH006134@pub.open-bio.org> mwilkinson Sun Nov 20 11:15:30 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv6115/t Modified Files: Client-Service.t Log Message: fixed test for client::service moby-live/Perl/t Client-Service.t,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:05:05 1.6 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:15:30 1.7 @@ -34,7 +34,7 @@ # Find a service at MOBY Central, try to create a local instance. my $C = MOBY::Client::Central->new(); -my ($s, $r) = $C->findService( authURI => 'www.illuminae.com', +my ($s, $r) = $C->findService( authURI => 'bioinfo.icapture.ubc.ca', name => 'getDragonLocusAlleles' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); From senger at pub.open-bio.org Sun Nov 20 17:38:39 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 12:38:39 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201738.jAKHcdpb006330@pub.open-bio.org> senger Sun Nov 20 12:38:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv6311/src/Clients Modified Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 12:30:51 1.2 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 17:38:39 1.3 @@ -1,4 +1,4 @@ -// TestArnWorker.java +// TestAntWorker.java // // Created: November 2005 // From senger at pub.open-bio.org Sun Nov 20 17:38:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 12:38:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201738.jAKHce4b006349@pub.open-bio.org> senger Sun Nov 20 12:38:39 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv6311/src/config Modified Files: log4j.properties Log Message: moby-live/Java/src/config log4j.properties,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/log4j.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/10/28 07:58:53 1.1 +++ /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/20 17:38:39 1.2 @@ -19,15 +19,20 @@ # $Id$ # ------------------------------------------------------------ -# Set root logger level to INFO and its only appender to A1. +# create A1 logger and set its severity level: +# -------------------------------------------- +##log4j.rootLogger=DEBUG, A1 log4j.rootLogger=INFO, A1 -# A1 is set to be a ConsoleAppender. +# set properties for A1 logger: +# ----------------------------- log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. +#log4j.appender.A1=org.apache.log4j.FileAppender +log4j.appender.A1.file=./jMoby-debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{1} %x - %m%n +# the rest: +# --------- # Ignore less significant messages from the third-party packages log4j.logger.org.apache.axis=WARN From senger at pub.open-bio.org Sun Nov 20 17:43:02 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Sun, 20 Nov 2005 12:43:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511201743.jAKHh2x5006534@pub.open-bio.org> senger Sun Nov 20 12:43:02 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/doc-files In directory pub.open-bio.org:/tmp/cvs-serv6519/src/main/org/biomoby/service/dashboard/doc-files Added Files: moby-dashboard-1.jpg moby-dashboard-2.jpg Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/doc-files moby-dashboard-1.jpg,NONE,1.1 moby-dashboard-2.jpg,NONE,1.1 From senger at pub.open-bio.org Mon Nov 21 17:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRDo009791@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv9749/docs Modified Files: ChangeLog Moses-deploy.html Log Message: moby-live/Java/docs ChangeLog,1.51,1.52 Moses-deploy.html,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/12 16:43:47 1.51 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2005/11/21 17:17:27 1.52 @@ -1,3 +1,8 @@ +2005-11-22 Martin Senger + + * Fixed getting XML parsers in CentralImpl.java in order to be + thread-safe. + 2005-11-12 Martin Senger * Changed MobyException to use initCause() and log.debug to better =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/Moses-deploy.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2005/09/22 16:07:08 1.2 +++ /home/repository/moby/moby-live/Java/docs/Moses-deploy.html 2005/11/21 17:17:27 1.3 @@ -306,7 +306,7 @@
    -./build-dev.sh deploy-services
    +./build-dev.sh undeploy-services
     
    @@ -419,7 +419,7 @@
    Martin Senger
    -Last modified: Thu Sep 22 18:24:09 2005 +Last modified: Mon Nov 21 23:55:46 2005
    From senger at pub.open-bio.org Mon Nov 21 17:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRlP009768@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv9749 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.42,1.43 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/19 18:33:00 1.42 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/21 17:17:27 1.43 @@ -102,6 +102,9 @@ + + + + + From senger at pub.open-bio.org Mon Nov 21 17:17:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHSfQ009868@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv9749/src/main/org/biomoby/client Modified Files: CentralImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.36,1.37 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/20 12:30:51 1.36 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/21 17:17:27 1.37 @@ -24,6 +24,8 @@ import org.tulsoft.tools.soap.axis.AxisUtils; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.DocumentBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -94,7 +96,6 @@ private URL endpoint; private String uri; - private javax.xml.parsers.DocumentBuilder docBuilder; protected boolean debug = false; /** Default location (endpoint) of a Moby registry. */ @@ -103,6 +104,20 @@ /** Default namespace used by the contacted Moby registry. */ public static final String DEFAULT_NAMESPACE = "http://mobycentral.icapture.ubc.ca/MOBY/Central"; + /** + * Thread local that gives each thread its own + * DocumentBuilderFactory (since it is not thread-safe). Code taken + * from Apache's JaxpUtils. + */ + public static ThreadLocal DOCUMENT_BUILDER_FACTORIES = new ThreadLocal() { + protected synchronized Object initialValue() { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware (true); + return dbf; + } + }; + + /************************************************************************* * Default constructor. It connects to a default Moby registry * (as defined in {@link #DEFAULT_ENDPOINT}) using a default namespace @@ -147,21 +162,27 @@ } this.uri = namespace; - // This method should work on almost all platforms to get an XML parser instance - try { - javax.xml.parsers.DocumentBuilderFactory dbf = - javax.xml.parsers.DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - docBuilder = dbf.newDocumentBuilder(); - } catch (Exception e) { - throw new MobyException ("Could not configure an XML parser: " + e, e); - } - cache = new Hashtable(); useCache = true; } /************************************************************************* + * Loads a DOM Document from an InputStream. Uses thread-safe + * mechanism. + *************************************************************************/ + public static Document loadDocument (InputStream input) + throws MobyException { + try { + DocumentBuilderFactory dbf + = (DocumentBuilderFactory)DOCUMENT_BUILDER_FACTORIES.get(); + DocumentBuilder db = dbf.newDocumentBuilder(); + return (db.parse (input)); + } catch (Exception e) { + throw new MobyException ("Problem with reading XML input: " + e.toString(), e); + } + } + + /************************************************************************* * Call 'method' with 'parameters' and return its result. *************************************************************************/ protected Object doCall (String method, Object[] parameters) @@ -237,12 +258,7 @@ String id = "", success = "0", message = "", rdf = ""; // parse returned XML - Document document = null; - try { - document=docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } + Document document = loadDocument (new ByteArrayInputStream (xml.getBytes())); Element root = document.getDocumentElement(); NodeList children = root.getChildNodes(); @@ -465,15 +481,8 @@ *************************************************************************/ public MobyService[] extractServices (String xml) throws MobyException { -// if (xmk == null) -// throw new MobyException () - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } + Document document = loadDocument (new ByteArrayInputStream (xml.getBytes())); NodeList list = document.getElementsByTagName ("Service"); MobyService[] results = new MobyService [list.getLength()]; for (int i = 0; i < list.getLength(); i++) { @@ -671,16 +680,9 @@ String result = (String)doCall ("retrieveServiceNames", new Object[] {}); - // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceName"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -720,13 +722,7 @@ // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); - } catch (Exception e) { - throw new MobyException (e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceName"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -771,13 +767,7 @@ new Object[] {}); // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceProvider"); String[] results = new String [list.getLength()]; for (int i = 0; i < list.getLength(); i++) @@ -830,12 +820,7 @@ throws MobyException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("serviceType"); if (list == null || list.getLength() == 0) return new MobyServiceType[] {}; @@ -886,13 +871,7 @@ throws MobyException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getDocumentElement().getElementsByTagName ("Namespace"); if (list == null || list.getLength() == 0) { return new MobyNamespace[] {}; @@ -958,13 +937,7 @@ // parse returned XML Map results = new TreeMap (getStringComparator()); - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream(result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Object"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -1025,13 +998,7 @@ throws MobyException, NoSuccessException { // parse returned XML - Document document = null; - try { - document = docBuilder.parse(new ByteArrayInputStream (xmlSource.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (xmlSource.getBytes())); NodeList list = document.getElementsByTagName ("retrieveObjectDefinition"); if (list == null || list.getLength() == 0) throw new NoSuccessException ("Data Type name was not found.", @@ -1135,10 +1102,7 @@ }); // parse returned XML - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); Element service = document.getDocumentElement(); Node wsdl = service.getFirstChild(); if (wsdl == null) @@ -1555,10 +1519,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); @@ -1611,10 +1572,7 @@ // parse returned XML Map results = new HashMap(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); for (int i = 0; i < list.getLength(); i++) { @@ -1668,10 +1626,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try{document=docBuilder.parse(new ByteArrayInputStream(result.getBytes()));} - catch(Exception e){throw new MobyException(e.toString(), e);} - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Relationship"); // it should always be just one element in this list @@ -1730,13 +1685,7 @@ // parse returned XML Vector v = new Vector(); - Document document = null; - try { - document = docBuilder.parse (new ByteArrayInputStream (result.getBytes())); - } catch (Exception e) { - throw new MobyException(e.toString(), e); - } - + Document document = loadDocument (new ByteArrayInputStream (result.getBytes())); NodeList list = document.getElementsByTagName ("Resource"); for (int i = 0; i < list.getLength(); i++) { Element elem = (Element)list.item (i); From senger at pub.open-bio.org Mon Nov 21 17:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRKX009811@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv9749/src/Clients Modified Files: TestAntWorker.java Log Message: moby-live/Java/src/Clients TestAntWorker.java,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/20 17:38:39 1.3 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAntWorker.java 2005/11/21 17:17:27 1.4 @@ -12,6 +12,7 @@ import org.tulsoft.tools.gui.SwingUtils; +import org.apache.tools.ant.Project; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.ExitException; import org.apache.tools.ant.NoBannerLogger; @@ -41,11 +42,11 @@ Properties props = new Properties(); SimpleAnt ant = new SimpleAnt(); -// DefaultLogger logger = new DefaultLogger(); NoBannerLogger logger = new NoBannerLogger(); logger.setOutputPrintStream (new PrintStream (new ConsoleStream (false))); logger.setErrorPrintStream (new PrintStream (new ConsoleStream (false))); ant.addBuildListener (logger); +// ant.setMsgOutputLevel (Project.MSG_VERBOSE); ant.startAnt (args, props); } From senger at pub.open-bio.org Mon Nov 21 17:17:27 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:17:27 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211717.jALHHRGN009848@pub.open-bio.org> senger Mon Nov 21 12:17:27 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv9749/src/config Modified Files: log4j.properties run-any-client run-any-client.bat run-dashboard run-dashboard.bat Log Message: moby-live/Java/src/config log4j.properties,1.2,1.3 run-any-client,1.5,1.6 run-any-client.bat,1.6,1.7 run-dashboard,1.3,1.4 run-dashboard.bat,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/log4j.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/20 17:38:39 1.2 +++ /home/repository/moby/moby-live/Java/src/config/log4j.properties 2005/11/21 17:17:27 1.3 @@ -28,7 +28,7 @@ # ----------------------------- log4j.appender.A1=org.apache.log4j.ConsoleAppender #log4j.appender.A1=org.apache.log4j.FileAppender -log4j.appender.A1.file=./jMoby-debug.log +#log4j.appender.A1.file=./jMoby-debug.log log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{1} %x - %m%n =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/15 03:25:51 1.5 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/21 17:17:27 1.6 @@ -14,6 +14,7 @@ CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/20 12:30:51 1.6 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/21 17:17:27 1.7 @@ -5,6 +5,7 @@ set CP= for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" set CP=build\classes;%CP% set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/20 12:30:51 1.3 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/21 17:17:27 1.4 @@ -5,6 +5,19 @@ # $Id$ # ---------------------------------------------------- +# --- setup JAVA_HOME +if [ -z "$JAVA_HOME" ] ; then + JAVA=`which java` + if [ -z "$JAVA" ] ; then + echo "Cannot find JAVA. Please set your PATH." + exit 1 + else + JAVA_BIN=`dirname $JAVA` + JAVA_HOME=$JAVA_BIN/.. + export JAVA_HOME + fi +fi + PROJECT_HOME=@PROJECT_HOME@ CLASSPATH=${PROJECT_HOME}/build/classes @@ -15,5 +28,7 @@ CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH -exec java -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" +JAVA=$JAVA_HOME/bin/java +exec $JAVA -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/20 12:30:51 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard.bat 2005/11/21 17:17:27 1.5 @@ -1,10 +1,20 @@ @echo off +if NOT "%JAVA_HOME%"=="" goto javadone +echo ======================================================= +echo Setup the JAVA_HOME environment variable. +echo Hint (for XP): Click Start -- Control Panel -- System. +echo Then click Advanced, then click "Environment Variables". +echo ======================================================== +goto end +:javadone + set "PROJECT_HOME=@PROJECT_HOME@" cd "%PROJECT_HOME%" set CP= for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i +set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" set CP=build\classes;%CP% set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% @@ -12,4 +22,7 @@ set CP=build\others\samples;%CP% set CP=build\lib\dashboard-config.jar;%CP% -java -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* +set "JAVA=%JAVA_HOME%\bin\java" +"%JAVA%" -classpath "%CP%" org.biomoby.service.dashboard.Dashboard %* + +:end From senger at pub.open-bio.org Mon Nov 21 17:46:04 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Mon, 21 Nov 2005 12:46:04 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511211746.jALHk4YK010085@pub.open-bio.org> senger Mon Nov 21 12:46:04 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client In directory pub.open-bio.org:/tmp/cvs-serv10066/src/main/org/biomoby/client Modified Files: CentralDigestCachedImpl.java Log Message: moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.15,1.16 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/20 12:30:51 1.15 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java 2005/11/21 17:46:04 1.16 @@ -607,7 +607,7 @@ } /************************************************************************** - * Update namespaces from a moby registry - this easier than with + * Update namespaces from a moby registry - this is easier than with * other entities: just get a new LIST_FILE. *************************************************************************/ protected boolean fillNamespacesCache() @@ -933,6 +933,7 @@ Properties result = new Properties(); result.put (CACHE_PROP_REGISTRY_URL, getRegistryEndpoint()); result.put (CACHE_PROP_COUNT, new Integer (0)); + result.put (CACHE_PROP_SIZE, new Long (0)); if (cacheDir == null) return result; String realName = null; try { @@ -969,8 +970,10 @@ ageOfOldest = Math.min (ageOfOldest, age); } } - result.put (CACHE_PROP_COUNT, new Integer (realCount)); - result.put (CACHE_PROP_SIZE, new Long (realSize)); + if (! CACHE_PART_NAMESPACES.equals (id)) { + result.put (CACHE_PROP_COUNT, new Integer (realCount)); + result.put (CACHE_PROP_SIZE, new Long (realSize)); + } if (ageOfYoungest > 0) result.put (CACHE_PROP_YOUNGEST, new Long (ageOfYoungest)); if (ageOfOldest < Long.MAX_VALUE) @@ -987,7 +990,8 @@ StringBuffer buf = new StringBuffer(); buf.append (props.getProperty (CACHE_PROP_NAME) + "\n"); add (buf, "Biomoby registry", props.get (CACHE_PROP_REGISTRY_URL)); - add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); + if ( ((Integer)props.get (CACHE_PROP_COUNT)).intValue() > 0 ) + add (buf, "Number of entities", props.get (CACHE_PROP_COUNT)); Object value = props.get (CACHE_PROP_OLDEST); if (value != null) { long age = ((Long)value).longValue(); @@ -1000,7 +1004,8 @@ add (buf, "Youngest entry created", new Date (age)); add (buf, "Youngest entry has age", Utils.ms2Human (new Date().getTime() - age)); } - add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); + if ( ((Long)props.get (CACHE_PROP_SIZE)).longValue() > 0 ) + add (buf, "Size (in bytes)", props.get (CACHE_PROP_SIZE)); add (buf, "Location", props.get (CACHE_PROP_LOCATION)); return new String (buf); } From senger at pub.open-bio.org Tue Nov 22 18:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 13:03:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SQS013418@pub.open-bio.org> senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv13384/src/Clients Added Files: TestLog.java Log Message: moby-live/Java/src/Clients TestLog.java,NONE,1.1 From senger at pub.open-bio.org Tue Nov 22 18:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 13:03:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SGE013403@pub.open-bio.org> senger Tue Nov 22 13:03:27 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv13384 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.43,1.44 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/21 17:17:27 1.43 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/22 18:03:27 1.44 @@ -1530,7 +1530,7 @@ - + senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config In directory pub.open-bio.org:/tmp/cvs-serv13384/src/config Modified Files: run-any-client run-any-client.bat run-cache-client run-dashboard run-service Log Message: moby-live/Java/src/config run-any-client,1.6,1.7 run-any-client.bat,1.7,1.8 run-cache-client,1.1,1.2 run-dashboard,1.4,1.5 run-service,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/21 17:17:27 1.6 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client 2005/11/22 18:03:28 1.7 @@ -9,13 +9,13 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH -CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH exec java -cp $CLASSPATH "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-any-client.bat,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/21 17:17:27 1.7 +++ /home/repository/moby/moby-live/Java/src/config/run-any-client.bat 2005/11/22 18:03:28 1.8 @@ -6,10 +6,10 @@ for %%i in (lib\*.jar) do call cp.bat %%i for %%i in (lib\ant_home\lib\*.jar) do call cp.bat %%i set "CP=%JAVA_HOME%\lib\tools.jar;%CP%" -set CP=build\classes;%CP% -set CP=build\Clients;%CP% set CP=build\others\datatypes;%CP% set CP=build\others\skeletons;%CP% set CP=build\others\samples;%CP% +set CP=build\classes;%CP% +set CP=build\Clients;%CP% java -classpath "%CP%" %* =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-cache-client,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/run-cache-client 2004/11/14 16:12:50 1.1 +++ /home/repository/moby/moby-live/Java/src/config/run-cache-client 2005/11/22 18:03:28 1.2 @@ -10,8 +10,8 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'` +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH exec java -cp $CLASSPATH CacheRegistryClient "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-dashboard,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/21 17:17:27 1.4 +++ /home/repository/moby/moby-live/Java/src/config/run-dashboard 2005/11/22 18:03:28 1.5 @@ -20,15 +20,15 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=${JAVA_HOME}/lib/tools.jar +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/lib/dashboard-config.jar:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/ant_home/lib/*.jar | tr ' ' ':'`:$CLASSPATH -CLASSPATH=${JAVA_HOME}/lib/tools.jar:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH JAVA=$JAVA_HOME/bin/java exec $JAVA -cp $CLASSPATH org.biomoby.service.dashboard.Dashboard "$@" =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/run-service,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/run-service 2005/08/26 06:27:03 1.1 +++ /home/repository/moby/moby-live/Java/src/config/run-service 2005/11/22 18:03:28 1.2 @@ -10,11 +10,11 @@ PROJECT_HOME=@PROJECT_HOME@ -CLASSPATH=${PROJECT_HOME}/build/classes -CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH +CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'` CLASSPATH=${PROJECT_HOME}/build/others/datatypes:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/skeletons:$CLASSPATH CLASSPATH=${PROJECT_HOME}/build/others/samples:$CLASSPATH -CLASSPATH=`echo ${PROJECT_HOME}/lib/*.jar | tr ' ' ':'`:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/classes:$CLASSPATH +CLASSPATH=${PROJECT_HOME}/build/Clients:$CLASSPATH exec java -cp $CLASSPATH org.biomoby.client.BaseCmdLineClient "$@" From senger at pub.open-bio.org Tue Nov 22 18:03:28 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 13:03:28 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511221803.jAMI3SiU013550@pub.open-bio.org> senger Tue Nov 22 13:03:28 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images In directory pub.open-bio.org:/tmp/cvs-serv13384/src/main/org/biomoby/service/dashboard/images Added Files: smallDeploy.gif smallDeploy_dis.gif smallUnDeploy.gif smallUnDeploy_dis.gif Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard/images smallDeploy.gif,NONE,1.1 smallDeploy_dis.gif,NONE,1.1 smallUnDeploy.gif,NONE,1.1 smallUnDeploy_dis.gif,NONE,1.1 From mwilkinson at pub.open-bio.org Tue Nov 22 20:05:01 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 15:05:01 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222005.jAMK51xA013984@pub.open-bio.org> mwilkinson Tue Nov 22 15:05:01 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv13959/t Modified Files: Client-Central.t Client-Service.t Log Message: modified the test suite so that it connects to whatever MOBY Central is set as the default in the environment. The test suite will function on a registry that is empty *except for the bootstrap object ontology*. It also works under Windows using nmake test. moby-live/Perl/t Client-Central.t,1.43,1.44 Client-Service.t,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/20 16:05:05 1.43 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/22 20:05:00 1.44 @@ -14,9 +14,36 @@ use Test::More 'no_plan'; #skip_all => "Turn off for development"; # See perldoc Test::More for details use strict; use Data::Dumper; + +print STDERR <new( - Registries => { # URL/URI should be specific, not just "localhost" - mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl', - URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'} - } - ); + my $C = MOBY::Client::Central->new(); my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); $r = $C->deregisterService( serviceName => 'myfirstservice', authURI => 'test.suite.com' ); @@ -46,15 +68,19 @@ }; # Can we connect to the registry? -my $C = MOBY::Client::Central->new( - Registries => { # URL/URI should be specific, not just "localhost" - mobycentral => { URL => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl', - URI => 'http://mobycentral.icapture.ubc.ca/MOBY/Central'} - } - ); +my $C = MOBY::Client::Central->new(); isa_ok( $C, 'MOBY::Client::Central',"Connected to test MOBY Central") or die("Cannot Connect to MOBY Central... cannot continue?"); +print STDERR <Registries->{mobycentral}->{URL},"\n\n\n"; + + ############ ENFORCE REGISTRY API ############### # First, mandatory methods for all registries. =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Service.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/20 16:15:30 1.7 +++ /home/repository/moby/moby-live/Perl/t/Client-Service.t 2005/11/22 20:05:00 1.8 @@ -22,7 +22,15 @@ BEGIN { use_ok('MOBY::Client::Service') }; END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterService( serviceName => 'myfirstservice', + authURI => 'test.suite.com' ); }; @@ -34,8 +42,25 @@ # Find a service at MOBY Central, try to create a local instance. my $C = MOBY::Client::Central->new(); -my ($s, $r) = $C->findService( authURI => 'bioinfo.icapture.ubc.ca', - name => 'getDragonLocusAlleles' ); +my %RegSmpl = ( serviceName => "myfirstservice", + serviceType => "Retrieval", + authURI => "test.suite.com", + contactEmail => 'your at mail.address', + description => "this is my first service", + category => "moby", + URL => "http://illuminae/cgi-bin/service.pl", + input => [ + ['articleName1', [Object => []]], # Simple + ], + output => [ + ['articleName2', [String => []]], # Simple + ], + ); + +# Service name can't start with numeric +my $r = $C->registerService( %RegSmpl ); +my ($s, $err) = $C->findService( authURI => 'test.suite.com', + name => 'myfirstservice' ); ok($s) or diag("Couldn't retrieve service details from MOBY Central"); ok($$s[0]) or diag("no service instance found for getDragonLocusAlleles"); my $wsdl = $C->retrieveService($$s[0]); From mwilkinson at pub.open-bio.org Tue Nov 22 21:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 16:33:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNbe014235@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv14216/MOBY/Client Modified Files: OntologyServer.pm Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/MOBY/Client OntologyServer.pm,1.14,1.15 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm 2005/09/27 00:01:24 1.14 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/OntologyServer.pm 2005/11/22 21:33:23 1.15 @@ -124,6 +124,7 @@ $self->{$attrname} = $self->_default_for( $attrname ); } } + $self->host($ENV{MOBY_ONTOLOGYSERVER}) if ($ENV{MOBY_ONTOLOGYSERVER}); return undef unless $self->host; return $self; } From mwilkinson at pub.open-bio.org Tue Nov 22 21:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 16:33:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNvK014254@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/scripts In directory pub.open-bio.org:/tmp/cvs-serv14216/scripts Modified Files: OntologyServer.cgi Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/scripts OntologyServer.cgi,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi 2005/09/27 00:01:24 1.5 +++ /home/repository/moby/moby-live/Perl/scripts/OntologyServer.cgi 2005/11/22 21:33:23 1.6 @@ -1,7 +1,6 @@ -#!/usr/bin/perl -w +#!perl -w use CGI qw/:standard/; -use lib "/usr/local/apache/cgi-bin/MOBY05"; use MOBY::OntologyServer; use strict; From mwilkinson at pub.open-bio.org Tue Nov 22 21:33:23 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Tue, 22 Nov 2005 16:33:23 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511222133.jAMLXNtr014278@pub.open-bio.org> mwilkinson Tue Nov 22 16:33:23 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv14216/t Modified Files: Client-OntologyServer.t CommonSubs.t Log Message: made modifications to allow complete independence from public MOBY Central. The MOBY::Client::OntologyServer checks the MOBY_ONTOLOGYSERVER environment varable, and connects to whatever server is at that address. if you set this to localhost you will be talking to your own moby ontologies. I have also modified the test suite so that they will work on a vanilla bootstrapped MOBY ontology server, and don't expect any entries from the public ontologies with the exception of the bootstrap entries. moby-live/Perl/t Client-OntologyServer.t,1.5,1.6 CommonSubs.t,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t 2005/09/27 00:06:24 1.5 +++ /home/repository/moby/moby-live/Perl/t/Client-OntologyServer.t 2005/11/22 21:33:23 1.6 @@ -15,11 +15,50 @@ use Test::More 'no_plan'; #skip_all => "Skipped for development"; #'no_plan'; # perldoc Test::More for details use strict; use MOBY::Client::OntologyServer; -#Is the client-code even installed? -BEGIN { use_ok('MOBY::Client::OntologyServer') }; - +use MOBY::Client::Central; +BEGIN { use_ok('MOBY::Client::OntologyServer'); + # initialize with a couple of useless things that we can guarantee to find + my $C = MOBY::Client::Central->new(); + + my %Namespace = ( namespaceType => 'Rub1', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + my $r = $C->registerNamespace( %Namespace ); + %Namespace = ( namespaceType => 'Rub2', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + $r = $C->registerNamespace( %Namespace ); + my %ServiceType = ( serviceType => "Rub1", + description => "a human-readable description of the service", + contactEmail => 'your at email.address', + authURI => "test.suite.com", + Relationships => { ISA => ['Service'] } + ); + $r = $C->registerServiceType( %ServiceType ); + %ServiceType = ( serviceType => "Rub2", + description => "a human-readable description of the service", + contactEmail => 'your at email.address', + authURI => "test.suite.com", + Relationships => { ISA => ['Service'] } + ); + $r = $C->registerServiceType( %ServiceType );}; + END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterNamespace( namespaceType => 'Rub1' ); + $r = $C->deregisterNamespace( namespaceType => 'Rub2' ); + $r = $C->deregisterServiceType( serviceType => 'Rub2' ); + $r = $C->deregisterServiceType( serviceType => 'Rub2' ); }; @@ -28,6 +67,29 @@ objectExists serviceExists namespaceExists /); my $os = MOBY::Client::OntologyServer->new(); + +print STDERR <host,"\n\n\n"; + + foreach (@autoload) {eval{$os->$_};} # Call all AUTOLOAD methods, to create them. can_ok("MOBY::Client::OntologyServer", @API) or diag("OntologyServer doesn't implement full API"); @@ -47,14 +109,9 @@ # Start fresh.... $os = MOBY::Client::OntologyServer->new(); -################ CHECK THAT VALID STUFF RETURNS CORRECTLY ########## -# -# It would really be better not to have literal lists of valid namespaces here, -# Can we pull the entire list of valid namespaces in programmatically from somewhere, -# and check them all here? Ditto for Objects, Service-types -# + my ($success, $msg, $existingURI); -my @check_ns = qw/SGD NCBI_gi GO FB PMID/; # These seem pretty solid +my @check_ns = qw/Rub1 Rub2/; # These seem pretty solid foreach (@check_ns) { ($success, $msg, $existingURI) = $os->namespaceExists( term => $_); is($success, 1) @@ -70,10 +127,7 @@ or diag("Object '$_' reported erroneously as non-existent."); } -my @check_servicetype = qw/Alignment Analysis Conversion Edit -NCBI_Blast Parsing SetIntersection SetOperation SetUnion -Retrieval Registration Resolution -StructuralPrediction/; # Service types don't change much, but who knows.... +my @check_servicetype = qw/Rub1 Rub2/; # Service types don't change much, but who knows.... foreach (@check_servicetype) { ($success, $msg, $existingURI) = $os->serviceExists(term => $_); is($success, 1) =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/CommonSubs.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/t/CommonSubs.t 2005/09/21 19:08:28 1.3 +++ /home/repository/moby/moby-live/Perl/t/CommonSubs.t 2005/11/22 21:33:23 1.4 @@ -21,10 +21,38 @@ use XML::LibXML; use MOBY::MobyXMLConstants; +use MOBY::Client::Central; +BEGIN { use_ok('MOBY::Client::OntologyServer'); + # initialize with a couple of useless things that we can guarantee to find + my $C = MOBY::Client::Central->new(); + + my %Namespace = ( namespaceType => 'Rub1', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + my $r = $C->registerNamespace( %Namespace ); + %Namespace = ( namespaceType => 'Rub2', + authURI => 'your.authority.URI', + description => "human readable description of namespace", + contactEmail => 'your at address.here' + ); + $r = $C->registerNamespace( %Namespace ); +}; + END { - # Clean up after yourself, in case tests fail, or the interpreter is interrupted partway though... + # Define cleanup of registry, to return it to its 'pristine' state, + # so that later attempts to run tests don't run into problems caused + # by failure of these tests, or abortion of the test script. + # Reconnect to MOBY Central here, since other connections + # will have gone out of scope by the time we get to this END block. + # Also can't use %Obj, + my $C = MOBY::Client::Central->new(); + my $r = $C->deregisterNamespace( namespaceType => 'Rub1' ); + $r = $C->deregisterNamespace( namespaceType => 'Rub2' ); }; + my @must_implement = qw/ collectionResponse complexResponse @@ -150,7 +178,7 @@ # be returned; other articlenames will generate a 'undef' response, so that the number of inputs # matches the number of outputs. -my @NS = ("NCBI_gi", "SGD"); +my @NS = ("Rub1", "Rub2"); my $articles = [ XML_maker(""), XML_maker(""), XML_maker("") @@ -177,7 +205,7 @@ or diag("Wrong number of Simple Articles IDs returned " . "(expected zero for bogus namespace)"); -is(scalar getSimpleArticleIDs('SGD_LOCUS', $articles), scalar @{$articles}) +is(scalar getSimpleArticleIDs('Rub1', $articles), scalar @{$articles}) or diag("Wrong number of Simple Articles IDs returned " . "(expected zero for valid but unused namespace)"); @@ -300,7 +328,7 @@ } } # Check that bona-fide namespaces are valid, regardless of position in the list of valid namespaces -my @ns = ('SGD', 'SGD_LOCUS'); +my @ns = ('Rub1', 'Rub2'); foreach (@ns) { ok (validateThisNamespace($_, @ns), "Validate namespace") or diag("Namespace ($_) not in list of namespaces"); From senger at pub.open-bio.org Wed Nov 23 02:48:40 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 21:48:40 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511230248.jAN2me8U014961@pub.open-bio.org> senger Tue Nov 22 21:48:40 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv14926/src/main/org/biomoby/service/dashboard Modified Files: AntModel.java DashboardProperties.java DeploymentTable.java GeneratorPanel.java NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard AntModel.java,1.4,1.5 DashboardProperties.java,1.20,1.21 DeploymentTable.java,1.1,1.2 GeneratorPanel.java,1.8,1.9 NOTES,1.30,1.31 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2005/11/22 18:03:28 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AntModel.java 2005/11/23 02:48:40 1.5 @@ -27,6 +27,8 @@ import java.util.Vector; import java.util.Enumeration; import java.util.Properties; +import java.util.Map; +import java.util.Iterator; import java.io.File; /** @@ -212,35 +214,17 @@ public void mosesDeploy() throws MobyException { -// boolean toGenerate = propertyChannel.getBoolean (DP_USE_DT_GEN, true); -// boolean toCompile = propertyChannel.getBoolean (DP_USE_DT_COMP, true); -// boolean toJavadoc = propertyChannel.getBoolean (DP_USE_DT_DOC, true); -// boolean toJar = propertyChannel.getBoolean (DP_USE_DT_JAR, true); - -// // build a set of properties for Ant -// Properties props = new Properties(); -// addRegistryProps (props); -// addGeneratorProps (props); - -// // build a set of Ant targets -// Vector v = new Vector(); -// if (toGenerate && toCompile && toJavadoc && toJar) { -// v.addElement ("moses-datatypes"); -// } else { -// if (toGenerate) -// v.addElement ("generate-datatypes"); -// if (toJavadoc) -// v.addElement ("moses-docs"); -// if (toJar) -// v.addElement ("jar-datatypes"); -// if (toCompile && ! toJavadoc && ! toJar) -// v.addElement ("moses-compile"); -// } -// String[] targets = new String [v.size()]; -// v.copyInto (targets); + // build a set of properties for Ant + Properties props = new Properties(); + addDeploymentProps (props); + add (props, "users.lib.dir", DP_USER_JARS); + add (props, "wsdd.template", DP_WSDD_TEMPL); -// // run it... -// runAnt (targets, props); + // run it... + if (propertyChannel.getBoolean (DP_LOCAL_DEPLOY, true)) + runAnt (new String[] { "deploy-services" }, props); + else + runAnt (new String[] { "deploy-remote" }, props); } /********************************************************************* @@ -248,6 +232,14 @@ ********************************************************************/ public void mosesUndeploy() throws MobyException { + + // build a set of properties for Ant + Properties props = new Properties(); + addDeploymentProps (props); + + // run it... + if (propertyChannel.getBoolean (DP_LOCAL_DEPLOY, true)) + runAnt (new String[] { "undeploy-services" }, props); } /********************************************************************* @@ -394,6 +386,26 @@ } /********************************************************************* + * Add properties shared by deployment and undeployment... + ********************************************************************/ + protected void addDeploymentProps (Properties props) { + add (props, "catalina.home", DP_TOMCAT_HOME); + add (props, "axis.relative.path", DP_AXIS_IN_TOMCAT); + add (props, "tomcat.host", DP_HOSTNAME); + add (props, "tomcat.port", DP_PORT); + add (props, "axis.admin.url", DP_AXIS_ADMIN); + + Map services = (Map)propertyChannel.get (DP_DEPL_SERVICES); + if (services == null) return; + for (Iterator it = services.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = (Map.Entry)it.next(); + String serviceName = (String)entry.getKey(); + String className = (String)entry.getValue(); + props.put ("service." + serviceName, className); + } + } + + /********************************************************************* * Take a property 'channelPropName' from the property channel, * and if it is not empty, add it to 'props' under the name * 'antPropName'. =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/22 18:03:28 1.20 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardProperties.java 2005/11/23 02:48:40 1.21 @@ -46,6 +46,7 @@ static final String DP_SEL_SERVICES = "selectedServices"; // type: Vector with service/authority name static final String DP_SEL_AUTHORITIES = "selectedAuthorities"; // type: Vector with authority name + static final String DP_DEPL_SERVICES = "servicesToDeploy"; // type: Map with serviceName => className static final String DP_LOCAL_DEPLOY = "use-local-deploy"; static final String DP_TOMCAT_HOME = "tomcatHome"; =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DeploymentTable.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/service/dashboard/DeploymentTable.java 2005/11/22 18:03:28 1.1 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DeploymentTable.java 2005/11/23 02:48:40 1.2 @@ -12,6 +12,8 @@ import javax.swing.table.TableColumn; import java.util.Enumeration; import java.util.Vector; +import java.util.Map; +import java.util.HashMap; /** * A swing JTable that collects names of services that are going to be @@ -39,13 +41,28 @@ } /********************************************************************* - * + * Add data representing one row to this table. ********************************************************************/ public void addData (String serviceName, String className) { ((DeploymentTableModel)tableModel).addData (serviceName, className); } /********************************************************************* + * Return all data currently available in the table. The keys are + * service names, the values are class names (representing classes + * that will implement these services). + ********************************************************************/ + public Map getData() { + Vector v = tableModel.getData(); + Map result = new HashMap (v.size() + 1); + for (Enumeration en = v.elements(); en.hasMoreElements(); ) { + TableDataBag bag = (TableDataBag)en.nextElement(); + result.put (bag.serviceName, bag.className); + } + return result; + } + + /********************************************************************* * Ignored. ********************************************************************/ public void setData (org.biomoby.shared.MobyData[] newData) { } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/22 18:03:28 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 02:48:40 1.9 @@ -50,6 +50,8 @@ import java.io.ByteArrayOutputStream; import java.util.Enumeration; import java.util.Vector; +import java.util.Map; +import java.util.Iterator; /** * A panel allowing to generate Java code for new services using the @@ -90,6 +92,19 @@ "You can also select one or more authorities\n" + "(then code for all their services will be made).\n\n"; + protected static final String NODEPL_ERROR = + "Sorry, you need first to select some services\n" + + "which you wish to be deployed (or undeployed).\n\n" + + + "You can select several (or even many) of them\n" + + "by using CTRL and SHIFT when selecting them.\n" + + "You can also select one or more authorities\n" + + "(it will add all their services to the list).\n\n"; + + protected static final String NOIMPL_ERROR = + "Sorry, each service that is going to be deployed\n" + + "needs to have assigned a class that implements it.\n\n"; + // associated models working behind the scene AntModel antModel; RegistryModel registryModel; @@ -109,6 +124,7 @@ JTextFieldWithHistory pattern; DeploymentTable dTable; JCheckBox copyBySelect; + JRadioButton locally; // shared icons protected static Icon genDTIcon, genDTIconDis; @@ -172,22 +188,20 @@ antModel.setErrorStream (new ConsoleStream (console, true)); antModel.setMsgOutputLevel (AntModel.MSG_INFO); - // service tree panel + // three major parts JPanel selection = getServicesSelectionPanel(); - - // code generators panel JPanel generators = getGeneratorsPanel(); + JPanel deployment = getDeploymentPanel(); - // deployment panel - JPanel deploy = getDeploymentPanel(); + JPanel fields = new JPanel (new GridBagLayout()); + SwingUtils.addComponent (fields, generators, 0, 0, 1, 1, HORI, NWEST, 0.0, 0.0); + SwingUtils.addComponent (fields, deployment, 1, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); // split it into moving panels - JSplitPane split = vSplit (selection, console, 0.5); - - // put all together - SwingUtils.addComponent (pComponent, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); - SwingUtils.addComponent (pComponent, generators, 1, 0, 1, 1, HORI, NWEST, 0.0, 0.0); - SwingUtils.addComponent (pComponent, deploy, 2, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); + JSplitPane split = hSplit (vSplit (selection, + console, 0.5), + fields, 0.5); + SwingUtils.addComponent (pComponent, split, 0, 0, 1, 1, BOTH, NWEST, 1.0, 1.0); return pComponent; } @@ -422,12 +436,12 @@ boolean deployLocally = getPrefValue (DP_LOCAL_DEPLOY, true); propertyChannel.put (DP_LOCAL_DEPLOY, new Boolean (deployLocally).toString()); - JRadioButton locally = new JRadioButton ("On local machine", deployLocally); + locally = new JRadioButton ("On local machine", deployLocally); locally.setActionCommand ("true"); locally.addActionListener (deployListener); - JRadioButton remotely = new JRadioButton ("On remote machine", deployLocally); - locally.setActionCommand ("false"); - locally.addActionListener (deployListener); + JRadioButton remotely = new JRadioButton ("On remote machine", ! deployLocally); + remotely.setActionCommand ("false"); + remotely.addActionListener (deployListener); ButtonGroup group = new ButtonGroup(); group.add (locally); @@ -537,7 +551,6 @@ }); deployButton.setIcon (deployIcon); deployButton.setDisabledIcon (deployIconDis); - deployButton.setEnabled (false); // temporarily undeployButton = createButton (" Undeploy ", @@ -551,9 +564,9 @@ }); undeployButton.setIcon (undeployIcon); undeployButton.setDisabledIcon (undeployIconDis); + undeployButton.setEnabled (locally.isSelected()); undeployButton.setEnabled (false); // temporarily - // put all together Component glue2 = Box.createHorizontalGlue(); SwingUtils.addComponent (p, pDeploy, 0, 0, 3, 1, HORI, NWEST, 0.0, 0.0); @@ -566,12 +579,17 @@ return p; } - // + // this is used both for 'locally' and 'remotelly' radio buttons; + // 'locally' button has an action command "true" and 'remotely' + // button has an action command "false" private ActionListener deployListener = new ActionListener() { public void actionPerformed (ActionEvent e) { String local = e.getActionCommand(); - setPrefValue (DP_LOCAL_DEPLOY, UUtils.is (local)); + boolean isLocal = UUtils.is (local); + setPrefValue (DP_LOCAL_DEPLOY, isLocal); propertyChannel.put (DP_LOCAL_DEPLOY, local); + undeployButton.setEnabled (isLocal); + undeployButton.setEnabled (false); // temporarily } }; @@ -815,6 +833,19 @@ * Deploy services... **************************************************************************/ protected void onDeploy() { + if (! onCheckData()) return; + Map data = dTable.getData(); + for (Iterator it = data.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = (Map.Entry)it.next(); + String className = (String)entry.getValue(); + if (UUtils.isEmpty (className)) { + String msg = NOIMPL_ERROR.replaceAll ("\\\\n", "
    "); + error ("" + msg); + return; + } + } + + // ...and let Ant to deploy it final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { @@ -847,6 +878,7 @@ * Undeploy services... **************************************************************************/ protected void onUndeploy() { + if (! onCheckData()) return; final SwingWorker worker = new SwingWorker() { MobyException exception = null; public Object construct() { @@ -876,6 +908,22 @@ } /************************************************************************** + * Get data from a deployment table; check if there are some + * (report error if not) and put them in the property + * channel. Return accordingly. + **************************************************************************/ + protected boolean onCheckData() { + Map data = dTable.getData(); + if (data.size() == 0) { + String msg = NODEPL_ERROR.replaceAll ("\\\\n", "
    "); + error ("" + msg); + return false; + } + propertyChannel.put (DP_DEPL_SERVICES, data); + return true; + } + + /************************************************************************** * Disable/enable Ant-processing buttons... **************************************************************************/ protected void setEnabledAntButtons (boolean enabled) { @@ -884,8 +932,8 @@ bothButton.setEnabled (enabled); dtclsButton.setEnabled (enabled); sclsButton.setEnabled (enabled); -// deployButton.setEnabled (enabled); -// undeployButton.setEnabled (enabled); + deployButton.setEnabled (enabled); +// undeployButton.setEnabled (enabled && locally.isSelected()); // temporarily } /************************************************************************** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/22 18:03:28 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 02:48:40 1.31 @@ -25,13 +25,18 @@ * BUG: the BuildDataTree does not paint itself always well +* Not yet ready: Undeploy: too many messages... + Should be done: --------------- * right-click - if nothing selected, it should take what is under the mouse (selected first), otherwise it is annoying +* Implement ConsoleStream better + * documentation (both pages and help documents) + - also to start Moses/Dashboard FAQs (with Eddie's one to start) * More testing: - interrupting loading @@ -51,6 +56,8 @@ * more attention for the various encodings +* current registry in the window title... "Connected to..." + Later: ------ * WARN: How would an authority with characters 'http://' cope as a From senger at pub.open-bio.org Wed Nov 23 03:14:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Tue, 22 Nov 2005 22:14:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511230314.jAN3El2a015083@pub.open-bio.org> senger Tue Nov 22 22:14:46 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv15060/src/main/org/biomoby/service/dashboard Modified Files: GeneratorPanel.java NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard GeneratorPanel.java,1.9,1.10 NOTES,1.31,1.32 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 02:48:40 1.9 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/GeneratorPanel.java 2005/11/23 03:14:46 1.10 @@ -458,7 +458,8 @@ String initValue = null; String os = System.getProperty ("os.name"); if (os.startsWith ("Windows")) - initValue = "c:\\Program Files\\Apache Software Foundation\\Tomcat 5.5"; + initValue = null; +// initValue = "c:\\Program Files\\Apache Software Foundation\\Tomcat 5.5"; else if (os.startsWith ("Mac")) initValue = null; else =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 02:48:40 1.31 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/NOTES 2005/11/23 03:14:46 1.32 @@ -50,12 +50,8 @@ * starting panel/splash screen -* add deployment panel to code generator - * base client panel (services testing panel) -* more attention for the various encodings - * current registry in the window title... "Connected to..." Later: @@ -77,6 +73,8 @@ * manage/export/import user preferences +* more attention for the various encodings + ? some of the notification stuff can inherit from property change stuff ? move help system to Java Help; more contextual help From mwilkinson at pub.open-bio.org Wed Nov 23 20:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 15:58:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaKU017570@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY/Client In directory pub.open-bio.org:/tmp/cvs-serv17528/MOBY/Client Modified Files: Central.pm Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/MOBY/Client Central.pm,1.127,1.128 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v retrieving revision 1.127 retrieving revision 1.128 diff -u -r1.127 -r1.128 --- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/20 16:13:23 1.127 +++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/11/23 20:58:36 1.128 @@ -1709,10 +1709,13 @@ Usage : $def = $MOBY->Relationships(%args) Function : traverse and return the relationships in the ontology - Returns : hashref of $hash{relationship_type}=\@lsids + Returns : hashref of + FOR SERVICES: + $hash{'isa'}=[{lsid => $lsid, term => 'termy'},...] + FOR OBJECTS: + $hash{relationship_type}=[{lsid => $lsid, articleName => 'thingy', term => 'termy'},...] Args : EITHER serviceType => $term_or_lsid OR objectType => $term_or_lsid - Relationships => \@relationship_types (optional, 'all' if parameter is missing) Registry => $registry_name (optional) expandRelationships => [1/0] (optional) @@ -1769,6 +1772,7 @@ return &_relationshipsPayload($payload); } + sub _relationshipsPayload { my ($payload) = @_; return undef unless $payload; @@ -1779,23 +1783,32 @@ my $x = $doc->getElementsByTagName("Relationship"); my $no_relationships = $x->size(); for ( my $n = 1 ; $n <= $no_relationships ; ++$n ) { - my $relationshipType = - $x->get_node($n)->getAttributeNode('relationshipType') - ; # may or may not have a name + my $relationshipType = $x->get_node($n)->getAttributeNode('relationshipType'); # may or may not have a name if ($relationshipType) { $relationshipType = $relationshipType->getValue(); - } - else { - return - "FAILED! must include a relationshipType in every relationship\n"; + } else { + return "FAILED! must include a relationshipType in every relationship\n"; } my @child = $x->get_node($n)->childNodes; - foreach (@child) { - next unless $_->nodeType == ELEMENT_NODE; - my @child2 = $_->childNodes; - foreach (@child2) { - next unless $_->nodeType == TEXT_NODE; - push @{ $relationships{$relationshipType} }, $_->toString; + foreach my $child(@child) { + my ($lsid, $article, $term) = ("", "", ""); + next unless $child->nodeType == ELEMENT_NODE; + my $lsidattr = $child->getAttributeNode('lsid'); # may or may not have a name + if ($lsidattr) { + $lsid = $lsidattr->getValue(); + } + my $ARTattr = $child->getAttributeNode('articleName'); # may or may not have a name + if ($ARTattr) { + $article = $ARTattr->getValue(); + } + my %info; + $info{lsid} = $lsid; + ($info{articleName} = $article) if $article; + my @child2 = $child->childNodes; + foreach my $child2(@child2) { + next unless $child2->nodeType == TEXT_NODE; + $info{term} = $child2->toString; + push @{ $relationships{$relationshipType} }, \%info; } } } From mwilkinson at pub.open-bio.org Wed Nov 23 20:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 15:58:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaG7017590@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/t In directory pub.open-bio.org:/tmp/cvs-serv17528/t Modified Files: Client-Central.t Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/t Client-Central.t,1.44,1.45 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/t/Client-Central.t,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/22 20:05:00 1.44 +++ /home/repository/moby/moby-live/Perl/t/Client-Central.t 2005/11/23 20:58:36 1.45 @@ -51,20 +51,20 @@ # Reconnect to MOBY Central here, since other connections # will have gone out of scope by the time we get to this END block. # Also can't use %Obj, - my $C = MOBY::Client::Central->new(); - my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); - $r = $C->deregisterService( serviceName => 'myfirstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => '1myfirstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'my]firstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'myf_irstservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterService( serviceName => 'mysecondservice', - authURI => 'test.suite.com' ); - $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); - $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); +# my $C = MOBY::Client::Central->new(); +# my $r = $C->deregisterObjectClass( objectType => "Rubbish" ); +# $r = $C->deregisterService( serviceName => 'myfirstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => '1myfirstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'my]firstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'myf_irstservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterService( serviceName => 'mysecondservice', +# authURI => 'test.suite.com' ); +# $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); +# $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); }; # Can we connect to the registry? @@ -183,19 +183,22 @@ $r = $C->Relationships(objectType => $Obj{objectType}); isa_ok($r, "HASH", "Relationship types hash") - or diag("Relationships didn't return a hashref for object types") ; + or diag("Object Relationships didn't return a hashref for object types") ; isa_ok( $r->{'isa'}, 'ARRAY') - or diag("Relationships didn't return a hash of arrayrefs"); -is(shift @{$r->{'isa'}}, "Object") - or diag("Relationships(objectType) doesn't have the right parentage."); + or diag("Object Relationships didn't return a hash of arrayrefs"); +isa_ok($r->{'isa'}->[0], "HASH") + or diag("Object Relationships didn't return a hash of arrayrefs of hasrefs"); +is($r->{'isa'}->[0]->{term}, "Object") + or diag("Object Relationships(objectType) doesn't have the right parentage."); $r = $C->Relationships(serviceType => $ServiceType{serviceType}); isa_ok($r, "HASH", "Relationship types hash") - or diag("Relationships didn't return a hashref for service types") ; -#print STDERR "\n\n\nkeys ",(keys %rel), "\n\n\n"; + or diag("Service Relationships didn't return a hashref for service types") ; isa_ok($r->{'isa'}, 'ARRAY') - or diag("Relationships didn't return a hash of arrayrefs for services"); -is(shift @{$r->{'isa'}}, + or diag("Service Relationships didn't return a hash of arrayrefs for services"); +isa_ok($r->{'isa'}->[0], "HASH") + or diag("Service Relationships didn't return a hash of arrayrefs of hasrefs"); +is($r->{'isa'}->[0]->{term}, $ServiceType{Relationships}->{ISA}->[0]) or diag("Relationships (serviceType) doesn't have the right parentage."); From mwilkinson at pub.open-bio.org Wed Nov 23 20:58:36 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 15:58:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232058.jANKwaqj017551@pub.open-bio.org> mwilkinson Wed Nov 23 15:58:36 EST 2005 Update of /home/repository/moby/moby-live/Perl/MOBY In directory pub.open-bio.org:/tmp/cvs-serv17528/MOBY Modified Files: Central.pm OntologyServer.pm Log Message: modified the Perl Client API a little bit (in a way that is reflective of how I would like to modify it overall). Changed the Relationships call such that it returns (a) the articleName as well as the related object,and (b) returns these as a hashref rather than a listref. The MOBY Central API for the Relationships call has also changed in a way that should not break any existing code. A new attribute has been added to the objectType element in the Relationship call response. The attribute is articleName and it reflects the articleName of the associated objectType in the context of that relationship. moby-live/Perl/MOBY Central.pm,1.222,1.223 OntologyServer.pm,1.88,1.89 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v retrieving revision 1.222 retrieving revision 1.223 diff -u -r1.222 -r1.223 --- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/09/29 14:47:39 1.222 +++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/11/23 20:58:36 1.223 @@ -484,7 +484,8 @@ (@ISAlist = @{$relationships->{$isa}}) if ($relationships->{$isa}) ; # for each of the inherited parents, check their articleNames foreach my $ISA(@ISAlist){ # $ISA = [lsid, articleName] (but articleName shuld be null anyway in this case) - my $what_it_is = shift @$ISA; + my $what_it_is = $ISA->{lsid}; + # my $articleName = $ISA->{articleName} map {($x=1) if ($what_it_is eq $_)} @primitive_lsids; # test primitives against this one } return $x; # return flag state @@ -2892,8 +2893,8 @@ outputXML : - ExistingServiceType - ExistingServiceType + ExistingObjectType + ExistingObjectType .... @@ -2983,12 +2984,12 @@ $response .= "\n"; foreach my $lsid_article ( @lsids_articles ) { - my ($lsid, $articleName) = @$lsid_article; - # ugh... I have to cheat here because the term is not returned from the Ontology Server - # one day we may have to fix this... - $lsid =~ /urn\:lsid\:[^\:]+\:[^\:]+\:([^\:]+)/; # get the term portion of the LSID - $term = $1; - $response .= "<${ontology}Type lsid='$lsid'>$term\n"; + my $lsid = $lsid_article->{lsid}; + my $term = $lsid_article->{term}; + my $articleName = $lsid_article->{articleName}; + $response .= "<${ontology}Type lsid='$lsid' "; + $response .= "articleName='$articleName'" if $articleName; + $response .= ">$term\n"; } $response .= "\n"; } =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/09/30 23:14:12 1.88 +++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/11/23 20:58:36 1.89 @@ -223,6 +223,94 @@ } } +=head2 objectInfo + +=cut + +sub objectInfo{ + my ( $self, %args ) = @_; + + $CONFIG ||= MOBY::Config->new; # exported by Config.pm + my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyobject' ); + + my $term = $args{term}; + $term =~ s/^moby://; # if the term is namespaced, then remove that + my $sth; + return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'object' ); + return (0, undef, undef) unless $term; + + my $result; + + $result = $adaptor->query_object(type => $term); + my $row = shift(@$result); + #my $lsid = $row->{object_lsid}; + #my $type = $row->{object_type}; + #my $desc = $row->{description}; + #my $auth = $row->{authority}; + #my $email = $row->{contact_email}; + # + if ($row->{object_lsid}) + { # if it is in there, then it has been discovered regardless of being foreign or not + return $row; + } elsif ( _isForeignLSID($term) ) { # if not in our ontology, but is a foreign LSID, then pass it back verbatim + return {object_lsid => $term, + object_type => $term, + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } else { # under all other circumstances (i.e. not a term, or a non-existent biomoby LSID) then fail + return {object_lsid => "", + object_type => "", + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } +} + + +=head2 serviceInfo + +=cut + +sub serviceInfo{ + my ( $self, %args ) = @_; + + $CONFIG ||= MOBY::Config->new; # exported by Config.pm + my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyservice' ); + + my $term = $args{term}; + $term =~ s/^moby://; # if the term is namespaced, then remove that + my $sth; + return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'service' ); + return (0, undef, undef) unless $term; + + my $result; + + $result = $adaptor->query_service(type => $term); + my $row = shift(@$result); + + if ($row->{service_lsid}) + { # if it is in there, then it has been discovered regardless of being foreign or not + return $row; + } elsif ( _isForeignLSID($term) ) { # if not in our ontology, but is a foreign LSID, then pass it back verbatim + return {service_lsid => $term, + service_type => $term, + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } else { # under all other circumstances (i.e. not a term, or a non-existent biomoby LSID) then fail + return {service_lsid => "", + service_type => "", + description => "LSID $term does not exist in the biomoby.org Object Class system\n", + authority => "", + contact_email => "", + }; + } +} + sub _isMOBYLSID { my ($lsid) = @_; return 1 if $lsid =~ /^urn\:lsid\:biomoby.org/; @@ -536,7 +624,7 @@ (@ISAlist = @{$relationships->{$isa}}) if ($relationships->{$isa}) ; # for each of the inherited parents, check their articleNames foreach my $ISA(@ISAlist){ # $ISA = [lsid, articleName] (but articleName shuld be null anyway in this case) - my $what_it_is = shift @$ISA; + my $what_it_is = $ISA->{lsid}; # check the hasa relationships for common articleName $foundCommonArticleNameFlag += _compareArticleNames(OS => $OS, type => $what_it_is, relationship => $hasalsid, targetArticleName => $articleName); # check the has relationships for common articleName @@ -564,7 +652,7 @@ if ($contents->{$content}){ my @CONTENTlist = @{$contents->{$content}}; foreach my $CONTAINED(@CONTENTlist){ - $foundCommonArticleNameFlag = 1 if ($CONTAINED->[1] eq $targetArticleName); #->[1] is the articleName field + $foundCommonArticleNameFlag = 1 if ($CONTAINED->{articleName} eq $targetArticleName); #->[1] is the articleName field } } } @@ -1111,11 +1199,11 @@ return \%result; } -=head2 Relationships +=head2 RelationshipsDEPRECATED =cut -sub Relationships { +sub RelationshipsDEPRECATED { # this entire subroutine assumes that there is NOT multiple parenting!! my ( $self, %args ) = @_; @@ -1167,6 +1255,69 @@ return \%results; #results(relationship} = [[lsid1,articleNmae], [lsid2, articleName], [lsid3, articleName]] } + +=head2 Relationships + +=cut + +sub Relationships { + + # this entire subroutine assumes that there is NOT multiple parenting!! + my ( $self, %args ) = @_; + my $ontology = $args{ontology} ? $args{ontology} : $self->ontology; + my $term = $args{term}; + my $relationship = $args{relationship}; + my $direction = $args{direction} ? $args{direction} : 'root'; + my $expand = $args{expand} ? 1 : 0; + return + unless ( $ontology + && $term + && ( ( $ontology eq 'service' ) || ( $ontology eq 'object' ) ) ); + + # convert $term into an LSID if it isn't already + if ( $ontology eq 'service' ) { + $term = $self->getServiceURI($term); + $relationship ||="isa"; + my $OS = MOBY::OntologyServer->new(ontology => 'relationship'); + $relationship = $OS->getRelationshipURI("service", $relationship); + } elsif ( $ontology eq 'object' ) { + $term = $self->getObjectURI($term); + $relationship ||="isa"; + my $OS = MOBY::OntologyServer->new(ontology => 'relationship'); + $relationship = $OS->getRelationshipURI("object", $relationship); + } + my %results; + while ( ( $term ne 'urn:lsid:biomoby.org:objectclass:Object' ) + && ( $term ne 'urn:lsid:biomoby.org:servicetype:Service' ) ) + { + my $defs = $self->_doRelationshipsQuery( $ontology, $term, + $relationship, $direction ); + return {[]} unless $defs; # somethig has gone terribly wrong! + my $lsid; + my $rel; + my $articleName; + foreach ( @{$defs} ) { + $lsid = $_->[0]; + $rel = $_->[1]; + $articleName = $_->[2]; + $articleName ||=""; + if ($ontology eq 'object'){ + my $info = $self->objectInfo(term => $lsid); # we need to get the term name, and that doesn't come from here + my $term = $info->{object_type}; + push @{ $results{$rel} }, {lsid => $lsid, articleName => $articleName, term => $term}; + } else { + my $info = $self->serviceInfo(term => $lsid); # we need to get the term name, and that doesn't come from here + my $term = $info->{service_type}; + push @{ $results{$rel} }, {lsid => $lsid, term => $term}; + } + } + last unless ($expand); + last unless ( $direction eq "root" ); # if we aren't going to root, then be careful or we'll loop infnitely + $term = $lsid; # this entire subroutine assumes that there is NOT multiple parenting... + } + return \%results; +} + sub _doRelationshipsQuery { my ( $self, $ontology, $term, $relationship, $direction ) = @_; $CONFIG ||= MOBY::Config->new; # exported by Config.pm @@ -1260,7 +1411,8 @@ #${$lsids}{relationshiptype}=[lsid, lsid, lsid]; foreach my $lsid_article ( @{ $lsids->{$relationship} } ) { # go through the related terms - my ($lsid, $article) = @{$lsid_article}; + my $lsid = $lsid_article->{lsid}, + my $article = $lsid_article->{articleName}; $debug && _LOG("found $lsid as relationship"); next if ( defined $IDS{$lsid} ) From mwilkinson at pub.open-bio.org Wed Nov 23 21:01:05 2005 From: mwilkinson at pub.open-bio.org (Mark Wilkinson) Date: Wed, 23 Nov 2005 16:01:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232101.jANL15LI017666@pub.open-bio.org> mwilkinson Wed Nov 23 16:01:05 EST 2005 Update of /home/repository/moby/moby-live/Docs/MOBY-S_API In directory pub.open-bio.org:/tmp/cvs-serv17645/MOBY-S_API Modified Files: XMLPayloads.html Log Message: updated documentation for new Relationships output moby-live/Docs/MOBY-S_API XMLPayloads.html,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html 2005/10/24 17:31:57 1.4 +++ /home/repository/moby/moby-live/Docs/MOBY-S_API/XMLPayloads.html 2005/11/23 21:01:05 1.5 @@ -415,7 +415,7 @@ <Relationships> <Relationship relationshipType="RelationshipOntologyTerm1" lsid='urn:lsid:authority.uri:namespace:id'> - [ <objecctType lsid='...'>OntologyTerm</objectType> | + [ <objecctType lsid='...' articleName='foo'>OntologyTerm</objectType> | <serviceType lsid='...'>OntologyTerm</serviceType> ] ... </Relationship> From gss at pub.open-bio.org Wed Nov 23 23:53:03 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:53:03 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232353.jANNr3Ul018009@pub.open-bio.org> gss Wed Nov 23 18:53:03 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary In directory pub.open-bio.org:/tmp/cvs-serv17984/src/org/semanticmoby/vocabulary Modified Files: MOBY.java Log Message: Removed keyword property; added metadata property s-moby/ref-impl/core/src/org/semanticmoby/vocabulary MOBY.java,1.5,1.6 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/03 22:31:42 1.5 +++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/vocabulary/MOBY.java 2005/11/23 23:53:03 1.6 @@ -59,14 +59,10 @@ public static final Property lastModifiedDate = property(getURI(), "lastModifiedDate"); - public static final Property Property = - property(getURI(), "Property"); - - public static final Property keyword = - property(getURI(), "keyword"); + public static final Property metadata = + property(getURI(), "metadata"); public static String getURI() { - return "http://www.semanticmoby.org/ontologies/core/"; } From gss at pub.open-bio.org Wed Nov 23 23:53:38 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:53:38 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232353.jANNrc1m018045@pub.open-bio.org> gss Wed Nov 23 18:53:38 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/util In directory pub.open-bio.org:/tmp/cvs-serv18024/WebRoot/ontologies/util Added Files: N3Serialization Serialization RDFXMLSerialization Log Message: Converted from N3 s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/util N3Serialization,NONE,1.1 Serialization,NONE,1.1 RDFXMLSerialization,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 23:54:45 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:54:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232354.jANNsjeI018115@pub.open-bio.org> gss Wed Nov 23 18:54:44 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies In directory pub.open-bio.org:/tmp/cvs-serv18063/WebRoot/examples/ontologies Removed Files: GreetingResource ProxyResource.n3 FASTASequence index.html GeneSymbol CerealGrainSearchResource GeneDetails.n3 FASTASequence.n3 GreetingResource.n3 ElegansSearchResource BlastResource.n3 ArabidopsisSearchResource.n3 ArabidopsisSearchResource GeneSymbol.n3 PubSearchResource DrosophilaSearchResource.n3 PubSearchResource.n3 geneName ElegansSearchResource.n3 BlastResource greeting.n3 geneName.n3 GeneDetails DrosophilaSearchResource SacchromycesSearchResource.n3 greeting ProxyResource sequenceText.n3 CerealGrainSearchResource.n3 SacchromycesSearchResource sequenceText Log Message: These classes were here only to provide keywords; that functionality is now replaced with the moby:metadata Pull model s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies GreetingResource,1.1,NONE ProxyResource.n3,1.1,NONE FASTASequence,1.1,NONE index.html,1.2,NONE GeneSymbol,1.1,NONE CerealGrainSearchResource,1.1,NONE GeneDetails.n3,1.1,NONE FASTASequence.n3,1.1,NONE GreetingResource.n3,1.1,NONE ElegansSearchResource,1.1,NONE BlastResource.n3,1.1,NONE ArabidopsisSearchResource.n3,1.1,NONE ArabidopsisSearchResource,1.1,NONE GeneSymbol.n3,1.1,NONE PubSearchResource,1.1,NONE DrosophilaSearchResource.n3,1.1,NONE PubSearchResource.n3,1.1,NONE geneName,1.1,NONE ElegansSearchResource.n3,1.1,NONE BlastResource,1.1,NONE greeting.n3,1.1,NONE geneName.n3,1.1,NONE GeneDetails,1.1,NONE DrosophilaSearchResource,1.1,NONE SacchromycesSearchResource.n3,1.1,NONE greeting,1.1,NONE ProxyResource,1.1,NONE sequenceText.n3,1.1,NONE CerealGrainSearchResource.n3,1.1,NONE SacchromycesSearchResource,1.1,NONE sequenceText,1.1,NONE rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GreetingResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ProxyResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/FASTASequence,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/index.html,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneSymbol,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/CerealGrainSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneDetails.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/FASTASequence.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GreetingResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ElegansSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/BlastResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ArabidopsisSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ArabidopsisSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneSymbol.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/PubSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/DrosophilaSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/PubSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/geneName,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ElegansSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/BlastResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/greeting.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/geneName.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/GeneDetails,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/DrosophilaSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/SacchromycesSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/greeting,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/ProxyResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/sequenceText.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/CerealGrainSearchResource.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/SacchromycesSearchResource,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/ontologies/RCS/sequenceText,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 23:55:26 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:55:26 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232355.jANNtQUG018195@pub.open-bio.org> gss Wed Nov 23 18:55:25 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core In directory pub.open-bio.org:/tmp/cvs-serv18130/WebRoot/ontologies/core Modified Files: outputURI oneLineDescription index.html operatesOn Subject.n3 name.n3 name oneLineDescription.n3 Subject Added Files: inputURI aboutURI metadata.n3 aboutURI.n3 inputURI.n3 outputURI.n3 metadata Removed Files: resourceAboutURI.n3 subjectProperty.n3 Service keyword subjectProperty Service.n3 resourceAboutURI keyword.n3 Log Message: Misc cleanup of ontology elements s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core inputURI,NONE,1.1 aboutURI,NONE,1.1 metadata.n3,NONE,1.1 aboutURI.n3,NONE,1.1 inputURI.n3,NONE,1.1 outputURI.n3,NONE,1.1 metadata,NONE,1.1 outputURI,1.1,1.2 oneLineDescription,1.2,1.3 index.html,1.2,1.3 operatesOn,1.3,1.4 Subject.n3,1.1,1.2 name.n3,1.2,1.3 name,1.2,1.3 oneLineDescription.n3,1.2,1.3 Subject,1.1,1.2 resourceAboutURI.n3,1.1,NONE subjectProperty.n3,1.1,NONE Service,1.1,NONE keyword,1.1,NONE subjectProperty,1.1,NONE Service.n3,1.1,NONE resourceAboutURI,1.1,NONE keyword.n3,1.1,NONE =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI 2005/10/28 04:08:40 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/outputURI 2005/11/23 23:55:25 1.2 @@ -1,12 +1,12 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription 2005/11/23 23:55:25 1.3 @@ -1,12 +1,12 @@ + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/index.html 2005/11/23 23:55:25 1.3 @@ -27,9 +27,9 @@
  • =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/03 22:37:29 1.3 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/operatesOn 2005/11/23 23:55:25 1.4 @@ -4,33 +4,33 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > + + + + + + + + - + + + + + - + - + - - - - - - - - - - - - - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject.n3 2005/11/23 23:55:25 1.2 @@ -10,9 +10,4 @@ a owl:Restriction ; owl:onProperty moby:mapsTo ; owl:minCardinality "1"^^xsd:nonNegativeInteger - ] ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty moby:subjectProperty ; - owl:minCardinality "1"^^xsd:nonNegativeInteger - ] . + ] . \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name.n3 2005/11/23 23:55:25 1.3 @@ -9,7 +9,7 @@ rdfs:domain [ rdfs:subClassOf [ a owl:Class ; - owl:unionOf (moby:Service moby:Subject moby:Object) + owl:unionOf (moby:Resource moby:Subject moby:Object) ] ]; rdfs:range xsd:string . \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/name 2005/11/23 23:55:25 1.3 @@ -9,23 +9,23 @@ - - + + + + + + + - + + + + - - - - - - - - - + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3 2005/10/28 04:08:40 1.2 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/oneLineDescription.n3 2005/11/23 23:55:25 1.3 @@ -6,5 +6,5 @@ moby:oneLineDescription a owl:DatatypeProperty ; - rdfs:domain moby:Service ; + rdfs:domain moby:Resource ; rdfs:range xsd:string . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject 2004/07/15 20:27:14 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/Subject 2005/11/23 23:55:25 1.2 @@ -1,22 +1,16 @@ - - 1 - - - + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - + + 1 - - + \ No newline at end of file rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/resourceAboutURI.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/subjectProperty.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/keyword,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/subjectProperty,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/Service.n3,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/resourceAboutURI,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/core/RCS/keyword.n3,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 23:55:45 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:55:45 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232355.jANNtjUI018233@pub.open-bio.org> gss Wed Nov 23 18:55:45 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies In directory pub.open-bio.org:/tmp/cvs-serv18208/WebRoot/ontologies Modified Files: index.html Log Message: Fixed a typo s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies index.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html 2004/07/15 20:27:16 1.1 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/ontologies/index.html 2005/11/23 23:55:44 1.2 @@ -20,11 +20,11 @@ - + - +
    - - Technical Overview - - - An overview of how to use VPIN-compliant OWL graphs to search for - resources that match a query graph -
    Advertising Resources @@ -52,7 +41,7 @@ - A set of Developer tools to convert and validate OWL graphs + Developer tools to convert OWL graphs
    - - - + + + @@ -51,12 +51,12 @@ - - - - - - + + + + + + @@ -66,12 +66,6 @@ - - - - - -
    ServiceN3RDF/XML
    ResourceN3RDF/XML
    Graph N3 RDF/XML
    oneLineDescription N3 RDF/XML
    resourceAboutURIN3RDF/XML
    keywordN3RDF/XML
    aboutURIN3RDF/XML
    metadataN3RDF/XML
    operatesOn N3 RDF/XML
    mapsTo N3 RDF/XML
    subjectPropertyN3RDF/XML
    objectPropertyN3RDF/XML
    GroupDescription
    Corecore Core classes and properties, which, taken together, form the backbone "canonical" structure of Semantic MOBY graphs.
    Utilityutil Utility classes and properties
    From gss at pub.open-bio.org Wed Nov 23 23:56:36 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:56:36 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232356.jANNuavs018267@pub.open-bio.org> gss Wed Nov 23 18:56:36 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies In directory pub.open-bio.org:/tmp/cvs-serv18246/WebRoot/examples/proxies Added Files: ncbi-megablast-metadata.txt gramene-query-metadata.txt sgd-quicksearch-metadata.txt wormbase-query-metadata.txt flybase-genequery-metadata.txt tair-seqviewer-metadata.txt tair-mapviewer-metadata.txt pubmed-metadata.txt Log Message: Added files containing keywords to replace ontology elements that were only there to provide keywords s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies ncbi-megablast-metadata.txt,NONE,1.1 gramene-query-metadata.txt,NONE,1.1 sgd-quicksearch-metadata.txt,NONE,1.1 wormbase-query-metadata.txt,NONE,1.1 flybase-genequery-metadata.txt,NONE,1.1 tair-seqviewer-metadata.txt,NONE,1.1 tair-mapviewer-metadata.txt,NONE,1.1 pubmed-metadata.txt,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 23:57:02 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:57:02 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNv2Q9018357@pub.open-bio.org> gss Wed Nov 23 18:57:02 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies In directory pub.open-bio.org:/tmp/cvs-serv18272/WebRoot/examples/proxies Modified Files: wormbase-query tair-seqviewer flybase-genequery ncbi-megablast.n3 gramene-query.n3 sgd-quicksearch.n3 tair-seqviewer.n3 tair-mapviewer tair-mapviewer.n3 pubmed ncbi-megablast sgd-quicksearch pubmed.n3 gramene-query wormbase-query.n3 flybase-genequery.n3 Log Message: Updated to remove keyword properties, add metadata properties s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies wormbase-query,1.5,1.6 tair-seqviewer,1.6,1.7 flybase-genequery,1.5,1.6 ncbi-megablast.n3,1.5,1.6 gramene-query.n3,1.5,1.6 sgd-quicksearch.n3,1.6,1.7 tair-seqviewer.n3,1.6,1.7 tair-mapviewer,1.5,1.6 tair-mapviewer.n3,1.5,1.6 pubmed,1.5,1.6 ncbi-megablast,1.5,1.6 sgd-quicksearch,1.6,1.7 pubmed.n3,1.5,1.6 gramene-query,1.5,1.6 wormbase-query.n3,1.5,1.6 flybase-genequery.n3,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - - - - - + - + - - WormBase Query C. elegans database query at wormbase.org http://www.wormbase.org/ - + http://www.semanticmoby.org/examples/proxies/wormbase-query-metadata.txt + + + + + - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer 2005/11/23 23:57:02 1.7 @@ -1,29 +1,27 @@ - + + - + - + - - TAIR Sequence Viewer Arabidopsis Sequence Viewer resource provided by TAIR http://www.arabidopsis.org/servlets/sv - + http://www.semanticmoby.org/examples/proxies/tair-seqviewer-metadata.txt + - - - + + - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@ - - - FlyBase Gene Query - http://flybase.bio.indiana.edu/genes/fbgquery.hform FlyBase gene query form at flybase.bio.indiana.edu + http://flybase.bio.indiana.edu/genes/fbgquery.hform + http://www.semanticmoby.org/examples/proxies/flybase-genequery-metadata.txt + - + + - + - - + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:ncbi-megablast - a moby:Resource, exterms:ProxyResource, exterms:BlastResource ; + a moby:Resource, ; moby:name "NCBI Mega BLAST" ; moby:oneLineDescription "NCBI MegaBlast resource provided by NCBI" ; moby:inputURI "http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/ncbi-megablast-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:gramene-query - a moby:Resource, exterms:ProxyResource, exterms:CerealGrainSearchResource ; + a moby:Resource ; moby:name "Gramene Query" ; moby:oneLineDescription "Cereal grains database query at gramene.org" ; moby:inputURI "http://www.gramene.org/" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/gramene-query-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch.n3 2005/11/23 23:57:02 1.7 @@ -1,22 +1,22 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:sgd-quicksearch - a moby:Resource, exterms:ProxyResource, exterms:SacchromycesSearchResource ; + a moby:Resource ; moby:name "SGD Quick Search" ; moby:oneLineDescription "Saccharomyces cerevisiae quick search" ; moby:inputURI "http://db.yeastgenome.org/cgi-bin/search/quickSearch" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/sgd-quicksearch-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ - a moby:Subject, exterms:GeneSymbol ; + a moby:Subject ; moby:mapsTo [ - a moby:Object, exterms:GeneDetails + a moby:Object ] ] ] . =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-seqviewer.n3 2005/11/23 23:57:02 1.7 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:tair-seqviewer - a moby:Resource, exterms:ProxyResource, exterms:ArabidopsisSearchResource ; + a moby:Resource ; moby:name "TAIR Sequence Viewer" ; moby:oneLineDescription "Arabidopsis Sequence Viewer resource provided by TAIR" ; moby:inputURI "http://www.arabidopsis.org/servlets/sv" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/tair-seqviewer-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@ - - TAIR Map Viewer Arabidopsis Map Viewer resource provided by TAIR http://www.arabidopsis.org/servlets/mapper + http://www.semanticmoby.org/examples/proxies/tair-mapviewer-metadata.txt - - - - + + + + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/tair-mapviewer.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:tair-mapviewer - a moby:Resource, exterms:ProxyResource, exterms:ArabidopsisSearchResource ; + a moby:Resource ; moby:name "TAIR Map Viewer" ; moby:oneLineDescription "Arabidopsis Map Viewer resource provided by TAIR" ; moby:inputURI "http://www.arabidopsis.org/servlets/mapper" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/tair-mapviewer-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed 2005/11/23 23:57:02 1.6 @@ -1,6 +1,5 @@
    - - - - - PubMed Entrez PubMed resource provided by NCBI http://www.ncbi.nlm.nih.gov/entrez/query.fcgi? + http://www.semanticmoby.org/examples/proxies/pubmed-metadata.txt - \ No newline at end of file + + + + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/ncbi-megablast 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - - + + - - + - + + - NCBI Mega BLAST - - http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2 - + NCBI Mega BLAST NCBI MegaBlast resource provided by NCBI - + http://www.ncbi.nlm.nih.gov/BLAST/Blast.cgi?CMD=Web&LAYOUT=TwoWindows&AUTO_FORMAT=Semiauto&ALIGNMENTS=50&ALIGNMENT_VIEW=Tabular&CLIENT=web&DATABASE=nr&DESCRIPTIONS=100&ENTREZ_QUERY=%28none%29&EXPECT=10&FILTER=L&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&NCBI_GI=on&PAGE=MegaBlast&SERVICE=plain&SET_DEFAULTS.x=34&SET_DEFAULTS.y=8&SHOW_OVERVIEW=on&END_OF_HTTPGET=Yes&SHOW_LINKOUT=yes&GET_SEQUENCE=yes&PERC_IDENT=None,1,-2 + http://www.semanticmoby.org/examples/proxies/ncbi-megablast-metadata.txt + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/sgd-quicksearch 2005/11/23 23:57:02 1.7 @@ -1,6 +1,5 @@ - - - - - - - - - - - SGD Quick Search Saccharomyces cerevisiae quick search http://db.yeastgenome.org/cgi-bin/search/quickSearch + http://www.semanticmoby.org/examples/proxies/sgd-quicksearch-metadata.txt + + + + + + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/pubmed.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:pubmed - a moby:Resource, exterms:ProxyResource, exterms:PubSearchResource ; + a moby:Resource ; moby:name "PubMed" ; moby:oneLineDescription "Entrez PubMed resource provided by NCBI" ; moby:inputURI "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/pubmed-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/gramene-query 2005/11/23 23:57:02 1.6 @@ -1,29 +1,27 @@ - + + + + + + - - + - Gramene Query + Gramene Query + Cereal grains database query at gramene.org http://www.gramene.org/ - - + http://www.semanticmoby.org/examples/proxies/gramene-query-metadata.txt - Cereal grains database query at gramene.org - - - - - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3 2005/11/04 06:45:58 1.5 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/wormbase-query.n3 2005/11/23 23:57:02 1.6 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:wormbase-query - a moby:Resource, exterms:ProxyResource, exterms:ElegansSearchResource ; + a moby:Resource ; moby:name "WormBase Query" ; moby:oneLineDescription "C. elegans database query at wormbase.org" ; moby:inputURI "http://www.wormbase.org/" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/wormbase-query-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3 2005/11/04 06:45:58 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/proxies/flybase-genequery.n3 2005/11/23 23:57:02 1.7 @@ -1,16 +1,16 @@ @prefix moby: . @prefix ex: . - at prefix exterms: . @prefix rdfs: . @prefix rdf: . @prefix owl: . @prefix xsd: . ex:flybase-genequery - a moby:Resource, exterms:ProxyResource, exterms:DrosophilaSearchResource ; + a moby:Resource ; moby:name "FlyBase Gene Query" ; moby:oneLineDescription "FlyBase gene query form at flybase.bio.indiana.edu" ; moby:inputURI "http://flybase.bio.indiana.edu/genes/fbgquery.hform" ; + moby:metadata "http://www.semanticmoby.org/examples/proxies/flybase-genequery-metadata.txt"; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Wed Nov 23 23:57:21 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:57:21 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNvL46018391@pub.open-bio.org> gss Wed Nov 23 18:57:21 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv18370/WebRoot/examples/hello Added Files: metadata.txt Log Message: Added files containing keywords to replace ontology elements that were only there to provide keywords s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello metadata.txt,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 23:57:31 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:57:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232357.jANNvVFW018425@pub.open-bio.org> gss Wed Nov 23 18:57:31 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello In directory pub.open-bio.org:/tmp/cvs-serv18396/WebRoot/examples/hello Modified Files: hello-world.rdf hello-world.n3 Log Message: Updated to remove keyword properties, add metadata properties s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello hello-world.rdf,1.6,1.7 hello-world.n3,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/03 22:37:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.rdf 2005/11/23 23:57:31 1.7 @@ -6,25 +6,25 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:moby="http://www.semanticmoby.org/ontologies/core/" > - - - - - VPIN Hello World resource Simple example of a VPIN resource http://www.semanticmoby.org/examples/hello-world http://www.semanticmoby.org/examples/display-hello-world - + http://www.semanticmoby.org/examples/hello/metadata.txt + - - + + - + - + + + + + \ No newline at end of file =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/03 22:37:11 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/examples/hello/hello-world.n3 2005/11/23 23:57:31 1.7 @@ -7,11 +7,12 @@ @prefix xsd: . ex:hello-world - a moby:Resource, exterms:GreetingResource ; + a moby:Resource ; moby:name "VPIN Hello World resource" ; moby:oneLineDescription "Simple example of a VPIN resource" ; moby:aboutURI "http://www.semanticmoby.org/examples/hello-world" ; moby:outputURI "http://www.semanticmoby.org/examples/display-hello-world" ; + moby:metadata "http://www.semanticmoby.org/examples/hello/metadata.txt" ; moby:operatesOn [ a moby:Graph ; moby:hasMapping [ From gss at pub.open-bio.org Wed Nov 23 23:58:15 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:58:15 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232358.jANNwF5n018463@pub.open-bio.org> gss Wed Nov 23 18:58:15 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer In directory pub.open-bio.org:/tmp/cvs-serv18438/WebRoot/developer Modified Files: dev-tools.jsp Log Message: Fixed a typo; removed unused forms s-moby/ref-impl/semanticmoby.org/WebRoot/developer dev-tools.jsp,1.6,1.7 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/17 02:53:03 1.6 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/WebRoot/developer/dev-tools.jsp 2005/11/23 23:58:15 1.7 @@ -13,7 +13,7 @@ Convert a Graph to a Different Format -
    + Paste a graph, select its input format, and press "Convert Graph" to convert to the other format @@ -48,61 +48,6 @@
    -
    - -

    - List All Statements in the S-MOBY Metadata Repository -

    - -
    - - - -
    - -
    - -

    - Validate an OWL Graph using Jena -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see what type of - OWL the graph represents - - - -
    -
    - - - -
    - -
    - -

    - Validate an OWL Graph for MOBY Canonical Form -

    - -
    - - Paste a graph in RDF/XML format and press "Validate" to see if it is MOBY - canonical form - - - -
    -
    - - - -
    - -
    - <%@ include file="/footer.jsp" %> From gss at pub.open-bio.org Wed Nov 23 23:58:48 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:58:48 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232358.jANNwml4018499@pub.open-bio.org> gss Wed Nov 23 18:58:48 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv18476/src/org/semanticmoby/ref/tools Removed Files: KeywordFinder.java KeywordList.java Log Message: Functionality supplanted by MetadataRetriever class s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools KeywordFinder.java,1.10,NONE KeywordList.java,1.7,NONE rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/RCS/KeywordFinder.java,v: No such file or directory rcsdiff: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/RCS/KeywordList.java,v: No such file or directory From gss at pub.open-bio.org Wed Nov 23 23:59:09 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:59:09 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232359.jANNx9ol018533@pub.open-bio.org> gss Wed Nov 23 18:59:09 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools In directory pub.open-bio.org:/tmp/cvs-serv18512/src/org/semanticmoby/ref/tools Added Files: MetadataRetriever.java Log Message: Helper class for Pull model of keyword registration s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools MetadataRetriever.java,NONE,1.1 From gss at pub.open-bio.org Wed Nov 23 23:59:37 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 18:59:37 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511232359.jANNxbsw018571@pub.open-bio.org> gss Wed Nov 23 18:59:37 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv18546/src/org/semanticmoby/ref/tools/db Modified Files: StorageManager.java Log Message: Use the new MetadataRetriever to find keywords to register s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db StorageManager.java,1.10,1.11 =================================================================== RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/15 22:34:08 1.10 +++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db/StorageManager.java 2005/11/23 23:59:36 1.11 @@ -12,6 +12,7 @@ import org.semanticmoby.vocabulary.*; import java.sql.Connection; +import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.*; @@ -93,14 +94,11 @@ Statement stmt = it.nextStatement(); Resource subject = stmt.getSubject(); - String subjectURI = subject.getURI(); - - if (subject.isAnon() || - ( - (subjectURI != null) && - subjectURI.startsWith(uriString) - )) { + String subjectURI = subject.getURI(); + if ((subject.isAnon()) || + ((subjectURI != null) && + (subjectURI.startsWith(uriString)))) { dbModel.add(stmt); } } @@ -117,9 +115,14 @@ // Add keywords associated with the resource // - KeywordFinder finder = new KeywordFinder(resource); - addKeywords(resource.getResource().getURI(), finder.getKeywords(), - dbModel); + MetadataRetriever retriever = new MetadataRetriever( + resource.getJenaModel(), 10000); + + Set words = retriever.getKeywords(); + + if (! words.isEmpty()) { + addKeywords(words, uriString, dbModel); + } // Commit the transaction on the database model // @@ -141,71 +144,65 @@ } } - - private void addKeywords(String resourceURI, KeywordList list, Model model) + private void addKeywords(Set keywords, String resourceURI, Model model) throws StorageException { - + + PreparedStatement stmt = null; + try { - ModelRDB dbModel = (ModelRDB) model; - Connection conn = dbModel.getConnection().getConnection(); + ModelRDB dbModel = (ModelRDB) model; + Connection conn = dbModel.getConnection().getConnection(); - java.sql.Statement sql = conn.createStatement(); - - doAddKeywords(resourceURI, list.getResourceKeywords(), "P", sql); - doAddKeywords(resourceURI, list.getSubjectKeywords(), "S", sql); - doAddKeywords(resourceURI, list.getObjectKeywords(), "O", sql); + stmt = conn.prepareStatement( + "INSERT INTO MOBY_KEYWORD " + + " (keyword, resource_uri, applies_to) " + + "VALUES ( ?, ?, '' )"); + + for (Iterator it = keywords.iterator(); it.hasNext();) { + String keyword = (String) it.next(); + stmt.setString(1, keyword); + stmt.setString(2, resourceURI); + stmt.execute(); + } + } catch (Throwable t) { - t.printStackTrace(); throw new StorageException(t); + } finally { + if (stmt != null) { + try { + stmt.close(); + } catch (Throwable t) {} + } } } - - private void doAddKeywords(String resourceURI, Iterator it, - String appliesTo, java.sql.Statement sql) - throws SQLException { - - while (it.hasNext()) { - - String keyword = it.next().toString(); - - StringBuffer sb = new StringBuffer(); - - sb.append("INSERT INTO MOBY_KEYWORD\n"); - sb.append(" (keyword, resource_uri, applies_to)\n"); - sb.append("values ('"); - sb.append(keyword.toLowerCase().trim()); - sb.append("', '"); - sb.append(resourceURI); - sb.append("', '"); - sb.append(appliesTo); - sb.append("')"); - - String queryString = sb.toString(); - - sql.execute(queryString); - } - } - - private void removeKeywords(String resourceURI, Model model) throws StorageException { - + + PreparedStatement stmt = null; + try { - ModelRDB dbModel = (ModelRDB) model; - Connection conn = dbModel.getConnection().getConnection(); - - java.sql.Statement sql = conn.createStatement(); + ModelRDB dbModel = (ModelRDB) model; + Connection conn = dbModel.getConnection().getConnection(); - sql.execute("DELETE FROM MOBY_KEYWORD WHERE resource_uri = '" + - resourceURI + "'"); + stmt = conn.prepareStatement( + "DELETE FROM MOBY_KEYWORD WHERE resource_uri = '?'"); + + stmt.setString(1, resourceURI); + stmt.execute(); + } catch (Throwable t) { - t.printStackTrace(); throw new StorageException(t); + } finally { + if (stmt != null) { + try { + stmt.close(); + } catch (Throwable t) {} + } } } From gss at pub.open-bio.org Thu Nov 24 00:00:05 2005 From: gss at pub.open-bio.org (Gary Schiltz) Date: Wed, 23 Nov 2005 19:00:05 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511240000.jAO005j8018610@pub.open-bio.org> gss Wed Nov 23 19:00:05 EST 2005 Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db In directory pub.open-bio.org:/tmp/cvs-serv18589/src/org/semanticmoby/ref/tools/db Added Files: ClearDB.java Log Message: Utility class to clear a database of Jena statements and MOBY keywords s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/db ClearDB.java,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 10:42:08 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 05:42:08 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241042.jAOAg8We020249@pub.open-bio.org> senger Thu Nov 24 05:42:07 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/panels In directory pub.open-bio.org:/tmp/cvs-serv20231/panels Log Message: Directory /home/repository/moby/moby-live/Java/docs/panels added to the repository moby-live/Java/docs/panels - New directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/-,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/New,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Java/docs/panels/RCS/directory,v: No such file or directory From senger at pub.open-bio.org Thu Nov 24 13:51:30 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:30 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpUHa020603@pub.open-bio.org> senger Thu Nov 24 08:51:30 EST 2005 Update of /home/repository/moby/moby-live/Java In directory pub.open-bio.org:/tmp/cvs-serv20584 Modified Files: build.xml Log Message: moby-live/Java build.xml,1.44,1.45 =================================================================== RCS file: /home/repository/moby/moby-live/Java/build.xml,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- /home/repository/moby/moby-live/Java/build.xml 2005/11/22 18:03:27 1.44 +++ /home/repository/moby/moby-live/Java/build.xml 2005/11/24 13:51:30 1.45 @@ -38,6 +38,7 @@ + @@ -290,6 +291,8 @@ 'excludepackagenames' below (use comma-separated list, wildcard allowed). Consider also to add new 'group' elements (below) for new packages. --> + + @@ -337,6 +340,10 @@ + + + + From senger at pub.open-bio.org Thu Nov 24 13:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVEu020622@pub.open-bio.org> senger Thu Nov 24 08:51:30 EST 2005 Update of /home/repository/moby/moby-live/Java/docs In directory pub.open-bio.org:/tmp/cvs-serv20584/docs Modified Files: index.html Added Files: Dashboard-NOTES.txt Dashboard.html Log Message: moby-live/Java/docs Dashboard-NOTES.txt,NONE,1.1 Dashboard.html,NONE,1.1 index.html,1.16,1.17 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/index.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- /home/repository/moby/moby-live/Java/docs/index.html 2005/10/18 20:15:37 1.16 +++ /home/repository/moby/moby-live/Java/docs/index.html 2005/11/24 13:51:30 1.17 @@ -44,9 +44,9 @@
  • How to use jMoby @@ -54,7 +54,8 @@
  • How to develop with jMoby
      -
    • MoSeS - Moby Services Support +
    • MoSeS - Moby Services Support +
    • Biomoby Dashboard
    • The Twelve Commandments for jMoby developers (and some good advice)
    • Directories and packages names explained
    • Available APIs @@ -92,7 +93,7 @@
      Martin Senger
      -Last modified: Tue Oct 18 22:04:57 2005 +Last modified: Thu Nov 24 16:19:09 2005
      From senger at pub.open-bio.org Thu Nov 24 13:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpV2C020639@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv20584/docs/images Added Files: MosesGeneratorPanel-small.jpg MosesGeneratorPanel.jpg RegistrationPanel-small.jpg RegistrationPanel.jpg RegistryBrowserPanel-small.jpg RegistryBrowserPanel.jpg updated.gif Log Message: moby-live/Java/docs/images MosesGeneratorPanel-small.jpg,NONE,1.1 MosesGeneratorPanel.jpg,NONE,1.1 RegistrationPanel-small.jpg,NONE,1.1 RegistrationPanel.jpg,NONE,1.1 RegistryBrowserPanel-small.jpg,NONE,1.1 RegistryBrowserPanel.jpg,NONE,1.1 updated.gif,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 13:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVYn020677@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/Clients In directory pub.open-bio.org:/tmp/cvs-serv20584/src/Clients Modified Files: TestAuth.java Log Message: moby-live/Java/src/Clients TestAuth.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java 2005/11/16 08:40:53 1.1 +++ /home/repository/moby/moby-live/Java/src/Clients/TestAuth.java 2005/11/24 13:51:31 1.2 @@ -11,7 +11,7 @@ // Access the page try { // Create a URL for the desired page - URL url = new URL ("http://localhost/~senger/secure/a.tmp"); + URL url = new URL ("http://localhost:9999/~senger/secure/a.tmp"); // Read all the text returned by the server BufferedReader in = new BufferedReader (new InputStreamReader (url.openStream())); From senger at pub.open-bio.org Thu Nov 24 13:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVW5020720@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20584/src/main/org/biomoby/service/dashboard Modified Files: RegistrationPanel.java Removed Files: NOTES Log Message: moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationPanel.java,1.17,1.18 NOTES,1.32,NONE =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/19 18:33:01 1.17 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationPanel.java 2005/11/24 13:51:31 1.18 @@ -161,7 +161,7 @@ * **************************************************************************/ public String getName() { - return "Biomoby Registration"; + return "Registration"; } /************************************************************************** rcsdiff: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RCS/NOTES,v: No such file or directory From senger at pub.open-bio.org Thu Nov 24 13:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVmY020698@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard In directory pub.open-bio.org:/tmp/cvs-serv20584/src/config/dashboard/org/biomoby/service/dashboard Modified Files: dashboard.txt Log Message: moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt 2005/11/19 18:33:01 1.1 +++ /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard/dashboard.txt 2005/11/24 13:51:31 1.2 @@ -1,8 +1,8 @@ -Dasboard is a Graphical User Interface helping Biomoby service +Dashboard is a Graphical User Interface helping Biomoby service providers to develop and deploy their Biomoby services. However, because of its extensibility, it may contain also panels that are useful even for pure Biomoby end-users when they wish to call Biomoby -services).

      +services.

      Support for Java developing for Biomoby is available at http://biomoby.org/moby-live/Java/docs/. From senger at pub.open-bio.org Thu Nov 24 13:51:31 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:51:31 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241351.jAODpVlP020658@pub.open-bio.org> senger Thu Nov 24 08:51:31 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/panels In directory pub.open-bio.org:/tmp/cvs-serv20584/docs/panels Added Files: .cvsignore.template Log Message: moby-live/Java/docs/panels .cvsignore.template,NONE,1.1 From senger at pub.open-bio.org Thu Nov 24 13:52:47 2005 From: senger at pub.open-bio.org (Martin Senger) Date: Thu, 24 Nov 2005 08:52:47 -0500 Subject: [MOBY-guts] biomoby commit Message-ID: <200511241352.jAODql25020788@pub.open-bio.org> senger Thu Nov 24 08:52:47 EST 2005 Update of /home/repository/moby/moby-live/Java/docs/images In directory pub.open-bio.org:/tmp/cvs-serv20773/docs/images Added Files: GCP-dashboard-smaller.jpg GCP-dashboard.jpg bug.gif Log Message: moby-live/Java/docs/images GCP-dashboard-smaller.jpg,NONE,1.1 GCP-dashboard.jpg,NONE,1.1 bug.gif,NONE,1.1