KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > dictionary > DictionaryNamespaceComponent


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.dictionary;
18
19 import java.util.Collection JavaDoc;
20
21 import org.alfresco.service.namespace.NamespaceService;
22
23
24 /**
25  * Data Dictionary Namespace Service Implementation
26  *
27  * @author David Caruana
28  */

29 public class DictionaryNamespaceComponent implements NamespaceService
30 {
31
32     /**
33      * Namespace DAO
34      */

35     private NamespaceDAO namespaceDAO;
36
37
38     /**
39      * Sets the Namespace DAO
40      *
41      * @param namespaceDAO namespace DAO
42      */

43     public void setNamespaceDAO(NamespaceDAO namespaceDAO)
44     {
45         this.namespaceDAO = namespaceDAO;
46     }
47
48
49     /* (non-Javadoc)
50      * @see org.alfresco.repo.dictionary.NamespaceService#getURIs()
51      */

52     public Collection JavaDoc<String JavaDoc> getURIs()
53     {
54         return namespaceDAO.getURIs();
55     }
56
57
58     /* (non-Javadoc)
59      * @see org.alfresco.repo.dictionary.NamespaceService#getPrefixes()
60      */

61     public Collection JavaDoc<String JavaDoc> getPrefixes()
62     {
63         return namespaceDAO.getPrefixes();
64     }
65
66
67     /* (non-Javadoc)
68      * @see org.alfresco.repo.ref.NamespacePrefixResolver#getNamespaceURI(java.lang.String)
69      */

70     public String JavaDoc getNamespaceURI(String JavaDoc prefix)
71     {
72         return namespaceDAO.getNamespaceURI(prefix);
73     }
74
75
76     /* (non-Javadoc)
77      * @see org.alfresco.repo.ref.NamespacePrefixResolver#getPrefixes(java.lang.String)
78      */

79     public Collection JavaDoc<String JavaDoc> getPrefixes(String JavaDoc namespaceURI)
80     {
81         return namespaceDAO.getPrefixes(namespaceURI);
82     }
83
84     
85     /* (non-Javadoc)
86      * @see org.alfresco.service.namespace.NamespaceService#registerNamespace(java.lang.String, java.lang.String)
87      */

88     public void registerNamespace(String JavaDoc prefix, String JavaDoc uri)
89     {
90         // TODO:
91
throw new UnsupportedOperationException JavaDoc();
92     }
93
94
95     /* (non-Javadoc)
96      * @see org.alfresco.service.namespace.NamespaceService#registerNamespace(java.lang.String, java.lang.String)
97      */

98     public void unregisterNamespace(String JavaDoc prefix)
99     {
100         // TODO:
101
throw new UnsupportedOperationException JavaDoc();
102     }
103     
104 }
105
Popular Tags