This project has retired. For details please refer to its Attic page.
ExternalIdentifierImpl xref
View Javadoc
1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.ws.scout.registry.infomodel;
18  
19  import javax.xml.registry.JAXRException;
20  import javax.xml.registry.LifeCycleManager;
21  import javax.xml.registry.infomodel.ClassificationScheme;
22  import javax.xml.registry.infomodel.InternationalString;
23  import javax.xml.registry.infomodel.RegistryObject;
24  
25  /**
26   * Implements JAXR Interface.
27   * For futher details, look into the JAXR API Javadoc.
28   *
29   * @author Anil Saldhana  <anil@apache.org>
30   */
31  public class ExternalIdentifierImpl extends RegistryObjectImpl
32          implements javax.xml.registry.infomodel.ExternalIdentifier
33  {
34  
35      private ClassificationScheme identity = new ClassificationSchemeImpl(null);
36      private String value = new String();
37      private RegistryObject parent;
38  
39      /**
40       * Creates a new instance of ExternalIdentifierImpl
41       */
42      public ExternalIdentifierImpl(LifeCycleManager lifeCycleManager)
43      {
44          super(lifeCycleManager);
45      }
46  
47      public ExternalIdentifierImpl(LifeCycleManager lifeCycleManager,
48                                    ClassificationScheme identity,
49                                    InternationalString name,
50                                    String value)
51      {
52          super(lifeCycleManager, name);
53          this.identity = identity;
54          this.value = value;
55      }
56  
57      public ClassificationScheme getIdentificationScheme()
58              throws JAXRException
59      {
60          return identity;
61      }
62  
63      public RegistryObject getRegistryObject() throws JAXRException
64      {
65          return parent;
66      }
67  
68      public String getValue() throws JAXRException
69      {
70          return value;
71      }
72  
73      public void setIdentificationScheme(ClassificationScheme cs)
74              throws JAXRException
75      {
76          identity = cs;
77      }
78  
79      public void setValue(String str) throws JAXRException
80      {
81          value = str;
82      }
83  
84      //Specific API
85      public void setRegistryObject(RegistryObject obj)
86      {
87          parent = obj;
88      }
89  
90  }