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 set(String identifier, Object value) { context.set( identifier, value ); }
@Override public String toString() { return "ContextImpl [name=" + name + ", parent=" + parent.getName() + ", context=" + context + "]"; }
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 Object get(String identifier) { return rootShadow.get( identifier ); }
public Void execute(Context context) { context.getContextManager().getContext("__TEMP__").set(identifier, new GridKnowledgeBaseConfiguration()); return null; } }
public World getContextManager() { return context.getContextManager(); }
public void remove(String name) { context.remove( name ); }
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 Object get(String identifier) { return root.get( identifier ); }
public Void execute(Context context) { context.getContextManager().getContext("__TEMP__").set(identifier, new GridKnowledgeSessionConfiguration()); return null; } }
public ContextManager getContextManager() { return context.getContextManager(); }
public void remove(String identifier) { root.remove( identifier ); }
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 context) { Context targetCtx; if ( this.contextName == null ) { targetCtx = context; } else { targetCtx = context.getContextManager().getContext( this.contextName ); } GetDefaultValue sim = (GetDefaultValue) context.get( "simulator" ); Object o = sim.getObject(); // for FactHandle's we store the handle on a map and the actual object as if ( o instanceof FactHandle ) { Map<String, FactHandle> handles = (Map<String, FactHandle>) targetCtx.get( "h" ); if ( handles == null ) { handles = new HashMap<String, FactHandle>(); targetCtx.set( "h", handles ); } handles.put( identifier, (FactHandle) o ); o = ((InternalFactHandle) o).getObject(); } targetCtx.set( identifier, o ); return o; }
public Object get(String identifier) { return context.get( identifier ); }
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; }