Examples of TimeLineXml


Examples of jp.co.nskint.uq.pd.signage.model.xml.TimeLineXml

     *            タイムライン情報
     */
    public void put(Manager manager, TimeLine timeline) {
        Transaction tx = Datastore.beginTransaction();
        // XMLモデルを文字列に変換
        TimeLineXml xmlModel = timeline.getXmlModel();
        if (xmlModel != null) {
            try {
                StringWriter writer = new StringWriter();
                JAXBContext context =
                    JAXBContext.newInstance("jp.co.nskint.uq.pd.signage.model.xml");
View Full Code Here

Examples of jp.co.nskint.uq.pd.signage.model.xml.TimeLineXml

        // スケジュール情報の作成
        final String scheduleId = "0";
        Schedule schedule = cretateSchedule(scheduleId, blockId);

        // タイムラインXMLモデルの作成
        TimeLineXml timelineXml = cretateTimeLineXml(tlid, name, block, schedule);

        TimeLine timeline = new TimeLine();
        timeline.setId(id);
        Date now = new Date();
        timeline.setRegisteredDate(now);
View Full Code Here

Examples of jp.co.nskint.uq.pd.signage.model.xml.TimeLineXml

     *            スケジュール情報
     * @return タイムラインXMLモデル情報
     */
    public TimeLineXml cretateTimeLineXml(long tlid, String name, Block block,
            Schedule schedule) {
        TimeLineXml timelineXml = new TimeLineXml();
        timelineXml.setId(""+tlid);
        timelineXml.setName(name);
        timelineXml.getBlock().add(block);
        timelineXml.getSchedule().add(schedule);

        return timelineXml;
    }
View Full Code Here

Examples of jp.co.nskint.uq.pd.signage.model.xml.TimeLineXml

    public LayoutInfo getViewLayout(TimeLine timeline) {
        GregorianCalendar now = new GregorianCalendar();
        final int nowHour = now.get(GregorianCalendar.HOUR_OF_DAY);
        final int nowMin = now.get(GregorianCalendar.MINUTE);

        TimeLineXml model = timeline.getXmlModel();
        ArrayList<Schedule> schedules = new ArrayList<Schedule>(model.getSchedule());
        Collections.reverse(schedules);
        for (Schedule schedule : schedules) {
            boolean before = true;
            if (schedule.getStart() != null) {
                final GregorianCalendar start = schedule.getStart().toGregorianCalendar();
                final int startHour = start.get(GregorianCalendar.HOUR_OF_DAY);
                final int startMin = start.get(GregorianCalendar.MINUTE);

                before = startHour < nowHour || startHour == nowHour && startMin <= nowMin;
            }
            boolean after = true;
            GregorianCalendar end = now;
            end.add(GregorianCalendar.DAY_OF_MONTH, 1);
            end.set(GregorianCalendar.HOUR_OF_DAY, 0);
            end.set(GregorianCalendar.MINUTE, 0);
            end.set(GregorianCalendar.SECOND, 0);
            end.set(GregorianCalendar.MILLISECOND, 0);
            if (schedule.getEnd() != null) {
                end = schedule.getEnd().toGregorianCalendar();
                final int endHour = end.get(GregorianCalendar.HOUR_OF_DAY);
                final int endMin = end.get(GregorianCalendar.MINUTE);

                after = endHour > nowHour || endHour == nowHour && endMin >= nowMin;
            }
            if (before && after) {
                for (Block block : model.getBlock()) {
                    if (block.getId().equals(schedule.getBlockId())) {
                        LayoutService layoutService = new LayoutService();
                        LayoutInfo result = new LayoutInfo();
                        result.layout = layoutService.get(timeline.getManagerRef().getModel(), Long.parseLong(block.getLayoutId()));
                        result.reloadTime = end.getTime();
View Full Code Here

Examples of jp.co.nskint.uq.pd.signage.model.xml.TimeLineXml

        if (this.xmlModel == null) {
            try {
                StringReader reader = new StringReader(this.getXml());
                JAXBContext context =
                    JAXBContext.newInstance("jp.co.nskint.uq.pd.signage.model.xml");
                TimeLineXml xmlModel =
                    (TimeLineXml) context
                        .createUnmarshaller()
                        .unmarshal(reader);
                this.xmlModel = xmlModel;
            } catch (JAXBException e) {
View Full Code Here

Examples of jp.co.nskint.uq.pd.signage.model.xml.TimeLineXml

                errors.put("page", "指定されたタイムラインは存在しません。");
                return forward("/error.jsp");
            }

            // タイムラインXML情報を取得
            TimeLineXml timelineXml = timeline.getXmlModel();

            List<Layout> layoutList = manager.getLayoutListRef().getModelList();
            this.request.setAttribute("layoutList", layoutList);

//            String defaultLayoutId = timeline.getLayoutId();
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.