org.apache.wink.webdav.model
Class Source

java.lang.Object
  extended by org.apache.wink.webdav.model.Source

public class Source
extends Object

The source Property per the WebDAV specification [RFC 4918]

    Name:       source
    Namespace:  DAV:
    Purpose:    The destination of the source link identifies the
    resource that contains the unprocessed source of the link's source.
    Description: The source of the link (src) is typically the URI of the
    output resource on which the link is defined, and there is typically
    only one destination (dst) of the link, which is the URI where the
    unprocessed source of the resource may be accessed.  When more than
    one link destination exists, this specification asserts no policy on
    ordering.
 
    <!ELEMENT source (link)* >
    
    Example - A source Property
 
    <?xml version="1.0" encoding="utf-8" ?>
    <D:prop xmlns:D="DAV:" xmlns:F="http://www.foocorp.com/Project/">
      <D:source>
           <D:link>
                <F:projfiles>Source</F:projfiles>
                <D:src>http://foo.bar/program</D:src>
                <D:dst>http://foo.bar/src/main.c</D:dst>
           </D:link>
           <D:link>
                <F:projfiles>Library</F:projfiles>
                <D:src>http://foo.bar/program</D:src>
                <D:dst>http://foo.bar/src/main.lib</D:dst>
           </D:link>
           <D:link>
                <F:projfiles>Makefile</F:projfiles>
                <D:src>http://foo.bar/program</D:src>
                <D:dst>http://foo.bar/src/makefile</D:dst>
           </D:link>
      </D:source>
    </D:prop>
 
    In this example the resource http://foo.bar/program has a source
    property that contains three links.  Each link contains three
    elements, two of which, src and dst, are part of the DAV schema
    defined in this document, and one which is defined by the schema
    http://www.foocorp.com/project/ (Source, Library, and Makefile).  A
    client which only implements the elements in the DAV spec will not
    understand the foocorp elements and will ignore them, thus seeing the
    expected source and destination links.  An enhanced client may know
    about the foocorp elements and be able to present the user with
    additional information about the links.  This example demonstrates
    the power of XML markup, allowing element values to be enhanced
    without breaking older clients.
 
 


Field Summary
protected  List<Link> link
           
 
Constructor Summary
Source()
           
 
Method Summary
 List<Link> getLink()
          Gets the value of the link property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

link

protected List<Link> link
Constructor Detail

Source

public Source()
Method Detail

getLink

public List<Link> getLink()
Gets the value of the link property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the link property.

For example, to add a new item, do as follows:

 getLink().add(newItem);
 

Objects of the following type(s) are allowed in the list Link



Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.