Class Namespace

    • Constructor Detail

      • Namespace

        public Namespace()
        Creates an empty namespace
      • Namespace

        public Namespace​(String newname,
                         String newproviderAccount,
                         CommonMessages.Langs newLanguage)
        Namespace constructor with name and responsible
        Parameters:
        newname - Name to be set
        newproviderAccount - Owner account to be set
        newLanguage - Language of the data model of the namespace.
    • Method Detail

      • getName

        public String getName()
        Get the name of this Namespace
        Returns:
        Namespace::name of container Namespace.
      • setName

        public void setName​(String newname)
        Set the Namespace::name of this Namespace
        Parameters:
        newname - New name to be set
      • getProviderAccountID

        public AccountID getProviderAccountID()
        Get the responsible of this Namespace
        Returns:
        Namespace::responsible of container Namespace.
      • setProviderAccountID

        public void setProviderAccountID​(AccountID newResponsible)
        Set the Namespace::responsible of this Namespace.
        Parameters:
        newResponsible - Responsible account to set
      • setImportedInterfaces

        public void setImportedInterfaces​(Map<Tuple<InterfaceID,​ContractID>,​ImportedInterface> newimportedInterfaces)
        Set the Namespace::importedInterfaces
        Parameters:
        newimportedInterfaces - the importedInterfaces to set
      • removeImportedInterface

        public ImportedInterface removeImportedInterface​(InterfaceID interfaceToRemove,
                                                         ContractID contractID)
        Removes an imported interface from this namespace
        Parameters:
        interfaceToRemove - ID of the interface
        contractID - ID of the contract of the interface to remove
        Returns:
        The imported interface removed or null if it was not imported.
      • existsImportedInterface

        public boolean existsImportedInterface​(InterfaceID importedInterface,
                                               ContractID contractID)
        Check if there is an imported interface with the ID provided
        Parameters:
        importedInterface - ID of the imported interface
        contractID - ID of the contract of the imported interface
        Returns:
        TRUE if the interface was already improted. FALSE otherwise.
      • addImportedInterface

        public void addImportedInterface​(ImportedInterface importedInterface)
        Adds a new imported interface
        Parameters:
        importedInterface - Specifications of the imported interface to add
      • registerPropertyUsingImport

        public void registerPropertyUsingImport​(PropertyID propertyID,
                                                InterfaceID importedInterface,
                                                ContractID contractID)
        Registers the property with ID provided as using the import with IDs specified
        Parameters:
        propertyID - ID of the property using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • registerOperationUsingImport

        public void registerOperationUsingImport​(OperationID operationID,
                                                 InterfaceID importedInterface,
                                                 ContractID contractID)
        Registers the operation with ID provided as using the import with IDs specified
        Parameters:
        operationID - ID of the operation using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • registerImplementationUsingImport

        public void registerImplementationUsingImport​(ImplementationID implementationID,
                                                      InterfaceID importedInterface,
                                                      ContractID contractID)
        Registers the implementation with ID provided as using the import with IDs specified
        Parameters:
        implementationID - ID of the implementation using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • registerSubClassUsingImport

        public void registerSubClassUsingImport​(MetaClassID metaclassID,
                                                InterfaceID importedInterface,
                                                ContractID contractID)
        Registers the subclass with ID provided as extending the import with ID specified
        Parameters:
        metaclassID - ID of the subclass using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • unregisterPropertyUsingImport

        public void unregisterPropertyUsingImport​(PropertyID propertyID,
                                                  InterfaceID importedInterface,
                                                  ContractID contractID)
        Unregisters the property with ID provided from using the import with IDs specified
        Parameters:
        propertyID - ID of the property using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • unregisterOperationUsingImport

        public void unregisterOperationUsingImport​(OperationID operationID,
                                                   InterfaceID importedInterface,
                                                   ContractID contractID)
        Unregisters the operation with ID provided from using the import with IDs specified
        Parameters:
        operationID - ID of the operation using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • unregisterImplementationUsingImport

        public void unregisterImplementationUsingImport​(ImplementationID implementationID,
                                                        InterfaceID importedInterface,
                                                        ContractID contractID)
        Unregisters the implementation with ID provided from using the import with IDs specified
        Parameters:
        implementationID - ID of the implementation using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • unregisterSubClassUsingImport

        public void unregisterSubClassUsingImport​(MetaClassID metaclassID,
                                                  InterfaceID importedInterface,
                                                  ContractID contractID)
        Unregisters the subclass with ID provided as extending the import with ID specified
        Parameters:
        metaclassID - ID of the subclass using the import
        importedInterface - ID of the imported interface used
        contractID - ID of the contract of the imported interface
      • getImportedInterface

        public ImportedInterface getImportedInterface​(InterfaceID importedInterface,
                                                      ContractID contractID)
        Get the imported interface with IDs provided
        Parameters:
        importedInterface - ID of the imported interface
        contractID - ID of the contract of the imported interface
        Returns:
        The imported interface with IDs provided or Null if there is no imported interface with the IDs provided.
      • getImportedInterfacesOfMetaClass

        public HashMap<Tuple<InterfaceID,​ContractID>,​ImportedInterface> getImportedInterfacesOfMetaClass​(MetaClassID metaClassID)
        Get the imported interfaces with Class ID provided
        Parameters:
        metaClassID - ID of the class
        Returns:
        The imported interface with Class ID provided or empty if there is no imported interface with the Class ID provided.
      • getLanguage

        public CommonMessages.Langs getLanguage()
        Get the Namespace::language
        Returns:
        the language
      • setLanguage

        public void setLanguage​(CommonMessages.Langs newlanguage)
        Set the Namespace::language
        Parameters:
        newlanguage - the language to set
      • getProviderAccountName

        public String getProviderAccountName()
        Get providerAccountName
        Returns:
        the providerAccountName
      • setProviderAccountName

        public void setProviderAccountName​(String newproviderAccountName)
        Set providerAccountName
        Parameters:
        newproviderAccountName - the providerAccountName to set