private void flattenChildType(String name, Central central, String current, List list) throws ProcessorCreationException { MobyDataType dt = null; try { dt = central.getDataType(name); } catch (MobyException e) { throw new ProcessorCreationException( "There was a problem getting information from the MobyCentral registry at " + this.registryEndpoint + System.getProperty("line.separator") + e.getLocalizedMessage()); } catch (NoSuccessException e) { throw new ProcessorCreationException( "There was no success in getting information from the MobyCentral registry at " + this.registryEndpoint + System.getProperty("line.separator") + e.getLocalizedMessage()); } processDatatype(dt, central, current, list); }
throw new ProcessorCreationException(name + ": The supplied endpoint url was \n malformed, endpoint was specified as '" + theEndpoint + "'");
public Processor loadProcessorFromXML(Element processorNode, ScuflModel model, String name) throws ProcessorCreationException, DuplicateProcessorNameException, XScuflFormatException { Element workflowProcessor = processorNode.getChild("workflow",XScufl.XScuflNS); // See if we're being loaded from a URL, if so use the old mechanism to load. Element locationElement = workflowProcessor.getChild("xscufllocation",XScufl.XScuflNS); if (locationElement != null) { String definitionURL = workflowProcessor.getChild("xscufllocation",XScufl.XScuflNS).getTextTrim(); return new WorkflowProcessor(model, name, definitionURL); } else { // Loading from inlined workflow Element scuflElement = workflowProcessor.getChild("scufl",XScufl.XScuflNS); if (scuflElement == null) { // Neither location nor literal workflow, this is a fault throw new ProcessorCreationException("Neither XScufl location nor literal inlined workflow defined for nested workflow processor, failing!"); } // Otherwise have a full XScufl definition to use to populate the model with return new WorkflowProcessor(model, name, scuflElement); } }
/** * Construct a new processor with the given model to bind to, name and URL * of a workflow description to contain. */ public WorkflowProcessor(ScuflModel model, String name, String definitionURL) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); this.definitionURL = definitionURL; try { // Create a new model instance theInternalModel = new ScuflModel(); try { theInternalModel.setOffline(model.isOffline()); } catch (SetOnlineException soe) { // } // Populate from the definition URL XScuflParser.populate(new URL(definitionURL).openStream(), theInternalModel, null); buildPorts(); } catch (MalformedURLException mue) { throw new ProcessorCreationException("The supplied definition URL was malformed, specified as '" + definitionURL + "'"); } catch (Exception e) { e.printStackTrace(); throw new ProcessorCreationException("The workflow processor '" + name + "' caused an exception :\n" + e.getMessage() + "\n during creation. The exception had type :\n" + e.getClass().toString()); } }
/** * Use the endpoint data to set the description field */ public void getDescriptionText() throws ProcessorCreationException { try { Map info = (Map) Soap.callWebService(endpoint.toString(), "getAnalysisType"); // Get the description element from the map String description = (String) info.get("description"); if (description != null) { setDescription(description); } } catch (ServiceException se) { throw new ProcessorCreationException(getName() + ": Unable to create a new call to connect to\n soaplab, error was : " + se.getMessage()); } catch (RemoteException re) { throw new ProcessorCreationException(getName() + ": Unable to call the get description method\n for XScufl processor " + getName() + "\nendpoint : " + endpoint.toString() + "\n Remote exception message " + re.getMessage()); } }
private void init() throws ProcessorCreationException { // Find the service endpoint (by calling Moby registry) try { if (mobyObject == null) { worker = new CentralImpl(mobyEndpoint); mobyObject = worker.getDataType(this.serviceName); setEndpoint(mobyEndpoint); } } catch (Exception e) { if (e instanceof ProcessorCreationException) { throw (ProcessorCreationException) e; } throw new ProcessorCreationException(formatError(e.toString())); } }
init(); } catch (DuplicatePortNameException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage()); } catch (PortCreationException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage());
public NotificationProcessor(ScuflModel model, String name) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); try { Port inputPort1 = new InputPort(this, "publishMessage"); Port inputPort2 = new InputPort(this, "Topic"); addPort(inputPort1); addPort(inputPort2); } catch (Exception e) { throw new ProcessorCreationException("Couldn't create NotificationProcessor"); } }
/** * Set the description field */ public void getDescriptionText() throws ProcessorCreationException { if (mobyObject.getDescription() != null) setDescription(mobyObject.getDescription()); else { try { // worker = new CentralImpl(this.mobyEndpoint); this.mobyObject = worker.getDataType(this.serviceName); } catch (MobyException e) { e.printStackTrace(); throw new ProcessorCreationException( "Error creating new CentralImpl in getDescriptionText. Processor not created"); } catch (NoSuccessException e) { e.printStackTrace(); throw new ProcessorCreationException( "Error getting data type in getDescriptionText. Processor not created"); } } }
bp.addPort(p); } catch (PortCreationException pce) { throw new ProcessorCreationException("Unable to create port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException("Unable to create port! " + dpne.getMessage()); bp.addPort(p); } catch (PortCreationException pce) { throw new ProcessorCreationException("Unable to create port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException("Unable to create port! " + dpne.getMessage());
init(); } catch (DuplicatePortNameException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage()); } catch (PortCreationException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage());
MobyService[] services = worker.findService(pattern); if (services == null || services.length == 0) throw new ProcessorCreationException(formatError("I cannot find the service.")); mobyService = services[0]; throw new ProcessorCreationException(formatError("Service has an empty endpoint.")); try { setEndpoint(serviceEndpoint); } catch (MalformedURLException e2) { throw new ProcessorCreationException(formatError("Service has malformed endpoint: '" + serviceEndpoint + "'.")); throw (ProcessorCreationException) e; throw new ProcessorCreationException(formatError(e.toString()));
/** * Set the endpoint for this biomoby processor */ void setEndpoint(String specifier) throws MalformedURLException, ProcessorCreationException { URL new_endpoint = new URL(specifier); if (this.endpoint != null) { if (!this.endpoint.equals(new_endpoint)) { fireModelEvent(new ScuflModelEvent(this, "Service endpoint changed to '" + specifier + "'")); } else { // Do nothing if the endpoint was the same as before return; } } else { fireModelEvent(new ScuflModelEvent(this, "Service endpoint set to '" + specifier + "'")); } this.endpoint = new_endpoint; try { generatePorts(); getDescriptionText(); } catch (PortCreationException e) { throw new ProcessorCreationException(formatError("When trying to create ports: " + e.getMessage())); } catch (DuplicatePortNameException e) { throw new ProcessorCreationException(formatError("When trying to create ports: " + e.getMessage())); } }
getDescriptionText(); } catch (PortCreationException e) { throw new ProcessorCreationException( formatError("When trying to create ports: " + e.getMessage())); } catch (DuplicatePortNameException e) { throw new ProcessorCreationException( formatError("When trying to create ports: " + e.getMessage()));
addPort(p); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException( "The supplied specification for the rserv processor '" + name + "' contained a duplicate port '" + dpne.getMessage() + "'"); } catch (PortCreationException pce) { throw new ProcessorCreationException( "An error occured whilst generating ports for the rserv processor " + pce.getMessage());
throw new ProcessorCreationException("The supplied specification for the BSF script processor '" + name + "' contained a duplicate port '" + dpne.getMessage() + "'"); } catch (PortCreationException pce) { throw new ProcessorCreationException("An error occured whilst generating ports for the BSF processor " + pce.getMessage());
/** * Set the endpoint for this soaplab processor */ void setEndpoint(String specifier) throws MalformedURLException, ProcessorCreationException { URL new_endpoint = new URL(specifier); if (endpoint != null) { if (endpoint.equals(new_endpoint) == false) { fireModelEvent(new ScuflModelEvent(this, "Service endpoint changed to '" + specifier + "'")); } else { // Do nothing if the endpoint was the same as before return; } } else { fireModelEvent(new ScuflModelEvent(this, "Service endpoint set to '" + specifier + "'")); } endpoint = new_endpoint; try { if (this.isOffline() == false) { generatePorts(); getDescriptionText(); } } catch (PortCreationException pce) { throw new ProcessorCreationException(getName() + ": Exception when trying to create ports\n from Soaplab endpoint : " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException(getName() + ": Exception when trying to create ports\n from Soaplab endpoint : " + dpne.getMessage()); } }
throw new ProcessorCreationException( "The supplied specification for the beanshell processor '" + name + "' contained a duplicate port '" + dpne.getMessage() + "'"); } catch (PortCreationException pce) { throw new ProcessorCreationException( "An error occured whilst generating ports for the beanshell processor " + pce.getMessage());
/** * Construct a new processor from the supplied JDOM element, this element * being the 'scufl' top level workflow element from an inline nested * workflow declaration */ public WorkflowProcessor(ScuflModel model, String name, Element scuflElement) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); // Have to clone the element because it already has a parent // so will not work with a new document instance try { Document doc = new Document((Element) scuflElement.clone()); theInternalModel = new ScuflModel(); try { if (model != null) { theInternalModel.setOffline(model.isOffline()); } } catch (SetOnlineException soe) { // } XScuflParser.populate(doc, theInternalModel, null); setDescription(theInternalModel.getDescription().getText()); buildPorts(); } catch (Exception e) { throw new ProcessorCreationException("The workflow processor '" + name + "' caused an exception :\n" + e.getMessage() + "\n during creation. The exception had type :\n" + e.getClass().toString()); } }
throw new ProcessorCreationException( "Unable to create inferno processor", ex);