Class ResourcePath
java.lang.Object
com.inductiveautomation.ignition.common.project.resource.ResourcePath
- All Implemented Interfaces:
- Serializable,- Comparable<ResourcePath>
Represents a full resource path from the file system, relative to a Project.
 
Takes the form of moduleId[/resourceType[/path]]
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionResourcePath(ResourceType type, StringPath path) ResourcePath(ResourceType type, String path) 
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(ResourcePath that) static ResourcePathcreateModuleRoot(String moduleId) booleanReturns a string version of the path of this resource.getName()getPath()getType()inthashCode()booleanisAncestorOf(ResourcePath possibleDescendant) Returnstrueif this ResourcePath is an ancestor ofpossibleDescendant.booleanReturnstrueif this ResourcePath points to a module's root folder.booleanisParentOf(ResourcePath possibleChild) booleanReturnstrueif this ResourcePath points to a resource type folder.toString()
- 
Constructor Details- 
ResourcePath- Parameters:
- type- the type of resource
- path- the full path underneath the resource type folder, ending with the name of the resource.
 
- 
ResourcePath- Parameters:
- type- the type of resource
- path- the full path underneath the resource type folder, ending with the name of the resource.
 
 
- 
- 
Method Details- 
createModuleRoot
- 
getResourceType
- 
isModuleFolderpublic boolean isModuleFolder()Returnstrueif this ResourcePath points to a module's root folder.This means that the path is root ( StringPath.isRoot()and the ResourceType's typeId is null.- Returns:
- trueif this ResourcePath points to a module's root folder.
 
- 
isResourceTypeFolderpublic boolean isResourceTypeFolder()Returnstrueif this ResourcePath points to a resource type folder.- Returns:
- trueif this ResourcePath points to a resource type folder.
 
- 
isParentOf- Returns:
- trueif this ResourcePath is the direct parent of- possibleChild.
 
- 
isAncestorOfReturnstrueif this ResourcePath is an ancestor ofpossibleDescendant.- Parameters:
- possibleDescendant- the ResourcePath that might be a descendant.
- Returns:
- trueif this ResourcePath is an ancestor of- possibleDescendant.
 
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
- 
getModuleId
- 
getType
- 
getPath- Returns:
- the path after the resource type. Includes the resource name
 
- 
getFolderPathReturns a string version of the path of this resource.
- 
getParentPath
- 
getParent
- 
getChild
- 
getName- Returns:
- the name that identifies the resource. Either the last element of the path, or the resourceType if the types folder, or the moduleId if the modules folder.
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<ResourcePath>
 
 
-