Package fi.tut.mei.resdescapi.rescatapi
Class ResCatStoImpl
- java.lang.Object
-
- fi.tut.mei.resdescapi.rescatapi.ResCatStoImpl
-
- All Implemented Interfaces:
IIssueActions<ResCatIssue>
,ResCatStorageInterface
- Direct Known Subclasses:
ResCatStoImpl_LocalFileSystem
,ResCatStoImpl_TestWithDummyData
public abstract class ResCatStoImpl extends Object implements ResCatStorageInterface, IIssueActions<ResCatIssue>
Abstract class for Resource Catalogue Storages. Provides some basic implementations for interface ResCatStorageInterface.- Author:
- Niko Siltala
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface fi.tut.mei.resdescapi.rescatapi.ResCatStorageInterface
ResCatStorageInterface.EnumSearchDomainForARD, ResCatStorageInterface.EnumSearchField
-
-
Constructor Summary
Constructors Constructor Description ResCatStoImpl()
ResCatStoImpl(String id, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addIssue(ResCatIssue issue)
Adds an issue to the list of issues.void
clearIssues()
Clears the list of active issuesboolean
equals(Object obj)
Set<CapabilityInfo>
getAllStored_Capabilities_ARD()
Gets all stored capabilities for ARDs in this ResCatStorage.Set<CapabilityInfo>
getAllStored_Capabilities_RD()
Gets all stored capabilities for RDs in this ResCatStorage.Set<CategoryInfo>
getAllStored_Categories_ARD()
Gets all stored categories for ARDs in this ResCatStorageSet<CategoryInfo>
getAllStored_Categories_RD()
Gets all stored categories for RDs in this ResCatStorageSet<InterfaceStdInfo>
getAllStored_Interfaces_ARD()
Gets all stored interface standards for ARDs in this ResCatStorageSet<InterfaceStdInfo>
getAllStored_Interfaces_RD()
Gets all stored interface standards for RDs in this ResCatStorageSet<PropertyInfo>
getAllStored_Properties_ARD()
Gets all stored properties for ARDs in this ResCatStorageSet<PropertyInfo>
getAllStored_Properties_RD()
Gets all stored properties for RDs in this ResCatStorageList<ResCatIssue>
getIssues()
Gets the list of active Issues.String
getResourceCatalogueId()
Gets the (primary) ID of the resource catalogue.String
getResourceCatalogueName()
Gets the name of the resource catalogue.int
hashCode()
boolean
hasIssues()
Does an object has active Issuesboolean
isWritable()
Is the catalogue writable.void
setResourceCatalogueId(String resourceCatalogueId)
Sets the (primary) ID of the cataloguevoid
setResourceCatalogueName(String resourceCatalogueName)
Sets the name of the cataloguevoid
setWritable(boolean writable)
Sets writable flag.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fi.tut.mei.resdescapi.rescatapi.ResCatStorageInterface
getARDStructureFromStorage, getNumberOfArds, getNumberOfRds, getRDSkeleton_ARDandProfile, getRDStructureFromStorage, getRepositoryReport, hasARDAndProfile, hasRD, pushARDContentToStorage, pushARDStructureToStorage, pushRDContentToStorage, pushRDStructureToStorage, viewARDAndProfiles_All, viewARDAndProfiles_Capability, viewARDAndProfiles_CapabilityParameter, viewARDAndProfiles_Category, viewARDAndProfiles_Description, viewARDAndProfiles_Interface, viewARDAndProfiles_Property, viewRDs_All, viewRDs_Capability, viewRDs_CapabilityParameter, viewRDs_Category, viewRDs_Description, viewRDs_Interface, viewRDs_Property
-
-
-
-
Method Detail
-
getResourceCatalogueId
public String getResourceCatalogueId()
Description copied from interface:ResCatStorageInterface
Gets the (primary) ID of the resource catalogue. It is used to uniquely identify the catalogue instance. Must be unique inside the application.- Specified by:
getResourceCatalogueId
in interfaceResCatStorageInterface
- Returns:
- ID of the catalogue.
-
setResourceCatalogueId
public void setResourceCatalogueId(String resourceCatalogueId)
Description copied from interface:ResCatStorageInterface
Sets the (primary) ID of the catalogue- Specified by:
setResourceCatalogueId
in interfaceResCatStorageInterface
- Parameters:
resourceCatalogueId
- the (primary)resourceCatalogueId to set
-
getResourceCatalogueName
public String getResourceCatalogueName()
Description copied from interface:ResCatStorageInterface
Gets the name of the resource catalogue. It is used at the same time to uniquely identify the catalogue instance. Must be unique inside the application.- Specified by:
getResourceCatalogueName
in interfaceResCatStorageInterface
- Returns:
- name of the catalogue.
-
setResourceCatalogueName
public void setResourceCatalogueName(String resourceCatalogueName)
Description copied from interface:ResCatStorageInterface
Sets the name of the catalogue- Specified by:
setResourceCatalogueName
in interfaceResCatStorageInterface
- Parameters:
resourceCatalogueName
- the resourceCatalogueName to set
-
isWritable
public boolean isWritable()
Description copied from interface:ResCatStorageInterface
Is the catalogue writable. Can new ARDs and RDs pushed through this API interface.- Specified by:
isWritable
in interfaceResCatStorageInterface
- Returns:
- Is catalogue writable flag. True = can be written.
-
setWritable
public void setWritable(boolean writable)
Description copied from interface:ResCatStorageInterface
Sets writable flag.- Specified by:
setWritable
in interfaceResCatStorageInterface
- Parameters:
writable
- sets is the catalogue writable or not
-
getAllStored_Categories_ARD
public Set<CategoryInfo> getAllStored_Categories_ARD()
Description copied from interface:ResCatStorageInterface
Gets all stored categories for ARDs in this ResCatStorage- Specified by:
getAllStored_Categories_ARD
in interfaceResCatStorageInterface
- Returns:
- Set(CategoryInfo) contains a collection of Categories defined in ARDs.
-
getAllStored_Capabilities_ARD
public Set<CapabilityInfo> getAllStored_Capabilities_ARD()
Description copied from interface:ResCatStorageInterface
Gets all stored capabilities for ARDs in this ResCatStorage. Please note that Capability Query Library (CQL) should be used to get the full list of available capabilities and their properties!- Specified by:
getAllStored_Capabilities_ARD
in interfaceResCatStorageInterface
- Returns:
- Set(CapabilityInfo) contains a collection of capabilities defined in ARDs.
-
getAllStored_Interfaces_ARD
public Set<InterfaceStdInfo> getAllStored_Interfaces_ARD()
Description copied from interface:ResCatStorageInterface
Gets all stored interface standards for ARDs in this ResCatStorage- Specified by:
getAllStored_Interfaces_ARD
in interfaceResCatStorageInterface
- Returns:
- Set(InterfaceStdInfo) contains a collection of Interfaces standards defined in ARDs.
-
getAllStored_Properties_ARD
public Set<PropertyInfo> getAllStored_Properties_ARD()
Description copied from interface:ResCatStorageInterface
Gets all stored properties for ARDs in this ResCatStorage- Specified by:
getAllStored_Properties_ARD
in interfaceResCatStorageInterface
- Returns:
- Set(PropertyInfo) contains a collection of properties defined in ARDs.
-
getAllStored_Categories_RD
public Set<CategoryInfo> getAllStored_Categories_RD()
Description copied from interface:ResCatStorageInterface
Gets all stored categories for RDs in this ResCatStorage- Specified by:
getAllStored_Categories_RD
in interfaceResCatStorageInterface
- Returns:
- Set(CategoryInfo) contains a collection of Categories defined in RDs.
-
getAllStored_Capabilities_RD
public Set<CapabilityInfo> getAllStored_Capabilities_RD()
Description copied from interface:ResCatStorageInterface
Gets all stored capabilities for RDs in this ResCatStorage. Please note that Capability Query Library (CQL) should be used to get the full list of available capabilities and their properties!- Specified by:
getAllStored_Capabilities_RD
in interfaceResCatStorageInterface
- Returns:
- Set(CapabilityInfo) contains a collection of capabilities defined in RDs.
-
getAllStored_Interfaces_RD
public Set<InterfaceStdInfo> getAllStored_Interfaces_RD()
Description copied from interface:ResCatStorageInterface
Gets all stored interface standards for RDs in this ResCatStorage- Specified by:
getAllStored_Interfaces_RD
in interfaceResCatStorageInterface
- Returns:
- Set(InterfaceStdInfo) contains a collection of Interfaces standards defined in RDs.
-
getAllStored_Properties_RD
public Set<PropertyInfo> getAllStored_Properties_RD()
Description copied from interface:ResCatStorageInterface
Gets all stored properties for RDs in this ResCatStorage- Specified by:
getAllStored_Properties_RD
in interfaceResCatStorageInterface
- Returns:
- Set(PropertyInfo) contains a collection of properties defined in RDs.
-
hasIssues
public boolean hasIssues()
Description copied from interface:IIssueActions
Does an object has active Issues- Specified by:
hasIssues
in interfaceIIssueActions<ResCatIssue>
-
getIssues
public List<ResCatIssue> getIssues()
Description copied from interface:IIssueActions
Gets the list of active Issues. This return value follows the type implementation.- Specified by:
getIssues
in interfaceIIssueActions<ResCatIssue>
-
clearIssues
public void clearIssues()
Description copied from interface:IIssueActions
Clears the list of active issues- Specified by:
clearIssues
in interfaceIIssueActions<ResCatIssue>
-
addIssue
protected boolean addIssue(ResCatIssue issue)
Adds an issue to the list of issues.- Parameters:
issue
- The issue itself. Must not be null- Returns:
- true if issue was successfully added.
-
-