Package org.useware.kernel.model.structure

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


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

                QName targetUnit = (QName)data;
                System.out.println("navigate "+targetUnit);


            }
        });
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 targetId = (QName)data;

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


                String suffix = targetId.getSuffix();
                boolean isRelative = suffix !=null && (suffix.equals("prev")||suffix.equals("next"));

                InteractionUnit unit = dialog.findUnit(targetId);
                if(isRelative)
                    coordinator.getDialogState().activateBranch(unit, suffix);
View Full Code Here

        for(QName unitId : activation.getActiveItems().values())
        {
            // trigger activation procedure
            // TODO: Improve passing of relative nav information
            QName target = NONE.equals(suffix) ? unitId :
                    new QName(unitId.getNamespaceURI(), unitId.getLocalPart()+"#"+suffix);

            stateCoordination.activateUnit(target);
        }

        return activation.getActiveItems().get(activation.getActiveItems().size()-1);
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

    private final QName id;
    private final T type;
    private QName source;

    public Resource(String namespace, String id, T type) {
        this.id = new QName(namespace, id);
        this.type = type;
    }
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

            this.widget.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent clickEvent) {

                    Link link = (Link) interactionUnit;
                    QName target = link.getTarget();

                    NavigationEvent navigationEvent  = new NavigationEvent(
                            CommonQNames.NAVIGATION_ID, target,
                            NavigationEvent.Relation.fromString(link.getId().getLocalPart())  // TODO: local part?
                    );
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.