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 booleanaddIssue(ResCatIssue issue)Adds an issue to the list of issues.voidclearIssues()Clears the list of active issuesbooleanequals(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.StringgetResourceCatalogueId()Gets the (primary) ID of the resource catalogue.StringgetResourceCatalogueName()Gets the name of the resource catalogue.inthashCode()booleanhasIssues()Does an object has active IssuesbooleanisWritable()Is the catalogue writable.voidsetResourceCatalogueId(String resourceCatalogueId)Sets the (primary) ID of the cataloguevoidsetResourceCatalogueName(String resourceCatalogueName)Sets the name of the cataloguevoidsetWritable(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:ResCatStorageInterfaceGets the (primary) ID of the resource catalogue. It is used to uniquely identify the catalogue instance. Must be unique inside the application.- Specified by:
getResourceCatalogueIdin interfaceResCatStorageInterface- Returns:
- ID of the catalogue.
-
setResourceCatalogueId
public void setResourceCatalogueId(String resourceCatalogueId)
Description copied from interface:ResCatStorageInterfaceSets the (primary) ID of the catalogue- Specified by:
setResourceCatalogueIdin interfaceResCatStorageInterface- Parameters:
resourceCatalogueId- the (primary)resourceCatalogueId to set
-
getResourceCatalogueName
public String getResourceCatalogueName()
Description copied from interface:ResCatStorageInterfaceGets 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:
getResourceCatalogueNamein interfaceResCatStorageInterface- Returns:
- name of the catalogue.
-
setResourceCatalogueName
public void setResourceCatalogueName(String resourceCatalogueName)
Description copied from interface:ResCatStorageInterfaceSets the name of the catalogue- Specified by:
setResourceCatalogueNamein interfaceResCatStorageInterface- Parameters:
resourceCatalogueName- the resourceCatalogueName to set
-
isWritable
public boolean isWritable()
Description copied from interface:ResCatStorageInterfaceIs the catalogue writable. Can new ARDs and RDs pushed through this API interface.- Specified by:
isWritablein interfaceResCatStorageInterface- Returns:
- Is catalogue writable flag. True = can be written.
-
setWritable
public void setWritable(boolean writable)
Description copied from interface:ResCatStorageInterfaceSets writable flag.- Specified by:
setWritablein interfaceResCatStorageInterface- Parameters:
writable- sets is the catalogue writable or not
-
getAllStored_Categories_ARD
public Set<CategoryInfo> getAllStored_Categories_ARD()
Description copied from interface:ResCatStorageInterfaceGets all stored categories for ARDs in this ResCatStorage- Specified by:
getAllStored_Categories_ARDin 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:ResCatStorageInterfaceGets 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_ARDin 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:ResCatStorageInterfaceGets all stored interface standards for ARDs in this ResCatStorage- Specified by:
getAllStored_Interfaces_ARDin 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:ResCatStorageInterfaceGets all stored properties for ARDs in this ResCatStorage- Specified by:
getAllStored_Properties_ARDin 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:ResCatStorageInterfaceGets all stored categories for RDs in this ResCatStorage- Specified by:
getAllStored_Categories_RDin 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:ResCatStorageInterfaceGets 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_RDin 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:ResCatStorageInterfaceGets all stored interface standards for RDs in this ResCatStorage- Specified by:
getAllStored_Interfaces_RDin 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:ResCatStorageInterfaceGets all stored properties for RDs in this ResCatStorage- Specified by:
getAllStored_Properties_RDin interfaceResCatStorageInterface- Returns:
- Set(PropertyInfo) contains a collection of properties defined in RDs.
-
hasIssues
public boolean hasIssues()
Description copied from interface:IIssueActionsDoes an object has active Issues- Specified by:
hasIssuesin interfaceIIssueActions<ResCatIssue>
-
getIssues
public List<ResCatIssue> getIssues()
Description copied from interface:IIssueActionsGets the list of active Issues. This return value follows the type implementation.- Specified by:
getIssuesin interfaceIIssueActions<ResCatIssue>
-
clearIssues
public void clearIssues()
Description copied from interface:IIssueActionsClears the list of active issues- Specified by:
clearIssuesin 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.
-
-