You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2014/03/09 15:36:30 UTC
[1/4] JUDDI-198 all spec functionality and tModel vsv implemented
Repository: juddi
Updated Branches:
refs/heads/master 4c7e798b7 -> a866ea020
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
index 643ce81..54c9399 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
@@ -17,6 +17,7 @@ package org.apache.juddi.api.impl;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -32,16 +33,24 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
+import org.uddi.api_v3.AccessPoint;
import org.uddi.api_v3.BindingDetail;
+import org.uddi.api_v3.BindingTemplate;
+import org.uddi.api_v3.BusinessDetail;
import org.uddi.api_v3.BusinessEntity;
+import org.uddi.api_v3.BusinessService;
+import org.uddi.api_v3.BusinessServices;
import org.uddi.api_v3.CategoryBag;
import org.uddi.api_v3.Description;
import org.uddi.api_v3.GetBindingDetail;
+import org.uddi.api_v3.IdentifierBag;
import org.uddi.api_v3.KeyedReference;
import org.uddi.api_v3.Name;
+import org.uddi.api_v3.SaveBinding;
import org.uddi.api_v3.SaveBusiness;
import org.uddi.api_v3.SaveTModel;
import org.uddi.api_v3.TModel;
+import org.uddi.api_v3.TModelDetail;
import org.uddi.api_v3.TModelInstanceDetails;
import org.uddi.v3_service.UDDIInquiryPortType;
import org.uddi.v3_service.UDDIPublicationPortType;
@@ -61,6 +70,7 @@ public class API_150_ValueSetValidationTest {
static UDDIValueSetValidationImpl vsv = new UDDIValueSetValidationImpl();
static TckTModel tckTModel = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());
protected static String authInfoJoe = null;
+ protected static String authInfoMary = null;
protected static String authInfoSam = null;
protected static String authInfoRoot = null;
protected static String authInfoUDDI = null;
@@ -77,6 +87,7 @@ public class API_150_ValueSetValidationTest {
logger.debug("Getting auth tokens..");
try {
authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+ authInfoMary = TckSecurity.getAuthToken(security, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
authInfoRoot = TckSecurity.getAuthToken(security, TckPublisher.getRootPublisherId(), TckPublisher.getRootPassword());
authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
@@ -123,42 +134,35 @@ public class API_150_ValueSetValidationTest {
//register business/service/bt for validatevalues service
//this is done by the install process using the built in vsv
-
//add/alter BT to include instance info for ref to tmodel checked
//turns out we don't need this either, its in the default install data
//AlterRootBusiness();
-
//configure jUDDI API service to "set" the valid values
//SaveVSVValues(TckTModel.JOE_PUBLISHER_KEY_PREFIX + TMODEL);
-
//add a new service for joe, reference the checked tmodel with an invalid token
-
- SaveBusiness(authInfoJoe, true,TMODEL);
+ SaveBusiness(authInfoJoe, true, TMODEL);
//add a new service for joe, reference the checked tmodel with invalid token
}
+
@Ignore
@Test(expected = ValueNotAllowedException.class)
public void Scenario1Invalid() throws Exception {
//create checked tmodel x
//logger.info("Saving checked tModel");
- // SaveCheckedTModel(TckTModel.JOE_PUBLISHER_KEY_PREFIX + TMODEL);
+ // SaveCheckedTModel(TckTModel.JOE_PUBLISHER_KEY_PREFIX + TMODEL);
//register business/service/bt for validatevalues service
//this is done by the install process using the built in vsv
-
//add/alter BT to include instance info for ref to tmodel checked
//turns out we don't need this either, its in the default install data
//AlterRootBusiness();
-
//configure jUDDI API service to "set" the valid values
//logger.info("Saving VS valid values");
//SaveVSVValues(TckTModel.JOE_PUBLISHER_KEY_PREFIX + TMODEL);
-
//add a new service for joe, reference the checked tmodel with an invalid token
-
logger.info("Saving a business using those values");
- SaveBusiness(authInfoJoe, false,TMODEL);
+ SaveBusiness(authInfoJoe, false, TMODEL);
//add a new service for joe, reference the checked tmodel with invalid token
}
@@ -171,7 +175,7 @@ public class API_150_ValueSetValidationTest {
register business/service/bt for validatevalues service
add/alter BT to include instance info for ref to tmodel checked
alter checked tmodel, add reference to the BT for the validator
- >>> open question? do we check existing instances of tmodel x at this point? do we reject the request if validation fails?
+ >>> open question? do we check existing instances of tmodel x at this point? do we reject the request if validation fails?
someone tries to use the checked tmodel as a KR
on publish, the server attempts to validate the KR's value against the VV service via the binding Template
*/
@@ -184,7 +188,7 @@ public class API_150_ValueSetValidationTest {
tm.setName(new Name("My Custom validated key", "en"));
tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
tm.getCategoryBag().getKeyedReference().add(
- new KeyedReference(UDDIConstants.IS_VALIDATED_BY, UDDIConstants.IS_VALIDATED_BY_KEY_NAME, VSV_BT_KEY));
+ new KeyedReference(UDDIConstants.IS_VALIDATED_BY, UDDIConstants.IS_VALIDATED_BY_KEY_NAME, VSV_BT_KEY));
SaveTModel stm = new SaveTModel();
stm.setAuthInfo(authInfoJoe);
stm.getTModel().add(tm);
@@ -234,4 +238,469 @@ public class API_150_ValueSetValidationTest {
items.add(i);
juddi.setAllValidValues(authInfoJoe, items);
}
+
+ public void DerviedFromValid() throws Exception {
+
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_DERVIVED_FROM, "", "uddi:uddi.org:categorization:nodes"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void DerviedFromInValid() throws Exception {
+
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_DERVIVED_FROM, "", "uddi:juddi.apache.org:" + UUID.randomUUID().toString()));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test
+ public void EntitKeyValuesValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.ENTITY_KEY_VALUES, "", "tModelKey"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void EntitKeyValuesInValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.ENTITY_KEY_VALUES, "", "asdasdasd"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test
+ @Ignore
+ public void UDDINodeValid() throws Exception {
+ BusinessEntity be = new BusinessEntity();
+ be.getName().add(new Name("test", "en"));
+ be.setCategoryBag(new CategoryBag());
+ be.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:nodes", "", "node"));
+ SaveBusiness sb = new SaveBusiness();
+ sb.setAuthInfo(authInfoRoot);
+ sb.getBusinessEntity().add(be);
+ publication.saveBusiness(sb);
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void UDDINodeInValid1() throws Exception {
+ BusinessEntity be = new BusinessEntity();
+ be.getName().add(new Name("test", "en"));
+ be.setCategoryBag(new CategoryBag());
+ be.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:nodes", "", "asdasd"));
+ SaveBusiness sb = new SaveBusiness();
+ sb.setAuthInfo(authInfoRoot);
+ sb.getBusinessEntity().add(be);
+ publication.saveBusiness(sb);
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void UDDINodeInValid2() throws Exception {
+ BusinessEntity be = new BusinessEntity();
+ be.getName().add(new Name("test", "en"));
+ be.setBusinessServices(new BusinessServices());
+ BusinessService bs = new BusinessService();
+ bs.setCategoryBag(new CategoryBag());
+ bs.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:nodes", "", "asdasd"));
+ be.getBusinessServices().getBusinessService().add(bs);
+ be.setCategoryBag(new CategoryBag());
+
+ SaveBusiness sb = new SaveBusiness();
+ sb.setAuthInfo(authInfoRoot);
+ sb.getBusinessEntity().add(be);
+ publication.saveBusiness(sb);
+ }
+
+ @Test
+ public void OwningBusinessValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.OWNING_BUSINESS, "", "uddi:juddi.apache.org:businesses-asf"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void OwningBusinessInValid() throws Exception {
+ BusinessEntity be = new BusinessEntity();
+ be.getName().add(new Name("test", "en"));
+ be.setCategoryBag(new CategoryBag());
+ be.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.OWNING_BUSINESS, "", "uddi:juddi.apache.org:" + UUID.randomUUID().toString()));
+ SaveBusiness sb = new SaveBusiness();
+ sb.setAuthInfo(authInfoJoe);
+ sb.getBusinessEntity().add(be);
+ publication.saveBusiness(sb);
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void OwningBusinessInValid2() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.OWNING_BUSINESS, "", "uddi:juddi.apache.org:" + UUID.randomUUID().toString()));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test
+ public void TypeTmodelValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "", "namespace"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void TypeTModelInValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "", "wsdlDeployment"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void TypeBindingInValid() throws Exception {
+ SaveBinding sb = new SaveBinding();
+ sb.setAuthInfo(authInfoRoot);
+ BindingTemplate bt = new BindingTemplate();
+ bt.setServiceKey("uddi:juddi.apache.org:services-inquiry");
+ bt.setAccessPoint(new AccessPoint("http://test", "endPoint"));
+ bt.setCategoryBag(new CategoryBag());
+ bt.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "", "namespace"));
+ publication.saveBinding(sb);
+ }
+
+ @Test
+ public void TypeBindingValid() throws Exception {
+ SaveBinding sb = new SaveBinding();
+ sb.setAuthInfo(authInfoRoot);
+ BindingTemplate bt = new BindingTemplate();
+ bt.setServiceKey("uddi:juddi.apache.org:services-inquiry");
+ bt.setAccessPoint(new AccessPoint("http://test", "endPoint"));
+ bt.setCategoryBag(new CategoryBag());
+ bt.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "", "wsdlDeployment"));
+ sb.getBindingTemplate().add(bt);
+ publication.saveBinding(sb);
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void ValidatedByInValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_VALIDATED_BY, UDDIConstants.IS_VALIDATED_BY_KEY_NAME, "uddi:juddi.apache.org:s:nonexistentvalidator"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ }
+
+ @Test
+ @Ignore
+ public void ValidatedByValid() throws Exception {
+ //this is covered by the default install
+ }
+
+ @Test
+ public void ReplacedByValid() throws Exception {
+ TModel tm = new TModel();
+ tm.setName(new Name("My old tmodel", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ TModelDetail saveTModel = publication.saveTModel(stm);
+
+ tm = new TModel();
+ tm.setName(new Name("My new tmodel", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setIdentifierBag(new IdentifierBag());
+ tm.getIdentifierBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", saveTModel.getTModel().get(0).getTModelKey()));
+ stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test
+ public void ReplacedByValid2() throws Exception {
+ TModel tm = new TModel();
+ tm.setName(new Name("My old tmodel", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ TModelDetail saveTModel = publication.saveTModel(stm);
+
+ tm = new TModel();
+ tm.setName(new Name("My new tmodel", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setCategoryBag(new CategoryBag());
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", saveTModel.getTModel().get(0).getTModelKey()));
+ stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test
+ public void ReplacedByValid3() throws Exception {
+ BusinessEntity tm = new BusinessEntity();
+ tm.getName().add(new Name("My old business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveBusiness stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+ BusinessDetail saveBusiness = publication.saveBusiness(stm);
+
+ tm = new BusinessEntity();
+ tm.getName().add(new Name("My new business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setIdentifierBag(new IdentifierBag());
+ tm.getIdentifierBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", saveBusiness.getBusinessEntity().get(0).getBusinessKey()));
+ stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+ }
+
+ @Test
+ public void ReplacedByValid4() throws Exception {
+ BusinessEntity tm = new BusinessEntity();
+ tm.getName().add(new Name("My old business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveBusiness stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+ BusinessDetail saveBusiness = publication.saveBusiness(stm);
+
+ tm = new BusinessEntity();
+ tm.getName().add(new Name("My new business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setCategoryBag(new CategoryBag());
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", saveBusiness.getBusinessEntity().get(0).getBusinessKey()));
+ stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+ }
+
+ @Test
+ public void ReplacedByValid5Projected() throws Exception {
+ BusinessEntity tm = new BusinessEntity();
+ tm.setBusinessKey(TckTModel.JOE_PUBLISHER_KEY_PREFIX + "testbiz");
+ tm.getName().add(new Name("My old business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveBusiness stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+
+ tm = new BusinessEntity();
+ tm.setBusinessKey(TckTModel.JOE_PUBLISHER_KEY_PREFIX + "oldbiz");
+ tm.getName().add(new Name("My new business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setCategoryBag(new CategoryBag());
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", TckTModel.JOE_PUBLISHER_KEY_PREFIX + "testbiz"));
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+ }
+
+
+ @Test
+ public void ReplacedByValid6DifferentOwners() throws Exception {
+ BusinessEntity tm = new BusinessEntity();
+ tm.setBusinessKey(TckTModel.MARY_KEY_PREFIX + "testbiz");
+ tm.getName().add(new Name("My old business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveBusiness stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoMary);
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+
+ tm = new BusinessEntity();
+ tm.setBusinessKey(TckTModel.JOE_PUBLISHER_KEY_PREFIX + "oldbiz");
+ tm.getName().add(new Name("My new business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setCategoryBag(new CategoryBag());
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", TckTModel.MARY_KEY_PREFIX + "testbiz"));
+ stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+ }
+
+ @Test
+ public void ReplacedByValid7DifferentOwners() throws Exception {
+ BusinessEntity tm = new BusinessEntity();
+ tm.setBusinessKey(TckTModel.MARY_KEY_PREFIX + "testbiz");
+ tm.getName().add(new Name("My old business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ SaveBusiness stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoMary);
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+
+ tm = new BusinessEntity();
+ tm.setBusinessKey(TckTModel.JOE_PUBLISHER_KEY_PREFIX + "oldbiz");
+ tm.getName().add(new Name("My new business", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setIdentifierBag(new IdentifierBag());
+ tm.getIdentifierBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", TckTModel.MARY_KEY_PREFIX + "testbiz"));
+ stm = new SaveBusiness();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getBusinessEntity().add(tm);
+ publication.saveBusiness(stm);
+ }
+
+ /**
+ * reference undefined tmodel
+ *
+ * @throws Exception
+ */
+ @Test(expected = ValueNotAllowedException.class)
+ public void ReplacedByInValid() throws Exception {
+
+ TModel tm = new TModel();
+ tm.setName(new Name("My new tmodel", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setCategoryBag(new CategoryBag());
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", TckTModel.JOE_PUBLISHER_KEY_PREFIX + UUID.randomUUID().toString()));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ /**
+ * reference business key
+ *
+ * @throws Exception
+ */
+ @Test(expected = ValueNotAllowedException.class)
+ public void ReplacedByInValid2() throws Exception {
+
+ TModel tm = new TModel();
+ tm.setName(new Name("My new tmodel", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.setCategoryBag(new CategoryBag());
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", "uddi:juddi.apache.org:businesses-asf"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+ }
+
+ @Test
+ public void RelationshipsValid() throws Exception {
+ TModel tm = new TModel();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.RELATIONSHIPS, "", "peer-peer"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void RelationshipsInValid() throws Exception {
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.RELATIONSHIPS, "", "asdasdasd"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ }
+
+ @Test(expected = ValueNotAllowedException.class)
+ public void ClassLoadingTestsInValid() throws Exception {
+
+ //save a tmodel that's is validated but no validator exists
+ TModel tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ tm.setTModelKey(TckTModel.JOE_PUBLISHER_KEY_PREFIX + "nonexistentvalidator");
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_VALIDATED_BY, UDDIConstants.IS_VALIDATED_BY_KEY_NAME, "uddi:juddi.apache.org:servicebindings-valueset-cp"));
+ SaveTModel stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ tm = new TModel();
+ //tm.setTModelKey();
+ tm.setCategoryBag(new CategoryBag());
+ // tm.setTModelKey("uddi:uddi.org:categorization:nonexistentvalidator");
+ tm.setName(new Name("My Custom validated key", "en"));
+ tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
+ tm.getCategoryBag().getKeyedReference().add(new KeyedReference(TckTModel.JOE_PUBLISHER_KEY_PREFIX + "nonexistentvalidator", "", "asdasd"));
+ stm = new SaveTModel();
+ stm.setAuthInfo(authInfoJoe);
+ stm.getTModel().add(tm);
+ publication.saveTModel(stm);
+
+ //use it has a keyed reference, expect failure
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org
[3/4] JUDDI-198 all spec functionality and tModel vsv implemented
Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtype.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtype.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtype.java
deleted file mode 100644
index bb91a69..0000000
--- a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtype.java
+++ /dev/null
@@ -1,1027 +0,0 @@
-/*
- * Copyright 2014 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.juddi.validation.vsv;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.juddi.v3.error.ErrorMessage;
-import org.apache.juddi.v3.error.InvalidValueException;
-import org.uddi.api_v3.BindingTemplate;
-import org.uddi.api_v3.BusinessEntity;
-import org.uddi.api_v3.BusinessService;
-import org.uddi.api_v3.KeyedReference;
-import org.uddi.api_v3.KeyedReferenceGroup;
-import org.uddi.api_v3.PublisherAssertion;
-import org.uddi.api_v3.TModel;
-import org.uddi.api_v3.TModelInstanceInfo;
-import org.uddi.v3_service.DispositionReportFaultMessage;
-
-/**
- * To distinguish among various types of concept, UDDI has established the Types
- * category system. Publishers should categorize the tModels they publish using
- * values from uddi-org:types to make them easy to find. The approach to
- * categorization of tModels within the UDDI Type Category system is consistent
- * with that used for categorizing other entities using other category systems.
- * The categorization information for each tModel is added to the <categoryBag>
- * elements in a save_tModel API. One or more <keyedReference> elements are
- * added to the category bag to indicate the types of the tModel that is being
- * registered. See Appendix F Using Categorization for more information.
- *
- * <h4 style="margin-left:0in;text-indent:0in">11.1.1.4 Valid Values</h4>
- *
- * <p class="MsoBodyText">Checking of references to this value set consists of
- * ensuring that the keyValues are from the set of categories listed
- * below. No contextual checks are performed unless otherwise specified
- * for a given value.</p>
- *
- * <p class="MsoBodyText">The following constitute the value set for this
- * category system. The valid values are those categories marked as being
- * "allowed". These values are used in the keyValue attributes of keyedReference
- * elements that are contained in categoryBag elements.</p>
- *
- * <p class="MsoBodyText"> </p>
- *
- * <table class="specTable"
- * style="width:6.0in;margin-left:.5in;border-collapse:collapse;border:none"
- * border="1" cellpadding="0" cellspacing="0" width="576">
- * <thead>
- * <tr style="page-break-inside:avoid;height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt;
- * background:#FFFFCA;padding:0in 5.4pt 0in 5.4pt;height:6.75pt" valign="top"
- * width="26%">
- * <p class="MsoNormal"><b>ID</b></p>
- * </td>
- * <td style="width:19.4%;border:solid black 1.0pt;
- * border-left:none;background:#FFFFCA;padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal"><b>Parent ID</b></p>
- * </td>
- * <td style="width:13.14%;border:solid black 1.0pt;
- * border-left:none;background:#FFFFCA;padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal"><b>Allowed</b></p>
- * </td>
- * <td style="width:40.68%;border:solid black 1.0pt;
- * border-left:none;background:#FFFFCA;padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal"><b>Description</b></p>
- * </td>
- * </tr>
- * </thead>
- * <tbody><tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal"> </p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">No</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">These types are used for tModels</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> valueSet</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Value set</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> identifier</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">valueSet</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Identifier system</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> namespace</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">valueSet</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Namespace</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> categorization </p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">valueSet</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Categorization system</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> postalAddress</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">categorization</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Postal address system</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> categorizationGroup</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Category group system </p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> relationship</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Relationship type system</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> specification </p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Specification for a Web service</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> xmlSpec</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">specification</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Specification for a Web service using XML messages</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> soapSpec</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">xmlSpec</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Specification for interaction with a Web service using
- * SOAP messages</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> wsdlSpec</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">specification</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Specification for a Web service described in WSDL</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> protocol</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Protocol</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> transport</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">protocol</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Wire/transport protocol</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> signatureComponent</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Signature component</p>
- * </td>
- * </tr>
- * <tr style="height:6.75pt">
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
- * <p class="MsoNormal"> unvalidatable</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
- * 5.4pt;height:6.75pt" valign="top" width="40%">
- * <p class="MsoNormal">Prevents a checked value set from being used</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> checked</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Checked value set</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> unchecked</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Unchecked value set</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> cacheable</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Cacheable checked value set</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> uncacheable</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Uncacheable checked value set</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> keyGenerator</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Key generator (Note: A contextual check is performed as
- * specified below if this value is used)</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> findQualifier</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Find qualifier</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> sortOrder</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">findQualifier</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Sort order</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> useTypeDesignator</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">tModel</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">Designates a kind of usage for the pieces of data with
- * which it is associated</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal">bindingTemplate</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal"> </p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">No</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">These types are used for bindingTemplates</p>
- * </td>
- * </tr>
- * <tr>
- * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
- * 5.4pt 0in 5.4pt" valign="top" width="26%">
- * <p class="MsoNormal"> wsdlDeployment</p>
- * </td>
- * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="19%">
- * <p class="MsoNormal">bindingTemplate</p>
- * </td>
- * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="13%">
- * <p class="MsoNormal">Yes</p>
- * </td>
- * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
- * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
- * valign="top" width="40%">
- * <p class="MsoNormal">bindingTemplate represents the WSDL deployment of a Web
- * service</p>
- * </td>
- * </tr>
- * </tbody></table>
- *
- * <p class="MsoBodyText"> </p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>tModel: The UDDI type category system is structured to allow
- * for categorization of registry entries other than tModels. This key is the
- * root of the branch of the category system that is intended for use in
- * categorization of tModels within the UDDI registry. Categorization is not
- * allowed with this key.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>valueSet: A valueSet is the parent branch for the identifier,
- * namespace, and categorization values in this category system. A tModel
- * categorized with this value indicates it can be referenced by some other
- * value set tModel to indicate redefinition of purpose, derivation, extension
- * or equivalence.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>identifier: An identifier tModel represents a specific set of
- * values used to uniquely identify information. Identifier tModels are intended
- * to be used in keyedReferences inside of identifierBags. For example, a Dun
- * & Bradstreet D-U-N-S® Number uniquely identifies companies globally. The
- * D-U-N-S® Number system is an identifier system. </p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>namespace: A namespace tModel represents a scoping constraint
- * or domain for a set of information. In contrast to an identifier, a namespace
- * does not have a predefined set of values within the domain, but acts to avoid
- * collisions. It is similar to the namespace functionality used for XML. For
- * example, the uddi-org:relationships tModel, which is used to assert
- * relationships between businessEntity elements, is a namespace tModel.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>categorization: A categorization tModel is used for category
- * systems within the UDDI registry. NAICS and UNSPSC are examples of
- * categorization tModels.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>postalAddress: A postalAddress tModel is used to identify
- * different forms of postal address within the UDDI registry. postalAddress
- * tModels may be used with the address element to distinguish different forms
- * of postal address.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>categorizationGroup: A categorizationGroup tModel is used to
- * relate one or more category system tModels to one another so that they can be
- * used in keyedReferenceGroups.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>relationship: A relationship tModel is used for relationship
- * categorizations within the UDDI registry. relationship tModels are typically
- * used in connection with publisher relationship assertions.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>specification: A specification tModel is used for tModels that
- * define interactions with a Web service. These interactions typically include
- * the definition of the set of requests and responses, or other types of
- * interaction that are prescribed by the Web service. tModels describing XML,
- * COM, CORBA, or any other Web services are specification tModels.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>xmlSpec: An xmlSpec tModel is a refinement of the specification
- * tModel type. It is used to indicate that the interaction with the Web service
- * is via XML. The UDDI API tModels are xmlSpec tModels.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>soapSpec: Further refining the xmlSpec tModel type, a soapSpec
- * is used to indicate that the interaction with the Web service is via SOAP.
- * The UDDI API tModels are soapSpec tModels, in addition to xmlSpec
- * tModels.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>wsdlSpec: A tModel for a Web service described using WSDL is
- * categorized as a wsdlSpec.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>protocol: A tModel describing a protocol of any sort.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>transport: A transport tModel is a specific type of protocol.
- * HTTP, FTP, and SMTP are types of transport tModels.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>signatureComponent: A signature component is used to for cases
- * where a single tModel can not represent a complete specification for a Web
- * service. This is the case for specifications like RosettaNet, where
- * implementation requires the composition of three tModels to be complete - a
- * general tModel indicating RNIF, one for the specific PIP, and one for the
- * error handling services. Each of these tModels would be of type signature
- * component, in addition to any others as appropriate.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>unvalidatable: Used to mark a categorization or identifier
- * tModel as unavailable for use by keyedReferences. A value set provider
- * may mark its value set tModel <i>unvalidatable</i> if it wants to temporarily
- * disallow its use. See Section <a href="#_Ref8981064 ">6.4</a>
- * <i>Checked Value Set Validation</i> for more information.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>checked: Marking a tModel with this categorization asserts that
- * it represents a value set or category group system whose use, through
- * keyedReferences, may be checked. Registry, and possibly node policy
- * determines when and how a checked value set is supported.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>unchecked: Marking a tModel with this categorization asserts
- * that it represents a value set or category group system whose use, through
- * keyedReferences, is not checked.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>cacheable: Marking a tModel with this categorization asserts
- * that it represents a checked value set or category group system whose values
- * may be cached for validation. The validation algorithm for a supported
- * cacheable checked value set or category group system must rely solely upon
- * matching references against the cached set of values.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>uncacheable: Marking a tModel with this categorization asserts
- * that it represents a checked value set or category group system whose values
- * must not be cached for validation. The validation algorithm for a
- * supported uncacheable checked value set must be specified and associated with
- * the tModel marked with this categorization and may consider contextual
- * criteria involving the entity associated with the reference.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>keyGenerator: Marking a tModel with this categorization
- * designates it as one whose tModelKey identifies a key generator partition
- * that can be used by its owner to derive and assign other entity keys. This
- * categorization is reserved for key generator tModels. Any attempt to use this
- * categorization for something other than a key generator tModel will fail with
- * E_valueNotAllowed returned. </p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>findQualifier: A findQualifier tModel is used as the value of a
- * findQualifier element to indicate the type of processing to occur for the
- * inquiry function in which it is included.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>sortOrder: A sort order tModel defines a collation sequence
- * that can be used during inquiries to control ordering of the results.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>useTypeDesignator: A useTypeDesignator tModel is used to
- * describe the way a piece of data should be interpreted. It is
- * frequently used to extend the space of resource types found at a URI, such as
- * access points, overview URLs, and discovery URLs. UDDI designates a set
- * of common use types as simple strings; tModels of the useTypeDesignator type
- * are used to describe others.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>bindingTemplate: This key is the root of the branch of the
- * category system that is intended for use in categorization of
- * bindingTemplates within the UDDI registry. Categorization is not allowed with
- * this key.</p>
- *
- * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
- * style="font-family:Symbol">·<span style="font:7.0pt "Times New
- * Roman"">
- * </span></span>wsdlDeployment: A bindingTemplate categorized as a
- * wsdlDeployment contains within its accessPoint the endpoint for a WSDL
- * deployment document.</p>
- *
- * @author Alex O'Ree
- */
-public class Uddiuddiorgcategorizationtype implements ValueSetValidator {
-
- public static final String key = "uddi:uddi.org:categorization:types";
-
- private static Map<String, Boolean> NotAllowedOnBindings;
- private static Map<String, Boolean> NotAllowedOnTModels;
-
- static {
- NotAllowedOnTModels = new HashMap<String, Boolean>();
- NotAllowedOnTModels.put("wsdlDeployment".toLowerCase(), true);
- NotAllowedOnBindings = new HashMap<String, Boolean>();
- NotAllowedOnBindings.put("valueSet".toLowerCase(), true);
- NotAllowedOnBindings.put("identifier".toLowerCase(), true);
- NotAllowedOnBindings.put("namespace".toLowerCase(), true);
- NotAllowedOnBindings.put("categorization".toLowerCase(), true);
- NotAllowedOnBindings.put("postalAddress".toLowerCase(), true);
- NotAllowedOnBindings.put("categorizationGroup".toLowerCase(), true);
- NotAllowedOnBindings.put("relationship".toLowerCase(), true);
- NotAllowedOnBindings.put("specification".toLowerCase(), true);
- NotAllowedOnBindings.put("xmlSpec".toLowerCase(), true);
- NotAllowedOnBindings.put("soapSpec".toLowerCase(), true);
- NotAllowedOnBindings.put("wsdlSpec".toLowerCase(), true);
- NotAllowedOnBindings.put("protocol".toLowerCase(), true);
- NotAllowedOnBindings.put("transport".toLowerCase(), true);
- NotAllowedOnBindings.put("signatureComponent".toLowerCase(), true);
- NotAllowedOnBindings.put("unvalidatable".toLowerCase(), true);
- NotAllowedOnBindings.put("checked".toLowerCase(), true);
- NotAllowedOnBindings.put("unchecked".toLowerCase(), true);
- NotAllowedOnBindings.put("cacheable".toLowerCase(), true);
- NotAllowedOnBindings.put("uncacheable".toLowerCase(), true);
- NotAllowedOnBindings.put("keyGenerator".toLowerCase(), true);
- NotAllowedOnBindings.put("findQualifier".toLowerCase(), true);
- NotAllowedOnBindings.put("sortOrder".toLowerCase(), true);
- NotAllowedOnBindings.put("useTypeDesignator".toLowerCase(), true);
- }
-
- @Override
- public void validateValuesBindingTemplate(List<BindingTemplate> items, String xpath) throws DispositionReportFaultMessage {
- if (items == null) {
- return;
- }
- //can't use everything else
- for (int i = 0; i < items.size(); i++) {
- if (items.get(i).getCategoryBag() != null) {
- for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
- if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() != null) {
- if (NotAllowedOnBindings.containsKey(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() + "] not allowed on bindingtemplates for key " + key));
- }
- }
-
- }
-
- for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReferenceGroup().size(); k++) {
- if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() != null) {
- if (NotAllowedOnBindings.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() + "] not allowed on bindingtemplates for key " + key));
- }
- for (int j = 0; j < items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().size(); j++) {
- if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() != null) {
- if (NotAllowedOnBindings.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() + "] not allowed on bindingtemplates for key " + key));
- }
- }
- }
- }
- }
- }
- if (items.get(i).getTModelInstanceDetails() != null) {
-
- for (int k = 0; i < items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().size(); k++) {
- if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", key + " is not allowed on tModelInstanceInfos"));
- }
- }
- }
- }
- }
-
- @Override
- public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage {
- if (items == null) {
- return;
- }
-
- //cant use the following
- //wsdlDeployment
- for (int i = 0; i < items.size(); i++) {
-
- if (items.get(i).getBusinessServices() != null) {
- validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ").");
- }
- }
- }
-
- @Override
- public void validateValuesBusinessService(List<BusinessService> items, String xpath) throws DispositionReportFaultMessage {
- if (items == null) {
- return;
- }
- for (int i = 0; i < items.size(); i++) {
- if (items.get(i).getCategoryBag() != null) {
- //No specific rules for business services
-
- }
- if (items.get(i).getBindingTemplates() != null) {
- validateValuesBindingTemplate(items.get(i).getBindingTemplates().getBindingTemplate(), xpath + xpath + "businessService(" + i + ").identifierBag.");
- }
- }
- }
-
- @Override
- public void validateValuesPublisherAssertion(List<PublisherAssertion> items) throws DispositionReportFaultMessage {
- if (items == null) {
- return;
- }
- //no rules for PA
- }
-
- @Override
- public void validateTmodelInstanceDetails(List<TModelInstanceInfo> tModelInstanceInfo, String xpath) throws DispositionReportFaultMessage {
-
- }
-
- @Override
- public List<String> getValidValues() {
- List<String> ret = new ArrayList<String>();
- ret.addAll(NotAllowedOnBindings.keySet());
- ret.addAll(NotAllowedOnTModels.keySet());
- return ret;
- }
-
- @Override
- public void validateValuesTModel(List<TModel> items) throws DispositionReportFaultMessage {
- if (items == null) {
- return;
- }
- for (int i = 0; i < items.size(); i++) {
- if (items.get(i).getCategoryBag() != null) {
- for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
- if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() != null) {
- if (NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() + "] not allowed on tModels for key " + key));
- }
- }
-
- }
-
- for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReferenceGroup().size(); k++) {
- if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() != null) {
- if (NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() + "] not allowed on tModels for key " + key));
- }
- for (int j = 0; j < items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().size(); j++) {
- if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() != null) {
- if (NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() + "] not allowed on tModels for key " + key));
- }
- }
- }
- }
- }
- }
- if (items.get(i).getIdentifierBag() != null) {
- for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
- if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() != null) {
- if (NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().toLowerCase())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() + "] not allowed on tModels for key " + key));
- }
- }
-
- }
- }
- }
- }
-
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org
[2/4] JUDDI-198 all spec functionality and tModel vsv implemented
Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtypes.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtypes.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtypes.java
new file mode 100644
index 0000000..1933359
--- /dev/null
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationtypes.java
@@ -0,0 +1,1030 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juddi.validation.vsv;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.juddi.v3.error.ErrorMessage;
+import org.apache.juddi.v3.error.InvalidValueException;
+import org.uddi.api_v3.BindingTemplate;
+import org.uddi.api_v3.BusinessEntity;
+import org.uddi.api_v3.BusinessService;
+import org.uddi.api_v3.KeyedReference;
+import org.uddi.api_v3.KeyedReferenceGroup;
+import org.uddi.api_v3.PublisherAssertion;
+import org.uddi.api_v3.TModel;
+import org.uddi.api_v3.TModelInstanceInfo;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+
+/**
+ * To distinguish among various types of concept, UDDI has established the Types
+ * category system. Publishers should categorize the tModels they publish using
+ * values from uddi-org:types to make them easy to find. The approach to
+ * categorization of tModels within the UDDI Type Category system is consistent
+ * with that used for categorizing other entities using other category systems.
+ * The categorization information for each tModel is added to the <categoryBag>
+ * elements in a save_tModel API. One or more <keyedReference> elements are
+ * added to the category bag to indicate the types of the tModel that is being
+ * registered. See Appendix F Using Categorization for more information.
+ *
+ * <h4 style="margin-left:0in;text-indent:0in">11.1.1.4 Valid Values</h4>
+ *
+ * <p class="MsoBodyText">Checking of references to this value set consists of
+ * ensuring that the keyValues are from the set of categories listed
+ * below. No contextual checks are performed unless otherwise specified
+ * for a given value.</p>
+ *
+ * <p class="MsoBodyText">The following constitute the value set for this
+ * category system. The valid values are those categories marked as being
+ * "allowed". These values are used in the keyValue attributes of keyedReference
+ * elements that are contained in categoryBag elements.</p>
+ *
+ * <p class="MsoBodyText"> </p>
+ *
+ * <table class="specTable"
+ * style="width:6.0in;margin-left:.5in;border-collapse:collapse;border:none"
+ * border="1" cellpadding="0" cellspacing="0" width="576">
+ * <thead>
+ * <tr style="page-break-inside:avoid;height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt;
+ * background:#FFFFCA;padding:0in 5.4pt 0in 5.4pt;height:6.75pt" valign="top"
+ * width="26%">
+ * <p class="MsoNormal"><b>ID</b></p>
+ * </td>
+ * <td style="width:19.4%;border:solid black 1.0pt;
+ * border-left:none;background:#FFFFCA;padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal"><b>Parent ID</b></p>
+ * </td>
+ * <td style="width:13.14%;border:solid black 1.0pt;
+ * border-left:none;background:#FFFFCA;padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal"><b>Allowed</b></p>
+ * </td>
+ * <td style="width:40.68%;border:solid black 1.0pt;
+ * border-left:none;background:#FFFFCA;padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal"><b>Description</b></p>
+ * </td>
+ * </tr>
+ * </thead>
+ * <tbody><tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal"> </p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">No</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">These types are used for tModels</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> valueSet</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Value set</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> identifier</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">valueSet</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Identifier system</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> namespace</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">valueSet</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Namespace</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> categorization </p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">valueSet</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Categorization system</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> postalAddress</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">categorization</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Postal address system</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> categorizationGroup</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Category group system </p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> relationship</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Relationship type system</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> specification </p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Specification for a Web service</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> xmlSpec</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">specification</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Specification for a Web service using XML messages</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> soapSpec</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">xmlSpec</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Specification for interaction with a Web service using
+ * SOAP messages</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> wsdlSpec</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">specification</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Specification for a Web service described in WSDL</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> protocol</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Protocol</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> transport</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">protocol</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Wire/transport protocol</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> signatureComponent</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Signature component</p>
+ * </td>
+ * </tr>
+ * <tr style="height:6.75pt">
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt;height:6.75pt" valign="top" width="26%">
+ * <p class="MsoNormal"> unvalidatable</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in
+ * 5.4pt;height:6.75pt" valign="top" width="40%">
+ * <p class="MsoNormal">Prevents a checked value set from being used</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> checked</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Checked value set</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> unchecked</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Unchecked value set</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> cacheable</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Cacheable checked value set</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> uncacheable</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Uncacheable checked value set</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> keyGenerator</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Key generator (Note: A contextual check is performed as
+ * specified below if this value is used)</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> findQualifier</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Find qualifier</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> sortOrder</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">findQualifier</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Sort order</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> useTypeDesignator</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">tModel</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">Designates a kind of usage for the pieces of data with
+ * which it is associated</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal">bindingTemplate</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal"> </p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">No</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">These types are used for bindingTemplates</p>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td style="width:26.78%;border:solid black 1.0pt; border-top:none;padding:0in
+ * 5.4pt 0in 5.4pt" valign="top" width="26%">
+ * <p class="MsoNormal"> wsdlDeployment</p>
+ * </td>
+ * <td style="width:19.4%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="19%">
+ * <p class="MsoNormal">bindingTemplate</p>
+ * </td>
+ * <td style="width:13.14%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="13%">
+ * <p class="MsoNormal">Yes</p>
+ * </td>
+ * <td style="width:40.68%;border-top:none;border-left: none;border-bottom:solid
+ * black 1.0pt;border-right:solid black 1.0pt; padding:0in 5.4pt 0in 5.4pt"
+ * valign="top" width="40%">
+ * <p class="MsoNormal">bindingTemplate represents the WSDL deployment of a Web
+ * service</p>
+ * </td>
+ * </tr>
+ * </tbody></table>
+ *
+ * <p class="MsoBodyText"> </p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>tModel: The UDDI type category system is structured to allow
+ * for categorization of registry entries other than tModels. This key is the
+ * root of the branch of the category system that is intended for use in
+ * categorization of tModels within the UDDI registry. Categorization is not
+ * allowed with this key.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>valueSet: A valueSet is the parent branch for the identifier,
+ * namespace, and categorization values in this category system. A tModel
+ * categorized with this value indicates it can be referenced by some other
+ * value set tModel to indicate redefinition of purpose, derivation, extension
+ * or equivalence.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>identifier: An identifier tModel represents a specific set of
+ * values used to uniquely identify information. Identifier tModels are intended
+ * to be used in keyedReferences inside of identifierBags. For example, a Dun
+ * & Bradstreet D-U-N-S® Number uniquely identifies companies globally. The
+ * D-U-N-S® Number system is an identifier system. </p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>namespace: A namespace tModel represents a scoping constraint
+ * or domain for a set of information. In contrast to an identifier, a namespace
+ * does not have a predefined set of values within the domain, but acts to avoid
+ * collisions. It is similar to the namespace functionality used for XML. For
+ * example, the uddi-org:relationships tModel, which is used to assert
+ * relationships between businessEntity elements, is a namespace tModel.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>categorization: A categorization tModel is used for category
+ * systems within the UDDI registry. NAICS and UNSPSC are examples of
+ * categorization tModels.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>postalAddress: A postalAddress tModel is used to identify
+ * different forms of postal address within the UDDI registry. postalAddress
+ * tModels may be used with the address element to distinguish different forms
+ * of postal address.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>categorizationGroup: A categorizationGroup tModel is used to
+ * relate one or more category system tModels to one another so that they can be
+ * used in keyedReferenceGroups.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>relationship: A relationship tModel is used for relationship
+ * categorizations within the UDDI registry. relationship tModels are typically
+ * used in connection with publisher relationship assertions.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>specification: A specification tModel is used for tModels that
+ * define interactions with a Web service. These interactions typically include
+ * the definition of the set of requests and responses, or other types of
+ * interaction that are prescribed by the Web service. tModels describing XML,
+ * COM, CORBA, or any other Web services are specification tModels.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>xmlSpec: An xmlSpec tModel is a refinement of the specification
+ * tModel type. It is used to indicate that the interaction with the Web service
+ * is via XML. The UDDI API tModels are xmlSpec tModels.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>soapSpec: Further refining the xmlSpec tModel type, a soapSpec
+ * is used to indicate that the interaction with the Web service is via SOAP.
+ * The UDDI API tModels are soapSpec tModels, in addition to xmlSpec
+ * tModels.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>wsdlSpec: A tModel for a Web service described using WSDL is
+ * categorized as a wsdlSpec.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>protocol: A tModel describing a protocol of any sort.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>transport: A transport tModel is a specific type of protocol.
+ * HTTP, FTP, and SMTP are types of transport tModels.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>signatureComponent: A signature component is used to for cases
+ * where a single tModel can not represent a complete specification for a Web
+ * service. This is the case for specifications like RosettaNet, where
+ * implementation requires the composition of three tModels to be complete - a
+ * general tModel indicating RNIF, one for the specific PIP, and one for the
+ * error handling services. Each of these tModels would be of type signature
+ * component, in addition to any others as appropriate.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>unvalidatable: Used to mark a categorization or identifier
+ * tModel as unavailable for use by keyedReferences. A value set provider
+ * may mark its value set tModel <i>unvalidatable</i> if it wants to temporarily
+ * disallow its use. See Section <a href="#_Ref8981064 ">6.4</a>
+ * <i>Checked Value Set Validation</i> for more information.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>checked: Marking a tModel with this categorization asserts that
+ * it represents a value set or category group system whose use, through
+ * keyedReferences, may be checked. Registry, and possibly node policy
+ * determines when and how a checked value set is supported.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>unchecked: Marking a tModel with this categorization asserts
+ * that it represents a value set or category group system whose use, through
+ * keyedReferences, is not checked.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>cacheable: Marking a tModel with this categorization asserts
+ * that it represents a checked value set or category group system whose values
+ * may be cached for validation. The validation algorithm for a supported
+ * cacheable checked value set or category group system must rely solely upon
+ * matching references against the cached set of values.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>uncacheable: Marking a tModel with this categorization asserts
+ * that it represents a checked value set or category group system whose values
+ * must not be cached for validation. The validation algorithm for a
+ * supported uncacheable checked value set must be specified and associated with
+ * the tModel marked with this categorization and may consider contextual
+ * criteria involving the entity associated with the reference.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>keyGenerator: Marking a tModel with this categorization
+ * designates it as one whose tModelKey identifies a key generator partition
+ * that can be used by its owner to derive and assign other entity keys. This
+ * categorization is reserved for key generator tModels. Any attempt to use this
+ * categorization for something other than a key generator tModel will fail with
+ * E_valueNotAllowed returned. </p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>findQualifier: A findQualifier tModel is used as the value of a
+ * findQualifier element to indicate the type of processing to occur for the
+ * inquiry function in which it is included.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>sortOrder: A sort order tModel defines a collation sequence
+ * that can be used during inquiries to control ordering of the results.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>useTypeDesignator: A useTypeDesignator tModel is used to
+ * describe the way a piece of data should be interpreted. It is
+ * frequently used to extend the space of resource types found at a URI, such as
+ * access points, overview URLs, and discovery URLs. UDDI designates a set
+ * of common use types as simple strings; tModels of the useTypeDesignator type
+ * are used to describe others.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>bindingTemplate: This key is the root of the branch of the
+ * category system that is intended for use in categorization of
+ * bindingTemplates within the UDDI registry. Categorization is not allowed with
+ * this key.</p>
+ *
+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span
+ * style="font-family:Symbol">·<span style="font:7.0pt "Times New
+ * Roman"">
+ * </span></span>wsdlDeployment: A bindingTemplate categorized as a
+ * wsdlDeployment contains within its accessPoint the endpoint for a WSDL
+ * deployment document.</p>
+ *
+ * @author Alex O'Ree
+ */
+public class Uddiuddiorgcategorizationtypes implements ValueSetValidator {
+
+ public static final String key = "uddi:uddi.org:categorization:types";
+
+ private static Map<String, Boolean> NotAllowedOnBindings;
+ private static Map<String, Boolean> NotAllowedOnTModels;
+
+ static {
+ NotAllowedOnTModels = new HashMap<String, Boolean>();
+ NotAllowedOnTModels.put("wsdlDeployment".toLowerCase(), true);
+ NotAllowedOnBindings = new HashMap<String, Boolean>();
+ NotAllowedOnBindings.put("valueSet".toLowerCase(), true);
+ NotAllowedOnBindings.put("identifier".toLowerCase(), true);
+ NotAllowedOnBindings.put("namespace".toLowerCase(), true);
+ NotAllowedOnBindings.put("categorization".toLowerCase(), true);
+ NotAllowedOnBindings.put("postalAddress".toLowerCase(), true);
+ NotAllowedOnBindings.put("categorizationGroup".toLowerCase(), true);
+ NotAllowedOnBindings.put("relationship".toLowerCase(), true);
+ NotAllowedOnBindings.put("specification".toLowerCase(), true);
+ NotAllowedOnBindings.put("xmlSpec".toLowerCase(), true);
+ NotAllowedOnBindings.put("soapSpec".toLowerCase(), true);
+ NotAllowedOnBindings.put("wsdlSpec".toLowerCase(), true);
+ NotAllowedOnBindings.put("protocol".toLowerCase(), true);
+ NotAllowedOnBindings.put("transport".toLowerCase(), true);
+ NotAllowedOnBindings.put("signatureComponent".toLowerCase(), true);
+ NotAllowedOnBindings.put("unvalidatable".toLowerCase(), true);
+ NotAllowedOnBindings.put("checked".toLowerCase(), true);
+ NotAllowedOnBindings.put("unchecked".toLowerCase(), true);
+ NotAllowedOnBindings.put("cacheable".toLowerCase(), true);
+ NotAllowedOnBindings.put("uncacheable".toLowerCase(), true);
+ NotAllowedOnBindings.put("keyGenerator".toLowerCase(), true);
+ NotAllowedOnBindings.put("findQualifier".toLowerCase(), true);
+ NotAllowedOnBindings.put("sortOrder".toLowerCase(), true);
+ NotAllowedOnBindings.put("useTypeDesignator".toLowerCase(), true);
+ }
+
+ @Override
+ public void validateValuesBindingTemplate(List<BindingTemplate> items, String xpath) throws DispositionReportFaultMessage {
+ if (items == null) {
+ return;
+ }
+ //can't use everything else
+ for (int i = 0; i < items.size(); i++) {
+ if (items.get(i).getCategoryBag() != null) {
+ for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
+ if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() != null) {
+ if (NotAllowedOnBindings.containsKey(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().toLowerCase())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() + "] not allowed on bindingtemplates for key " + key));
+ }
+ }
+
+ }
+
+ for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReferenceGroup().size(); k++) {
+ if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() != null) {
+ if (NotAllowedOnBindings.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey().toLowerCase())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() + "] not allowed on bindingtemplates for key " + key));
+ }
+ for (int j = 0; j < items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().size(); j++) {
+ if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() != null) {
+ if (NotAllowedOnBindings.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey().toLowerCase())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() + "] not allowed on bindingtemplates for key " + key));
+ }
+ }
+ }
+ }
+ }
+ }
+ if (items.get(i).getTModelInstanceDetails() != null) {
+
+ for (int k = 0; k < items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().size(); k++) {
+ if (items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k) != null) {
+ if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", key + " is not allowed on tModelInstanceInfos"));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage {
+ if (items == null) {
+ return;
+ }
+
+ //cant use the following
+ //wsdlDeployment
+ for (int i = 0; i < items.size(); i++) {
+
+ if (items.get(i).getBusinessServices() != null) {
+ validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ").");
+ }
+ }
+ }
+
+ @Override
+ public void validateValuesBusinessService(List<BusinessService> items, String xpath) throws DispositionReportFaultMessage {
+ if (items == null) {
+ return;
+ }
+ for (int i = 0; i < items.size(); i++) {
+ if (items.get(i).getCategoryBag() != null) {
+ //No specific rules for business services
+
+ }
+ if (items.get(i).getBindingTemplates() != null) {
+ validateValuesBindingTemplate(items.get(i).getBindingTemplates().getBindingTemplate(), xpath + xpath + "businessService(" + i + ").identifierBag.");
+ }
+ }
+ }
+
+ @Override
+ public void validateValuesPublisherAssertion(List<PublisherAssertion> items) throws DispositionReportFaultMessage {
+ if (items == null) {
+ return;
+ }
+ //no rules for PA
+ }
+
+ @Override
+ public void validateTmodelInstanceDetails(List<TModelInstanceInfo> tModelInstanceInfo, String xpath) throws DispositionReportFaultMessage {
+
+ }
+
+ @Override
+ public List<String> getValidValues() {
+ List<String> ret = new ArrayList<String>();
+ ret.addAll(NotAllowedOnBindings.keySet());
+ ret.addAll(NotAllowedOnTModels.keySet());
+ return ret;
+ }
+
+ @Override
+ public void validateValuesTModel(List<TModel> items) throws DispositionReportFaultMessage {
+ if (items == null) {
+ return;
+ }
+ for (int i = 0; i < items.size(); i++) {
+ if (items.get(i).getCategoryBag() != null) {
+ for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
+ if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() != null
+ && key.equalsIgnoreCase(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey())) {
+ if (items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() != null && NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue().toLowerCase())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() + "] not allowed on tModels for key " + key));
+ }
+ }
+
+ }
+
+ for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReferenceGroup().size(); k++) {
+ if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getTModelKey() != null) {
+
+ for (int j = 0; j < items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().size(); j++) {
+ if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() != null
+ && key.equalsIgnoreCase(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey())) {
+ if (items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getKeyValue() != null
+ && NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getKeyValue().toLowerCase())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReferenceGroup().get(k).getKeyedReference().get(j).getTModelKey() + "] not allowed on tModels for key " + key));
+ }
+ }
+ }
+ }
+ }
+ }
+ if (items.get(i).getIdentifierBag() != null) {
+ for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
+ if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() != null) {
+ if (NotAllowedOnTModels.containsKey(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().toLowerCase())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Value [" + items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey() + "] not allowed on tModels for key " + key));
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationvalidatedby.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationvalidatedby.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationvalidatedby.java
index f0eb874..8de85d1 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationvalidatedby.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationvalidatedby.java
@@ -84,6 +84,7 @@ public class Uddiuddiorgcategorizationvalidatedby implements ValueSetValidator{
}
if (items.get(i).getTModelInstanceDetails() != null) {
for (int k = 0; k < items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().size(); k++) {
+ if (items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k) != null)
if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "not allowed on binding templates"));
}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgidentifierisreplacedby.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgidentifierisreplacedby.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgidentifierisreplacedby.java
index 0c97efe..9fbed12 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgidentifierisreplacedby.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgidentifierisreplacedby.java
@@ -186,8 +186,10 @@ public class Uddiuddiorgidentifierisreplacedby implements ValueSetValidator {
}
if (items.get(i).getTModelInstanceDetails() != null) {
for (int k = 0; k < items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().size(); k++) {
- if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "not allowed on binding templates"));
+ if (items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k) != null) {
+ if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "not allowed on binding templates"));
+ }
}
}
}
@@ -199,17 +201,69 @@ public class Uddiuddiorgidentifierisreplacedby implements ValueSetValidator {
if (items == null) {
return;
}
- for (int i = 0; i < items.size(); i++) {
- if (items.get(i).getCategoryBag() != null) {
- AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), key, "business");
- AbstractSimpleValidator.validateKeyNotPresentKeyRefGrp(items.get(i).getCategoryBag().getKeyedReferenceGroup(), key, "business");
- }
- if (items.get(i).getIdentifierBag() != null) {
- AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getCategoryBag().getKeyedReference(), key, "business");
+ // In the case where a reference is made from an obsolete tModel the following validation rules apply:
+ EntityManager em = PersistenceManager.getEntityManager();
+ EntityTransaction tx = em.getTransaction();
+ try {
+ tx.begin();
+ for (int i = 0; i < items.size(); i++) {
+ if (items.get(i).getCategoryBag() != null) {
+ for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
+ if (key.equalsIgnoreCase(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey())) {
+ //reference to self; this is invalid
+ if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().equalsIgnoreCase(items.get(i).getBusinessKey())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " can't reference itself"));
+ }
+
+ try {
+ org.apache.juddi.model.BusinessEntity find = em.find(org.apache.juddi.model.BusinessEntity.class, items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue());
+ if (find == null) {
+ // reference to a new tModel; this is a valid operation
+ if (!ContainsBusinessKey(items, items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " does not exist"));
+ }
+ }
+ } catch (ClassCastException c) {
+ // reference to a service, binding or business; this is an invalid operation given that the entity being pointed to must be a tModel
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " must be a business"));
+
+ }
+ }
+ }
+ }
+ if (items.get(i).getIdentifierBag() != null) {
+ for (int k = 0; k < items.get(i).getIdentifierBag().getKeyedReference().size(); k++) {
+ if (key.equalsIgnoreCase(items.get(i).getIdentifierBag().getKeyedReference().get(k).getTModelKey())) {
+ //reference to self; this is invalid
+ if (items.get(i).getIdentifierBag().getKeyedReference().get(k).getTModelKey().equalsIgnoreCase(items.get(i).getBusinessKey())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue() + " can't reference itself"));
+ }
+
+ try {
+ org.apache.juddi.model.BusinessEntity find = em.find(org.apache.juddi.model.BusinessEntity.class, items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue());
+ if (find == null) {
+ // reference to a new tModel; this is a valid operation
+ if (!ContainsBusinessKey(items, items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue() + " does not exist"));
+ }
+ }
+ } catch (ClassCastException c) {
+ // reference to a service, binding or business; this is an invalid operation given that the entity being pointed to must be a tModel
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue() + " must be a business"));
+
+ }
+ }
+ }
+ }
}
- if (items.get(i).getBusinessServices() != null) {
- validateValuesBusinessService(items.get(i).getBusinessServices().getBusinessService(), "businessEntity(" + i + ").");
+ tx.commit();
+ } catch (DispositionReportFaultMessage d) {
+ throw d;
+ } finally {
+ if (tx.isActive()) {
+ tx.rollback();
}
+ em.close();
}
}
@@ -281,25 +335,66 @@ public class Uddiuddiorgidentifierisreplacedby implements ValueSetValidator {
if (items == null) {
return;
}
+ // In the case where a reference is made from an obsolete tModel the following validation rules apply:
EntityManager em = PersistenceManager.getEntityManager();
EntityTransaction tx = em.getTransaction();
+
try {
+ tx.begin();
for (int i = 0; i < items.size(); i++) {
if (items.get(i).getCategoryBag() != null) {
for (int k = 0; k < items.get(i).getCategoryBag().getKeyedReference().size(); k++) {
if (key.equalsIgnoreCase(items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey())) {
- //TODO look up value
- Tmodel find = em.find(org.apache.juddi.model.Tmodel.class, items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue());
+ //reference to self; this is invalid
+ if (items.get(i).getCategoryBag().getKeyedReference().get(k).getTModelKey().equalsIgnoreCase(items.get(i).getTModelKey())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " can't reference itself"));
+ }
+
+ Tmodel find = null;
+ try {
+ find = em.find(org.apache.juddi.model.Tmodel.class, items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue());
+
+ } catch (ClassCastException c) {
+ // reference to a service, binding or business; this is an invalid operation given that the entity being pointed to must be a tModel
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " must be a tModel"));
+
+ }
if (find == null) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " does not exist"));
+ // reference to a new tModel; this is a valid operation
+ if (!ContainsKey(items, items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getCategoryBag().getKeyedReference().get(k).getKeyValue() + " does not exist"));
+ }
}
}
}
}
if (items.get(i).getIdentifierBag() != null) {
- AbstractSimpleValidator.validateKeyNotPresentKeyRef(items.get(i).getIdentifierBag().getKeyedReference(), key, "tmodel identbag");
+ for (int k = 0; k < items.get(i).getIdentifierBag().getKeyedReference().size(); k++) {
+ if (key.equalsIgnoreCase(items.get(i).getIdentifierBag().getKeyedReference().get(k).getTModelKey())) {
+ //reference to self; this is invalid
+ if (items.get(i).getIdentifierBag().getKeyedReference().get(k).getTModelKey().equalsIgnoreCase(items.get(i).getTModelKey())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue() + " can't reference itself"));
+ }
+ Tmodel find = null;
+ try {
+ find = em.find(org.apache.juddi.model.Tmodel.class, items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue());
+
+ } catch (ClassCastException c) {
+ // reference to a service, binding or business; this is an invalid operation given that the entity being pointed to must be a tModel
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue() + " must be a tModel"));
+
+ }
+ if (find == null) {
+ // reference to a new tModel; this is a valid operation
+ if (!ContainsKey(items, items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue())) {
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "Referenced key " + items.get(i).getIdentifierBag().getKeyedReference().get(k).getKeyValue() + " does not exist"));
+ }
+ }
+ }
+ }
}
}
+ tx.commit();
} catch (DispositionReportFaultMessage d) {
throw d;
} finally {
@@ -315,4 +410,22 @@ public class Uddiuddiorgidentifierisreplacedby implements ValueSetValidator {
return Collections.EMPTY_LIST;
}
+ private boolean ContainsKey(List<TModel> items, String keyValue) {
+ for (int i = 0; i < items.size(); i++) {
+ if (items.get(i).getTModelKey().equalsIgnoreCase(keyValue)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean ContainsBusinessKey(List<BusinessEntity> items, String keyValue) {
+ for (int i = 0; i < items.size(); i++) {
+ if (items.get(i).getBusinessKey().equalsIgnoreCase(keyValue)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml b/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml
index fb557a7..a2d64d7 100644
--- a/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml
+++ b/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml
@@ -64,7 +64,7 @@
<keyedReference keyName="uddi-org:types:categorization" keyValue="categorization" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:checked" keyValue="checked" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:cacheable" keyValue="cacheable" tModelKey="uddi:uddi.org:categorization:types" />
- <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:identifier:validatedby"/>
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
<tModel tModelKey="uddi:uddi.org:categorization:general_keywords">
@@ -156,7 +156,7 @@
<keyedReference keyName="uddi-org:types:categorization" keyValue="categorization" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:checked" keyValue="checked" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:uncacheable" keyValue="uncacheable" tModelKey="uddi:uddi.org:categorization:types" />
- <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:identifier:validatedby"/>
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
@@ -213,6 +213,7 @@
<categoryBag>
<keyedReference keyName="uddi-org:types:categorization" keyValue="categorization" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:unchecked" keyValue="unchecked" tModelKey="uddi:uddi.org:categorization:types" />
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
<tModel tModelKey="uddi:uddi.org:categorization:owningbusiness">
@@ -231,7 +232,7 @@
<keyedReference keyName="uddi-org:types:checked" keyValue="checked" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:uncacheable" keyValue="uncacheable" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="entityKeyValues" keyValue="businessKey" tModelKey="uddi:uddi.org:categorization:entitykeyvalues" />
- <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:identifier:validatedby"/>
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
<tModel tModelKey="uddi:uddi.org:identifier:isreplacedby">
@@ -252,7 +253,7 @@
<keyedReference keyName="uddi-org:types:uncacheable" keyValue="uncacheable" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="entityKeyValues" keyValue="businessKey" tModelKey="uddi:uddi.org:categorization:entitykeyvalues" />
<keyedReference keyName="entityKeyValues" keyValue="tModelKey" tModelKey="uddi:uddi.org:categorization:entitykeyvalues" />
- <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:identifier:validatedby"/>
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
@@ -297,7 +298,7 @@
<keyedReference keyName="uddi-org:types:checked" keyValue="checked" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:uncacheable" keyValue="uncacheable" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="entityKeyValues" keyValue="bindingKey" tModelKey="uddi:uddi.org:categorization:entitykeyvalues" />
- <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:identifier:validatedby"/>
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
<tModel tModelKey="uddi:uddi.org:categorization:derivedfrom">
@@ -315,6 +316,7 @@
<keyedReference keyName="uddi-org:types:checked" keyValue="checked" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:uncacheable" keyValue="uncacheable" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="entityKeyValues" keyValue="tModelKey" tModelKey="uddi:uddi.org:categorization:entitykeyvalues" />
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
<tModel tModelKey="uddi:uddi.org:categorization:entitykeyvalues">
@@ -330,6 +332,7 @@
<categoryBag>
<keyedReference keyName="uddi-org:types:categorization" keyValue="categorization" tModelKey="uddi:uddi.org:categorization:types" />
<keyedReference keyName="uddi-org:types:checked" keyValue="checked" tModelKey="uddi:uddi.org:categorization:types" />
+ <keyedReference keyName="" keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp" tModelKey="uddi:uddi.org:categorization:validatedby"/>
</categoryBag>
</tModel>
<tModel tModelKey="uddi:uddi.org:protocol:serverauthenticatedssl3">
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org
[4/4] git commit: JUDDI-198 all spec functionality and tModel vsv
implemented
Posted by al...@apache.org.
JUDDI-198 all spec functionality and tModel vsv implemented
Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/a866ea02
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/a866ea02
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/a866ea02
Branch: refs/heads/master
Commit: a866ea020a49a96c6d42e42784798689e5f919ca
Parents: 4c7e798
Author: alexoree <al...@apache.org>
Authored: Sun Mar 9 10:21:33 2014 -0400
Committer: alexoree <al...@apache.org>
Committed: Sun Mar 9 10:21:33 2014 -0400
----------------------------------------------------------------------
.../api/impl/UDDIValueSetValidationImpl.java | 76 +-
.../juddi/validation/ValidatePublish.java | 148 ++-
.../ValidateValuesFromWebService.java | 29 +-
.../validation/vsv/AbstractSimpleValidator.java | 19 +-
.../Uddiuddiorgcategorizationderivedfrom.java | 1 +
...Uddiuddiorgcategorizationowningbusiness.java | 1 +
.../vsv/Uddiuddiorgcategorizationtype.java | 1027 -----------------
.../vsv/Uddiuddiorgcategorizationtypes.java | 1030 ++++++++++++++++++
.../Uddiuddiorgcategorizationvalidatedby.java | 1 +
.../vsv/Uddiuddiorgidentifierisreplacedby.java | 143 ++-
.../juddi_install_data/UDDI_tModels.xml | 13 +-
.../impl/API_150_ValueSetValidationTest.java | 495 ++++++++-
12 files changed, 1842 insertions(+), 1141 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java
index e7642a1..cbfceae 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java
@@ -23,8 +23,15 @@ import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+import static org.apache.juddi.api.impl.AuthenticatedService.logger;
import org.apache.juddi.api.util.QueryStatus;
+import org.apache.juddi.api.util.SecurityQuery;
import org.apache.juddi.api.util.ValueSetValidationQuery;
+import org.apache.juddi.config.PersistenceManager;
+import org.apache.juddi.model.Tmodel;
+import org.apache.juddi.v3.client.UDDIConstants;
import org.apache.juddi.v3.error.ErrorMessage;
import org.apache.juddi.v3.error.FatalErrorException;
import org.apache.juddi.v3.error.ValueNotAllowedException;
@@ -48,14 +55,14 @@ import org.uddi.vs_v3.ValidateValues;
* Implementation the UDDI v3 spec for Value Set Validation This is basically
* used to validate Keyed Reference value sets and offers validation via jUDDI's
* VSV extensibility framework.<Br><BR>
- * To use this, define a tModel containing the following
+ * To use this, define a tModel containing the following
* <pre><categoryBag>
* <keyedReference keyName=""
* keyValue="uddi:juddi.apache.org:servicebindings-valueset-cp"
* tModelKey="uddi:uddi.org:identifier:validatedby"/>
* </categoryBag>
- * </pre>Where uddi:juddi.apache.org:servicebindings-valueset-cp
- * is the binding key of the service implementing the VSV API (this service).
+ * </pre>Where uddi:juddi.apache.org:servicebindings-valueset-cp is the binding
+ * key of the service implementing the VSV API (this service).
* <Br><BR>
* From there, you need to create a class that either implements
* {@link ValueSetValidator} or extends {@link AbstractSimpleValidator}. It must
@@ -116,8 +123,33 @@ public class UDDIValueSetValidationImpl extends AuthenticatedService implements
classNames.addAll(validateValuesTModel(body.getTModel()));
Set<String> set = new HashSet<String>(classNames);
Iterator<String> iterator = set.iterator();
- while (iterator.hasNext()) {
- String tmodelkey = iterator.next();
+ Set<String> validators = new HashSet<String>();
+ EntityManager em = PersistenceManager.getEntityManager();
+ EntityTransaction tx = em.getTransaction();
+ try {
+ while (iterator.hasNext()) {
+
+ String key = iterator.next();
+ Tmodel find = em.find(org.apache.juddi.model.Tmodel.class, key);
+ if (find != null) {
+ if (ContainsValidatedKey(find, UDDIConstants.IS_VALIDATED_BY)) {
+ validators.add(key);
+ }
+ }
+ }
+
+ } catch (Exception drfm) {
+ logger.warn("Unable to process vsv validation", drfm);
+ throw new FatalErrorException(new ErrorMessage("errors.valuesetvalidation.fatal", drfm.getMessage()));
+ } finally {
+ if (tx.isActive()) {
+ tx.rollback();
+ }
+ em.close();
+ }
+ Iterator<String> iterator1 = validators.iterator();
+ while (iterator1.hasNext()) {
+ String tmodelkey = iterator1.next();
String clazz = ConvertKeyToClass(tmodelkey);
ValueSetValidator vsv;
if (clazz == null) {
@@ -131,10 +163,13 @@ public class UDDIValueSetValidationImpl extends AuthenticatedService implements
vsv.validateValuesPublisherAssertion(body.getPublisherAssertion());
vsv.validateValuesTModel(body.getTModel());
} catch (ClassNotFoundException ex) {
+ logger.warn("Unable to process vsv validation for " + tmodelkey, ex);
throw new FatalErrorException(new ErrorMessage("errors.valuesetvalidation.fatal", "key=" + tmodelkey + " class=" + clazz + " " + ex.getMessage()));
} catch (InstantiationException ex) {
+ logger.warn("Unable to process vsv validation for " + tmodelkey, ex);
throw new FatalErrorException(new ErrorMessage("errors.valuesetvalidation.fatal", "key=" + tmodelkey + " class=" + clazz + " " + ex.getMessage()));
} catch (IllegalAccessException ex) {
+ logger.warn("Unable to process vsv validation for " + tmodelkey, ex);
throw new FatalErrorException(new ErrorMessage("errors.valuesetvalidation.fatal", "key=" + tmodelkey + " class=" + clazz + " " + ex.getMessage()));
}
}
@@ -319,4 +354,35 @@ public class UDDIValueSetValidationImpl extends AuthenticatedService implements
}
return null;
}
+
+ private boolean ContainsValidatedKey(Tmodel find, String key) {
+ if (find.getCategoryBag() != null) {
+ if (find.getCategoryBag().getKeyedReferences() != null) {
+ for (int i = 0; i < find.getCategoryBag().getKeyedReferences().size(); i++) {
+ if (key.equalsIgnoreCase(find.getCategoryBag().getKeyedReferences().get(i).getTmodelKeyRef())) {
+ return true;
+ }
+ }
+ }
+ if (find.getCategoryBag().getKeyedReferenceGroups() != null) {
+ for (int i = 0; i < find.getCategoryBag().getKeyedReferenceGroups().size(); i++) {
+ for (int k = 0; k < find.getCategoryBag().getKeyedReferenceGroups().get(i).getKeyedReferences().size(); k++) {
+ if (key.equalsIgnoreCase(find.getCategoryBag().getKeyedReferenceGroups().get(i).getKeyedReferences().get(k).getTmodelKeyRef())) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ if (find.getTmodelIdentifiers() != null) {
+
+ for (int i = 0; i < find.getTmodelIdentifiers().size(); i++) {
+ if (key.equalsIgnoreCase(find.getTmodelIdentifiers().get(i).getTmodelKeyRef())) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
index f788ae4..394c831 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
@@ -352,8 +352,9 @@ public class ValidatePublish extends ValidateUDDIApi {
for (org.uddi.api_v3.BusinessEntity entity : entityList) {
validateBusinessEntity(em, entity, config, publisher);
- validateCheckedTModels(entity, config);
+
}
+ validateCheckedTModelsBE(entityList, config);
}
public void validateSaveBusinessMax(EntityManager em) throws DispositionReportFaultMessage {
@@ -407,8 +408,9 @@ public class ValidatePublish extends ValidateUDDIApi {
for (org.uddi.api_v3.BusinessService entity : entityList) {
// Entity specific data validation
validateBusinessService(em, entity, null, config, publisher);
- validateCheckedTModels(entity, config);
+
}
+ validateCheckedTModelsBS(entityList, config);
}
public void validateSaveServiceMax(EntityManager em, String businessKey) throws DispositionReportFaultMessage {
@@ -460,8 +462,9 @@ public class ValidatePublish extends ValidateUDDIApi {
for (org.uddi.api_v3.BindingTemplate entity : entityList) {
validateBindingTemplate(em, entity, null, config, publisher);
- validateCheckedTModels(entity, config);
+
}
+ validateCheckedTModelsBT(entityList, config);
}
public void validateSaveBindingMax(EntityManager em, String serviceKey) throws DispositionReportFaultMessage {
@@ -513,8 +516,9 @@ public class ValidatePublish extends ValidateUDDIApi {
for (org.uddi.api_v3.TModel entity : entityList) {
validateTModel(em, entity, config, publisher);
- validateCheckedTModels(entity, config);
+
}
+ validateCheckedTModelsTM(entityList, config);
}
public void validateSaveTModelMax(EntityManager em) throws DispositionReportFaultMessage {
@@ -894,6 +898,7 @@ public class ValidatePublish extends ValidateUDDIApi {
for (org.uddi.api_v3.BindingTemplate bindingTemplate : bindingTemplateList) {
validateBindingTemplate(em, bindingTemplate, parent, config, publisher);
}
+
}
@@ -1032,7 +1037,7 @@ public class ValidatePublish extends ValidateUDDIApi {
validateDescriptions(bindingTemplate.getDescription());
validateHostingRedirector(em, bindingTemplate.getHostingRedirector(), config);
- validateCheckedTModels(bindingTemplate, config);
+ //validateCheckedTModels(bindingTemplate, config);
}
public void validateTModel(EntityManager em, org.uddi.api_v3.TModel tModel, Configuration config, UddiEntityPublisher publisher) throws DispositionReportFaultMessage {
@@ -1995,90 +2000,101 @@ public class ValidatePublish extends ValidateUDDIApi {
return api;
}
- private List<String> GetBindingKeysCheckedTModelKeyedReference(Map<String, TModel> cache, BindingTemplate bt) {
+ private List<String> GetBindingKeysCheckedTModelKeyedReferenceBT(Map<String, TModel> cache, List<BindingTemplate> obj) {
List<String> ret = new ArrayList<String>();
- if (bt == null) {
+ if (obj == null) {
return ret;
}
- if (bt.getCategoryBag() != null) {
- for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ for (BindingTemplate bt : obj) {
+ if (bt.getCategoryBag() != null) {
+ for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ }
}
}
return ret;
}
- private List<String> GetBindingKeysCheckedTModelKeyedReference(Map<String, TModel> cache, BusinessService bt) {
+ private List<String> GetBindingKeysCheckedTModelKeyedReferenceBS(Map<String, TModel> cache, List<BusinessService> obj) {
List<String> ret = new ArrayList<String>();
- if (bt == null) {
+ if (obj == null) {
return ret;
}
- if (bt.getCategoryBag() != null) {
- for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ for (BusinessService bt : obj) {
+ if (bt.getCategoryBag() != null) {
+ for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ }
}
- }
- if (bt.getBindingTemplates() != null) {
- for (int i = 0; i < bt.getBindingTemplates().getBindingTemplate().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getBindingTemplates().getBindingTemplate().get(i)));
+ if (bt.getBindingTemplates() != null) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReferenceBT(cache, bt.getBindingTemplates().getBindingTemplate()));
}
}
return ret;
}
- private List<String> GetBindingKeysCheckedTModelKeyedReference(Map<String, TModel> cache, BusinessEntity bt) {
+ private List<String> GetBindingKeysCheckedTModelKeyedReferenceBE(Map<String, TModel> cache, List<BusinessEntity> obj) {
List<String> ret = new ArrayList<String>();
- if (bt == null) {
+ if (obj == null) {
return ret;
}
- if (bt.getCategoryBag() != null) {
- for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ for (BusinessEntity bt : obj) {
+ if (bt.getCategoryBag() != null) {
+ for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ }
}
- }
- if (bt.getIdentifierBag() != null) {
- for (int i = 0; i < bt.getIdentifierBag().getKeyedReference().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getIdentifierBag().getKeyedReference().get(i)));
+ if (bt.getIdentifierBag() != null) {
+ for (int i = 0; i < bt.getIdentifierBag().getKeyedReference().size(); i++) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getIdentifierBag().getKeyedReference().get(i)));
+ }
}
- }
- if (bt.getBusinessServices() != null) {
- for (int i = 0; i < bt.getBusinessServices().getBusinessService().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getBusinessServices().getBusinessService().get(i)));
+ if (bt.getBusinessServices() != null) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReferenceBS(cache, bt.getBusinessServices().getBusinessService()));
}
}
-
return ret;
}
- private List<String> GetBindingKeysCheckedTModelKeyedReference(Map<String, TModel> cache, TModel bt) {
+ private List<String> GetBindingKeysCheckedTModelKeyedReferenceTM(Map<String, TModel> cache, List<TModel> obj) {
List<String> ret = new ArrayList<String>();
- if (bt == null) {
+ if (obj == null) {
return ret;
}
- if (bt.getCategoryBag() != null) {
- for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ for (TModel bt : obj) {
+ if (bt.getCategoryBag() != null) {
+ for (int i = 0; i < bt.getCategoryBag().getKeyedReference().size(); i++) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getCategoryBag().getKeyedReference().get(i)));
+ }
}
- }
- if (bt.getIdentifierBag() != null) {
- for (int i = 0; i < bt.getIdentifierBag().getKeyedReference().size(); i++) {
- ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getIdentifierBag().getKeyedReference().get(i)));
+ if (bt.getIdentifierBag() != null) {
+ for (int i = 0; i < bt.getIdentifierBag().getKeyedReference().size(); i++) {
+ ret.addAll(GetBindingKeysCheckedTModelKeyedReference(cache, bt.getIdentifierBag().getKeyedReference().get(i)));
+ }
}
}
-
return ret;
}
+ /**
+ * this should return a list of binding keys, only if the referenced kr
+ * contains is validated by
+ *
+ * @param cache
+ * @param get
+ * @return
+ */
private List<String> GetBindingKeysCheckedTModelKeyedReference(Map<String, TModel> cache, KeyedReference get) {
List<String> ret = new ArrayList<String>();
TModel ref = null;
+ log.debug("looking for is validated by for keyedref " + get.getTModelKey());
if (cache.containsKey(get.getTModelKey())) {
ref = cache.get(get.getTModelKey());
}
@@ -2091,27 +2107,39 @@ public class ValidatePublish extends ValidateUDDIApi {
}
}
if (ref != null) {
+
ret.addAll(TModelContains(UDDIConstants.IS_VALIDATED_BY, ref));
}
return ret;
}
- private List<String> TModelContains(String IS_VALIDATED_BY, TModel ref) {
+ /**
+ * returns all keyvalues from ref.catbag and identbag where the tmodel
+ * key matches
+ *
+ * @param key
+ * @param ref
+ * @return
+ */
+ private List<String> TModelContains(String key, TModel ref) {
+ log.debug("looking for key=" + key + " from tModel " + ref.getTModelKey());
List<String> ret = new ArrayList<String>();
if (ref == null) {
return null;
}
if (ref.getCategoryBag() != null) {
for (int i = 0; i < ref.getCategoryBag().getKeyedReference().size(); i++) {
- if (ref.getCategoryBag().getKeyedReference().get(i).getTModelKey().equalsIgnoreCase(IS_VALIDATED_BY)) {
+ if (ref.getCategoryBag().getKeyedReference().get(i).getTModelKey().equalsIgnoreCase(key)) {
+ log.debug("found reference for key=" + key + " from tModel " + ref.getTModelKey() + " validation endpoint " + ref.getCategoryBag().getKeyedReference().get(i).getKeyValue());
ret.add(ref.getCategoryBag().getKeyedReference().get(i).getKeyValue());
}
}
for (int i = 0; i < ref.getCategoryBag().getKeyedReferenceGroup().size(); i++) {
for (int k = 0; k < ref.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().size(); k++) {
- if (ref.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey().equalsIgnoreCase(IS_VALIDATED_BY)) {
+ if (ref.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey().equalsIgnoreCase(key)) {
+ log.debug("found reference for key=" + key + " from tModel " + ref.getTModelKey() + " validation endpoint " + ref.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue());
ret.add(ref.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue());
}
}
@@ -2119,7 +2147,8 @@ public class ValidatePublish extends ValidateUDDIApi {
}
if (ref.getIdentifierBag() != null) {
for (int i = 0; i < ref.getIdentifierBag().getKeyedReference().size(); i++) {
- if (ref.getIdentifierBag().getKeyedReference().get(i).getTModelKey().equalsIgnoreCase(IS_VALIDATED_BY)) {
+ if (ref.getIdentifierBag().getKeyedReference().get(i).getTModelKey().equalsIgnoreCase(key)) {
+ log.debug("found reference for key=" + key + " from tModel " + ref.getTModelKey() + " validation endpoint " + ref.getIdentifierBag().getKeyedReference().get(i).getKeyValue());
ret.add(ref.getIdentifierBag().getKeyedReference().get(i).getKeyValue());
}
}
@@ -2159,7 +2188,7 @@ public class ValidatePublish extends ValidateUDDIApi {
}
}
- private void validateCheckedTModels(BindingTemplate bindingTemplate, Configuration config) throws ValueNotAllowedException {
+ private void validateCheckedTModelsBT(List<BindingTemplate> bindingTemplate, Configuration config) throws ValueNotAllowedException {
boolean checkRef = false;
try {
@@ -2172,7 +2201,7 @@ public class ValidatePublish extends ValidateUDDIApi {
return;
}
Map<String, TModel> cache = new HashMap<String, TModel>();
- List<String> bindings = GetBindingKeysCheckedTModelKeyedReference(cache, bindingTemplate);
+ List<String> bindings = GetBindingKeysCheckedTModelKeyedReferenceBT(cache, bindingTemplate);
if (!bindings.isEmpty()) {
//get a unique list
@@ -2190,7 +2219,7 @@ public class ValidatePublish extends ValidateUDDIApi {
if (url != null) {
//call ValidateValuesFromWebService
//optimization for localhost?
- ValidateValuesFromWebService.Validate(Rectify(url, config), bindingTemplate);
+ ValidateValuesFromWebService.ValidateBinding(Rectify(url, config), bindingTemplate);
}
}
@@ -2198,7 +2227,7 @@ public class ValidatePublish extends ValidateUDDIApi {
}
}
- private void validateCheckedTModels(BusinessService obj, Configuration config) throws ValueNotAllowedException {
+ private void validateCheckedTModelsBS(List<BusinessService> bizlist, Configuration config) throws ValueNotAllowedException {
boolean checkRef = false;
try {
checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
@@ -2209,7 +2238,7 @@ public class ValidatePublish extends ValidateUDDIApi {
return;
}
Map<String, TModel> cache = new HashMap<String, TModel>();
- List<String> bindings = GetBindingKeysCheckedTModelKeyedReference(cache, obj);
+ List<String> bindings = GetBindingKeysCheckedTModelKeyedReferenceBS(cache, bizlist);
if (!bindings.isEmpty()) {
//get a unique list
@@ -2227,7 +2256,7 @@ public class ValidatePublish extends ValidateUDDIApi {
if (url != null) {
//call ValidateValuesFromWebService
//optimization for localhost?
- ValidateValuesFromWebService.Validate(Rectify(url, config), obj);
+ ValidateValuesFromWebService.ValidateService(Rectify(url, config), bizlist);
}
}
@@ -2235,7 +2264,7 @@ public class ValidatePublish extends ValidateUDDIApi {
}
}
- private void validateCheckedTModels(BusinessEntity entity, Configuration config) throws ValueNotAllowedException {
+ private void validateCheckedTModelsBE(List<BusinessEntity> entity, Configuration config) throws ValueNotAllowedException {
boolean checkRef = false;
try {
checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
@@ -2246,7 +2275,7 @@ public class ValidatePublish extends ValidateUDDIApi {
return;
}
Map<String, TModel> cache = new HashMap<String, TModel>();
- List<String> bindings = GetBindingKeysCheckedTModelKeyedReference(cache, entity);
+ List<String> bindings = GetBindingKeysCheckedTModelKeyedReferenceBE(cache, entity);
if (!bindings.isEmpty()) {
//get a unique list
@@ -2264,7 +2293,7 @@ public class ValidatePublish extends ValidateUDDIApi {
if (url != null) {
//call ValidateValuesFromWebService
//optimization for localhost?
- ValidateValuesFromWebService.Validate(Rectify(url, config), entity);
+ ValidateValuesFromWebService.ValidateBusiness(Rectify(url, config), entity);
}
}
@@ -2272,7 +2301,7 @@ public class ValidatePublish extends ValidateUDDIApi {
}
}
- private void validateCheckedTModels(TModel entity, Configuration config) throws ValueNotAllowedException {
+ private void validateCheckedTModelsTM(List<TModel> entity, Configuration config) throws ValueNotAllowedException {
boolean checkRef = false;
try {
checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
@@ -2283,7 +2312,7 @@ public class ValidatePublish extends ValidateUDDIApi {
return;
}
Map<String, TModel> cache = new HashMap<String, TModel>();
- List<String> bindings = GetBindingKeysCheckedTModelKeyedReference(cache, entity);
+ List<String> bindings = GetBindingKeysCheckedTModelKeyedReferenceTM(cache, entity);
if (!bindings.isEmpty()) {
//get a unique list
@@ -2299,9 +2328,10 @@ public class ValidatePublish extends ValidateUDDIApi {
url = find.getHostingRedirector();
}
if (url != null) {
+ log.info("attempting vsv from " + url);
//call ValidateValuesFromWebService
//optimization for localhost?
- ValidateValuesFromWebService.Validate(Rectify(url, config), entity);
+ ValidateValuesFromWebService.ValidateTModel(Rectify(url, config), entity);
}
}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/ValidateValuesFromWebService.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateValuesFromWebService.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateValuesFromWebService.java
index f0d1bc2..8c48298 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateValuesFromWebService.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateValuesFromWebService.java
@@ -15,6 +15,7 @@
*/
package org.apache.juddi.validation;
+import java.util.List;
import javax.xml.ws.BindingProvider;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -86,27 +87,26 @@ public class ValidateValuesFromWebService {
return vsv;
}
- public static void Validate(String url, BusinessEntity obj) throws ValueNotAllowedException {
+
+ public static void ValidateTModel(String url, List<TModel> obj) throws ValueNotAllowedException {
UDDIValueSetValidationPortType vsv = getPort(url);
ValidateValues req = new ValidateValues();
- req.getBusinessEntity().add(obj);
+ req.getTModel().addAll(obj);
try {
DispositionReport validateValues = vsv.validateValues(req);
- //TODO parse
} catch (Exception ex) {
- log.error("VSV Validation Failed: From external service at " + url + ". Reason: " + ex.getMessage());
- log.debug("VSV Validation Failed: From external service at " + url + ". Reason: ", ex);
+ log.warn(ex);
ValueNotAllowedException x = new ValueNotAllowedException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", ex.getMessage()));
throw x;
}
}
-
- public static void Validate(String url, TModel obj) throws ValueNotAllowedException {
+
+ public static void ValidateBinding(String url, List<BindingTemplate> obj) throws ValueNotAllowedException {
UDDIValueSetValidationPortType vsv = getPort(url);
ValidateValues req = new ValidateValues();
- req.getTModel().add(obj);
+ req.getBindingTemplate().addAll(obj);
try {
DispositionReport validateValues = vsv.validateValues(req);
@@ -117,10 +117,10 @@ public class ValidateValuesFromWebService {
}
}
- public static void Validate(String url, BusinessService obj) throws ValueNotAllowedException {
+ public static void ValidateService(String url, List<BusinessService> obj) throws ValueNotAllowedException {
UDDIValueSetValidationPortType vsv = getPort(url);
ValidateValues req = new ValidateValues();
- req.getBusinessService().add(obj);
+ req.getBusinessService().addAll(obj);
try {
DispositionReport validateValues = vsv.validateValues(req);
@@ -130,11 +130,12 @@ public class ValidateValuesFromWebService {
throw x;
}
}
-
- public static void Validate(String url, BindingTemplate obj) throws ValueNotAllowedException {
+
+
+ public static void ValidateBusiness(String url, List<BusinessEntity> obj) throws ValueNotAllowedException {
UDDIValueSetValidationPortType vsv = getPort(url);
ValidateValues req = new ValidateValues();
- req.getBindingTemplate().add(obj);
+ req.getBusinessEntity().addAll(obj);
try {
DispositionReport validateValues = vsv.validateValues(req);
@@ -145,7 +146,7 @@ public class ValidateValuesFromWebService {
}
}
- public static void Validate(String url, PublisherAssertion obj) throws ValueNotAllowedException {
+ public static void ValidatePubAss(String url, PublisherAssertion obj) throws ValueNotAllowedException {
UDDIValueSetValidationPortType vsv = getPort(url);
ValidateValues req = new ValidateValues();
req.getPublisherAssertion().add(obj);
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/AbstractSimpleValidator.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/AbstractSimpleValidator.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/AbstractSimpleValidator.java
index b8a7c29..4a23900 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/AbstractSimpleValidator.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/AbstractSimpleValidator.java
@@ -115,7 +115,7 @@ public abstract class AbstractSimpleValidator implements ValueSetValidator {
//ok we have some work to do
boolean valid = false;
for (int k = 0; k < validValues.size(); k++) {
- if (validValues.get(i).equals(items.get(i).getKeyValue())) {
+ if (validValues.get(k).equals(items.get(i).getKeyValue())) {
valid = true;
}
}
@@ -125,7 +125,7 @@ public abstract class AbstractSimpleValidator implements ValueSetValidator {
}
}
if (err.length() > 0) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", err));
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", err + getPrintableValidValues()));
}
}
@@ -180,7 +180,7 @@ public abstract class AbstractSimpleValidator implements ValueSetValidator {
return;
}
if (key.equalsIgnoreCase(item.getTModelKey())) {
- throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "key " + key + " not allowed on " + itemtype));
+ throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "key " + key + " not allowed on " + itemtype) );
}
}
@@ -196,4 +196,17 @@ public abstract class AbstractSimpleValidator implements ValueSetValidator {
}
}
+ private String getPrintableValidValues() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(" Valid Values:[");
+ List<String> validValues = getValidValues();
+ for (int i=0; i < validValues.size(); i++){
+ sb.append(validValues.get(i));
+ if (i+1< validValues.size())
+ sb.append(",");
+ }
+ sb.append("]");
+ return sb.toString();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationderivedfrom.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationderivedfrom.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationderivedfrom.java
index 8cc2a42..a973936 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationderivedfrom.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationderivedfrom.java
@@ -89,6 +89,7 @@ public class Uddiuddiorgcategorizationderivedfrom implements ValueSetValidator {
}
if (items.get(i).getTModelInstanceDetails() != null) {
for (int k = 0; k < items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().size(); k++) {
+ if (items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k) != null)
if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "not allowed on binding templates"));
}
http://git-wip-us.apache.org/repos/asf/juddi/blob/a866ea02/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationowningbusiness.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationowningbusiness.java b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationowningbusiness.java
index 4bb5261..fb05e08 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationowningbusiness.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/vsv/Uddiuddiorgcategorizationowningbusiness.java
@@ -72,6 +72,7 @@ public class Uddiuddiorgcategorizationowningbusiness implements ValueSetValidato
}
if (items.get(i).getTModelInstanceDetails() != null) {
for (int k = 0; k < items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().size(); k++) {
+ if (items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k) != null)
if (key.equalsIgnoreCase(items.get(i).getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey())) {
throw new InvalidValueException(new ErrorMessage("errors.valuesetvalidation.invalidcontent", "not allowed on binding templates"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org