/** * Parses the specified value. * * @param value The value. * @return Typed value. */ @Override protected TimeSpan parse(String value) { return EwsUtilities.getXSDurationToTimeSpan(value); }
/** * Reads the attribute from XML. * * @param reader the reader * @throws Exception the exception */ @Override public void readAttributesFromXml(EwsServiceXmlReader reader) throws Exception { this.id = reader.readAttributeValue(XmlAttributeNames.Id); this.name = reader.readAttributeValue(XmlAttributeNames.Name); this.bias = EwsUtilities.getXSDurationToTimeSpan(reader.readAttributeValue(XmlAttributeNames.Bias)); }
/** * Tries to read element from XML. * * @param reader accepts EwsServiceXmlReader * @return True if element was read * @throws Exception throws Exception */ @Override public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception { if (super.tryReadElementFromXml(reader)) { return true; } else { if (reader.getLocalName().equals(XmlElementNames.TimeOffset)) { this.timeOffset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue()); return true; } else if (reader.getLocalName().equals(XmlElementNames.Month)) { this.month = reader.readElementValue(Integer.class); EwsUtilities.ewsAssert(this.month > 0 && this.month <= 12, "AbsoluteMonthTransition.TryReadElementFromXml", "month is not in the valid 1 - 12 range."); return true; } else { return false; } } }
this.offset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue()); return true; } else if (reader.getLocalName().equalsIgnoreCase(
/** * Gets the minimum required server version. * * @param reader the reader * @return Earliest Exchange version in which this service object type is * supported. * @throws Exception the exception */ @Override public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception { if (reader.getLocalName().equals(XmlElementNames.BaseOffset)) { this.baseOffset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue()); return true; } else if (reader.getLocalName().equals(XmlElementNames.Standard)) { this.standard = new TimeChange(); this.standard.loadFromXml(reader, reader.getLocalName()); return true; } else if (reader.getLocalName().equals(XmlElementNames.Daylight)) { this.daylight = new TimeChange(); this.daylight.loadFromXml(reader, reader.getLocalName()); return true; } else { return false; } }
/** * Parses the specified value. * * @param value The value. * @return Typed value. */ @Override protected TimeSpan parse(String value) { return EwsUtilities.getXSDurationToTimeSpan(value); }
/** * Reads the attribute from XML. * * @param reader the reader * @throws Exception the exception */ @Override public void readAttributesFromXml(EwsServiceXmlReader reader) throws Exception { this.id = reader.readAttributeValue(XmlAttributeNames.Id); this.name = reader.readAttributeValue(XmlAttributeNames.Name); this.bias = EwsUtilities.getXSDurationToTimeSpan(reader.readAttributeValue(XmlAttributeNames.Bias)); }
/** * Tries to read element from XML. * * @param reader accepts EwsServiceXmlReader * @return True if element was read * @throws Exception throws Exception */ @Override public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception { if (super.tryReadElementFromXml(reader)) { return true; } else { if (reader.getLocalName().equals(XmlElementNames.TimeOffset)) { this.timeOffset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue()); return true; } else if (reader.getLocalName().equals(XmlElementNames.Month)) { this.month = reader.readElementValue(Integer.class); EwsUtilities.ewsAssert(this.month > 0 && this.month <= 12, "AbsoluteMonthTransition.TryReadElementFromXml", "month is not in the valid 1 - 12 range."); return true; } else { return false; } } }
this.offset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue()); return true; } else if (reader.getLocalName().equalsIgnoreCase(
/** * Gets the minimum required server version. * * @param reader the reader * @return Earliest Exchange version in which this service object type is * supported. * @throws Exception the exception */ @Override public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception { if (reader.getLocalName().equals(XmlElementNames.BaseOffset)) { this.baseOffset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue()); return true; } else if (reader.getLocalName().equals(XmlElementNames.Standard)) { this.standard = new TimeChange(); this.standard.loadFromXml(reader, reader.getLocalName()); return true; } else if (reader.getLocalName().equals(XmlElementNames.Daylight)) { this.daylight = new TimeChange(); this.daylight.loadFromXml(reader, reader.getLocalName()); return true; } else { return false; } }