Class UniqueNameContainmentDataReference
- java.lang.Object
-
- com.e1c.g5.v8.dt.check.suppress.datareference.UniqueNameContainmentDataReference
-
- All Implemented Interfaces:
IContainmentDataReference
,IDataReference
public class UniqueNameContainmentDataReference extends Object implements IContainmentDataReference
Addresses a naturally unique name of an element within a specific hierarchy of objects. Could be used to address such objects as form items, etc.
Contains the name of the object, the hierarchy type and the reverse parent path (from bottom to top) withing the element hierarchy. The path is used to compute enherited integration policies in case if no direct policy is defined for the reference.
-
-
Constructor Summary
Constructors Constructor Description UniqueNameContainmentDataReference(String name, org.eclipse.emf.ecore.EClass type)
Creates an instance of the reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParentNameToPath(String parentName)
Adds a parent element name to the path.String
getName()
Gets the name of the referenced elementIterable<String>
getParentPath()
Gets the parent path iterable.IPropertyDataReference
getPropertyDataReference()
Gets the property reference (if any).org.eclipse.emf.ecore.EClass
getType()
The type of the element hiearchy with unique names.boolean
hasParentPath()
Checks if this reference has the parent path.void
setPropertyDataReference(IPropertyDataReference propertyDataReference)
Sets the property data reference.
-
-
-
Constructor Detail
-
UniqueNameContainmentDataReference
public UniqueNameContainmentDataReference(String name, org.eclipse.emf.ecore.EClass type)
Creates an instance of the reference.- Parameters:
name
- The name of the element. Can benull
in case if the reference context cannot be addressed yet data path could be obtained.type
- The type of the hierarchy. Can't benull
-
-
Method Detail
-
addParentNameToPath
public void addParentNameToPath(String parentName)
Adds a parent element name to the path. As the path is reversed, the added element will be added to the tail of the path.- Parameters:
parentName
- The name of the parent element. Cannot benull
-
getName
public String getName()
Gets the name of the referenced element- Returns:
- The name of the element. Can be
null
in case if the reference context cannot be
-
getParentPath
public Iterable<String> getParentPath()
Gets the parent path iterable. The path is reversed (deepest precursor first) to to ease the inheritance computation.- Returns:
- The iterable containing parent element names. Cannot be
null
-
getPropertyDataReference
public IPropertyDataReference getPropertyDataReference()
Description copied from interface:IContainmentDataReference
Gets the property reference (if any).- Specified by:
getPropertyDataReference
in interfaceIContainmentDataReference
- Returns:
- Property reference. Can be
null
-
getType
public org.eclipse.emf.ecore.EClass getType()
The type of the element hiearchy with unique names.- Returns:
- The type of the hierarchy. Can't be
null
-
hasParentPath
public boolean hasParentPath()
Checks if this reference has the parent path.- Returns:
true
if the path exists;false
otherwise
-
setPropertyDataReference
public void setPropertyDataReference(IPropertyDataReference propertyDataReference)
Description copied from interface:IContainmentDataReference
Sets the property data reference.- Specified by:
setPropertyDataReference
in interfaceIContainmentDataReference
- Parameters:
propertyDataReference
- the propertyDataReference to set
-
-