public NotificationEventImpl()

in SdmxBeans/src/main/java/org/sdmxsource/sdmx/sdmxbeans/model/beans/registry/NotificationEventImpl.java [78:176]


    public NotificationEventImpl(org.sdmx.resources.sdmxml.schemas.v21.registry.NotifyRegistryEventType notification) {
        this.eventTime = DateUtil.formatDate(notification.getEventTime(), true);
        this.objectUrn = notification.getObjectURN();
        this.subscriptionUrn = notification.getSubscriptionURN();
        this.action = DATASET_ACTION.valueOf(notification.getEventAction().toString().toUpperCase());
        if (notification.getRegistrationEvent() != null) {
            this.registration = new RegistrationBeanImpl(notification.getRegistrationEvent().getRegistration());
        } else {
            beans = new SdmxBeansImpl();
            StructuresType structures = notification.getStructuralEvent().getStructures();
            if (structures.getCategorisations() != null) {
                for (CategorisationType type : structures.getCategorisations().getCategorisationList()) {
                    beans.addCategorisation(new CategorisationBeanImpl(type));
                }
            }
            if (structures.getCategorySchemes() != null) {
                for (CategorySchemeType type : structures.getCategorySchemes().getCategorySchemeList()) {
                    beans.addCategoryScheme(new CategorySchemeBeanImpl(type));
                }
            }
            if (structures.getCodelists() != null) {
                for (CodelistType type : structures.getCodelists().getCodelistList()) {
                    beans.addCodelist(new CodelistBeanImpl(type));
                }
            }
            if (structures.getConcepts() != null) {
                for (ConceptSchemeType type : structures.getConcepts().getConceptSchemeList()) {
                    beans.addConceptScheme(new ConceptSchemeBeanImpl(type));
                }
            }
            if (structures.getConstraints() != null) {
                for (AttachmentConstraintType type : structures.getConstraints().getAttachmentConstraintList()) {
                    beans.addAttachmentConstraint(new AttachmentConstraintBeanImpl(type));
                }
                for (ContentConstraintType type : structures.getConstraints().getContentConstraintList()) {
                    beans.addContentConstraintBean(new ContentConstraintBeanImpl(type));
                }
            }
            if (structures.getDataflows() != null) {
                for (DataflowType type : structures.getDataflows().getDataflowList()) {
                    beans.addDataflow(new DataflowBeanImpl(type));
                }
            }
            if (structures.getDataStructures() != null) {
                for (DataStructureType type : structures.getDataStructures().getDataStructureList()) {
                    beans.addDataStructure(new DataStructureBeanImpl(type));
                }
            }
            if (structures.getHierarchicalCodelists() != null) {
                for (HierarchicalCodelistType type : structures.getHierarchicalCodelists().getHierarchicalCodelistList()) {
                    beans.addHierarchicalCodelist(new HierarchicalCodelistBeanImpl(type));
                }
            }
            if (structures.getMetadataflows() != null) {
                for (MetadataflowType type : structures.getMetadataflows().getMetadataflowList()) {
                    beans.addMetadataFlow(new MetadataflowBeanImpl(type));
                }
            }
            if (structures.getMetadataStructures() != null) {
                for (MetadataStructureType type : structures.getMetadataStructures().getMetadataStructureList()) {
                    beans.addMetadataStructure(new MetadataStructureDefinitionBeanImpl(type));
                }
            }
            if (structures.getOrganisationSchemes() != null) {
                for (AgencySchemeType type : structures.getOrganisationSchemes().getAgencySchemeList()) {
                    beans.addAgencyScheme(new AgencySchemeBeanImpl(type));
                }
                for (DataConsumerSchemeType type : structures.getOrganisationSchemes().getDataConsumerSchemeList()) {
                    beans.addDataConsumerScheme(new DataConsumerSchemeBeanImpl(type));
                }
                for (DataProviderSchemeType type : structures.getOrganisationSchemes().getDataProviderSchemeList()) {
                    beans.addDataProviderScheme(new DataProviderSchemeBeanImpl(type));
                }
                for (OrganisationUnitSchemeType type : structures.getOrganisationSchemes().getOrganisationUnitSchemeList()) {
                    beans.addOrganisationUnitScheme(new OrganisationUnitSchemeBeanImpl(type));
                }
            }
            if (structures.getProcesses() != null) {
                for (ProcessType type : structures.getProcesses().getProcessList()) {
                    beans.addProcess(new ProcessBeanImpl(type));
                }
            }
            if (structures.getProvisionAgreements() != null) {
                for (ProvisionAgreementType type : structures.getProvisionAgreements().getProvisionAgreementList()) {
                    beans.addProvisionAgreement(new ProvisionAgreementBeanImpl(type));
                }
            }
            if (structures.getReportingTaxonomies() != null) {
                for (ReportingTaxonomyType type : structures.getReportingTaxonomies().getReportingTaxonomyList()) {
                    beans.addReportingTaxonomy(new ReportingTaxonomyBeanImpl(type));
                }
            }
            if (structures.getStructureSets() != null) {
                for (StructureSetType type : structures.getStructureSets().getStructureSetList()) {
                    beans.addStructureSet(new StructureSetBeanImpl(type));
                }
            }
        }
    }