KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > jdnc > markup > attr > BaseAttribute


1 /*
2  * $Id: BaseAttribute.java,v 1.1.1.1 2004/06/16 01:43:40 davidson1 Exp $
3  *
4  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5  * Santa Clara, California 95054, U.S.A. All rights reserved.
6  */

7
8 package org.jdesktop.jdnc.markup.attr;
9
10 import net.openmarkup.Realizable;
11
12 import org.w3c.dom.Element JavaDoc;
13
14 import org.jdesktop.jdnc.markup.RealizationUtils;
15
16 /**
17  * A utility class to abstract the resolution of referenced objects. This probably belongs
18  * somewhere else. Perhaps in the org.jdesktop.jdnc.markup package.
19  */

20 public class BaseAttribute {
21
22     /**
23      * This method insulates the ObjectRealizer implementation to get the Realized Object
24      * from the Element that has been referenced by the attributeValue.
25      */

26     public static Object JavaDoc getReferencedObject(Realizable target, String JavaDoc attributeValue) {
27     return RealizationUtils.getReferencedObject(target, attributeValue);
28     }
29
30     public static Element JavaDoc getReferencedElement(Realizable target,
31                                                String JavaDoc attributeValue) {
32     return RealizationUtils.getReferencedElement(target, attributeValue);
33     }
34
35 }
36
Popular Tags