public Object get(String identifier) { return root.get( identifier ); }
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 Boolean execute(Context context) { Iterator<QueryResultsRow> it = (Iterator<QueryResultsRow>) context.getContextManager().getContext( "__TEMP__" ).get( "Iterator - "+this.localId); return it.hasNext(); }
public StatefulKnowledgeSession getStatefulKnowledgesession() { return ( StatefulKnowledgeSession ) context.get( StatefulKnowledgeSession.class.getName() ); }
public Void execute(Context context) { KnowledgeBaseConfiguration kconf = (KnowledgeBaseConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setOption(option); return null; } }
public Object execute(Context context) { FixedKnowledgeCommandContext kcContext = new FixedKnowledgeCommandContext( context, (KnowledgeBuilder) context.get( this.kbuilderIdentifier ), (KnowledgeBase) context.get( this.kbaseIdentifier ), (StatefulKnowledgeSession) context.get( this.statefulKsessionName ), (WorkingMemoryEntryPoint) context.get(this.workingMemoryEntryPointName), (ExecutionResultImpl) context.get( this.kresults ) ); return ((GenericCommand) command).execute( kcContext ); }
public Void execute(Context context) { SessionConfiguration kconf = (SessionConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setProperty(propertyName, propertyValue); return null; } }
public Void execute(Context context) { KnowledgeBuilderConfiguration kconf = (KnowledgeBuilderConfiguration) context.get(kbuilderConfId); kconf.setProperty(this.name, this.value); 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) { NodeData data = (NodeData) context.get( NodeData.NODE_DATA ); data.getRoot().set( identifier, type + ":" + instanceId ); return null; }
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 Void execute(Context context) { NodeData data = (NodeData) context.get( NodeData.NODE_DATA ); data.getRoot().set( this.identifier, this.type + ":" + this.instanceId ); return null; }
public Void execute(Context context) { KnowledgeBaseConfiguration kconf = (KnowledgeBaseConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setProperty(propertyName, propertyValue); return null; } }
public Integer execute(Context context) { NodeData data = (NodeData) context.get( NodeData.NODE_DATA ); Integer sessionId = data.getSessionIdCounter().getAndIncrement(); if ( this.outIdentifier != null ) { ((ExecutionResultImpl)((KnowledgeCommandContext) context).getExecutionResults()).getResults().put( this.outIdentifier, sessionId ); } return sessionId; }
public Void execute(Context context) { SessionConfiguration kconf = (SessionConfiguration) context.getContextManager().getContext("__TEMP__").get(identifier); kconf.setOption(option); return null; } }
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 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; } }