本文整理了Java中net.fortuna.ical4j.model.parameter.XParameter
类的一些代码示例,展示了XParameter
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XParameter
类的具体详情如下:
包路径:net.fortuna.ical4j.model.parameter.XParameter
类名称:XParameter
[英]$Id$ [15/06/2004] Defines an extension parameter.
[中]$Id$[15/06/2004]定义了一个扩展参数。
代码示例来源:origin: ical4j/ical4j
public Parameter createParameter(final String value)
throws URISyntaxException {
return new XParameter(name, value);
}
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical
private static void testXparams(final Property p,
final Holder<Boolean> hasXparams) {
if (hasXparams.value) {
// No need to check
return;
}
ParameterList params = p.getParameters();
Iterator parit = params.iterator();
while (parit.hasNext()) {
Parameter param = (Parameter)parit.next();
if (!(param instanceof XParameter)) {
continue;
}
XParameter xpar = (XParameter)param;
if (xpar.getName().toUpperCase().equals(BwXproperty.xparUid)) {
continue;
}
hasXparams.value = true;
}
}
private static void processTimezones(final BwEvent ev,
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical
if (xpar.getName().toUpperCase().equals(BwXproperty.xparUid)) {
continue;
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
/**
* Gets any time x param.
* @return The parameter.
*/
private Parameter getAnyTimeXParam() {
return new XParameter(ICalendarConstants.PARAM_X_OSAF_ANYTIME, ICalendarConstants.VALUE_TRUE);
}
代码示例来源:origin: org.mnode.ical4j/ical4j
public Parameter createParameter(final String value)
throws URISyntaxException {
return new XParameter(name, value);
}
}
代码示例来源:origin: apache/ofbiz-framework
protected static XParameter toXParameter(String name, String value) {
if (name == null || value == null) {
return null;
}
return new XParameter(name, value);
}
代码示例来源:origin: 1and1/cosmo
/**
* Gets any time x param.
* @return The parameter.
*/
private Parameter getAnyTimeXParam() {
return new XParameter(ICalendarConstants.PARAM_X_OSAF_ANYTIME, ICalendarConstants.VALUE_TRUE);
}
代码示例来源:origin: 1and1/cosmo
private Parameter getInheritedAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_MISSING);
}
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
protected Parameter getAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_TRUE);
}
代码示例来源:origin: net.oneandone.cosmo/cosmo-core
private Parameter getInheritedAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_MISSING);
}
代码示例来源:origin: 1and1/cosmo
protected Parameter getAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_TRUE);
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical
private static Property uidProp(final Property prop, final String uid) {
Parameter par = new XParameter(BwXproperty.xparUid, uid);
prop.getParameters().add(par);
return prop;
}
代码示例来源:origin: ical4j/ical4j
/**
* Creates a parameter.
*
* @param name name of the parameter
* @param value a parameter value
* @return a component
* @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected
* parameters
*/
public Parameter createParameter(final String name, final String value)
throws URISyntaxException {
final ParameterFactory factory = getFactory(name);
Parameter parameter;
if (factory != null) {
parameter = factory.createParameter(value);
} else if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
} else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
} else {
throw new IllegalArgumentException(String.format("Unsupported parameter name: %s", name));
}
return parameter;
}
代码示例来源:origin: net.oneandone.ical4j/ical4j
/**
* Creates a parameter.
*
* @param name name of the parameter
* @param value a parameter value
* @return a component
* @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected
* parameters
*/
public Parameter createParameter(final String name, final String value)
throws URISyntaxException {
final ParameterFactory factory = getFactory(name);
Parameter parameter;
if (factory != null) {
parameter = factory.createParameter(value);
} else if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
} else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
} else {
throw new IllegalArgumentException(String.format("Unsupported parameter name: %s", name));
}
return parameter;
}
代码示例来源:origin: org.bedework.ical4j/ical4j
/**
* Creates a parameter.
*
* @param name name of the parameter
* @param value a parameter value
* @return a component
* @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected
* parameters
*/
public Parameter createParameter(final String name, final String value)
throws URISyntaxException {
final ParameterFactory factory = getFactory(name);
Parameter parameter;
if (factory != null) {
parameter = factory.createParameter(value);
} else if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
} else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
} else {
throw new IllegalArgumentException(String.format("Unsupported parameter name: %s", name));
}
return parameter;
}
代码示例来源:origin: org.mnode.ical4j/ical4j
/**
* Creates a parameter.
*
* @param name name of the parameter
* @param value a parameter value
* @return a component
* @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected
* parameters
*/
public Parameter createParameter(final String name, final String value)
throws URISyntaxException {
final ParameterFactory factory = getFactory(name);
Parameter parameter;
if (factory != null) {
parameter = factory.createParameter(value);
} else if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
} else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
} else {
throw new IllegalArgumentException(String.format("Unsupported parameter name: %s", name));
}
return parameter;
}
代码示例来源:origin: ical4j/ical4j
/**
* @return a new parameter instance
*/
public Parameter build() throws URISyntaxException {
Parameter parameter = null;
for (ParameterFactory factory : factories) {
if (factory.supports(name)) {
parameter = factory.createParameter(value);
break;
}
}
if (parameter == null) {
if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
}
else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
}
else {
throw new IllegalArgumentException(String.format("Unsupported parameter name: %s", name));
}
}
return parameter;
}
}
代码示例来源:origin: org.mnode.ical4j/ical4j
/**
* @return a new parameter instance
*/
public Parameter build() throws URISyntaxException {
Parameter parameter = null;
for (ParameterFactory factory : factories) {
if (factory.supports(name)) {
parameter = factory.createParameter(value);
break;
}
}
if (parameter == null) {
if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
}
else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
}
else {
throw new IllegalArgumentException(String.format("Unsupported parameter name: %s", name));
}
}
return parameter;
}
}
代码示例来源:origin: ical4j/ical4j
/**
* @return
*/
public static TestSuite suite() {
TestSuite suite = new TestSuite();
suite.addTest(new XParameterTest("testGetValue", new XParameter("name",
"value"), "name", "value"));
return suite;
}
}
代码示例来源:origin: org.bedework/bw-ical4j-cl
/**
* Creates a parameter.
* @param name name of the parameter
* @param value a parameter value
* @return a component
* @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected
* parameters
*/
public Parameter createParameter(final String name, final String value)
throws URISyntaxException {
final ParameterFactory factory = (ParameterFactory) getFactory(name);
Parameter parameter = null;
if (factory != null) {
parameter = factory.createParameter(name, value);
}
else if (isExperimentalName(name)) {
parameter = new XParameter(name, value);
}
else if (allowIllegalNames()) {
parameter = new XParameter(name, value);
}
else {
throw new IllegalArgumentException("Invalid parameter name: "
+ name);
}
return parameter;
}
内容来源于网络,如有侵权,请联系作者删除!