Interface IDataParentAdapter
- All Superinterfaces:
IDataAdapter
- All Known Implementing Classes:
DOIAdapter
,RootSDIAdapter
,SDIAdapter
A representation of the model object
IDataParentAdapter
.
The following features are supported:
-
Method Summary
Modifier and TypeMethodDescriptiondefault AbstractDAIAdapter<?>
Adds DAI to current DOIdefault IDataParentAdapter
Adds SDOI to SDI in current DOIdefault Optional<AbstractDAIAdapter<?>>
findDataAdapterByName
(String daiName) Finds DAI from current DOIdefault org.apache.commons.lang3.tuple.Pair<IDataAdapter,
Integer> findDeepestMatch
(List<String> sNames, int fromIndex, boolean isBdaNames) Search for the closest match for a list of structured data name (SDIs names = list of SDOs or BDAs names)default Optional<IDataParentAdapter>
findStructuredDataAdapterByName
(String sdiName) Search SDI by name, directly under current this DOI or SDIdefault AbstractDAIAdapter<?>
getDataAdapterByName
(String daiName) Gets DAI from current DOIgetName()
Get name of the DOI or SDIGet children (SDI or DAI) of this elementdefault IDataParentAdapter
getStructuredDataAdapterByName
(String sdiName) Gets SDI by name, directly under current this DOI or SDIConvert the given TDAI to a AbstractDAIAdapter The current instance must be the parent of the given childTSDIConvert the given TSDI to a RootSDIAdapter or SDIAdapter The current instance must be the parent of the given childTSDI
-
Method Details
-
getName
String getName()Get name of the DOI or SDI- Returns:
- name of the DOI or SDI
-
getSDIOrDAI
Get children (SDI or DAI) of this element- Returns:
- currentElem.getSDIOrDAI()
-
toAdapter
Convert the given TSDI to a RootSDIAdapter or SDIAdapter The current instance must be the parent of the given childTSDI- Parameters:
childTSDI
- child SDI to convert to an adapter- Returns:
- RootSDIAdapter when current instance is a DOI or SDIAdapter otherwise
- Throws:
IllegalArgumentException
- when the current instance is not the parent of the given childTSDI
-
toAdapter
Convert the given TDAI to a AbstractDAIAdapter The current instance must be the parent of the given childTSDI- Parameters:
childTDAI
- child SDI to convert to an adapter- Returns:
- AbstractDAIAdapter
- Throws:
IllegalArgumentException
- when the current instance is not the parent of the given childTSDI
-
findStructuredDataAdapterByName
default Optional<IDataParentAdapter> findStructuredDataAdapterByName(String sdiName) throws ScdException Search SDI by name, directly under current this DOI or SDI- Parameters:
sdiName
- name of SDI to find- Returns:
- RootSDIAdapter object
- Throws:
ScdException
- throws when specified name of SDI not present in current DOI or SDI
-
getStructuredDataAdapterByName
Gets SDI by name, directly under current this DOI or SDI- Parameters:
sdiName
- name of SDI to find- Returns:
- found SDI
- Throws:
ScdException
- throws when specified name of SDI not present in current DOI or SDI
-
getDataAdapterByName
Gets DAI from current DOI- Parameters:
daiName
- name of DAI to get- Returns:
- found DAI
- Throws:
ScdException
- throws when specified name of DAI not present in current DOI
-
findDataAdapterByName
Finds DAI from current DOI- Parameters:
daiName
- name of DAI to get- Returns:
- found DAI
- Throws:
ScdException
- throws when specified name of DAI not present in current DOI
-
addDAI
Adds DAI to current DOI- Parameters:
name
- name of DAI to addisUpdatable
- updatability state of DAI- Returns:
- DAIAdapter object as added DAI
-
addSDOI
Adds SDOI to SDI in current DOI- Parameters:
sdiName
- name of SDOI to add- Returns:
- RootSDIAdapter object as added SDOI
-
findDeepestMatch
default org.apache.commons.lang3.tuple.Pair<IDataAdapter,Integer> findDeepestMatch(List<String> sNames, int fromIndex, boolean isBdaNames) Search for the closest match for a list of structured data name (SDIs names = list of SDOs or BDAs names)- Parameters:
sNames
- list of either SDO or BDA namesfromIndex
- position in the list (0 to list size minus one)isBdaNames
- true if list of BDA names, false otherwise- Returns:
- a pair of SCL data object Adapter and depth of the list (an index of the list)
-