Author: geirm
Date: Thu Feb 10 12:22:28 2005
New Revision: 153284
URL: http://svn.apache.org/viewcvs?view=rev&rev=153284
Log:
added ability for an external Classification to
set the 'internality' of the scheme it is given.
I'm very fuzzy on this taxonomy stuff, so someone
should give it a look-see.
Also changed @author for better javadoc
Modified:
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java
Modified:
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java?view=diff&r1=153283&r2=153284
==============================================================================
---
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java
(original)
+++
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java
Thu Feb 10 12:22:28 2005
@@ -26,7 +26,8 @@
* Implements JAXR Classification Interface.
* For futher details, look into the JAXR API Javadoc.
*
- * @author Anil Saldhana <[EMAIL PROTECTED]>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Anil Saldhana</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
*/
public class ClassificationImpl extends RegistryObjectImpl
implements javax.xml.registry.infomodel.Classification
@@ -63,15 +64,27 @@
return concept;
}
+ /**
+ *
+ * @return he value of the taxonomy element if external Classification;
+ * the value of the Concept representing the taxonomy element
+ * if internal Classification
+ * @throws JAXRException
+ */
public String getValue() throws JAXRException
{
- return value;
+ if (isExternal()) {
+ return value;
+ }
+ else {
+ return concept.getValue();
+ }
}
public void setExternal(boolean b) {
this.external = b;
}
-
+
public boolean isExternal() throws JAXRException
{
return external;
@@ -81,6 +94,13 @@
throws JAXRException
{
scheme = cscheme;
+
+ /*
+ * not 100% clear, but I *think* the JavaDoc indicates that if
+ * our internality dictates that of the scheme.
+ */
+
+ ((ClassificationSchemeImpl) scheme).setExternal(isExternal());
}
public void setClassifiedObject(RegistryObject registryObject)
Modified:
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java?view=diff&r1=153283&r2=153284
==============================================================================
---
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java
(original)
+++
webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java
Thu Feb 10 12:22:28 2005
@@ -29,7 +29,8 @@
* Implements JAXR Interface.
* For futher details, look into the JAXR API Javadoc.
*
- * @author Anil Saldhana <[EMAIL PROTECTED]>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Anil Saldhana</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
*/
public class ClassificationSchemeImpl
extends RegistryEntryImpl
@@ -94,6 +95,10 @@
*/
throw new UnsupportedCapabilityException();
+ }
+
+ protected void setExternal(boolean b) {
+ this.external = b;
}
public boolean isExternal() throws JAXRException
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]