public class TreeLogic extends java.lang.Object implements ITreeLogic
ITreeLogic.HierarchicalException, ITreeLogic.IdContainsWrongChars, ITreeLogic.IdEmpty, ITreeLogic.NodeIdException, ITreeLogic.PastingIntoLeafException, ITreeLogic.SameIdExistsInChildren, ITreeLogic.TreeLogicException, ITreeLogic.WrongProjectException
Constructor and Description |
---|
TreeLogic() |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeChildOf(java.lang.String whatType,
java.lang.String parentType)
Method to check if it possible to 'what' type(for ex.
|
boolean |
canBeChildOf(java.lang.String whatType,
TreeNode parent)
Method to check if it possible to 'what' type(for ex.
|
boolean |
canBeChildOf(TreeNode what,
TreeNode parent)
Method to check if it possible to 'what' to be child of 'parent' TreeNode
|
boolean |
canBeChildOf(TreeNode what,
TreeNode parent,
boolean checkid) |
boolean |
canBeChildOfExc(java.lang.String whatType,
TreeNode parent)
Method to check if it possible to 'what' type(for ex.
|
boolean |
canBeChildOfExc(TreeNode what,
TreeNode parent)
Method to check if it possible to 'what' to be child of 'parent' TreeNode Throws exceptions
|
boolean |
canBeChildOfExc(TreeNode what,
TreeNode parent,
boolean checkid) |
boolean |
canBeCopiedTo(TreeNode what,
TreeNode newParent,
boolean changeId)
Check if it is possible to create copy of 'what' TreeNode in 'parent' TreeNode.
|
boolean |
canBeCopiedToExc(TreeNode what,
TreeNode newParent,
boolean changeId)
Check if it is possible to create copy of 'what' TreeNode in 'parent' TreeNode.
|
boolean |
canBeCreatedIn(java.lang.String whatType,
java.lang.String newId,
TreeNode parent)
Check if it possible to create node with type 'whatType' and id 'newId' to node 'parent'
|
boolean |
canBeCreatedIn(java.lang.String whatType,
TreeNode parent)
Check if it possible to create node with type 'whatType' and id 'newId' to node 'parent'
|
boolean |
canBeCreatedInExc(java.lang.String whatType,
java.lang.String newId,
TreeNode parent)
Check if it possible to create node with type 'whatType' and id 'newId' to node 'parent' Throws
exceptions
|
boolean |
canBeCreatedInExc(java.lang.String whatType,
TreeNode parent)
Check if it possible to create node with type 'whatType' and id 'newId' to node 'parent' Throws
exceptions
|
boolean |
canBeDeleted(TreeNode node)
Method to check possibility to delete a node
|
boolean |
canBeParentOf(java.lang.String whatType,
java.lang.String childType)
Method to check if it possible to 'what' type(for ex.
|
boolean |
canBeParentOf(java.lang.String whatType,
TreeNode child)
Method to check if it possible to 'what' type(for ex.
|
boolean |
canBeParentOf(TreeNode what,
TreeNode child)
Method to check if it possible to 'what' to be parent of 'child' TreeNode Throws exceptions
|
boolean |
canBeParentOfExc(TreeNode what,
TreeNode child)
Method to check if it possible to 'what' to be parent of 'child' TreeNode
|
boolean |
canBeTemplate(java.lang.String type) |
boolean |
checkVNodeRecursion(TreeNode treeNode,
TreeNode target) |
java.util.Set<java.lang.String> |
getLinkedNodeTypesToLink(java.lang.String linkToType)
Method to get all possible linkto: linked types for given linkTo: name
|
java.util.Set<java.lang.String> |
getPossibleLink(java.lang.String treeNodeType)
Method to return possible linkto: contruction's names for given node type
|
java.util.Set<java.lang.String> |
getPossibleLinkForAttribute(java.lang.String treeNodeType,
java.lang.String treeNodeAttribute)
Method to return possible linkto: contruction's names for given node type and concrete
attribute
|
boolean |
isAutoRenamable(java.lang.String type)
This method is created to support classes that are not needed in asking before rename on
copying
|
boolean |
isChildIdValid(TreeNode parent,
java.lang.String id)
Method to check if it possible to add node with id 'id' to node 'parent'
|
boolean |
isChildIdValid(TreeNode parent,
TreeNode node,
java.lang.String id)
Method to check if it possible to add node with id 'id' to node 'parent'
|
boolean |
isChildIdValidExc(TreeNode parent,
java.lang.String id)
Method to check if it possible to add node with id 'id' to node 'parent' Throws exceptions
|
boolean |
isChildIdValidExc(TreeNode parent,
TreeNode node,
java.lang.String id)
Method to check if it possible to add node with id 'id' to node 'parent' Throws exceptions
|
boolean |
isCopyable(TreeNode node)
Method to check a possibility of node coping
|
boolean |
isIdValid(TreeNode node,
java.lang.String newId)
Method to check if it possible to change id of 'node' to 'newId'
|
static boolean |
isIdValidExc(java.lang.String newId) |
boolean |
isIdValidExc(TreeNode node,
java.lang.String newId)
Method to check if it possible to change id of 'node' to 'newId' Throws exceptions
|
boolean |
isSiblingPasteAvalible(java.lang.String nodeType)
Method to check a possibility for node type to be copy-pasted as siblink of target node
|
static java.lang.Boolean |
isValidFileName(java.lang.String name) |
boolean |
usesIndexByDefault(java.lang.String type) |
public boolean canBeTemplate(java.lang.String type)
canBeTemplate
in interface ITreeLogic
public boolean canBeParentOfExc(TreeNode what, TreeNode child) throws ITreeLogic.WrongProjectException, ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
canBeParentOfExc
in interface ITreeLogic
what
- possible parent nodechild
- possible child nodeITreeLogic.WrongProjectException
ITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public boolean canBeParentOf(java.lang.String whatType, TreeNode child)
ITreeLogic
canBeParentOf
in interface ITreeLogic
child
- possible child nodepublic boolean canBeChildOfExc(TreeNode what, TreeNode parent) throws ITreeLogic.PastingIntoLeafException, ITreeLogic.WrongProjectException, ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
canBeChildOfExc
in interface ITreeLogic
what
- possible child nodeparent
- possible parent nodeITreeLogic.PastingIntoLeafException
- special paste exceptionITreeLogic.WrongProjectException
ITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public boolean canBeChildOfExc(TreeNode what, TreeNode parent, boolean checkid) throws ITreeLogic.PastingIntoLeafException, ITreeLogic.WrongProjectException, ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
public boolean canBeChildOfExc(java.lang.String whatType, TreeNode parent) throws ITreeLogic.PastingIntoLeafException
ITreeLogic
canBeChildOfExc
in interface ITreeLogic
parent
- possible parent nodeITreeLogic.PastingIntoLeafException
- special paste exceptionpublic static boolean isIdValidExc(java.lang.String newId) throws ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
public boolean isIdValidExc(TreeNode node, java.lang.String newId) throws ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
isIdValidExc
in interface ITreeLogic
node
- node to check possibility of id changenewId
- id to checkITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public boolean isChildIdValidExc(TreeNode parent, TreeNode node, java.lang.String id) throws ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
isChildIdValidExc
in interface ITreeLogic
parent
- possible parent node to node with id equal to 'id'node
- child to check id forid
- id to check possibility of adding it to node 'parent' as childITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public boolean isChildIdValidExc(TreeNode parent, java.lang.String id) throws ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
isChildIdValidExc
in interface ITreeLogic
parent
- possible parent node to node with id equal to 'id'id
- id to check possibility of adding it to node 'parent' as childITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public static java.lang.Boolean isValidFileName(java.lang.String name)
public boolean canBeCreatedInExc(java.lang.String whatType, java.lang.String newId, TreeNode parent) throws ITreeLogic.PastingIntoLeafException, ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
canBeCreatedInExc
in interface ITreeLogic
whatType
- type of node to create in 'parent'newId
- id of node to create in 'parent'parent
- node where checking id performingITreeLogic.PastingIntoLeafException
- special paste exceptionITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public boolean canBeCreatedInExc(java.lang.String whatType, TreeNode parent) throws ITreeLogic.PastingIntoLeafException
ITreeLogic
canBeCreatedInExc
in interface ITreeLogic
whatType
- type of node to create in 'parent'parent
- node where checking id performingITreeLogic.PastingIntoLeafException
- special paste exceptionpublic boolean canBeCopiedToExc(TreeNode what, TreeNode newParent, boolean changeId) throws ITreeLogic.PastingIntoLeafException, ITreeLogic.WrongProjectException, ITreeLogic.SameIdExistsInChildren, ITreeLogic.IdEmpty, ITreeLogic.IdContainsWrongChars
ITreeLogic
canBeCopiedToExc
in interface ITreeLogic
what
- TreeNode which have to be copiednewParent
- TreeNode where 'what' should be copiedchangeId
- if true, then methods checks possibility of adding 'what' with possible id
altering, otherwise, id seemed to be the sameITreeLogic.PastingIntoLeafException
ITreeLogic.WrongProjectException
ITreeLogic.SameIdExistsInChildren
ITreeLogic.IdEmpty
ITreeLogic.IdContainsWrongChars
public java.util.Set<java.lang.String> getPossibleLink(java.lang.String treeNodeType)
ITreeLogic
getPossibleLink
in interface ITreeLogic
treeNodeType
- type of TreeNode to get names of linkto: constructionspublic java.util.Set<java.lang.String> getPossibleLinkForAttribute(java.lang.String treeNodeType, java.lang.String treeNodeAttribute)
ITreeLogic
getPossibleLinkForAttribute
in interface ITreeLogic
treeNodeType
- type of TreeNode to get names of linkto: constructionstreeNodeAttribute
- name of attribute to get names of linktospublic java.util.Set<java.lang.String> getLinkedNodeTypesToLink(java.lang.String linkToType)
ITreeLogic
getLinkedNodeTypesToLink
in interface ITreeLogic
public boolean canBeDeleted(TreeNode node)
ITreeLogic
canBeDeleted
in interface ITreeLogic
node
- node to be deletedpublic boolean isCopyable(TreeNode node)
ITreeLogic
isCopyable
in interface ITreeLogic
public boolean canBeParentOf(TreeNode what, TreeNode child)
ITreeLogic
canBeParentOf
in interface ITreeLogic
what
- possible parent nodechild
- possible child nodepublic boolean canBeChildOf(TreeNode what, TreeNode parent)
ITreeLogic
canBeChildOf
in interface ITreeLogic
what
- possible child nodeparent
- possible parent nodepublic boolean canBeChildOf(TreeNode what, TreeNode parent, boolean checkid)
canBeChildOf
in interface ITreeLogic
public boolean canBeChildOf(java.lang.String whatType, TreeNode parent)
ITreeLogic
canBeChildOf
in interface ITreeLogic
parent
- possible parent nodepublic boolean isIdValid(TreeNode node, java.lang.String newId)
ITreeLogic
isIdValid
in interface ITreeLogic
node
- node to check possibility of id changenewId
- id to checkpublic boolean isChildIdValid(TreeNode parent, TreeNode node, java.lang.String id)
ITreeLogic
isChildIdValid
in interface ITreeLogic
parent
- possible parent node to node with id equal to 'id'node
- child to check id forid
- id to check possibility of adding it to node 'parent' as childpublic boolean isChildIdValid(TreeNode parent, java.lang.String id)
ITreeLogic
isChildIdValid
in interface ITreeLogic
parent
- possible parent node to node with id equal to 'id'id
- id to check possibility of adding it to node 'parent' as childpublic boolean canBeParentOf(java.lang.String whatType, java.lang.String childType)
ITreeLogic
canBeParentOf
in interface ITreeLogic
public boolean canBeChildOf(java.lang.String whatType, java.lang.String parentType)
ITreeLogic
canBeChildOf
in interface ITreeLogic
whatType
- type of possible child nodeparentType
- possible parent node typepublic boolean canBeCreatedIn(java.lang.String whatType, java.lang.String newId, TreeNode parent)
ITreeLogic
canBeCreatedIn
in interface ITreeLogic
whatType
- type of node to create in 'parent'newId
- id of node to create in 'parent'parent
- node where checking id performingpublic boolean canBeCopiedTo(TreeNode what, TreeNode newParent, boolean changeId)
ITreeLogic
canBeCopiedTo
in interface ITreeLogic
what
- TreeNode which have to be copiednewParent
- TreeNode where 'what' should be copiedchangeId
- if true, then methods checks possibility of adding 'what' with possible id
altering, otherwise, id seemed to be the samepublic boolean canBeCreatedIn(java.lang.String whatType, TreeNode parent)
ITreeLogic
canBeCreatedIn
in interface ITreeLogic
whatType
- type of node to create in 'parent'parent
- node where checking id performingpublic boolean isAutoRenamable(java.lang.String type)
ITreeLogic
isAutoRenamable
in interface ITreeLogic
public boolean isSiblingPasteAvalible(java.lang.String nodeType)
ITreeLogic
isSiblingPasteAvalible
in interface ITreeLogic
public boolean usesIndexByDefault(java.lang.String type)