public void testClassificationOnConcepts() throws Exception
{
login();
getJAXREssentials();
Concept concept=null;
Collection concepts = new ArrayList(1);
String portTypeName = "Test Port Type";
concept = blm.createConcept( null, portTypeName ,"" );
ExternalLink wsdlLink = blm.createExternalLink("http://test.org/"+portTypeName,"TEST Port Type definition");
concept.addExternalLink(wsdlLink);
ClassificationScheme TYPE = (ClassificationScheme)bqm.getRegistryObject(UUID_TYPE, LifeCycleManager.CLASSIFICATION_SCHEME);
//assertTrue("Classifications are not empty", TYPE.getClassifications().size() > 0);
System.out.println("TYPE.Classifications = " +TYPE.getClassifications());
concept.addClassification(blm.createClassification( TYPE, blm.createInternationalString("TEST CLASSIFICATION"), "test portType") );
concepts.add(concept);
BulkResponse response = blm.saveConcepts( concepts );
if (response != null && response.getCollection().size() > 0)
{
concept.setKey((Key)response.getCollection().iterator().next() );
assertNotNull("Key created != null", concept.getKey());
System.out.println("Concept Key = " + concept.getKey() + "\".");
}
//Obtain the saved concepts
Concept savedConcept = (Concept)bqm.getRegistryObject(concept.getKey().getId(),
LifeCycleManager.CONCEPT );
assertNotNull("savedConcept is not null", savedConcept);
Collection collection = savedConcept.getClassifications();
assertNotNull("Classifications is not null", collection);
assertTrue("Classifications is not empty", collection.isEmpty() == false);
}