Package org.fluxtream.core.metadata

Examples of org.fluxtream.core.metadata.WeekMetadata


        VisitedCity previousInferredCity = null, nextInferredCity = null;
        if (cities.size()==0) {
            previousInferredCity = searchCityBeforeDate(guestId, dates.first());
            nextInferredCity = searchCityAfterDate(guestId, dates.last());
            if (previousInferredCity==null&&nextInferredCity==null) {
                WeekMetadata info = new WeekMetadata(year, week);
                return info;
            }
        }
        final VisitedCity consensusVisitedCity = getConsensusVisitedCity(cities, previousInferredCity, nextInferredCity);
        final List<DayMetadata> dayMetadataForDates = getDayMetadataForDates(guestId, dates);
        final TreeMap<String, TimeZone> consensusTimezoneMap = getConsensusTimezoneMap(dayMetadataForDates);
        final List<VisitedCity> consensusCities = extractConsensusCities(dayMetadataForDates);
        TimezoneMap timezoneMap = TimezoneMap.fromConsensusTimezoneMap(consensusTimezoneMap);
        WeekMetadata info = new WeekMetadata(consensusVisitedCity, previousInferredCity, nextInferredCity, consensusTimezoneMap, timezoneMap, cities, consensusCities, year, week);
        return info;
    }
View Full Code Here


        try{
            long then = System.currentTimeMillis();
            //TODO:proper week data retrieval implementation
            //this implementation is just a dirt hacky way to make it work and some aspects (weather info) don't work

            WeekMetadata weekMetadata = metadataService.getWeekMetadata(guestId, year, week);
            CalendarModel calendarModel = CalendarModel.fromState(guestId, metadataService, "week/" + year + "/" + week);
            DigestModel digest = new DigestModel(TimeUnit.WEEK, weekMetadata, env, calendarModel);

            if (filter == null) {
                filter = "";
View Full Code Here

            List<ApiKey> apiKeyList = getApiKeyListFromConnectorObjectsEncoding(guest,connectorObjectsEncoded);
            Map<ApiKey,List<ObjectType>> objectTypesMap = getObjectTypesFromConnectorObjectsEncoding(apiKeyList,connectorObjectsEncoded);

            long then = System.currentTimeMillis();

            WeekMetadata weekMetadata = metadataService.getWeekMetadata(guestId, year, week);
            GuestSettings settings = settingsService.getSettings(guestId);
            ConnectorResponseModel day = prepareConnectorResponseModel(weekMetadata);

            for (ApiKey apiKey : apiKeyList){
                List<ObjectType> objectTypes = objectTypesMap.get(apiKey);
View Full Code Here

TOP

Related Classes of org.fluxtream.core.metadata.WeekMetadata

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.