Package org.jdom

Examples of org.jdom.DocType


            throws IllegalActionException, NameDuplicationException {
        Element root = null;
        Element director = null;

        // Set the doc type.
        DocType plot = new DocType("entity", "-//UC Berkeley//DTD MoML 1//EN",
                "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd");
        Document doc = null;

        if (micaboardFile != null) {
            Element micaboard = null;
View Full Code Here


        source.setAttribute("name", "source");
        source.setAttribute("value", sourcePath);
        root.addContent(source);

        // Set the doc type.
        DocType plot = new DocType("plot", "-//UC Berkeley//DTD MoML 1//EN",
                "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd");
        Document doc = new Document(root, plot);

        // Get the list of interfaces for this nesC component.
        ListIterator interfaces = Xnesc.interfaceList.listIterator();
View Full Code Here

        root.setAttribute("class", "ptolemy.moml.EntityLibrary");

        Element configure = new Element("configure");
        root.addContent(configure);

        DocType plot = new DocType("plot", "-//UC Berkeley//DTD MoML 1//EN",
                "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd");
        Document doc = new Document(); //root, plot);

        String comment = "DO NOT EDIT.  This file was generated by "
                + "ptolemy.domains.ptinyos.util.nc2moml.MoMLLib.  "
View Full Code Here

    }

    public void enableMultipleStreaming() {}

    public DocType getDocumentType() {
        DocType docType = getDocument().getDocType();
        if (docType == null) {
            docType = new DocType(getDocument().getRootElement().getName());
            getDocument().setDocType(docType);
        }
        return docType;
    }
View Full Code Here

        this.constrained = false;
    }

    public XMLValueDescriptor(String allowedDocType) {
        this.constrained = true;
        this.allowedDocType = new DocType(allowedDocType);
    }
View Full Code Here

    public boolean isDocument() {
        return false;
    }

    public DocType getDocumentType() {
        return new DocType(element.getName());
    }
View Full Code Here

     *
     * @throws Exception If an unexpected error occurs
     */
    public void testValueOfUnknownDocType() throws Exception
    {
        DocType docType = new DocType("application",
            "foo", "bar");
        assertNull(ApplicationXmlVersion.valueOf(docType));
    }
View Full Code Here

     *
     * @throws Exception If an unexpected error occurs
     */
    public void testValueOfDocType12() throws Exception
    {
        DocType docType = new DocType("application",
            ApplicationXmlVersion.V1_2.getPublicId(),
                ApplicationXmlVersion.V1_2.getSystemId());
        assertEquals(ApplicationXmlVersion.V1_2,
            ApplicationXmlVersion.valueOf(docType));
    }
View Full Code Here

     *
     * @throws Exception If an unexpected error occurs
     */
    public void testValueOfDocType13() throws Exception
    {
        DocType docType = new DocType("application",
            ApplicationXmlVersion.V1_3.getPublicId(),
                ApplicationXmlVersion.V1_3.getSystemId());
        assertEquals(ApplicationXmlVersion.V1_3,
            ApplicationXmlVersion.valueOf(docType));
    }
View Full Code Here

     *
     * @throws Exception If an unexpected error occurs
     */
    public void testValueOfUnknownDocType() throws Exception
    {
        DocType docType = new DocType("web-app",
            "foo", "bar");
        assertNull(WebXmlVersion.valueOf(docType));
    }
View Full Code Here

TOP

Related Classes of org.jdom.DocType

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.