01: /*
02: * Copyright 2001-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 java.util.ArrayList;
20: import java.util.Collection;
21:
22: import javax.xml.registry.JAXRException;
23: import javax.xml.registry.LifeCycleManager;
24: import javax.xml.registry.infomodel.RegistryObject;
25:
26: /**
27: * Implements JAXR Interface.
28: * For futher details, look into the JAXR API Javadoc.
29: *
30: * @author Anil Saldhana <anil@apache.org>
31: */
32: public class ExternalLinkImpl extends RegistryObjectImpl implements
33: javax.xml.registry.infomodel.ExternalLink {
34: private String uri = new String();
35: private boolean validateuri = false;
36: private Collection<RegistryObject> linkedObj = new ArrayList<RegistryObject>();
37:
38: /**
39: * Creates a new instance of ExternalLinkImpl
40: */
41: public ExternalLinkImpl(LifeCycleManager lifeCycleManager) {
42: super (lifeCycleManager);
43: }
44:
45: public String getExternalURI() throws JAXRException {
46: return uri;
47: }
48:
49: public Collection getLinkedObjects() throws JAXRException {
50: return linkedObj;
51: }
52:
53: public boolean getValidateURI() throws JAXRException {
54: return validateuri;
55: }
56:
57: public void setExternalURI(String str) throws JAXRException {
58: this .uri = str;
59: }
60:
61: public void setValidateURI(boolean param) throws JAXRException {
62: this .validateuri = param;
63: }
64:
65: //Specific API
66: public void addLinkedObject(RegistryObject obj) {
67: linkedObj.add(obj);
68: }
69:
70: public void removeLinkedObject(RegistryObject obj) {
71: linkedObj.remove(obj);
72: }
73:
74: }
|