public Object postProcess(IContext context, Object object) { Map<String, Object> map = (Map<String, Object>) object; return new Tuple((Object[])map.get("entities")); }
/** * Get the cache key. * Needs to identify this element with respect to its important features so that * two equal elements should return the same key. */ public Object getCacheKey() { return new Tuple(new Object[]{this.getClass().getName(), filter, oneresult? Boolean.TRUE: Boolean.FALSE, remote? Boolean.TRUE: Boolean.FALSE}); }
/** * Get the cache key. * Needs to identify this element with respect to its important features so that * two equal elements should return the same key. */ public Object getCacheKey() { return new Tuple(new Object[]{this.getClass().getName(), filter, oneresult? Boolean.TRUE: Boolean.FALSE, oneresult? Boolean.TRUE: Boolean.FALSE, type.getName()}); }
/** * Insert a row at a position. * @param rowcnt The row cnt. * @param row The row data. * @param object The object. */ public synchronized void insertRow(int rowcnt, List row, Object object) { data.add(rowcnt, new Tuple(row, object)); //System.out.println("DATA: "+data); fireTableRowsInserted(rowcnt, rowcnt); }
/** * Get or create a flyweight. * @return The flyweight. */ public static GoalbaseFlyweight getGoalbaseFlyweight(IOAVState state, Object scope) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); GoalbaseFlyweight ret = (GoalbaseFlyweight)ip.getFlyweightCache(IGoalbase.class, new Tuple(IGoalbase.class, scope)); if(ret==null) { ret = new GoalbaseFlyweight(state, scope); ip.putFlyweightCache(IGoalbase.class, new Tuple(IGoalbase.class, scope), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static EventbaseFlyweight getEventbaseFlyweight(IOAVState state, Object scope) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); EventbaseFlyweight ret = (EventbaseFlyweight)ip.getFlyweightCache(IEventbase.class, new Tuple(IEventbase.class, scope)); if(ret==null) { ret = new EventbaseFlyweight(state, scope); ip.putFlyweightCache(IEventbase.class, new Tuple(IEventbase.class, scope), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static WaitAbstractionFlyweight getWaitAbstractionFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); WaitAbstractionFlyweight ret = (WaitAbstractionFlyweight)ip.getFlyweightCache(IWaitAbstraction.class, new Tuple(IWaitAbstraction.class, handle)); if(ret==null) { ret = new WaitAbstractionFlyweight(state, scope, handle); ip.putFlyweightCache(IWaitAbstraction.class, new Tuple(IWaitAbstraction.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static PlanbaseFlyweight getPlanbaseFlyweight(IOAVState state, Object scope) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); PlanbaseFlyweight ret = (PlanbaseFlyweight)ip.getFlyweightCache(IPlanbase.class, new Tuple(IPlanbase.class, scope)); if(ret==null) { ret = new PlanbaseFlyweight(state, scope); ip.putFlyweightCache(IPlanbase.class, new Tuple(IPlanbase.class, scope), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static GoalFlyweight getGoalFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); GoalFlyweight ret = (GoalFlyweight)ip.getFlyweightCache(IGoal.class, new Tuple(IGoal.class, handle)); if(ret==null) { ret = new GoalFlyweight(state, scope, handle); ip.putFlyweightCache(IGoal.class, new Tuple(IGoal.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static InternalEventFlyweight getInternalEventFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); InternalEventFlyweight ret = (InternalEventFlyweight)ip.getFlyweightCache(IInternalEvent.class, new Tuple(IInternalEvent.class, handle)); if(ret==null) { ret = new InternalEventFlyweight(state, scope, handle); ip.putFlyweightCache(IInternalEvent.class, new Tuple(IInternalEvent.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static ExpressionbaseFlyweight getExpressionbaseFlyweight(IOAVState state, Object scope) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); ExpressionbaseFlyweight ret = (ExpressionbaseFlyweight)ip.getFlyweightCache(IExpressionbase.class, new Tuple(IExpressionbase.class, scope)); if(ret==null) { ret = new ExpressionbaseFlyweight(state, scope); ip.putFlyweightCache(IExpressionbase.class, new Tuple(IExpressionbase.class, scope), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static BeliefbaseFlyweight getBeliefbaseFlyweight(IOAVState state, Object scope) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); BeliefbaseFlyweight ret = (BeliefbaseFlyweight)ip.getFlyweightCache(IBeliefbase.class, new Tuple(IBeliefbase.class, scope)); if(ret==null) { ret = new BeliefbaseFlyweight(state, scope); ip.putFlyweightCache(IBeliefbase.class, new Tuple(IBeliefbase.class, scope), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static ParameterFlyweight getParameterFlyweight(IOAVState state, Object scope, Object handle, String name, Object parameterelement) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); ParameterFlyweight ret = (ParameterFlyweight)ip.getFlyweightCache(IParameter.class, new Tuple(IParameter.class, parameterelement, name)); if(ret==null) { ret = new ParameterFlyweight(state, scope, handle, name, parameterelement); ip.putFlyweightCache(IParameter.class, new Tuple(IParameter.class, parameterelement, name), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static PlanFlyweight getPlanFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); PlanFlyweight ret = (PlanFlyweight)ip.getFlyweightCache(IPlan.class, new Tuple(IPlan.class, handle)); if(ret==null) { ret = new PlanFlyweight(state, scope, handle); ip.putFlyweightCache(IPlan.class, new Tuple(IPlan.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static BeliefSetFlyweight getBeliefSetFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); BeliefSetFlyweight ret = (BeliefSetFlyweight)ip.getFlyweightCache(IBeliefSet.class, new Tuple(IBeliefSet.class, handle)); if(ret==null) { ret = new BeliefSetFlyweight(state, scope, handle); ip.putFlyweightCache(IBeliefSet.class, new Tuple(IBeliefSet.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static ExpressionFlyweight getExpressionFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); ExpressionFlyweight ret = (ExpressionFlyweight)ip.getFlyweightCache(IExpression.class, new Tuple(IExpression.class, handle)); if(ret==null) { ret = new ExpressionFlyweight(state, scope, handle); ip.putFlyweightCache(IExpression.class, new Tuple(IExpression.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static BeliefFlyweight getBeliefFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); BeliefFlyweight ret = (BeliefFlyweight)ip.getFlyweightCache(IBelief.class, new Tuple(IBelief.class, handle)); if(ret==null) { ret = new BeliefFlyweight(state, scope, handle); ip.putFlyweightCache(IBelief.class, new Tuple(IBelief.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static MessageEventFlyweight getMessageEventFlyweight(IOAVState state, Object scope, Object handle) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); MessageEventFlyweight ret = (MessageEventFlyweight)ip.getFlyweightCache(IMessageEvent.class, new Tuple(IMessageEvent.class, handle)); if(ret==null) { ret = new MessageEventFlyweight(state, scope, handle); ip.putFlyweightCache(IMessageEvent.class, new Tuple(IMessageEvent.class, handle), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static ParameterSetFlyweight getParameterSetFlyweight(IOAVState state, Object scope, Object handle, String name, Object parameterelement) { BDIInterpreter ip = BDIInterpreter.getInterpreter(state); ParameterSetFlyweight ret = (ParameterSetFlyweight)ip.getFlyweightCache(IParameterSet.class, new Tuple(IParameterSet.class, parameterelement, name)); if(ret==null) { ret = new ParameterSetFlyweight(state, scope, handle, name, parameterelement); ip.putFlyweightCache(IParameterSet.class, new Tuple(IParameterSet.class, parameterelement, name), ret); } return ret; }
/** * Get or create a flyweight. * @return The flyweight. */ public static WaitqueueFlyweight getWaitqueueFlyweight(IOAVState state, Object scope, Object rplan) { Tuple key = new Tuple(rplan, IWaitqueue.class); BDIInterpreter ip = BDIInterpreter.getInterpreter(state); WaitqueueFlyweight ret = (WaitqueueFlyweight)ip.getFlyweightCache(IWaitqueue.class, key); if(ret==null) { ret = new WaitqueueFlyweight(state, scope, rplan); ip.putFlyweightCache(IWaitqueue.class, key, ret); } return ret; }