当前位置: 首页>>代码示例>>Java>>正文


Java PropertyList.add方法代码示例

本文整理汇总了Java中net.fortuna.ical4j.model.PropertyList.add方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyList.add方法的具体用法?Java PropertyList.add怎么用?Java PropertyList.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.fortuna.ical4j.model.PropertyList的用法示例。


在下文中一共展示了PropertyList.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setRecurrenceDates

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
public void setRecurrenceDates(DateList dates) {
    if (dates == null) {
        return;
    }
    
    PropertyList<RDate> rdateList = getEvent().getProperties().getProperties(Property.RDATE);
    for (RDate rdate : rdateList) {
        rdateList.remove(rdate);
    }
    if (dates.isEmpty()) {
        return;
    }
    
    RDate rDate = new RDate(dates);
    setDateListPropertyValue(rDate);
    rdateList.add(rDate);   
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:18,代码来源:HibBaseEventStamp.java

示例2: setExceptionDates

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
public void setExceptionDates(DateList dates) {
    if (dates == null) {
        return;
    }
    
    PropertyList<Property> properties = getEvent().getProperties();
    for (Property exdate : properties.getProperties(Property.EXDATE)) {
        properties.remove(exdate);
    }
    if (dates.isEmpty()) {
        return;
    }
    
    ExDate exDate = new ExDate(dates);
    setDateListPropertyValue(exDate);
    properties.add(exDate);
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:18,代码来源:HibBaseEventStamp.java

示例3: setRecurrenceDates

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
/**
 * Sets recurrence dates.
 * @param dates The date list.
 */    
public void setRecurrenceDates(DateList dates) { 
    if (dates == null) {
        return;
    }
    
    PropertyList<Property> pl = getEvent().getProperties();
    for (Property rdate : pl.getProperties(Property.RDATE)) {
        pl.remove(rdate);
    }
    if (dates.isEmpty()) {
        return;
    }
    
    RDate rDate = new RDate(dates);
    setDateListPropertyValue(rDate);
    pl.add(rDate);   
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:22,代码来源:MockBaseEventStamp.java

示例4: setExceptionDates

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
/**
 * Sets exception dates.
 * @param dates The date list.
 */    
public void setExceptionDates(DateList dates) {
    if (dates == null) {
        return;
    }
    
    PropertyList<Property> properties = getEvent().getProperties();
    for (Property exdate : properties.getProperties(Property.EXDATE)) {
        properties.remove(exdate);
    }
    if (dates.isEmpty()) {
        return;
    }
    
    ExDate exDate = new ExDate(dates);
    setDateListPropertyValue(exDate);
    properties.add(exDate);
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:22,代码来源:MockBaseEventStamp.java

示例5: wrap

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
public void wrap(PropertyList properties, Cursor c) {
    int columnIndex = c.getColumnIndex(keyGoogleEvent);
    if (columnIndex != -1) {
        String value = c.getString(columnIndex);
        if (value != null) {
            try {
                Log.d(LOG_ID, "VEvent: " + keyVEvent + " GoogleEvent: " + keyGoogleEvent
                        + " Value: " + value);
                // Find timezone
                // TimeZone timezone = new
                // TimeZoneRegistryImpl().getTimeZone(c.getString(c
                // .getColumnIndex("timezone")));
                DateTime dateTime = new DateTime(Long.valueOf(value));
                // dateTime.setTimeZone(timezone);

                properties.add(createProperty(keyVEvent, dateTime.toString()));
            } catch (Exception exc) {
                Log.d(LOG_ID, "Error", exc);
            }
        }
    }
}
 
开发者ID:gillesB,项目名称:ical-import-export,代码行数:23,代码来源:GoogleVEventWrapper.java

示例6: loadRelatedParties

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
protected static void loadRelatedParties(List<GenericValue> relatedParties, PropertyList componentProps, Map<String, Object> context) {
    PropertyList attendees = componentProps.getProperties("ATTENDEE");
    for (GenericValue partyValue : relatedParties) {
        if ("CAL_ORGANIZER~CAL_OWNER".contains(partyValue.getString("roleTypeId"))) {
            // RFC 2445 4.6.1, 4.6.2, and 4.6.3 ORGANIZER can appear only once
            replaceProperty(componentProps, createOrganizer(partyValue, context));
        } else {
            String partyId = partyValue.getString("partyId");
            boolean newAttendee = true;
            Attendee attendee = null;
            Iterator<Attendee> i = UtilGenerics.cast(attendees.iterator());
            while (i.hasNext()) {
                attendee = i.next();
                Parameter xParameter = attendee.getParameter(partyIdXParamName);
                if (xParameter != null && partyId.equals(xParameter.getValue())) {
                    loadPartyAssignment(attendee, partyValue, context);
                    newAttendee = false;
                    break;
                }
            }
            if (newAttendee) {
                attendee = createAttendee(partyValue, context);
                componentProps.add(attendee);
            }
        }
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:28,代码来源:ICalConverter.java

示例7: replaceProperty

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
protected static void replaceProperty(PropertyList propertyList, Property property) {
    if (property == null) {
        return;
    }
    Property existingProp = propertyList.getProperty(property.getName());
    if (existingProp != null) {
        propertyList.remove(existingProp);
    }
    propertyList.add(property);
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:11,代码来源:ICalConverter.java

示例8: createEventPropertyList

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
private PropertyList createEventPropertyList() {
    PropertyList propertyList = new PropertyList();

    DtStart dtStart = new DtStart(new Date(event.getEventStartDate()));
    Duration duration = new Duration(new Dur(0, 1, 0, 0));

    propertyList.add(dtStart);
    propertyList.add(createRepeatRule(event));
    propertyList.add(duration);

    return propertyList;
}
 
开发者ID:memfis19,项目名称:Cadar,代码行数:13,代码来源:EventComponentCreator.java

示例9: evaluate

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
/**
 * Evaluates.
 * @param props The property list.
 * @param filter The text match filter.
 * @return The property list.
 */
private PropertyList evaluate(PropertyList props, TextMatchFilter filter) {
    PropertyList results = new PropertyList();
    for(Iterator<Property> it = props.iterator(); it.hasNext();) {
        Property prop = it.next();
        if(evaluate(prop,filter)==true) {
            results.add(prop);
        }
    }
    return results;
}
 
开发者ID:ksokol,项目名称:carldav,代码行数:17,代码来源:CalendarFilterEvaluater.java

示例10: evaluate

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
/**
 * Evaluates.
 * @param props The property list.
 * @param filter The text match filter.
 * @return The property list.
 */
private PropertyList<Property> evaluate(PropertyList<Property> props, TextMatchFilter filter) {
    PropertyList<Property> results = new PropertyList<>();
    for(Property prop : props) {
        if(evaluate(prop,filter)==true) {
            results.add(prop);
        }
    }
    return results;
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:16,代码来源:CalendarFilterEvaluater.java

示例11: setRecurrenceRules

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
public void setRecurrenceRules(List<Recur> recurs) {
    if (recurs == null) {
        return;
    }
    PropertyList<Property> properties = getEvent().getProperties();
    for (Property rrule : properties.getProperties(Property.RRULE)) {
        properties.remove(rrule);
    }
    for (Recur recur : recurs) {
        properties.add(new RRule(recur));
    }      
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:13,代码来源:HibBaseEventStamp.java

示例12: setExceptionRules

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
public void setExceptionRules(List<Recur> recurs) {
    if (recurs == null) {
        return;
    }
    PropertyList<Property> properties = getEvent().getProperties();
    for (Property exrule : properties.getProperties(Property.EXRULE)) {
        properties.remove(exrule);
    }
    for (Recur recur : recurs) {
        properties.add(new ExRule(recur));
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:13,代码来源:HibBaseEventStamp.java

示例13: setRecurrenceRules

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
/**
 * Sets recurrence rules.
 * @param recurs List with recurrence rules.
 */
public void setRecurrenceRules(List<Recur> recurs) {
    if (recurs == null) {
        return;
    }
    PropertyList<Property> pl = getEvent().getProperties();
    for (Property rrule : pl.getProperties(Property.RRULE)) {
        pl.remove(rrule);
    }
    for (Recur recur : recurs) {
        pl.add(new RRule(recur));
    }
  
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:18,代码来源:MockBaseEventStamp.java

示例14: setExceptionRules

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
/**
 * Sets exception rules.
 * @param recurs The list.
 */
public void setExceptionRules(List<Recur> recurs) {
    if (recurs == null) {
        return;
    }
    PropertyList<Property> pl = getEvent().getProperties();
    for (Property exrule : pl.getProperties(Property.EXRULE)) {
        pl.remove(exrule);
    }
    for (Recur recur : recurs) {
        pl.add(new ExRule(recur));
    }
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:17,代码来源:MockBaseEventStamp.java

示例15: makeCalendar

import net.fortuna.ical4j.model.PropertyList; //导入方法依赖的package包/类
protected static Calendar makeCalendar(GenericValue workEffort, Map<String, Object> context) throws GenericEntityException {
    String iCalData = null;
    GenericValue iCalValue = workEffort.getRelatedOne("WorkEffortIcalData", false);
    if (iCalValue != null) {
        iCalData = iCalValue.getString("icalData");
    }
    boolean newCalendar = true;
    Calendar calendar = null;
    if (iCalData == null) {
        Debug.logVerbose("iCalendar Data not found, creating new Calendar", module);
        calendar = new Calendar();
    } else {
        Debug.logVerbose("iCalendar Data found, using saved Calendar", module);
        StringReader reader = new StringReader(iCalData);
        CalendarBuilder builder = new CalendarBuilder();
        try {
            calendar = builder.build(reader);
            newCalendar = false;
        } catch (Exception e) {
            Debug.logError(e, "Error while parsing saved iCalendar, creating new iCalendar: ", module);
            calendar = new Calendar();
        }
    }
    PropertyList propList = calendar.getProperties();
    replaceProperty(propList, prodId);
    replaceProperty(propList, new XProperty(workEffortIdXPropName, workEffort.getString("workEffortId")));
    if (newCalendar) {
        propList.add(Version.VERSION_2_0);
        propList.add(CalScale.GREGORIAN);
        // TODO: Get time zone from publish properties value
        java.util.TimeZone tz = java.util.TimeZone.getDefault();
        TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
        net.fortuna.ical4j.model.TimeZone timezone = registry.getTimeZone(tz.getID());
        calendar.getComponents().add(timezone.getVTimeZone());
    }
    return calendar;
}
 
开发者ID:jamesyong,项目名称:o3erp,代码行数:38,代码来源:ICalConverter.java


注:本文中的net.fortuna.ical4j.model.PropertyList.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。