Class DMNMarshallerImportsHelperStandaloneImpl

  • All Implemented Interfaces:
    org.kie.workbench.common.dmn.api.marshalling.DMNMarshallerImportsHelper<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions,​org.kie.dmn.model.api.DRGElement,​org.kie.dmn.model.api.ItemDefinition>, DMNMarshallerImportsHelperStandalone

    @ApplicationScoped
    public class DMNMarshallerImportsHelperStandaloneImpl
    extends Object
    implements DMNMarshallerImportsHelperStandalone
    • Field Detail

      • NAMESPACE

        public static final QName NAMESPACE
    • Constructor Detail

      • DMNMarshallerImportsHelperStandaloneImpl

        public DMNMarshallerImportsHelperStandaloneImpl()
      • DMNMarshallerImportsHelperStandaloneImpl

        @Inject
        public DMNMarshallerImportsHelperStandaloneImpl​(org.kie.workbench.common.dmn.api.marshalling.DMNPathsHelper pathsHelper,
                                                        org.guvnor.common.services.project.service.WorkspaceProjectService projectService,
                                                        org.kie.dmn.api.marshalling.DMNMarshaller marshaller,
                                                        DMNIOHelper dmnIOHelper,
                                                        PMMLIncludedDocumentFactory pmmlDocumentFactory,
                                                        @Named("ioStrategy")
                                                        org.uberfire.io.IOService ioService)
    • Method Detail

      • getImportDefinitions

        public Map<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions> getImportDefinitions​(org.kie.workbench.common.stunner.core.diagram.Metadata metadata,
                                                                                                              List<org.kie.dmn.model.api.Import> imports)
        Description copied from interface: DMNMarshallerImportsHelperStandalone
        This method loads all imported DMN definitions from a list of imports.
        Specified by:
        getImportDefinitions in interface DMNMarshallerImportsHelperStandalone
        Parameters:
        metadata - represents the metadata from the main DMN model.
        imports - represent the list of imported files.
        Returns:
        a map Definitions indexed by Imports.
      • getPMMLDocuments

        public Map<org.kie.dmn.model.api.Import,​org.kie.workbench.common.dmn.api.editors.included.PMMLDocumentMetadata> getPMMLDocuments​(org.kie.workbench.common.stunner.core.diagram.Metadata metadata,
                                                                                                                                               List<org.kie.dmn.model.api.Import> imports)
        Description copied from interface: DMNMarshallerImportsHelperStandalone
        This method loads all imported PMML documents from a list of imports.
        Specified by:
        getPMMLDocuments in interface DMNMarshallerImportsHelperStandalone
        Parameters:
        metadata - represents the metadata from the main DMN model.
        imports - represent the list of imported files.
        Returns:
        a map PMMLDocumentMetadata indexed by Imports.
      • getImportXML

        public Map<org.kie.dmn.model.api.Import,​String> getImportXML​(org.kie.workbench.common.stunner.core.diagram.Metadata metadata,
                                                                           List<org.kie.dmn.model.api.Import> imports)
        Specified by:
        getImportXML in interface org.kie.workbench.common.dmn.api.marshalling.DMNMarshallerImportsHelper<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions,​org.kie.dmn.model.api.DRGElement,​org.kie.dmn.model.api.ItemDefinition>
      • getDMNModelPath

        public org.uberfire.backend.vfs.Path getDMNModelPath​(org.kie.workbench.common.stunner.core.diagram.Metadata metadata,
                                                             String modelNamespace,
                                                             String modelName)
        Description copied from interface: DMNMarshallerImportsHelperStandalone
        This method finds the Path of DMN model.
        Specified by:
        getDMNModelPath in interface DMNMarshallerImportsHelperStandalone
        Parameters:
        metadata - represents the metadata from the a DMN model from the scanned project.
        modelNamespace - represents the namespace of the desired DMN model.
        modelName - represents the mode name of the desired DMN model.
        Returns:
        the Path of the desired DMN model.
      • getImportedDRGElements

        public List<org.kie.dmn.model.api.DRGElement> getImportedDRGElements​(Map<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions> importDefinitions)
        Specified by:
        getImportedDRGElements in interface org.kie.workbench.common.dmn.api.marshalling.DMNMarshallerImportsHelper<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions,​org.kie.dmn.model.api.DRGElement,​org.kie.dmn.model.api.ItemDefinition>
      • getImportedItemDefinitions

        public List<org.kie.dmn.model.api.ItemDefinition> getImportedItemDefinitions​(Map<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions> importDefinitions)
        Specified by:
        getImportedItemDefinitions in interface org.kie.workbench.common.dmn.api.marshalling.DMNMarshallerImportsHelper<org.kie.dmn.model.api.Import,​org.kie.dmn.model.api.Definitions,​org.kie.dmn.model.api.DRGElement,​org.kie.dmn.model.api.ItemDefinition>
      • getImportedItemDefinitionsByNamespace

        public List<org.kie.dmn.model.api.ItemDefinition> getImportedItemDefinitionsByNamespace​(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject,
                                                                                                String modelName,
                                                                                                String namespace)
        Description copied from interface: DMNMarshallerImportsHelperStandalone
        This method finds the list of ItemDefinitions for a given namespace.
        Specified by:
        getImportedItemDefinitionsByNamespace in interface DMNMarshallerImportsHelperStandalone
        Parameters:
        workspaceProject - represents the project that will be scanned.
        modelName - is the value used as the prefix for imported ItemDefinitions.
        namespace - is the namespace of the model that provides the list of ItemDefinitions.
        Returns:
        a list of imported ItemDefinitions.