Package slash.navigation.gpx.binding11

Examples of slash.navigation.gpx.binding11.PersonType


        for (int ndx = 1; ndx < 6; ndx++) {
            Thread.sleep(4000L);
            List<BookType> newBooks = new LinkedList<BookType>();
      BookType book = new BookType();
      newBooks.add(book);
      PersonType author = new PersonType();
      book.getAuthor().add(author);
      author.setFirstName("Jack");
      author.setLastName("Icebear");
      Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
      author.setDateOfBirth(dateOfBirth.getTime());
      book.getTitle().add("More About Survival in the Arctic - Volume " + ndx);
      book.getPublisher().add("Frosty Edition");
      book.setYearPublished("2011");
      System.out.println("Publishing notification about a new book:");
      System.out.println("Jack Icebear - More About Survival in the Arctic - Volume " + ndx);
View Full Code Here


            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
        author.setDateOfBirth(dateOfBirth.getTime());
        book.getTitle().add("Survival in the Arctic");
        book.getPublisher().add("Frosty Edition");
        book.setYearPublished("2010");

        System.out.println("Book(s) is found:");
View Full Code Here

        }

        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("John");
        author.setLastName("Stripycat");
        Calendar dateOfBirth = new GregorianCalendar(202, Calendar.MAY, 17);
        author.setDateOfBirth(dateOfBirth.getTime());
        book.getTitle().add("Hunting basement inhabitants");
        book.getPublisher().add("Dusty Edition");
        book.setYearPublished("2013");

        System.out.println("Book(s) is found:");
View Full Code Here

            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
        author.setDateOfBirth(dateOfBirth.getTime());
        book.getTitle().add("Survival in the Arctic");
        book.getPublisher().add("Frosty Edition");
        book.setYearPublished("2010");

        System.out.println("Book(s) is found:");
View Full Code Here

        userextensionType.setEmail(asUtf8(email));
        userextensionType.setFirstname(asUtf8(firstName));
        userextensionType.setLastname(asUtf8(lastName));
        userextensionType.setPassword(asUtf8(password));

        ExtensionsType extensionsType = objectFactory.createExtensionsType();
        extensionsType.getAny().add(userextensionType);
        metadataType.setExtensions(extensionsType);

        GpxType gpxType = GpxUtil.createGpxType();
        gpxType.setMetadata(metadataType);
View Full Code Here

    public void testWritingRouteConverterExtensions() throws IOException, JAXBException {
        slash.navigation.gpx.routecatalog10.ObjectFactory rcFactory = new slash.navigation.gpx.routecatalog10.ObjectFactory();
        UserextensionType userExtensionType = rcFactory.createUserextensionType();
        userExtensionType.setFirstname("FIRST");
        slash.navigation.gpx.binding11.ObjectFactory gpxFactory = new slash.navigation.gpx.binding11.ObjectFactory();
        ExtensionsType extensionsType = gpxFactory.createExtensionsType();
        extensionsType.getAny().add(userExtensionType);
        GpxType gpx = gpxFactory.createGpxType();
        gpx.setCreator("CREATOR");
        gpx.setExtensions(extensionsType);
        assertNotNull(gpx);
        StringWriter writer = new StringWriter();
View Full Code Here

    @Test
    public void testWritingTrekBuddyExtensions() throws IOException, JAXBException {
        slash.navigation.gpx.binding11.ObjectFactory gpxFactory = new slash.navigation.gpx.binding11.ObjectFactory();
        slash.navigation.gpx.trekbuddy.ObjectFactory tbFactory = new slash.navigation.gpx.trekbuddy.ObjectFactory();
        ExtensionsType extensionsType = gpxFactory.createExtensionsType();
        extensionsType.getAny().add(tbFactory.createSpeed(formatBigDecimal(123.45, 2)));
        GpxType gpx = gpxFactory.createGpxType();
        assertNotNull(gpx);
        gpx.setExtensions(extensionsType);
        assertNotNull(gpx);
        StringWriter writer = new StringWriter();
View Full Code Here

        userextensionType.setEmail(email);
        userextensionType.setFirstname(firstName);
        userextensionType.setLastname(lastName);
        userextensionType.setPassword(password);

        ExtensionsType extensionsType = gpxFactory.createExtensionsType();
        extensionsType.getAny().add(userextensionType);
        metadataType.setExtensions(extensionsType);

        GpxType gpxType = createGpxType();
        gpxType.setMetadata(metadataType);
        return toXml(gpxType);
View Full Code Here

        if (gpx == null) {
            gpx = getCatalog().fetchGpx(getUrl());

            // avoid subsequent NullPointerExceptions on server errors
            if (gpx == null) {
                gpx = new GpxType();
                gpx.setMetadata(new MetadataType());
            }
        }
        return gpx;
    }
View Full Code Here

    public static GpxType unmarshal11(String string) throws JAXBException {
        return unmarshal11(new StringReader(string));
    }

    public static GpxType unmarshal11(Reader reader) throws JAXBException {
        GpxType result;
        try {
            JAXBElement element = (JAXBElement) newUnmarshaller11().unmarshal(reader);
            result = (GpxType) element.getValue();
        } catch (ClassCastException e) {
            throw new JAXBException("Parse error: " + e);
View Full Code Here

TOP

Related Classes of slash.navigation.gpx.binding11.PersonType

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.