Package edu.hawaii.ics.csdl.jupiter.file.preference

Examples of edu.hawaii.ics.csdl.jupiter.file.preference.Preference


   * @return Returns a <code>Preference</code> representing the data in the file.
   * @throws XMLStreamException Thrown if there is an error reading the file.
   */
  public static Preference parsePreferenceFile(XMLStreamReader reader)
      throws XMLStreamException {
    Preference preference = null;

    int eventType = reader.getEventType();
    while (reader.hasNext()) {
      eventType = reader.next();

      if (eventType == XMLStreamConstants.START_ELEMENT) {
        QName elementQName = reader.getName();
        String elementName = elementQName.toString();

        if (ELEMENT_PREFERENCE.equals(elementName)) {
          preference = new Preference();
        }
        else if (ELEMENT_GENERAL.equals(elementName)) {
          StaxPreferenceXmlUtil.parseGeneral(reader, preference);
        }
        else if (ELEMENT_VIEW.equals(elementName)) {
View Full Code Here

TOP

Related Classes of edu.hawaii.ics.csdl.jupiter.file.preference.Preference

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.