Search in sources :

Example 11 with AssociationType1

use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.

the class RegistryPackageTypeHelperTest method testGetAssociationsFromRegistryObjectList.

@Test
public void testGetAssociationsFromRegistryObjectList() throws Exception {
    RegistryObjectListType registryObjectList = ((RegistryPackageType) registryObject).getRegistryObjectList();
    List<AssociationType1> associations = rptHelper.getAssociations(registryObjectList);
    assertAssociations(associations);
}
Also used : RegistryObjectListType(oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType) RegistryPackageType(oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryPackageType) AssociationType1(oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1) Test(org.junit.Test)

Example 12 with AssociationType1

use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.

the class RegistryPackageTypeHelperTest method assertAssociations.

private void assertAssociations(List<AssociationType1> associations) {
    // Values from xml file
    int expectedSize = 13;
    String expectedId = "urn:association:1";
    String expectedAssociationType = "RelatedTo";
    String expectedSourceObject = "urn:registry:node";
    String expectedTargetObject = "urn:contact:id0";
    assertThat(associations, hasSize(expectedSize));
    AssociationType1 association = associations.get(0);
    assertThat(association.isSetId(), is(true));
    assertThat(association.getId(), is(equalTo(expectedId)));
    assertThat(association.isSetAssociationType(), is(true));
    assertThat(association.getAssociationType(), is(equalTo(expectedAssociationType)));
    assertThat(association.isSetSourceObject(), is(true));
    assertThat(association.getSourceObject(), is(equalTo(expectedSourceObject)));
    assertThat(association.isSetTargetObject(), is(true));
    assertThat(association.getTargetObject(), is(equalTo(expectedTargetObject)));
}
Also used : AssociationType1(oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1)

Example 13 with AssociationType1

use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.

the class RegistryPackageWebConverterTest method getThirdAssociation.

private AssociationType1 getThirdAssociation() {
    AssociationType1 association = RIM_FACTORY.createAssociationType1();
    association.setId("urn:association:3");
    association.setAssociationType("RelatedTo");
    association.setSourceObject("urn:contact:person1");
    association.setTargetObject("urn:content:collection:id0");
    return association;
}
Also used : AssociationType1(oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1)

Example 14 with AssociationType1

use of oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1 in project ddf by codice.

the class RegistryPackageWebConverterTest method getFirstAssociation.

private AssociationType1 getFirstAssociation() {
    AssociationType1 association = RIM_FACTORY.createAssociationType1();
    association.setId("urn:association:1");
    association.setAssociationType("RelatedTo");
    association.setSourceObject("urn:registry:node");
    association.setTargetObject("urn:contact:id0");
    return association;
}
Also used : AssociationType1(oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1)

Aggregations

AssociationType1 (oasis.names.tc.ebxml_regrep.xsd.rim._3.AssociationType1)14 ExtrinsicObjectType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ExtrinsicObjectType)5 RegistryObjectListType (oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectListType)4 ArrayList (java.util.ArrayList)3 JAXBElement (javax.xml.bind.JAXBElement)3 OrganizationType (oasis.names.tc.ebxml_regrep.xsd.rim._3.OrganizationType)3 PersonType (oasis.names.tc.ebxml_regrep.xsd.rim._3.PersonType)3 RegistryObjectType (oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryObjectType)3 RegistryPackageType (oasis.names.tc.ebxml_regrep.xsd.rim._3.RegistryPackageType)3 ServiceType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ServiceType)3 HashMap (java.util.HashMap)2 ClassificationType (oasis.names.tc.ebxml_regrep.xsd.rim._3.ClassificationType)2 IdentifiableType (oasis.names.tc.ebxml_regrep.xsd.rim._3.IdentifiableType)2 Test (org.junit.Test)2 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 QName (javax.xml.namespace.QName)1 SubmitObjectsRequest (oasis.names.tc.ebxml_regrep.xsd.lcm._3.SubmitObjectsRequest)1 SlotType1 (oasis.names.tc.ebxml_regrep.xsd.rim._3.SlotType1)1