/******************************************************************************* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *******************************************************************************/ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.1-b02-fcs // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2008.12.04 at 02:20:17 PM IST // package org.apache.wink.webdav.model; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * The <code>propfind</code> XML element per the WebDAV specification [RFC 4918] * * <pre> * Name: propfind * Namespace: DAV: * Purpose: Specifies the properties to be returned from a PROPFIND * method. Two special elements are specified for use with propfind, * allprop and propname. If prop is used inside propfind it MUST only * contain property names, not values. * * <!ELEMENT propfind (allprop | propname | prop) > * </pre> */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = {"allprop", "propname", "prop"}) @XmlRootElement(name = "propfind") public class Propfind { protected Allprop allprop; protected Propname propname; protected Prop prop; /** * Gets the value of the allprop property. * * @return possible object is {@link Allprop } */ public Allprop getAllprop() { return allprop; } /** * Sets the value of the allprop property. * * @param value allowed object is {@link Allprop } */ public void setAllprop(Allprop value) { this.allprop = value; } /** * Gets the value of the propname property. * * @return possible object is {@link Propname } */ public Propname getPropname() { return propname; } /** * Sets the value of the propname property. * * @param value allowed object is {@link Propname } */ public void setPropname(Propname value) { this.propname = value; } /** * Gets the value of the prop property. * * @return possible object is {@link Prop } */ public Prop getProp() { return prop; } /** * Sets the value of the prop property. * * @param value allowed object is {@link Prop } */ public void setProp(Prop value) { this.prop = value; } public boolean isAllprop() { return getAllprop() != null; } public boolean isPropname() { return getPropname() != null; } /** * Unmarshal a Propfind object from the provided input stream * * @param is the input stream * @return an instance of a Propfind object * @throws IOException */ public static Propfind unmarshal(InputStream is) throws IOException { return unmarshal(new InputStreamReader(is)); } /** * Marshal a Propfind object to the provided output stream * * @param instance the Propfind instance to marshal * @param outputStreamWriter the output stream * @throws IOException */ public static void marshal(Propfind instance, OutputStream os) throws IOException { marshal(instance, new OutputStreamWriter(os)); } /** * Unmarshal a Propfind object from the provided reader * * @param reader the input reader * @return an instance of a Propfind object * @throws IOException */ public static Propfind unmarshal(Reader reader) throws IOException { Unmarshaller unmarshaller = WebDAVModelHelper.createUnmarshaller(); Propfind instance = WebDAVModelHelper.unmarshal(unmarshaller, reader, Propfind.class, "propfind"); //$NON-NLS-1$ return instance; } /** * Marshal a Propfind object to the provided writer * * @param instance the Profind instance to marshal * @param writer the output writer * @throws IOException */ public static void marshal(Propfind instance, Writer writer) throws IOException { Marshaller marshaller = WebDAVModelHelper.createMarshaller(); WebDAVModelHelper.marshal(marshaller, instance, writer, "propfind"); //$NON-NLS-1$ } }