Package fi.tut.mei.resdescapi.rescatapi
Interface ResCatAPIInterface
-
- All Known Implementing Classes:
ResCatAPI
,ResCatAPI_ByDescription
,ResCatAPI_ByGuid
,ResCatAPI_ById
,ResCatAPI_ByName
,ResCatAPI_BySwitching
public interface ResCatAPIInterface
Interface for accessing and interacting with Resource Catalogue- Author:
- Niko Siltala
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractResourceDesc
getARDStructure_ARDId(String ardId)
Retrieves an Abstract Resource Description (ARD) from the Resource Catalogue in java object format.int
getNumberOfArds()
Get number of ARDs in the currently selected repository.int
getNumberOfRds()
Get number of RDs in the currently selected repository.ResourceDescription
getRDSkeleton_ARDandProfile(String ARDId, String ProfileId)
Creates a RDSkeleton, which is a customised RDTemplate, by given ARD and Profile.ResourceDescription
getRDStructure_EmptyTemplate()
Retrieves an Empty Template of Resource Description (RD)ResourceDescription
getRDStructure_RDId(String RDId)
Retrieves Resource Description (RD) by given RD Idboolean
setARDStructure(AbstractResourceDesc ardObj, boolean overwrite)
Writes/pushes Abstract Resource Description (ARD) to the Resource Catalogueboolean
setARDStructure(AbstractResourceDesc ardObj, String filename, boolean overwrite)
Writes/pushes Abstract Resource Description (ARD) to the Resource Catalogueboolean
setRDStructure(ResourceDescription rdObj, boolean overwrite)
Sets (pushes) the given Resource Description (RD) to Resource Catalogue Storageboolean
setRDStructure(ResourceDescription rdObj, String filename, boolean overwrite)
Sets (pushes) the given Resource Description (RD) to Resource Catalogue StorageMap<String,String>
viewARD_All()
Retrieving the complete list of ARD descriptionsMap<String,String>
viewARD_Capability(String capability)
Retrieving the complete list of ARD descriptions by an arbitrary capabilityMap<String,String>
viewARD_CapabilityParameter(String capability, List<String> parameters, List<String> values)
Retrieving the complete list of ARD descriptions by an arbitrary capability and associated parameters.Map<String,String>
viewARD_Category(String category)
Retrieving the complete list of ARD descriptions by an arbitrary categoryMap<String,String>
viewARD_Description(String ardDesc)
Retrieving the complete list of ARD descriptions by an textual descriptionMap<String,String>
viewARD_Interface(String interfaceStd)
Retrieving the complete list of ARD descriptions by an arbitrary interface standard.Map<String,String>
viewARD_Property(String property)
Retrieving the complete list of ARD descriptions by an arbitrary property.Map<String,String>
viewProfile_ARDandCapability(String capability, String ARDId)
Retrieving the complete list of Profiles descriptions of specific ARD containing an arbitrary capabilityMap<String,String>
viewProfile_ARDandCapabilityParameter(String capability, String ARDId, List<String> parameters, List<String> values)
Retrieving the complete list of Profiles descriptions of specific ARD by an arbitrary capability and associated parameters.Map<String,ARDAndProfInfo>
viewProfile_Capability(String capability)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary capabilityMap<String,ARDAndProfInfo>
viewProfile_CapabilityParameter(String capability, List<String> parameters, List<String> values)
Retrieving the complete list of ARDs and their Profiles by an arbitrary capability and associated parameters.Map<String,ARDAndProfInfo>
viewProfile_Category(String category)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary categoryMap<String,ARDAndProfInfo>
viewProfile_Interface(String interfaceStd)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary interface standardMap<String,ARDAndProfInfo>
viewProfile_Property(String property)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary propertyMap<String,String>
viewRD_All()
Retrieving the complete list of RD descriptionsMap<String,String>
viewRD_Capability(String capability)
Retrieving the complete list of RD descriptions by an arbitrary capabilityMap<String,String>
viewRD_CapabilityParameter(String capability, List<String> parameters, List<String> values)
Retrieving the complete list of RD descriptions by an arbitrary capability and associated parameters.Map<String,String>
viewRD_Category(String category)
Retrieving the complete list of RD descriptions by an arbitrary categoryMap<String,String>
viewRD_Description(String rdDesc)
Retrieving the complete list of RD descriptions by an arbitrary RD related descriptionMap<String,String>
viewRD_Interface(String interfaceStd)
Retrieving the complete list of RD descriptions by an arbitrary interface standardMap<String,String>
viewRD_Property(String property)
Retrieving the complete list of RD descriptions by an arbitrary property
-
-
-
Method Detail
-
getNumberOfArds
int getNumberOfArds()
Get number of ARDs in the currently selected repository.- Returns:
- Number of ARDs in the repository. 0 or larger. Returns also 0 if repository does not exist.
-
viewARD_All
Map<String,String> viewARD_All()
Retrieving the complete list of ARD descriptions- Returns:
- Map(ARDId as key, ARDName as value). null if it is empty.
-
viewARD_Description
Map<String,String> viewARD_Description(String ardDesc)
Retrieving the complete list of ARD descriptions by an textual description- Parameters:
ardDesc
- string used to search from description. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDName as value). null if no matches are found.
-
viewARD_Capability
Map<String,String> viewARD_Capability(String capability)
Retrieving the complete list of ARD descriptions by an arbitrary capability- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDName as value). null if no matches are found.
-
viewARD_CapabilityParameter
Map<String,String> viewARD_CapabilityParameter(String capability, List<String> parameters, List<String> values)
Retrieving the complete list of ARD descriptions by an arbitrary capability and associated parameters. In order to match with the ARD, all given parameters (and possible values) must match with the capability content. I.e. if even one of parameters is not found, the ARD will not be added on the list of matches.- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.parameters
- List of parameter information. Meaning of this information depends on implementation.values
- Optional. The list can be null. Links to a parameter on the parameters list. Must be same size and index as parameters list. Single item on the list can be null as well.- Returns:
- Map(ARDId as key, ARDName as value). null if no matches are found.
-
viewARD_Category
Map<String,String> viewARD_Category(String category)
Retrieving the complete list of ARD descriptions by an arbitrary category- Parameters:
category
- Category information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDName as value). null if no matches are found.
-
viewARD_Interface
Map<String,String> viewARD_Interface(String interfaceStd)
Retrieving the complete list of ARD descriptions by an arbitrary interface standard.- Parameters:
interfaceStd
- Interface (standard) information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDName as value). null if no matches are found.
-
viewARD_Property
Map<String,String> viewARD_Property(String property)
Retrieving the complete list of ARD descriptions by an arbitrary property.- Parameters:
property
- Property information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDName as value). null if no matches are found.
-
viewProfile_ARDandCapability
Map<String,String> viewProfile_ARDandCapability(String capability, String ARDId) throws ARDNotExistException
Retrieving the complete list of Profiles descriptions of specific ARD containing an arbitrary capability- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.ARDId
- Abstract Resource Description (ARD) Id- Returns:
- Map(ProfileId as key, Name of Profile as value). null if no matches are found.
- Throws:
ARDNotExistException
-
viewProfile_ARDandCapabilityParameter
Map<String,String> viewProfile_ARDandCapabilityParameter(String capability, String ARDId, List<String> parameters, List<String> values) throws ARDNotExistException
Retrieving the complete list of Profiles descriptions of specific ARD by an arbitrary capability and associated parameters. In order to match with the ARD and its Profile, all given parameters (and possible values) must match with the capability content. I.e. if even one of parameters is not found, the ARD's Profile will not be added on the list of matches.- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.ARDId
- Abstract Resource Description (ARD) Idparameters
- List of parameter information. Meaning of this information depends on implementation.values
- Optional. The list can be null. Links to a parameter on the parameters list. Must be same size and index as parameters list. Single item on the list can be null as well.- Returns:
- Map(ProfileId as key, Name of Profile as value). null if no matches are found.
- Throws:
ARDNotExistException
-
viewProfile_Capability
Map<String,ARDAndProfInfo> viewProfile_Capability(String capability)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary capability- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDAndProfInfo as value>. null if no matches are found. (TODO Add link.)
-
viewProfile_CapabilityParameter
Map<String,ARDAndProfInfo> viewProfile_CapabilityParameter(String capability, List<String> parameters, List<String> values)
Retrieving the complete list of ARDs and their Profiles by an arbitrary capability and associated parameters. In order to match with the ARD and its Profile, all given parameters (and possible values) must match with the capability content. I.e. if even one of parameters is not found, the ARD's Profile will not be added on the list of matches. An ARD is not added, if it does not have any matching Profile(s).- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.parameters
- List of parameter information. Meaning of this information depends on implementation.values
- Optional. The list can be null. Links to a parameter on the parameters list. Must be same size and index as parameters list. Single item on the list can be null as well.- Returns:
- Map(ARDId as key, ARDAndProfInfo as value). null if no matches are found.
-
viewProfile_Category
Map<String,ARDAndProfInfo> viewProfile_Category(String category)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary category- Parameters:
category
- Category information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDAndProfInfo as value>. null if no matches are found. (TODO Add link.)
-
viewProfile_Interface
Map<String,ARDAndProfInfo> viewProfile_Interface(String interfaceStd)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary interface standard- Parameters:
interfaceStd
- Interface (standard) information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDAndProfInfo as value>. null if no matches are found. (TODO Add link.)
-
viewProfile_Property
Map<String,ARDAndProfInfo> viewProfile_Property(String property)
Retrieving the complete list of ARDs and their Profiles containing an arbitrary property- Parameters:
property
- Property information string. Meaning of this information depends on implementation.- Returns:
- Map(ARDId as key, ARDAndProfInfo as value>. null if no matches are found. (TODO Add link.)
-
getARDStructure_ARDId
AbstractResourceDesc getARDStructure_ARDId(String ardId) throws ARDNotExistException, IOException, Exception
Retrieves an Abstract Resource Description (ARD) from the Resource Catalogue in java object format.- Parameters:
ardId
- ID of the Abstract Resource Description (ARD) to be retrieved.- Returns:
- dataModel of ARD
- Throws:
ARDNotExistException
- corresponding ARD does not exist.IOException
Exception
-
setARDStructure
boolean setARDStructure(AbstractResourceDesc ardObj, boolean overwrite) throws UserAuthorisationException, UserHasNotRightsException, IOException, ARDAlreadyExistException
Writes/pushes Abstract Resource Description (ARD) to the Resource Catalogue- Parameters:
ardObj
- Abstract Resource Description (ARD) structure as java object formatoverwrite
- Should existing ARD to be overwritten? default is false (i.e. not to do so). True existing description is overwritten.- Returns:
- true if set succeeds
- Throws:
UserAuthorisationException
- User is not authorised.UserHasNotRightsException
- User has no enough rights to write this ARDIOException
- IO related failure has occured.ARDAlreadyExistException
- If ARD already exists. In case overwrite=true, this will not be thrown.
-
setARDStructure
boolean setARDStructure(AbstractResourceDesc ardObj, String filename, boolean overwrite) throws UserAuthorisationException, UserHasNotRightsException, IOException, ARDAlreadyExistException
Writes/pushes Abstract Resource Description (ARD) to the Resource Catalogue- Parameters:
ardObj
- Abstract Resource Description (ARD) structure as java object formatfilename
- Filename used to store the ARD resource.overwrite
- Should existing ARD to be overwritten? default is false (i.e. not to do so). True existing description is overwritten.- Returns:
- true if set succeeds
- Throws:
UserAuthorisationException
- User is not authorised.UserHasNotRightsException
- User has no enough rights to write this ARDIOException
- IO related failure has occured.ARDAlreadyExistException
- If ARD already exists. In case overwrite=true, this will not be thrown.
-
getRDSkeleton_ARDandProfile
ResourceDescription getRDSkeleton_ARDandProfile(String ARDId, String ProfileId) throws ARDNotExistException, ProfileNotExistException, IOException, Exception
Creates a RDSkeleton, which is a customised RDTemplate, by given ARD and Profile. This is a valid Resource Description (RD), which the user can start to modify and fill in.- Parameters:
ARDId
- Selected Abstract Resource Description(ARD)ProfileId
- Selected Profile inside ARD- Returns:
- Resource Description (RD)
- Throws:
ARDNotExistException
ProfileNotExistException
IOException
Exception
-
getNumberOfRds
int getNumberOfRds()
Get number of RDs in the currently selected repository.- Returns:
- Number of RDs in the repository. 0 or larger. Returns also 0 if repository does not exist.
-
viewRD_All
Map<String,String> viewRD_All()
Retrieving the complete list of RD descriptions- Returns:
- Map(RDId as key, Name of RD as value). null if it is empty.
-
viewRD_Description
Map<String,String> viewRD_Description(String rdDesc)
Retrieving the complete list of RD descriptions by an arbitrary RD related description- Parameters:
rdDesc
- Description information string. Meaning of this information depends on implementation.- Returns:
- Map(RDId as key, Name of RD as value). null if no matches are found.
-
viewRD_Capability
Map<String,String> viewRD_Capability(String capability)
Retrieving the complete list of RD descriptions by an arbitrary capability- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.- Returns:
- Map(RDId as key, Name of RD as value). null if no matches are found.
-
viewRD_CapabilityParameter
Map<String,String> viewRD_CapabilityParameter(String capability, List<String> parameters, List<String> values)
Retrieving the complete list of RD descriptions by an arbitrary capability and associated parameters. In order to match with the RD all given parameters (and possible values) must match with the capability content. I.e. if even one of parameters is not found, the RD will not be added on the list of matches.- Parameters:
capability
- Capability information string. Meaning of this information depends on implementation.parameters
- List of parameter information. Meaning of this information depends on implementation.values
- Optional. The list can be null. Links to a parameter on the parameters list. Must be same size and index as parameters list. Single item on the list can be null as well.- Returns:
- Map(RDId as key, RDName as value). null if no matches are found.
-
viewRD_Category
Map<String,String> viewRD_Category(String category)
Retrieving the complete list of RD descriptions by an arbitrary category- Parameters:
category
- Category information string. Meaning of this information depends on implementation.- Returns:
- Map(RDId as key, RDName as value). null if no matches are found.
-
viewRD_Interface
Map<String,String> viewRD_Interface(String interfaceStd)
Retrieving the complete list of RD descriptions by an arbitrary interface standard- Parameters:
interfaceStd
- Interface (standard) information string. Meaning of this information depends on implementation.- Returns:
- Map(RDId as key, Name of RD as value). null if no matches are found.
-
viewRD_Property
Map<String,String> viewRD_Property(String property)
Retrieving the complete list of RD descriptions by an arbitrary property- Parameters:
property
- Property information string. Meaning of this information depends on implementation.- Returns:
- Map(RDId as key, Name of RD as value). null if no matches are found.
-
getRDStructure_EmptyTemplate
ResourceDescription getRDStructure_EmptyTemplate() throws RDNotExistException, IOException, Exception
Retrieves an Empty Template of Resource Description (RD)- Returns:
- Resource description (RD)
- Throws:
RDNotExistException
IOException
Exception
-
getRDStructure_RDId
ResourceDescription getRDStructure_RDId(String RDId) throws RDNotExistException, IOException, Exception
Retrieves Resource Description (RD) by given RD Id- Parameters:
RDId
- ID of resource description- Returns:
- Resource description (RD)
- Throws:
RDNotExistException
IOException
Exception
-
setRDStructure
boolean setRDStructure(ResourceDescription rdObj, boolean overwrite) throws UserAuthorisationException, UserHasNotRightsException, IOException, RDAlreadyExistException
Sets (pushes) the given Resource Description (RD) to Resource Catalogue Storage- Parameters:
rdObj
- Resource Description (RD) according its object modeloverwrite
- true = overwrites existing RD- Returns:
- true if set succeeds
- Throws:
RDNotExistException
- RD with this RDId already exists.IOException
- IO writing(/reading) issue has occurredUserAuthorisationException
UserHasNotRightsException
RDAlreadyExistException
-
setRDStructure
boolean setRDStructure(ResourceDescription rdObj, String filename, boolean overwrite) throws UserAuthorisationException, UserHasNotRightsException, IOException, RDAlreadyExistException
Sets (pushes) the given Resource Description (RD) to Resource Catalogue Storage- Parameters:
rdObj
- Resource Description (RD) according its object modelfilename
- Filename used to store the RD resource.overwrite
- true = overwrites existing RD- Returns:
- true if set succeeds
- Throws:
RDNotExistException
- RD with this RDId already exists.IOException
- IO writing(/reading) issue has occurredUserAuthorisationException
UserHasNotRightsException
RDAlreadyExistException
-
-