KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sample > registry > model > impl > RegistryImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.sample.registry.model.impl;
20
21 import java.util.Collections JavaDoc;
22 import java.util.List JavaDoc;
23 import org.sample.registry.model.Entries;
24 import org.sample.registry.model.KnownTypes;
25 import org.sample.registry.model.Registry;
26 import org.sample.registry.model.RegistryComponent;
27 import org.sample.registry.model.RegistryVisitor;
28 import org.w3c.dom.Element JavaDoc;
29
30 public class RegistryImpl extends RegistryComponentImpl.Named implements Registry {
31
32     public RegistryImpl(RegistryModelImpl model, Element JavaDoc e) {
33         super(model, e);
34     }
35     
36     public RegistryImpl(RegistryModelImpl model) {
37         this(model, createElementNS(model, RegistryQNames.REGISTRY));
38     }
39     
40     public void accept(RegistryVisitor visitor) {
41         visitor.visit(this);
42     }
43     
44     /**
45      * Accessing methods for member 'knownTypes'
46      */

47     public KnownTypes getKnownTypes() {
48         return getChild(KnownTypes.class);
49     }
50     public void setKnownTypes(KnownTypes types) {
51         List JavaDoc<Class JavaDoc<? extends RegistryComponent>> empty = Collections.emptyList();
52         setChild(KnownTypes.class, KNOWN_TYPES_PROPERTY, types, empty);
53     }
54
55     public void setEntries(Entries entries) {
56         List JavaDoc<Class JavaDoc<? extends RegistryComponent>> empty = Collections.emptyList();
57         setChild(KnownTypes.class, KNOWN_TYPES_PROPERTY, entries, empty);
58     }
59
60     public Entries getEntries() {
61         return getChild(Entries.class);
62     }
63 }
64
Popular Tags