Examples of PoiList


Examples of slash.navigation.viamichelin.binding.PoiList

    }

    public void read(InputStream source, CompactCalendar startDate, ParserContext<ViaMichelinRoute> context) throws Exception {
        InputStreamReader reader = new InputStreamReader(source);
        try {
            PoiList poiList = unmarshal(reader);
            context.appendRoute(process(poiList));
        }
        finally {
            reader.close();
        }
View Full Code Here

Examples of slash.navigation.viamichelin.binding.PoiList

    }


    private PoiList createPoiList(ViaMichelinRoute route) {
        ObjectFactory objectFactory = new ObjectFactory();
        PoiList poiList = objectFactory.createPoiList();
        poiList.setVersion("2.0");
        Itinerary itinerary = objectFactory.createItinerary();
        itinerary.setName(asRouteName(route.getName()));
        poiList.getItineraryOrPoi().add(itinerary);
        for (Wgs84Position position : route.getPositions()) {
            Step step = objectFactory.createStep();
            step.setLongitude(formatPositionAsString(position.getLongitude()));
            step.setLatitude(formatPositionAsString(position.getLatitude()));
            step.setName(position.getDescription());
View Full Code Here

Examples of slash.navigation.viamichelin.binding.PoiList

        xmlReader.setEntityResolver(entityResolver);
        return xmlReader;
    }

    public static PoiList unmarshal(Reader reader) throws JAXBException {
        PoiList result = null;
        try {
            result = (PoiList) newUnmarshaller().unmarshal(new SAXSource(createXMLReader(), new InputSource(reader)));
        } catch (ClassCastException e) {
            throw new JAXBException("Parse error: " + 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.