public String execute(Context context) { String rowId = UUID.randomUUID().toString(); QueryResultsRow row = ((Iterator<QueryResultsRow>) context.getContextManager().getContext( "__TEMP__" ).get( "Iterator - "+this.localId)).next(); context.getContextManager().getContext( "__TEMP__" ).set("Row - "+rowId+" - "+this.localId, row); return rowId; }
public Boolean execute(Context context) { Iterator<QueryResultsRow> it = (Iterator<QueryResultsRow>) context.getContextManager().getContext( "__TEMP__" ).get( "Iterator - "+this.localId); return it.hasNext(); }
public Object execute(Context ctx) { Context targetCtx; if ( this.contextName == null ) { targetCtx = ctx; } else { targetCtx = ctx.getContextManager().getContext( this.contextName ); } return targetCtx.get( identifier); }
public Void execute(Context context) { Iterator<QueryResultsRow> it = ((QueryResults)context.getContextManager().getContext( "__TEMP__" ).get( this.localId )).iterator(); context.getContextManager().getContext( "__TEMP__" ).set( "Iterator - "+this.localId, it); return null; }
public Void execute(Context context) { KnowledgeAgent agent = (KnowledgeAgent) context.getContextManager().getContext("__TEMP__").get( kbaseKagentId+"_kAgent" ); if( this.res != null ) { System.out.println("Applying Resource: "+this.res); agent.applyChangeSet( this.res ); } if( this.cs != null ) { System.out.println( "Applying Change-set: "+this.cs); agent.applyChangeSet( this.cs ); } return null; }
public Void execute(Context context) { context.getContextManager().getContext("__TEMP__").set(identifier, new GridKnowledgeBaseConfiguration()); return null; } }
public Void execute(Context context) { KnowledgeBaseConfiguration kconf = (KnowledgeBaseConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setOption(option); return null; } }
public Void execute(Context context) { KnowledgeBaseConfiguration kconf = (KnowledgeBaseConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setProperty(propertyName, propertyValue); return null; } }
public Void execute(Context context) { SessionConfiguration kconf = (SessionConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setOption(option); return null; } }
public Void execute(Context context) { context.getContextManager().getContext("__TEMP__").set(identifier, new GridKnowledgeSessionConfiguration()); return null; } }
public Void execute(Context context) { SessionConfiguration kconf = (SessionConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setProperty(propertyName, propertyValue); return null; } }
public String execute(Context context) { SessionConfiguration kconf = (SessionConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); return kconf.getProperty(propertyName); } }
public Void execute(Context context) { if ( this.contextName == null ) { context.getContextManager().getContext( World.ROOT ).set( this.identifier, ((GenericCommand) this.cmd).execute( context ) ); } else { context.getContextManager().getContext( this.contextName ).set( this.identifier, ((GenericCommand) this.cmd).execute( context ) ); } return null; }
public Integer execute(Context context) { return ((QueryResults)context.getContextManager().getContext( "__TEMP__" ).get( this.localId )).size(); }
public Void execute(Context context) { context.getContextManager().getContext("__TEMP__").set(identifier, new GridKnowledgeBuilderConfiguration()); return null; } }
public String execute(Context context) { KnowledgeBuilderConfiguration kconf = (KnowledgeBuilderConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); return kconf.getProperty(propertyName); } }
public String execute(Context context) { KnowledgeBaseConfiguration kconf = (KnowledgeBaseConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); return kconf.getProperty(propertyName); } }
public KnowledgeBase execute(Context context) { KnowledgeBase kbase = null; KnowledgeBaseConfiguration kconf = null; if(kbaseConfId != null){ kconf = (KnowledgeBaseConfiguration) context.getContextManager().getContext( "__TEMP__" ).get(kbaseConfId); } if ( kconf == null ) { kbase = KnowledgeBaseFactory.newKnowledgeBase(); } else { kbase = KnowledgeBaseFactory.newKnowledgeBase( kconf ); } return kbase; }
public Object execute(Context context) { Object result = ((NativeQueryResults)context.getContextManager().getContext( "__TEMP__" ).get( this.localId )).getResults().get(0).get(key); return result; }
public String[] execute(Context context) { Declaration[] parameters = ((NativeQueryResults)context.getContextManager().getContext( "__TEMP__" ).get( this.localId )).getResults().getParameters(); String[] results = new String[parameters.length]; int i = 0; for(Declaration param : parameters){ results[i]=param.getIdentifier(); i++; } return results; } }