Examples of Tableau


Examples of org.semanticweb.HermiT.tableau.Tableau

                result.add(new OWLNamedIndividualNode(factory.getOWLNamedIndividual(IRI.create(individual.getIRI()))));
        }
        return new OWLNamedIndividualNodeSet(result);
    }
    protected Set<Individual> getSameAsIndividuals(Individual individual) {
        Tableau tableau=getTableau();
        Set<Individual> result=new HashSet<Individual>();
        result.add(individual);
        for (Individual potentiallySameIndividual : m_dlOntology.getAllIndividuals())
            if (isResultRelevantIndividual(potentiallySameIndividual) && !individual.equals(potentiallySameIndividual))
                if (!tableau.isSatisfiable(true,true,Collections.singleton(Atom.create(Inequality.INSTANCE,individual,potentiallySameIndividual)),null,null,null,null,new ReasoningTaskDescription(true,"is {0} same as {1}",individual,potentiallySameIndividual)))
                    result.add(potentiallySameIndividual);
        return result;
    }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

            break;
        default:
            throw new IllegalArgumentException("Unknown expansion strategy type.");
        }

        return new Tableau(interruptFlag,tableauMonitor,existentialsExpansionStrategy,config.useDisjunctionLearning,permanentDLOntology,additionalDLOntology,config.parameters);
    }
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

        }

        Effigy effigy = ((TableauFrame) parent).getEffigy();

        // FIXME: Is the cast safe?
        Tableau tableau = (Tableau) effigy.getEntity("JNICodeGeneratorGUI");

        if (tableau == null) {
            try {
                tableau = new Tableau(effigy, "JNICodeGeneratorGUI");
            } catch (KernelException e) {
                throw new InternalErrorException(e);
            }
        }

        Frame frame = tableau.getFrame();

        if (frame == null) {
            try {
                frame = new JNICodeGeneratorGUI(codeGenerator, tableau);
            } catch (KernelException e) {
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

            Effigy containerEffigy = Configuration.findEffigy(toplevel());
            try {
                _effigy = new PtolemyEffigy(containerEffigy,
                        "ModelDisplay Effigy");
                _effigy.setModel(_entity);
                _tableau = new Tableau(_effigy, "tableau");
            } catch (NameDuplicationException e) {
                throw new IllegalActionException(this, e,
                        "Failed to create tableau.");
            }
            _frame = new TableauFrame(_tableau);
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

         @param parent The parent window, or null if there is none.
         */
        public void createEditor(NamedObj object, Frame parent) {
            try {
                Effigy effigy = ((TableauFrame) parent).getEffigy();
                Tableau tableau = _tableauFactory.createTableau(effigy);
                if (tableau == null) {
                    throw new Exception("Tableau factory returns null.");
                }
                tableau.setEditable(effigy.isModifiable());
                tableau.show();
            } catch (Exception ex) {
                throw new InternalErrorException(object, ex,
                        "Cannot generate code. Perhaps outside Vergil?");
            }
        }
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

                    try {
                        _parser.reset();
                        // Export the model into moml string and then import it
                        // again. Needed b some models with unnoticeable state.
                        NamedObj newModel = _parser.parse(model.exportMoML());
                        Tableau tableau = configuration.openModel(newModel,
                                effigy);
                        if (_tableaus[i] != null) {
                            _tableaus[i].close();
                        }
                        _tableaus[i] = tableau;

                        JFrame frame = tableau.getFrame();
                        // Compute location of the new frame.
                        RecordToken location =
                            (RecordToken) screenLocation.getToken();
                        int x = ((IntToken) location.get("x")).intValue();
                        int y = ((IntToken) location.get("y")).intValue();
                        Point newLocation = frame.getLocation();
                        if (x >= 0) {
                            newLocation.x = x;
                        }
                        if (y >= 0) {
                            newLocation.y = y;
                        }
                        // Move the frame to the edge if it exceeds the screen.
                        Dimension size = frame.getSize();
                        Toolkit toolkit = Toolkit.getDefaultToolkit();
                        Dimension screenSize = toolkit.getScreenSize();
                        newLocation.x = Math.min(newLocation.x,
                                screenSize.width - size.width);
                        newLocation.y = Math.min(newLocation.y,
                                screenSize.height - size.height);
                        frame.setLocation(newLocation);
                        frame.addWindowListener(this);

                        String titleString = null;
                        if (titleValue.equals("")) {
                            URI uri = URIAttribute.getModelURI(newModel);
                            if (uri != null) {
                                URI modelURI = new URI(uri.getScheme(), uri
                                        .getUserInfo(), uri.getHost(), uri
                                        .getPort(), uri.getPath()
                                        + newModel.getName() + ".xml", null,
                                        null);
                                titleString = modelURI.toString() + " ("
                                        + getName() + ")";
                            }
                        } else {
                            titleString = titleValue;
                        }
                        tableau.setTitle(titleString);
                    } catch (NameDuplicationException e) {
                        throw new IllegalActionException(this, e,
                                "Cannot open model.");
                    } catch (Exception e) {
                        throw new IllegalActionException(this, e,
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

        setModified(false);
        close();

        MoMLParser parser = new MoMLParser();
        try {
            Tableau tableau = getFrameController().getConfiguration().openModel(
                    parser.parse(moml));
            Frame frame = tableau.getFrame();
            if (modified && (frame instanceof TableauFrame)) {
                ((TableauFrame) tableau.getFrame()).setModified(true);
            }
        } catch (Exception e) {
            MessageHandler.error("Cannot open default tableau for the "
                    + "model.", e);
        }
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

                object = getTarget();
            }

            try {
                BasicGraphFrame frame = _controller.getFrame();
                Tableau tableau = frame.getTableau();

                // effigy is the whole model.
                Effigy effigy = (Effigy) tableau.getContainer();

                // We want to open a new window that behaves as a
                // child of the model window.  So, we create a new text
                // effigy inside this one.  Specify model's effigy as
                // a container for this new effigy.
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

                getFrameController().getConfiguration();
            if (configuration == null) {
                throw new InternalErrorException("Cannot get configuration.");
            }

            Tableau tableau = configuration.openModel(model);
            MatchResultViewer viewer = (MatchResultViewer) tableau.getFrame();
            viewer.setMatchResult(results);
            viewer.setSourceFileName(sourceFileName);
            viewer.setTransformationRule(
                    getFrameController().getTransformationRule());
            return viewer;
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

        }

        Effigy effigy = ((TableauFrame) parent).getEffigy();

        // FIXME: Is the cast safe?
        Tableau tableau = (Tableau) effigy.getEntity("codeGeneratorGUI");

        if (tableau == null) {
            try {
                tableau = new Tableau(effigy, "codeGeneratorGUI");
            } catch (KernelException e) {
                throw new InternalErrorException(e);
            }
        }

        Frame frame = tableau.getFrame();

        if (frame == null) {
            try {
                frame = new CodeGeneratorGUI(codeGenerator, tableau);
            } catch (KernelException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.