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 Context createContext(String identifier) { Context actualCtx = world.getContext( identifier ); if ( actualCtx == null ) { // actualCtx = world.createContext( identifier ); } ShadowContext shadowCtx = contexts.get( identifier ); if ( shadowCtx == null ) { shadowCtx = new ShadowContextImpl( world.getName(), world, this ); contexts.put( identifier, shadowCtx ); } return null; }
public String getName() { return world.getName(); }
public ShadowWorldImpl(World world) { this.world = world; rootShadow = new ShadowContextImpl( world.getName(), world, this ); }
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) { 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 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 GridKnowledgeBuilderConfiguration()); return null; } }
public Void execute(Context context) { KnowledgeBuilderConfiguration kconf = (KnowledgeBuilderConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setProperty(propertyName, propertyValue); 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); } }