Package org.useware.kernel.model.structure

Examples of org.useware.kernel.model.structure.QName


                            );
                        }

                        @Override
                        public void onSystemEvent(SystemEvent event) {
                            QName id = (QName) event.getPayload();

                            Set<Integer> keys = childUnits.keySet();
                            for (Integer key : keys) {
                                if (childUnits.get(key).equals(id)) {
                                    tabLayoutpanel.selectTab(key, false);
View Full Code Here


        @Override
        public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {

            Object source = event.getSource();

            QName targetTab = childUnits.get(event.getItem());

            if (targetTab != null) {
                eventBus.fireEventFromSource(
                        new NavigationEvent(
                                CommonQNames.NAVIGATION_ID,
View Full Code Here

            );
        }

        @Override
        public void onSystemEvent(SystemEvent event) {
            QName id = (QName) event.getPayload();

            Set<Integer> keys = childUnits.keySet();
            for (final Integer key : keys) {
                if (childUnits.get(key).equals(id)) {
View Full Code Here

        Map<QName, ModelNode> descriptions = context.get (ContextKey.MODEL_DESCRIPTIONS);

         // TODO (BUG): After the first reification the behaviour is modified,
        // so the predicate might apply to a dfferent unit. As a result the correllation id is different!

        QName correlationId = interactionUnit.findMapping(MappingType.DMR, new Predicate<DMRMapping>() {
            @Override
            public boolean appliesTo(DMRMapping candidate) {
                return candidate.getAddress()!=null;
            }
        }).getCorrelationId();
View Full Code Here

        }
        else if(prev.getTemporalOperator().isScopeBoundary()
                && !pastPivot)
        {
            // select first child and skip the remaining ones
            QName activeChild = activeItems.get(stack.size()-1);
            if(null==activeChild)
                activeItems.put(stack.size()-1, container.getId());
        }
    }
View Full Code Here

    }

    @Override
    public void visit(InteractionUnit unit) {

        QName activeChild = activeItems.get(stack.size()-1);

        if(null==activeChild && !pastPivot)
        {
            activeItems.put(stack.size()-1, unit.getId());
        }
View Full Code Here

     *
     * @param event
     */
    @Override
    public void onInteractionEvent(final InteractionEvent event) {
        QName id = event.getId();
        QName source = (QName)event.getSource();

        final Set<Procedure> collection = procedures.get(id);
        Procedure execution = null;

        if(collection!=null)
        {
            for(Procedure consumer : collection) {

                // TODO: This isn't optimal (creation of new resource with every comparison)
                Resource<ResourceType> resource = new Resource<ResourceType>(id, ResourceType.Interaction);
                resource.setSource(source);

                boolean justified = consumer.getJustification() == null
                        || source.equals(consumer.getJustification());

                if(consumer.doesConsume(resource) && justified)
                {
                    execution = consumer;
                    break;
View Full Code Here

     * @param event
     */
    @Override
    public void onNavigationEvent(NavigationEvent event) {

        QName source = (QName)event.getSource();
        QName target = event.getTarget();

        //System.out.println("Navigate to " + target);

        InteractionUnit targetUnit = dialog.findUnit(target);
        if(targetUnit!=null// local to dialog
        {
            String suffix = target.getSuffix();
            if("prev".equals(suffix) || "next".equals(suffix)) // relative, local (#prev, #next)
            {
                throw new RuntimeException("Relative navigation not implemented: "+suffix);

                /*if(NavigationEvent.RELATION.next.equals(suffix))
 
View Full Code Here

            @Override
            public void execute(Dialog dialog, Object data) {

                StatementEvent event = (StatementEvent)data;

                QName sourceId = (QName)event.getSource();
                String key = event.getKey();
                String value = event.getValue();


                if(value!=null)
View Full Code Here

        setCommand(new ModelDrivenCommand() {
            @Override
            public void execute(Dialog dialog, Object data) {

                // activate target unit
                QName targetUnit = (QName)data;

                // 1.) verify activation constraints
                assert getRuntimeAPI().canBeActivated(targetUnit) : "Unit is not activatable: "+ targetUnit;

View Full Code Here

TOP

Related Classes of org.useware.kernel.model.structure.QName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.