Package com.piketec.tpt.api
Interface Mapping
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,TptRemote
public interface Mapping extends IdentifiableRemote, NamedObject
This object provides an interface to a mapping in TPT. The mapping consists of a number of mapping flavors.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
A2L_FLAVOR
A2L flavorstatic java.lang.String
ADTF_FLAVOR
Adtf flavorstatic java.lang.String
CTB_FLAVOR
CTB Mapping flavorstatic java.lang.String
INIT_VALUES_FLAVOR
Initial values flavorstatic java.lang.String
LABCAR_FLAVOR
LabCar flavorstatic java.lang.String
LOGGING_FLAVOR
Logging flavorstatic java.lang.String
MEASUREMENT_FLAVOR
Measurement flavorstatic java.lang.String
MINMAX_FLAVOR
Min/Max flavorstatic java.lang.String
OUTPUT_OPERATION_FLAVOR
Output Operation flavorstatic java.lang.String
RENAME_FLAVOR
Rename flavorstatic java.lang.String
SCALING_FLAVOR
Scaling flavorstatic java.lang.String
SIMULINK_MEASUREMENT_FLAVOR
Simulink Measurement flavorstatic java.lang.String
SIMULINK_OBJECT_FLAVOR
Simulink Object flavorstatic java.lang.String
SOMEIP_FLAVOR
SOME/IP flavorstatic java.lang.String
TARGETLINK_DATA_DICTIONARY_FLAVOR
TargetLink Data Dictionary flavorstatic java.lang.String
TARGETLINK_MEASUREMENT_FLAVOR
TargetLink Measurement flavorstatic java.lang.String
TASMO_INPUT_SPECIFICATION_FLAVOR
TASMO Input Specification flavorstatic java.lang.String
TOLERANCE_FLAVOR
Tolerance flavor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFlavor(java.lang.String flavorName)
Add a new flavor to the mapping represented by this object.RemoteCollection<java.lang.String>
getFlavors()
Returns the list of all Mapping Flavors contained in this mapping.java.lang.String
getMappingFlavorColumnDefaultValue(Declaration decl, java.lang.String column)
Get the default value of the given mapping flavor column for the given declaration.java.lang.String
getMappingFlavorColumnDefaultValue(Declaration decl, java.lang.String subElement, java.lang.String column)
Get the default value of the given mapping flavor column for the given declaration.java.lang.String
getMappingFlavorColumnValue(Declaration decl, java.lang.String column, boolean allowDefaultValue)
Get the value of the given mapping flavor column.java.lang.String
getMappingFlavorColumnValue(Declaration decl, java.lang.String subElement, java.lang.String column, boolean allowDefaultValue)
Get the value of the given mapping flavor column of structured elements and its members.void
setMappingFlavorColumnValue(Declaration decl, java.lang.String column, java.lang.String value)
Set the value of the given mapping flavor column.void
setMappingFlavorColumnValue(Declaration decl, java.lang.String subElement, java.lang.String column, java.lang.String value)
Set the value of the given mapping flavor column.-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
Methods inherited from interface com.piketec.tpt.api.NamedObject
getName, setName
-
-
-
-
Field Detail
-
INIT_VALUES_FLAVOR
static final java.lang.String INIT_VALUES_FLAVOR
Initial values flavor- See Also:
- Constant Field Values
-
A2L_FLAVOR
static final java.lang.String A2L_FLAVOR
A2L flavor- See Also:
- Constant Field Values
-
ADTF_FLAVOR
static final java.lang.String ADTF_FLAVOR
Adtf flavor- See Also:
- Constant Field Values
-
CTB_FLAVOR
static final java.lang.String CTB_FLAVOR
CTB Mapping flavor- See Also:
- Constant Field Values
-
LABCAR_FLAVOR
static final java.lang.String LABCAR_FLAVOR
LabCar flavor- See Also:
- Constant Field Values
-
LOGGING_FLAVOR
static final java.lang.String LOGGING_FLAVOR
Logging flavor- See Also:
- Constant Field Values
-
MEASUREMENT_FLAVOR
static final java.lang.String MEASUREMENT_FLAVOR
Measurement flavor- See Also:
- Constant Field Values
-
MINMAX_FLAVOR
static final java.lang.String MINMAX_FLAVOR
Min/Max flavor- See Also:
- Constant Field Values
-
OUTPUT_OPERATION_FLAVOR
static final java.lang.String OUTPUT_OPERATION_FLAVOR
Output Operation flavor- See Also:
- Constant Field Values
-
RENAME_FLAVOR
static final java.lang.String RENAME_FLAVOR
Rename flavor- See Also:
- Constant Field Values
-
SIMULINK_MEASUREMENT_FLAVOR
static final java.lang.String SIMULINK_MEASUREMENT_FLAVOR
Simulink Measurement flavor- See Also:
- Constant Field Values
-
SIMULINK_OBJECT_FLAVOR
static final java.lang.String SIMULINK_OBJECT_FLAVOR
Simulink Object flavor- See Also:
- Constant Field Values
-
TARGETLINK_DATA_DICTIONARY_FLAVOR
static final java.lang.String TARGETLINK_DATA_DICTIONARY_FLAVOR
TargetLink Data Dictionary flavor- See Also:
- Constant Field Values
-
TARGETLINK_MEASUREMENT_FLAVOR
static final java.lang.String TARGETLINK_MEASUREMENT_FLAVOR
TargetLink Measurement flavor- See Also:
- Constant Field Values
-
TOLERANCE_FLAVOR
static final java.lang.String TOLERANCE_FLAVOR
Tolerance flavor- See Also:
- Constant Field Values
-
SCALING_FLAVOR
static final java.lang.String SCALING_FLAVOR
Scaling flavor- See Also:
- Constant Field Values
-
TASMO_INPUT_SPECIFICATION_FLAVOR
static final java.lang.String TASMO_INPUT_SPECIFICATION_FLAVOR
TASMO Input Specification flavor- See Also:
- Constant Field Values
-
SOMEIP_FLAVOR
static final java.lang.String SOMEIP_FLAVOR
SOME/IP flavor- See Also:
- Constant Field Values
-
-
Method Detail
-
getFlavors
RemoteCollection<java.lang.String> getFlavors() throws java.rmi.RemoteException
Returns the list of all Mapping Flavors contained in this mapping.- Returns:
- A
RemoteCollection
of Mapping Flavors. - Throws:
java.rmi.RemoteException
- remote communication problem
-
addFlavor
void addFlavor(java.lang.String flavorName) throws ApiException, java.rmi.RemoteException
Add a new flavor to the mapping represented by this object.- Parameters:
flavorName
- The name of the flavor.- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- IfflavorName == null
or the mapping already contains the flavor or the name of the flavor is unknown to TPT.
-
getMappingFlavorColumnValue
java.lang.String getMappingFlavorColumnValue(Declaration decl, java.lang.String column, boolean allowDefaultValue) throws ApiException, java.rmi.RemoteException
Get the value of the given mapping flavor column.- Parameters:
decl
- TheDeclaration
from which you want to get the flavor.column
- The name of the column of the flavor. Valid column names are all mapping specific column names from the declaration editor, such asMin
,Max
,Hidden
,External_Name
etc.allowDefaultValue
- A flag which allows to get the default value from the flavor in case it is null.- Returns:
- The String representation of the value from the given mapping flavor column.
- Throws:
ApiException
- If the declaration or the column is null, if the declaration does not exist locally or if the mapping does not have any flavor with the given column.java.rmi.RemoteException
- remote communication problem
-
getMappingFlavorColumnValue
java.lang.String getMappingFlavorColumnValue(Declaration decl, java.lang.String subElement, java.lang.String column, boolean allowDefaultValue) throws ApiException, java.rmi.RemoteException
Get the value of the given mapping flavor column of structured elements and its members.- Parameters:
decl
- TheDeclaration
from which you want to get the flavor.subElement
- The subelement in case of a structuredDeclaration
. Can be left empty ornull
to get the value for the root element. The sub elements must be separated by '.'. Do NOT add the name of the declaration as first element.column
- The name of the column of the flavor. Valid column names are all mapping specific column names from the declaration editor, such asMin
,Max
,Hidden
,External_Name
etc.allowDefaultValue
- A flag which allows to get the default value from the flavor in case it is null.- Returns:
- The String representation of the value from the given mapping flavor column.
- Throws:
ApiException
- If the declaration or the column is null, if the declaration does not exist locally or if the mapping does not have any flavor with the given column.java.rmi.RemoteException
- remote communication problem
-
setMappingFlavorColumnValue
void setMappingFlavorColumnValue(Declaration decl, java.lang.String column, java.lang.String value) throws ApiException, java.rmi.RemoteException
Set the value of the given mapping flavor column.- Parameters:
decl
- TheDeclaration
from which you want to set the flavor.column
- The name of the column of the flavor. Valid column names are all mapping specific column names from the declaration editor, such asMin
,Max
,Hidden
,External_Name
etc.value
- The value to be set. Setting the value to the default value (getMappingFlavorColumnDefaultValue(Declaration, String)
) will let the value be null when the file is saved and loaded again.- Throws:
ApiException
- If the declaration or the column is null, if the declaration does not exist locally, if the mapping does not have any flavor with the given column or if the value can not be parsed to the column type.java.rmi.RemoteException
- remote communication problem
-
setMappingFlavorColumnValue
void setMappingFlavorColumnValue(Declaration decl, java.lang.String subElement, java.lang.String column, java.lang.String value) throws ApiException, java.rmi.RemoteException
Set the value of the given mapping flavor column.- Parameters:
decl
- TheDeclaration
from which you want to set the flavor.subElement
- The subelement in case of a structuredDeclaration
. Can be left empty ornull
to set the value for the root element. The sub elements must be separated by '.'. Do NOT add the name of the declaration as first element.column
- The name of the column of the flavor. Valid column names are all mapping specific column names from the declaration editor, such asMin
,Max
,Hidden
,External_Name
etc.value
- The value to be set. Setting the value to the default value (getMappingFlavorColumnDefaultValue(Declaration, String)
) will let the value be null when the file is saved and loaded again.- Throws:
ApiException
- If the declaration or the column is null, if the declaration does not exist locally, if the mapping does not have any flavor with the given column or if the value can not be parsed to the column type.java.rmi.RemoteException
- remote communication problem
-
getMappingFlavorColumnDefaultValue
java.lang.String getMappingFlavorColumnDefaultValue(Declaration decl, java.lang.String column) throws ApiException, java.rmi.RemoteException
Get the default value of the given mapping flavor column for the given declaration.- Parameters:
decl
- TheDeclaration
from which you want to get the flavor.column
- The name of the column of the flavor.- Returns:
- The String representation of the default value from the flavor
- Throws:
ApiException
- If the declaration or the column is null, if the declaration does not exist locally or if the mapping does not have any flavor with the given column.java.rmi.RemoteException
- remote communication problem
-
getMappingFlavorColumnDefaultValue
java.lang.String getMappingFlavorColumnDefaultValue(Declaration decl, java.lang.String subElement, java.lang.String column) throws ApiException, java.rmi.RemoteException
Get the default value of the given mapping flavor column for the given declaration.- Parameters:
decl
- TheDeclaration
from which you want to get the flavor.subElement
- The subelement in case of a structuredDeclaration
. Can be left empty ornull
to set the value for the root element. The sub elements must be separated by '.'. Do NOT add the name of the declaration as first element.column
- The name of the column of the flavor.- Returns:
- The String representation of the default value from the flavor
- Throws:
ApiException
- If the declaration or the column is null, if the declaration does not exist locally or if the mapping does not have any flavor with the given column.java.rmi.RemoteException
- remote communication problem
-
-