Bio2RDF: CPath reverse links
Created: 2009-02-19 07:18:17
No description has been set
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (2)
Bio2RDF: CPath get reverse links |
Bio2RDF: CPath get node<s parents |
Descriptions (1)
SELECT ?s
FROM <http://www.pathwaycommons.org/pc/webservice.do>
WHERE {
?s, ?p, <http://bio2rdf.org/cpath:IDENTIFIER> .
} |
Dependencies (0)
Inputs (1)
Name |
Description |
cpath_bmuri |
|
Processors (7)
Name |
Type |
Description |
Get_Web_Page_from_url |
localworker |
ScriptURL inputURL = null;
if (base != void) {
inputURL = new URL(new URL(base), url);
}
else {
inputURL = new URL(url);
}
URLConnection con = inputURL.openConnection();
InputStream in = con.getInputStream();
InputStreamReader isr = new InputStreamReader(in);
Reader inReader = new BufferedReader(isr);
StringBuffer buf = new StringBuffer();
int ch;
while ((ch = inReader.read()) > -1) {
buf.append((char)ch);
}
inReader.close();
contents = buf.toString();
//String NEWLINE = System.getProperty("line.separator");
//
//URL inputURL = null;
//if (base != void) {
// inputURL = new URL(new URL(base), url);
//} else {
// inputURL = new URL(url);
//}
//StringBuffer result = new StringBuffer();
//BufferedReader reader = new BufferedReader(new InputStreamReader(inputURL.openStream()));
//String line = null;
//while ((line = reader.readLine()) != null) {
// result.append(line);
// result.append(NEWLINE);
//}
//
//contents = result.toString();
|
Concatenate_cpath_parents_url |
beanshell |
Scriptcpath_url = "http://www.pathwaycommons.org/pc/webservice.do?version=2.0&output=xml&cmd=get_parents&q=" + query ; |
Split_string_into_string_list |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
eol |
stringconstant |
Value\n |
Filter_list_of_pc_bmuri |
beanshell |
Scriptimport java.util.regex.*;
cpath_bmuris = new ArrayList();
Pattern thePat = Pattern.compile("");
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
Matcher matcher = thePat.matcher(item);
if (matcher.find()) {
cpath_bmuris.add("urn:bm:cpath:"+matcher.group(1));
}
}
|
cpath_id_for_test |
stringconstant |
Valueurn:bm:cpath:83134 |
Split_bmuri |
beanshell |
Scriptstring = new String(bmuri);
string = string.substring(7, string.length());
int i = string.lastIndexOf(":");
int j = string.length();
namespace = string.substring(0, i);
id = string.substring(i+1, j);
namespace_id = namespace + ":" + id; |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
Concatenate_cpath_parents_url |
|
query
|
cpath_url
|
Filter_list_of_pc_bmuri |
|
stringlist
|
cpath_bmuris
|
Split_bmuri |
|
bmuri
|
namespace_id
namespace
id
|
Outputs (1)
Name |
Description |
cpath_bmuris |
|
Datalinks (7)
Source |
Sink |
Concatenate_cpath_parents_url:cpath_url |
Get_Web_Page_from_url:url |
Split_bmuri:id |
Concatenate_cpath_parents_url:query |
Get_Web_Page_from_url:contents |
Split_string_into_string_list:string |
eol:value |
Split_string_into_string_list:regex |
Split_string_into_string_list:split |
Filter_list_of_pc_bmuri:stringlist |
cpath_bmuri |
Split_bmuri:bmuri |
Filter_list_of_pc_bmuri:cpath_bmuris |
cpath_bmuris |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment