I have a problem.
I've using mylyn in eclipse for the realization of semantic repository for bug
My problem is the extraction of data by bug
This is the code fragment:
import java.net.MalformedURLExcepimport java.util.List;
import org.qualipso.feeder.issue.QualipsoProperties;
import org.eclipse.jface.action.Action;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
import org.qualipso.advdoc.ws.client.feed.beans.AddLiteralProperties_req;
import org.qualipso.advdoc.ws.client.feed.beans.AddLiteralProperties_resp;
import org.qualipso.advdoc.ws.client.feed.beans.AddObjectProperties_req;
import org.qualipso.advdoc.ws.client.feed.beans.AddObjectProperties_resp;
import org.qualipso.advdoc.ws.client.feed.beans.CreateResource_req;
import org.qualipso.advdoc.ws.client.feed.beans.CreateResource_resp;
import org.qualipso.advdoc.ws.client.feed.beans.LiteralProperty;
import org.qualipso.advdoc.ws.client.feed.beans.ObjectProperty;
import org.qualipso.advdoc.ws.client.feed.service.QualiPSoFeedAPISoapClient;
import org.qualipso.feeder.preferences.PreferenceConstants;
import org.xml.sax.SAXException;
import es.tid.frawa.service.servlet.TdiServiceException;
public class TaskFeedAction extends Action {
static String url_doap="http://usefulinc.com/ns/doap";
static String url_foaf="http://xmlns.com/foaf/0.1/";
static String url_dct="http://purl.org/dc/terms/";
static String url_rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns";
static String url_xsd="http://www.w3.org/2001/XMLSchema";
static String url_baetle="http://xmlns.com/baetle/";
static String url_rdfs="http://www.w3.org/2000/01/rdf-schema";
static String url_owl="http://www.w3.org/2002/07/owl";
static String url_sioc="http://rdfs.org/sioc/ns";
static String url_wf="http://www.w3.org/2005/01/wf/flow";
static String url_skos="http://www.w3.org/2004/02/skos/core";
static String url_dc="http://purl.org/dc/elements/1.1/";
List<AbstractTaskContainer> selectedElements;
public TaskFeedAction(List<AbstractTaskContainer> selectedElements) {
super("Send to Repository");
this.selectedElements=selectedElements;
}
@Override
public void run() {
QualipsoProperties qp= new QualipsoProperties();
qp.createAndShowGUI();
String conn=Activator.getDefault().getPreferenceStore().getString(PreferenceConstants. FEED_URL);
//try {
/*QualiPSoFeedAPISoapClient feedAPI =
new QualiPSoFeedAPISoapClient(conn,null,null,null);*/
for (AbstractTaskContainer atc: selectedElements) {
/*if(atc instanceof RepositoryConfiguration)
{
}*/
if (atc instanceof BugzillaTask) {
//BugzillaTask at =(BugzillaTask)selectedElements;
BugzillaTask at =(BugzillaTask)atc;
String bugURI=at.getUrl();
CreateResource_req cr_req = new CreateResource_req();
cr_req.setResourceUri(bugURI);
//feedAPI.CreateResource(cr_req);
AddObjectProperties_req op_req = new AddObjectProperties_req();
op_req.setResourceUri(bugURI);
if (at.getTaskKind().equalsIgnoreCase("bug")) {
op_req.addObjectProperties( new ObjectProperty(url_rdf+ "#type",url_baetle+ "#Bug"));
System. out.println("#Bug "+ bugURI);
} else {
op_req.addObjectProperties( new ObjectProperty(url_rdf+ "#type",url_baetle+ "#Issue"));
System. out.println("#Issue "+ bugURI);
}
//feedAPI.AddObjectProperties(op_req);
AddLiteralProperties_req lp_req = new AddLiteralProperties_req();
lp_req.setResourceUri(bugURI);
lp_req.addLiteralProperties( new LiteralProperty(url_baetle+ "#description",at.getSummary()));
if (at.getCreationDate()!=null) {
lp_req.addLiteralProperties( new LiteralProperty(url_baetle+ "#created",at.getCreationDate().toString()));
}
lp_req.addLiteralProperties( new LiteralProperty(url_baetle+ "#id",at.getTaskId()));
if (at.getDueDate()!=null) {
lp_req.addLiteralProperties( new LiteralProperty(url_baetle+ "#due_date",at.getDueDate().toString()));
}
lp_req.addLiteralProperties( new LiteralProperty(url_baetle+ "#environment",at.getProduct()));
The problem is the extraction of other data :
OS
platform ,......
How resolve?
|