Package org.fluxtream.core.metadata

Examples of org.fluxtream.core.metadata.MonthMetadata


        VisitedCity previousInferredCity = null, nextInferredCity = null;
        if (cities.size()==0) {
            previousInferredCity = searchCityBeforeDate(guestId, dates.first());
            nextInferredCity = searchCityAfterDate(guestId, dates.last());
            if (previousInferredCity==null && nextInferredCity==null) {
                MonthMetadata info = new MonthMetadata(year, month);
                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);
        MonthMetadata info = new MonthMetadata(consensusVisitedCity, previousInferredCity, nextInferredCity, consensusTimezoneMap, timezoneMap, cities, consensusCities, year, month);
        return info;
    }
View Full Code Here


            return Response.status(401).entity("You are no longer logged in").build();
        long guestId = guest.getId();

        try{
            long then = System.currentTimeMillis();
            MonthMetadata monthMetadata = metadataService.getMonthMetadata(guestId, year, month);
            CalendarModel calendarModel = CalendarModel.fromState(guestId, metadataService, "month/" + year + "/" + month);
            DigestModel digest = new DigestModel(TimeUnit.MONTH, monthMetadata, env, calendarModel);

            digest.metadata.timeUnit = "MONTH";
            if (filter == null) {
View Full Code Here

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

            long then = System.currentTimeMillis();

            MonthMetadata monthMetadata = metadataService.getMonthMetadata(guestId, year, month);
            GuestSettings settings = settingsService.getSettings(guestId);
            ConnectorResponseModel day = prepareConnectorResponseModel(monthMetadata);

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

TOP

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

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.