01: // DAVPropAction.java
02: // $Id: DAVPropAction.java,v 1.2 2000/10/12 16:19:20 bmahe Exp $
03: // (c) COPYRIGHT MIT, INRIA and Keio, 2000.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05: package org.w3c.www.webdav.xml;
06:
07: import org.w3c.dom.Element;
08: import org.w3c.dom.Node;
09:
10: /**
11: * @version $Revision: 1.2 $
12: * @author Benoît Mahé (bmahe@w3.org)
13: */
14: public class DAVPropAction extends DAVNode {
15: public final static int UNDEFINED = -1;
16: public final static int SET = 1;
17: public final static int REMOVE = 2;
18:
19: int action = UNDEFINED;
20:
21: public int getAction() {
22: if (action == UNDEFINED) {
23: if (element.getLocalName().equals(SET_NODE)) {
24: action = SET;
25: } else if (element.getLocalName().equals(REMOVE_NODE)) {
26: action = REMOVE;
27: }
28: }
29: return action;
30: }
31:
32: public DAVProperties getProperties() {
33: Element n = (Element) getDAVNode(PROP_NODE);
34: if (n != null) {
35: return new DAVProperties(n);
36: }
37: return null;
38: }
39:
40: DAVPropAction(Element element) {
41: super(element);
42: }
43:
44: }
|