Class Namespace
- java.lang.Object
-
- es.bsc.dataclay.util.MgrObject<NamespaceID>
-
- es.bsc.dataclay.util.management.namespacemgr.Namespace
-
public final class Namespace extends MgrObject<NamespaceID>
This class represents a namespace.
-
-
Constructor Summary
Constructors Constructor Description Namespace()
Creates an empty namespaceNamespace(String newname, String newproviderAccount, CommonMessages.Langs newLanguage)
Namespace constructor with name and responsible
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImportedInterface(ImportedInterface importedInterface)
Adds a new imported interfaceboolean
existsImportedInterface(InterfaceID importedInterface, ContractID contractID)
Check if there is an imported interface with the ID providedImportedInterface
getImportedInterface(InterfaceID importedInterface, ContractID contractID)
Get the imported interface with IDs providedMap<Tuple<InterfaceID,ContractID>,ImportedInterface>
getImportedInterfaces()
Get the Namespace::importedInterfacesHashMap<Tuple<InterfaceID,ContractID>,ImportedInterface>
getImportedInterfacesOfMetaClass(MetaClassID metaClassID)
Get the imported interfaces with Class ID providedCommonMessages.Langs
getLanguage()
Get the Namespace::languageString
getName()
Get the name of this NamespaceAccountID
getProviderAccountID()
Get the responsible of this NamespaceString
getProviderAccountName()
Get providerAccountNamevoid
registerImplementationUsingImport(ImplementationID implementationID, InterfaceID importedInterface, ContractID contractID)
Registers the implementation with ID provided as using the import with IDs specifiedvoid
registerOperationUsingImport(OperationID operationID, InterfaceID importedInterface, ContractID contractID)
Registers the operation with ID provided as using the import with IDs specifiedvoid
registerPropertyUsingImport(PropertyID propertyID, InterfaceID importedInterface, ContractID contractID)
Registers the property with ID provided as using the import with IDs specifiedvoid
registerSubClassUsingImport(MetaClassID metaclassID, InterfaceID importedInterface, ContractID contractID)
Registers the subclass with ID provided as extending the import with ID specifiedImportedInterface
removeImportedInterface(InterfaceID interfaceToRemove, ContractID contractID)
Removes an imported interface from this namespacevoid
setImportedInterfaces(Map<Tuple<InterfaceID,ContractID>,ImportedInterface> newimportedInterfaces)
Set the Namespace::importedInterfacesvoid
setLanguage(CommonMessages.Langs newlanguage)
Set the Namespace::languagevoid
setName(String newname)
Set the Namespace::name of this Namespacevoid
setProviderAccountID(AccountID newResponsible)
Set the Namespace::responsible of this Namespace.void
setProviderAccountName(String newproviderAccountName)
Set providerAccountNamevoid
unregisterImplementationUsingImport(ImplementationID implementationID, InterfaceID importedInterface, ContractID contractID)
Unregisters the implementation with ID provided from using the import with IDs specifiedvoid
unregisterOperationUsingImport(OperationID operationID, InterfaceID importedInterface, ContractID contractID)
Unregisters the operation with ID provided from using the import with IDs specifiedvoid
unregisterPropertyUsingImport(PropertyID propertyID, InterfaceID importedInterface, ContractID contractID)
Unregisters the property with ID provided from using the import with IDs specifiedvoid
unregisterSubClassUsingImport(MetaClassID metaclassID, InterfaceID importedInterface, ContractID contractID)
Unregisters the subclass with ID provided as extending the import with ID specified-
Methods inherited from class es.bsc.dataclay.util.MgrObject
getDataClayID, setDataClayID
-
-
-
-
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 setnewproviderAccount
- Owner account to be setnewLanguage
- 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
-
getImportedInterfaces
public Map<Tuple<InterfaceID,ContractID>,ImportedInterface> getImportedInterfaces()
Get the Namespace::importedInterfaces- Returns:
- the importedInterfaces
-
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 interfacecontractID
- 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 interfacecontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 importimportedInterface
- ID of the imported interface usedcontractID
- 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 interfacecontractID
- 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
-
-