Package org.openuri.nameworld

Examples of org.openuri.nameworld.NameworldDocument


    public NameworldTest(String name) { super(name); }
    public static Test suite() { return new TestSuite(NameworldTest.class); }

    public static void testWorld1() throws Exception
    {
        NameworldDocument doc = (NameworldDocument)
                    XmlObject.Factory.parse(TestEnv.xbeanCase("nameworld/world1.xml"));

        Assert.assertEquals(new QName("http://openuri.org/nameworld", "nameworld"), doc.schemaType().getDocumentElementName());

        QName[] contents = new QName[]
        {
            new QName("http://bar.com/", "barcity"),
            new QName("http://foo.com/", "footown"),
            new QName("http://bar.com/", "barvillage"),
            new QName("http://bar.com/", "bartown"),
            new QName("http://foo.com/", "foovillage"),
            new QName("http://bar.com/", "barvillage"),
            new QName("http://foo.com/", "foocity"),
            new QName("http://bar.com/", "bartown"),
            new QName("http://foo.com/", "foovillage"),
            new QName("http://foo.com/", "footown"),
            new QName("http://bar.com/", "barvillage"),
            new QName("http://foo.com/", "foovillage"),
        };
        int t = 0;

        Nameworld world = doc.getNameworld();
        Nameworld.Island[] islands = world.getIslandArray();
        for (int i = 0; i < islands.length; i++)
        {
            Loc[] locs = islands[i].getLocationArray();
            for (int j = 0; j < locs.length; j++)
View Full Code Here


    public NameworldTest(String name) { super(name); }
    public static Test suite() { return new TestSuite(NameworldTest.class); }

    public static void testWorld1() throws Exception
    {
        NameworldDocument doc = (NameworldDocument)
                    XmlObject.Factory.parse(TestEnv.xbeanCase("nameworld/world1.xml"));

        Assert.assertEquals(new QName("http://openuri.org/nameworld", "nameworld"), doc.schemaType().getDocumentElementName());

        QName[] contents = new QName[]
        {
            new QName("http://bar.com/", "barcity"),
            new QName("http://foo.com/", "footown"),
            new QName("http://bar.com/", "barvillage"),
            new QName("http://bar.com/", "bartown"),
            new QName("http://foo.com/", "foovillage"),
            new QName("http://bar.com/", "barvillage"),
            new QName("http://foo.com/", "foocity"),
            new QName("http://bar.com/", "bartown"),
            new QName("http://foo.com/", "foovillage"),
            new QName("http://foo.com/", "footown"),
            new QName("http://bar.com/", "barvillage"),
            new QName("http://foo.com/", "foovillage"),
        };
        int t = 0;

        Nameworld world = doc.getNameworld();
        Nameworld.Island[] islands = world.getIslandArray();
        for (int i = 0; i < islands.length; i++)
        {
            Loc[] locs = islands[i].getLocationArray();
            for (int j = 0; j < locs.length; j++)
View Full Code Here

TOP

Related Classes of org.openuri.nameworld.NameworldDocument

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.