public class SimpRepData
extends java.lang.Object
A simplified rep is a list of component paths. The tricky part is whether those components are included or excluded from the rep.
If defaultExclude=true, then any components not listed are excluded from the rep, and the listed items are included.
If defaultExclude=false (the default), then any components not listed are included in the rep, and the listed items are excluded.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_EXCLUDE |
static int |
DEFAULT_INCLUDE |
static int |
DEFAULT_UNKNOWN |
| Constructor and Description |
|---|
SimpRepData() |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(java.util.List<java.lang.Integer> path)
Add a new component to the representation
|
void |
addSubItem(java.util.List<java.lang.Integer> path,
SimpRepData data)
Add a new sub-rep to the representation
|
boolean |
containsDescendant(java.util.List<java.lang.Integer> path)
Check whether the representation contains a reference to a descendant
of the specified component.
|
boolean |
containsItem(java.util.List<java.lang.Integer> path)
Check whether the representation contains a reference to a component.
|
SimpRepData |
containsNestedRep(java.util.List<java.lang.Integer> path)
Check whether the representation contains a nested rep for a
specified assembly component path.
|
boolean |
excludes(java.util.List<java.lang.Integer> path)
Check whether a component is excluded from the representation.
|
boolean |
excludesDescendant(java.util.List<java.lang.Integer> path)
Check whether any descendant of a component is excluded from
the representation.
|
java.util.List<java.util.List<java.lang.Integer>> |
getItems() |
int |
getLevelDefault(java.util.List<java.lang.Integer> path)
Returns the default status (include or exclude) for the givem
subassembly path
|
java.lang.String |
getName() |
java.util.List<java.lang.Integer> |
getPath() |
SimpRepData |
getSimpRep(java.util.List<java.lang.Integer> path)
Finds the simplified rep specific to the given subassembly.
|
java.util.List<SimpRepData> |
getSubItems() |
boolean |
hasItem(java.util.List<java.lang.Integer> path)
Checks whether the specified component exists as an item
anywhere in the simplified rep tree
|
boolean |
isDefaultExclude() |
int |
numPaths()
Returns the number of items (component paths) in the simplified rep.
|
void |
setDefaultExclude(boolean defaultExclude) |
void |
setItems(java.util.List<java.util.List<java.lang.Integer>> items) |
void |
setName(java.lang.String name) |
void |
setPath(java.util.List<java.lang.Integer> path) |
void |
setSubItems(java.util.List<SimpRepData> subItems) |
public static final int DEFAULT_UNKNOWN
public static final int DEFAULT_EXCLUDE
public static final int DEFAULT_INCLUDE
public void addItem(java.util.List<java.lang.Integer> path)
path - The component path for the componentpublic void addSubItem(java.util.List<java.lang.Integer> path,
SimpRepData data)
path - The data for sub-representationdata - The JShell object representing the datapublic boolean excludes(java.util.List<java.lang.Integer> path)
path - The component path to checkpublic boolean excludesDescendant(java.util.List<java.lang.Integer> path)
If the input path is empty, then it will check whether the representation excludes anything. The PROBLEM with this is that it only works right when the rep is defaultExclude=false. When defaultExclude=true BUT all the components in the rep are items (included) then it will return true when it should return false.
path - The component path to checkpublic boolean containsItem(java.util.List<java.lang.Integer> path)
path - The component path for the componentpublic SimpRepData containsNestedRep(java.util.List<java.lang.Integer> path)
path - The component path for the subassemblypublic int getLevelDefault(java.util.List<java.lang.Integer> path)
path - The component path for the subassemblypublic boolean hasItem(java.util.List<java.lang.Integer> path)
path - The component path for the componentpublic SimpRepData getSimpRep(java.util.List<java.lang.Integer> path)
path - The component path for the subassemblypublic boolean containsDescendant(java.util.List<java.lang.Integer> path)
path - The component path for the componentpublic int numPaths()
public java.lang.String getName()
public void setName(java.lang.String name)
name - Name of the simplified reppublic java.util.List<java.util.List<java.lang.Integer>> getItems()
public void setItems(java.util.List<java.util.List<java.lang.Integer>> items)
items - List of component paths in the reppublic boolean isDefaultExclude()
public void setDefaultExclude(boolean defaultExclude)
defaultExclude - Whether non-listed componets are excluded; if false, then non-listed components are includedpublic java.util.List<java.lang.Integer> getPath()
public void setPath(java.util.List<java.lang.Integer> path)
public java.util.List<SimpRepData> getSubItems()
public void setSubItems(java.util.List<SimpRepData> subItems)