373839404142434445
*/ public RDFActivity(String SPARQLquery) { super(DEFAULT_ACTIVITY_NAME); query = new SimpleActivityInput("expression"); query.add(new StringData(SPARQLquery)); mOutput = new SimpleActivityOutput("rdfdata"); this.setResourceID("RDFResource"); }
105106107108109110111112
* if there is an error reading from a data source. */ public StringData nextOutput() throws DataStreamErrorException, UnexpectedDataValueException, DataSourceUsageException { return new StringData((String) mOutput.getDataValueIterator() .nextAsString()); }
128129130131132133134
* @param name * Name to add to the input. */ public void addInput(String name) { query.add(new StringData(name)); }
*/ public QueryEPR(String SPARQLquery) { super(DEFAULT_ACTIVITY_NAME); mQuery = new SimpleActivityInput("expression"); mQuery.add(new StringData(SPARQLquery)); mOutput = new SimpleActivityOutput("rdfdata"); this.setResourceID("RDFResource"); }
105106107108109110111
* if there is an error reading from a data source. */ public StringData nextOutput() throws DataStreamErrorException, UnexpectedDataValueException, DataSourceUsageException { return new StringData(mOutput.getDataValueIterator().nextAsString()); }
127128129130131132133
* @param name * Name to add to the input. */ public void addInput(String name) { mQuery.add(new StringData(name)); }
*/ public QueryRDFDB(String SPARQLquery) { super(DEFAULT_ACTIVITY_NAME); mQuery = new SimpleActivityInput("expression"); mQuery.add(new StringData(SPARQLquery)); mOutput = new SimpleActivityOutput("rdfdata"); this.setResourceID("testresourcesdb"); }
132133134135136137138139140
public void addAggregates(String[] aggregates) { mGroupByColumnsInput.add(ListBegin.VALUE); for (int i = 0; i < aggregates.length; i++) { mGroupByColumnsInput.add(new StringData(aggregates[i])); } mGroupByColumnsInput.add(ListEnd.VALUE); }