Package com.ptc.windchill.associativity
Interface AssociativePath
- All Superinterfaces:
BasePath,Serializable
- All Known Implementing Classes:
com.ptc.windchill.associativity.AbstractAssociativePath,PartAssociativePath
A run time representation of a path. It follows the
Supported API: true
Extendable: false
PartPathOccurrence model to represent path as recursive
model, but stores more information in terms of references to the Part, usage, occurrence (optional). This is used in
services around associative structure transformationSupported API: true
Extendable: false
-
Field Summary
Fields inherited from interface com.ptc.windchill.baseserver.BasePath
CMP_ID_SEPARATOR_STR, PATH_DELIMITER -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubPath(AssociativePath path) Adds the given sub-path to current path
Supported API: truebooleanReturns true if the current instances contains the input path or vice versa
Supported API: trueReturns the list of allMasteredin the givenAssociativePathstarting from the root to leaf.Returns the list of allAssociativein the giveAssociativePathstarting from the leaf to root.Returns the list of allAssociativein the giveAssociativePathstarting from the leaf to root.Returns the list of allUsesOccurrencein the giveAssociativePathstarting from the leaf to root.Returns the list of allAssociativeUsageLinkin the giveAssociativePathstarting from the leaf to root.Returns theAssociativeUsageLinkbetween the parent and childAssociativein the path model
Supported API: true
getChild()Returns component id path from root to leaf seperated by '|'
Supported API: trueReturns the newAssociativePathwhich is equal to currentAssociativePathpath with all new references to previous path i.e.ReturnAssociativePathafter removing occurrence info.returns theUsesOccurrenceassociated with givenAssociativeUsageLink.Returns he occurrence path from leaf to root separated by "/"
Supported API: truegetRoot()Returns the absolute root associative in current path
Supported API: true
Returns he occurrence path from root to leaf separated by "/"
Supported API: trueReturns theAssociativePathmodel containing information about parent child in the structure.getUsage()Deprecated.
Supported API: trueReturns component id path from root to leaf seperated by '/'
Supported API: true
Supported API: truebooleanTells if path has occurrence at each level i.e.booleanThis checks usage unit is each at each level so this path can have occurrences at each level.booleanReturns true, if the given path is to a master object
Supported API: truevoidsetPathToAMaster(boolean isMasterPath) The latest iteration is stored for the child, when the path represents a master.booleanstartsWith(AssociativePath path) returns true if current path starts with the input path else false
Supported API: truetoString(boolean detailed)
Supported API: trueMethods inherited from interface com.ptc.windchill.baseserver.BasePath
getAllMasteredSet, getAllPathElements, getAllPathElementSet, getNumberPath, getUniqueIdPath
-
Method Details
-
getUsage
AssociativeUsageLink getUsage()Deprecated., usegetAssociativeUsage()insteadReturns theAssociativeUsageLinkbetween the parent and childAssociativein the path model
Supported API: true
- Specified by:
getUsagein interfaceBasePath- Returns:
- the
AssociativeUsageLink
-
getAssociativeUsage
AssociativeUsageLink getAssociativeUsage()Returns theAssociativeUsageLinkbetween the parent and childAssociativein the path model
Supported API: true
- Returns:
- the
AssociativeUsageLink
-
getChild
Associative getChild()- Specified by:
getChildin interfaceBasePath- Returns:
- the
Associative
-
getOccurrence
UsesOccurrence getOccurrence()returns theUsesOccurrenceassociated with givenAssociativeUsageLink. It may returnnullin case no occurrence for the given usage link.
Supported API: true
- Returns:
- the
UsesOccurrence
-
getSubPath
AssociativePath getSubPath()Returns theAssociativePathmodel containing information about parent child in the structure. In case the previous child doesn't exist i.e. we have aAssociativePathmodel for root then the method returnsnull.
Supported API: true
- Specified by:
getSubPathin interfaceBasePath- Returns:
- the sub-path of the current associative path
-
getRoot
Associative getRoot()Returns the absolute root associative in current path
Supported API: true
-
getAllUsages
List<AssociativeUsageLink> getAllUsages()Returns the list of allAssociativeUsageLinkin the giveAssociativePathstarting from the leaf to root.
Supported API: true- Specified by:
getAllUsagesin interfaceBasePath- Returns:
- list of
AssociativeUsageLink
-
getAllAssociatives
List<Associative> getAllAssociatives()Returns the list of allAssociativein the giveAssociativePathstarting from the leaf to root.
Supported API: true- Returns:
- list of
Associative
-
getAllAssociativesSet
Set<Associative> getAllAssociativesSet()Returns the list of allAssociativein the giveAssociativePathstarting from the leaf to root. It gives result in linkedHashSet
Supported API: true- Returns:
-
getAllOccurrences
List<UsesOccurrence> getAllOccurrences()Returns the list of allUsesOccurrencein the giveAssociativePathstarting from the leaf to root. It may containnullwherever theUsesOccurrenceinformation is not available
Supported API: true- Returns:
- list of
UsesOccurrence
-
getDeepCopy
Returns the newAssociativePathwhich is equal to currentAssociativePathpath with all new references to previous path i.e. while creating the deep copy we create new instances of previous paths as well
Supported API: true- Specified by:
getDeepCopyin interfaceBasePath- Returns:
- the
AssociativePath - Throws:
WTException
-
addSubPath
Adds the given sub-path to current path
Supported API: true- Parameters:
path- theAssociativePath
-
getOccurrencePath
String getOccurrencePath()Returns he occurrence path from leaf to root separated by "/"
Supported API: true- Returns:
- the occurrence path from leaf to root separated by "/"
-
getRootToLeafOccurrencePath
String getRootToLeafOccurrencePath()Returns he occurrence path from root to leaf separated by "/"
Supported API: true- Returns:
- the occurrence path from root to leaf separated by "/"
-
getComponentIdPath
String getComponentIdPath()Returns component id path from root to leaf seperated by '|'
Supported API: true- Returns:
-
getUsagePath
String getUsagePath()
Supported API: true- Returns:
-
getUsagePathFromRoot
String getUsagePathFromRoot()Returns component id path from root to leaf seperated by '/'
Supported API: true- Returns:
-
setPathToAMaster
void setPathToAMaster(boolean isMasterPath) The latest iteration is stored for the child, when the path represents a master. So, the boolean isMasterPath is set, if the path is to a master
Supported API: true- Parameters:
isMasterPath-
-
isPathToAMaster
boolean isPathToAMaster()Returns true, if the given path is to a master object
Supported API: true- Returns:
-
getDeepCopyOfUsage
AssociativePath getDeepCopyOfUsage()- Returns:
- Throws:
WTException
-
toString
Supported API: true -
isOccurrencablePath
boolean isOccurrencablePath()This checks usage unit is each at each level so this path can have occurrences at each level. For an inflated path better to useisFullyOccurrencePath()as from CAD we can have 1 occurrence for non-each unit as well but never allowed for parts directly in Windchill
Supported API: true- Returns:
-
getUsagePathKey
String getUsagePathKey()
Supported API: true- Returns:
-
containsOrContained
Returns true if the current instances contains the input path or vice versa
Supported API: true- Parameters:
path-- Returns:
-
isFullyOccurrencePath
boolean isFullyOccurrencePath()Tells if path has occurrence at each level i.e. fully occurrence path. Does not depend on unit on usage as there is case where non-each unit can have single occurrence when coming from CAD
Supported API: true- Returns:
-
getAllAssociativeMasters
Returns the list of allMasteredin the givenAssociativePathstarting from the root to leaf.
Supported API: true- Returns:
- list of
Associative
-
startsWith
returns true if current path starts with the input path else false
Supported API: true- Parameters:
path-- Returns:
-
getAssociativeUsage()instead