Examples of exportMoML()


Examples of ptolemy.kernel.util.Attribute.exportMoML()

            throws IOException {
        Iterator attributes = attributeList().iterator();

        while (attributes.hasNext()) {
            Attribute attribute = (Attribute) attributes.next();
            attribute.exportMoML(output, depth);
        }

        Iterator ports = portList().iterator();

        while (ports.hasNext()) {
View Full Code Here

Examples of ptolemy.kernel.util.Attribute.exportMoML()

            throws IOException {
        try {
            for (Object att : attributeList()) {
                if (!(att instanceof Parameter)) {
                    Attribute attribute = (Attribute) att;
                    attribute.exportMoML(output, depth);
                }
            }
            if (_astCreated) {
                // Get the name of the Ptalon file.
                String filename;
View Full Code Here

Examples of ptolemy.kernel.util.Attribute.exportMoML()

                Attribute attribute = (Attribute) attributeObject;
                if (!_isAttributeCopied(attribute)) {
                    continue;
                }

                String moml = "<group name=\"auto\">" + attribute.exportMoML()
                        + "</group>";
                MoMLChangeRequest request = new MoMLChangeRequest(this, host,
                        moml);
                request.execute();
            }
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

                        NamedObj newEntity = _createInstance(cls, arguments);
                        System.out.println("create an instance of " + clsName
                                + ".\n");
                        ((ComponentEntity) newEntity).setContainer(null);

                        String chg = newEntity.exportMoML();
                        System.out.println("the moml description of the "
                                + "new object is: \n" + chg + "\n");

                        ChangeRequest request = new MoMLChangeRequest(this, // originator
                                this, // context
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

            MoMLParser.setMoMLFilters(BackwardCompatibility.allFilters());

            MoMLParser.addMoMLFilter(new RemoveGraphicalClasses());
            MoMLParser.addMoMLFilter(new HideAnnotationNames());
            NamedObj topLevel = parser.parseFile(args[0]);
            System.out.println(topLevel.exportMoML());
        } catch (Throwable throwable) {
            System.err.println("Failed to filter \"" + args[0] + "\"");
            throwable.printStackTrace();
            System.exit(1);
        }
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

                String missingClassName = exception.missingClassName();
                if (missingClassName.equals(containedObject.getName())
                        || (missingClassName.startsWith(".") && missingClassName
                                .substring(1).equals(containedObject.getName()))) {
                    try {
                        String moml = containedObject.exportMoML()
                                .replaceFirst("<class",
                                        "<class createIfNecessary=\"true\"");

                        MoMLChangeRequest change = new MoMLChangeRequest(
                                parsedContainer, parsedContainer, moml);
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

                        //     System.out.println("alternate getMOML result string (in EditorDropTarget) - "+result);
                    } catch (Exception w) {
                        System.out.println("Error creating alternateGetMoml!");
                    }
                } else { // default method for PtolemyII use
                    result = dropObj.exportMoML(name);
                }

                moml.append(result);
                moml.append("<" + rootNodeName + " name=\"" + name + "\">\n");
                moml
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

            while (elements.hasNext()) {
                NamedObj element = (NamedObj) elements.next();

                // first level to avoid obnoxiousness with
                // toplevel translations.
                element.exportMoML(buffer, 0);
            }

            if (container instanceof CompositeEntity) {
                buffer.write(((CompositeEntity) container).exportLinks(1,
                        namedObjSet));
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

                        + "<!DOCTYPE " + _elementName + " PUBLIC "
                        + "\"-//UC Berkeley//DTD MoML 1//EN\"\n"
                        + "    \"http://ptolemy.eecs.berkeley.edu"
                        + "/xml/dtd/MoML_1.dtd\">\n");
            }
            model.exportMoML(fileWriter, 0, name);
        } finally {
            if (fileWriter != null) {
                fileWriter.close();
            }
        }
View Full Code Here

Examples of ptolemy.kernel.util.NamedObj.exportMoML()

        while (elements.hasNext()) {
            NamedObj element = (NamedObj) elements.next();

            // first level to avoid obnoxiousness with toplevel translations.
            element.exportMoML(buffer, 1);
        }

        buffer.write("</group>\n");
        return buffer.toString();
    }
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.