| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 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.Concept; |
| 23 | |
import javax.xml.registry.infomodel.RegistryObject; |
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
public class ClassificationImpl extends RegistryObjectImpl |
| 33 | |
implements javax.xml.registry.infomodel.Classification |
| 34 | |
{ |
| 35 | |
|
| 36 | 50 | private ClassificationScheme scheme = new ClassificationSchemeImpl(null); |
| 37 | 50 | private Concept concept = new ConceptImpl(null); |
| 38 | 50 | private boolean external = false; |
| 39 | |
private String value; |
| 40 | |
|
| 41 | 50 | private RegistryObject classfiedobj = null; |
| 42 | |
|
| 43 | |
|
| 44 | |
|
| 45 | |
|
| 46 | |
public ClassificationImpl(LifeCycleManager lifeCycleManager) |
| 47 | |
{ |
| 48 | 50 | super(lifeCycleManager); |
| 49 | 50 | } |
| 50 | |
|
| 51 | |
public ClassificationScheme getClassificationScheme() |
| 52 | |
throws JAXRException |
| 53 | |
{ |
| 54 | 18 | return scheme; |
| 55 | |
} |
| 56 | |
|
| 57 | |
public RegistryObject getClassifiedObject() throws JAXRException |
| 58 | |
{ |
| 59 | 0 | return classfiedobj; |
| 60 | |
} |
| 61 | |
|
| 62 | |
public Concept getConcept() throws JAXRException |
| 63 | |
{ |
| 64 | 18 | return concept; |
| 65 | |
} |
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
|
| 70 | |
|
| 71 | |
|
| 72 | |
|
| 73 | |
|
| 74 | |
public String getValue() throws JAXRException |
| 75 | |
{ |
| 76 | 18 | if (isExternal()) { |
| 77 | 18 | return value; |
| 78 | |
} |
| 79 | |
else { |
| 80 | 0 | return concept.getValue(); |
| 81 | |
} |
| 82 | |
} |
| 83 | |
|
| 84 | |
public void setExternal(boolean b) { |
| 85 | 18 | this.external = b; |
| 86 | 18 | } |
| 87 | |
|
| 88 | |
public boolean isExternal() throws JAXRException |
| 89 | |
{ |
| 90 | 102 | return external; |
| 91 | |
} |
| 92 | |
|
| 93 | |
public void setClassificationScheme(ClassificationScheme cscheme) |
| 94 | |
throws JAXRException |
| 95 | |
{ |
| 96 | 48 | scheme = cscheme; |
| 97 | |
|
| 98 | |
|
| 99 | |
|
| 100 | |
|
| 101 | |
|
| 102 | |
|
| 103 | 48 | ((ClassificationSchemeImpl) scheme).setExternal(isExternal()); |
| 104 | 48 | } |
| 105 | |
|
| 106 | |
public void setClassifiedObject(RegistryObject registryObject) |
| 107 | |
throws JAXRException |
| 108 | |
{ |
| 109 | 0 | classfiedobj = registryObject; |
| 110 | 0 | } |
| 111 | |
|
| 112 | |
public void setConcept(Concept cpt) throws JAXRException |
| 113 | |
{ |
| 114 | 0 | concept = cpt; |
| 115 | 0 | } |
| 116 | |
|
| 117 | |
public void setValue(String str) throws JAXRException |
| 118 | |
{ |
| 119 | 48 | value = str; |
| 120 | 48 | } |
| 121 | |
|
| 122 | |
} |