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 voidaddImportedInterface(ImportedInterface importedInterface)Adds a new imported interfacebooleanexistsImportedInterface(InterfaceID importedInterface, ContractID contractID)Check if there is an imported interface with the ID providedImportedInterfacegetImportedInterface(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.LangsgetLanguage()Get the Namespace::languageStringgetName()Get the name of this NamespaceAccountIDgetProviderAccountID()Get the responsible of this NamespaceStringgetProviderAccountName()Get providerAccountNamevoidregisterImplementationUsingImport(ImplementationID implementationID, InterfaceID importedInterface, ContractID contractID)Registers the implementation with ID provided as using the import with IDs specifiedvoidregisterOperationUsingImport(OperationID operationID, InterfaceID importedInterface, ContractID contractID)Registers the operation with ID provided as using the import with IDs specifiedvoidregisterPropertyUsingImport(PropertyID propertyID, InterfaceID importedInterface, ContractID contractID)Registers the property with ID provided as using the import with IDs specifiedvoidregisterSubClassUsingImport(MetaClassID metaclassID, InterfaceID importedInterface, ContractID contractID)Registers the subclass with ID provided as extending the import with ID specifiedImportedInterfaceremoveImportedInterface(InterfaceID interfaceToRemove, ContractID contractID)Removes an imported interface from this namespacevoidsetImportedInterfaces(Map<Tuple<InterfaceID,ContractID>,ImportedInterface> newimportedInterfaces)Set the Namespace::importedInterfacesvoidsetLanguage(CommonMessages.Langs newlanguage)Set the Namespace::languagevoidsetName(String newname)Set the Namespace::name of this NamespacevoidsetProviderAccountID(AccountID newResponsible)Set the Namespace::responsible of this Namespace.voidsetProviderAccountName(String newproviderAccountName)Set providerAccountNamevoidunregisterImplementationUsingImport(ImplementationID implementationID, InterfaceID importedInterface, ContractID contractID)Unregisters the implementation with ID provided from using the import with IDs specifiedvoidunregisterOperationUsingImport(OperationID operationID, InterfaceID importedInterface, ContractID contractID)Unregisters the operation with ID provided from using the import with IDs specifiedvoidunregisterPropertyUsingImport(PropertyID propertyID, InterfaceID importedInterface, ContractID contractID)Unregisters the property with ID provided from using the import with IDs specifiedvoidunregisterSubClassUsingImport(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
-
-