01: /* Namespaceable.java
02:
03: {{IS_NOTE
04:
05: Purpose:
06: Description:
07: History:
08: 2001/10/23 23:52:55, Create, Tom M. Yeh.
09: }}IS_NOTE
10:
11: Copyright (C) 2001 Potix Corporation. All Rights Reserved.
12:
13: {{IS_RIGHT
14: This program is distributed under GPL Version 2.0 in the hope that
15: it will be useful, but WITHOUT ANY WARRANTY.
16: }}IS_RIGHT
17: */
18: package org.zkoss.idom;
19:
20: /**
21: * Represents a class that supports namespace.
22: * It is usually implemented by a class that also implements Item or Group.
23: * Currently, only Element and Attribute implement it.
24: *
25: * @author tomyeh
26: * @see Item
27: * @see Group
28: * @see Attributable
29: * @see Binable
30: */
31: public interface Namespaceable {
32: /**
33: * Gets the namespace.
34: *
35: * @return the namespace; never null
36: */
37: public Namespace getNamespace();
38:
39: /**
40: * Sets the namespace. A null namespace will be converted to
41: * Namespace.NO_NAMESPACE.
42: */
43: public void setNamespace(Namespace ns);
44:
45: /**
46: * Gets the tag name of this item.
47: * The tag name is also called the full qualitifed name -- the name
48: * <i>with</i> the namespace prefix, e.g., prefix:name.
49: *
50: * <p>To get the local name (the name without prefix),
51: * Namespaceable.getLocalName could be used.
52: */
53: public String getTagName();
54:
55: /**
56: * Sets the tag name of this item.
57: */
58: public void setTagName(String tname);
59:
60: /**
61: * Gets the local name of this item.
62: * The local name is the name without prefix.
63: *
64: * <p>To get the tag name (the name with prefix),
65: * Namespaceable.getTagName could be used.
66: */
67: public String getLocalName();
68:
69: /**
70: * Sets the local name of this item.
71: */
72: public void setLocalName(String lname);
73: }
|