Java Doc for ComponentPath.java in  » Content-Management-System » contelligent » de » finix » contelligent » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » contelligent » de.finix.contelligent 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.finix.contelligent.ComponentPath

All known Subclasses:   de.finix.contelligent.GlobalComponentPath,
ComponentPath
public class ComponentPath implements PropertyType,java.io.Serializable(Code)
A ComponentPath instance represents a valid path to a Component . As many methods within the Contelligent System require the directory and the name of a component as separate parameters this class acts as a helper class for parsing a string into ComponentPath.getDir dir and ComponentPath.getName name .


Field Summary
final public static  ComponentPathEMPTY_PATH
    
final public static  ComponentPathROOT_PATH
    
final public static  charSEPARATOR
    
final public static  StringSEPARATOR_STRING
    
final public static  intVCSIZE_COMPPATH
    
final public static  intVCSIZE_DIR
    
final public static  intVCSIZE_NAME
    
final static  org.apache.log4j.Loggerlog
    
final  StringpathpathWithEndTokendirname
    
final public static  StringpermittedNameCharacters
    
final public static  StringpermittedPathCharacters
    

Constructor Summary
public  ComponentPath(String path)
     Creates a ComponentPath from the given path.
public  ComponentPath(String path, boolean validatePath)
     Creates a ComponentPath from the given path.

Method Summary
public  ComponentPathappend(String name)
    
public  ComponentPathappend(ComponentPath toAppend)
    
public static  ComponentPathcalculateLargestCommonPath(ComponentPath[] paths)
     Returns the largest common path among the given paths.
 voidcheckPathLength(String dir, String name)
    
public  booleanequals(Object o)
    
public  ComponentPathexchangeParent(ComponentPath oldParent, ComponentPath newParent)
     Returns a path where the given oldParent is exchanged with newParent or null if this path is not a ComponentPath.isSubPathOf sub-path of oldParent.
public  StringgetDir()
    
public  StringgetName()
    
public  String[]getParsedPath()
     Returns a String[] containing the elements of this path.
public  StringgetPathWithEndToken()
    
public  StringgetStringHash()
    
public  inthashCode()
    
public  booleanisAbsolute()
    
public static  booleanisAbsolutePath(String path)
     Returns true if the given path begins with a ComponentPath.SEPARATOR .
public  booleanisDotDotRelative()
    
public  booleanisEmpty()
     Returns true if this path is null or has length zero.
public  booleanisRelative()
    
public  booleanisRoot()
    
public static  booleanisSubPathOf(String subPath, String path)
     Returns true if subPath is a sub-path of path by means of path-elements.
public  booleanisSubPathOf(ComponentPath path)
     Returns true if this path is a sub-path of path by means of path-elements.
public  ComponentPathparentPath()
    
public static  String[]parsePath(String path)
     Returns a String[] containing the elements of the given path which are determined by means of a ComponentPath.SEPARATOR separator . The path doesn't need to start or end with a separator, so with the default separator '/' either of "/sub/text", "sub/text", "/sub/text/" or "sub/text/" will result in two path elements 'sub' and 'text'.
public  ComponentPathprepend(ComponentPath toPrepend)
    
public  ComponentPathtoAbsolutePath(ComponentPath rootPath)
    
public  StringtoPath()
    
public  ComponentPathtoRelativePath(ComponentPath rootPath)
    
public  StringtoString()
    
public static  StringvalidatePath(String path)
     FIXME: this method currently doesn't do anything! Validates the given path (and should throw exception if path is invalid).
public static  PropertyTypevalueOf(String s)
     Returns a new ComponentPath object initialized to the value of the specified String.

Field Detail
EMPTY_PATH
final public static ComponentPath EMPTY_PATH(Code)



ROOT_PATH
final public static ComponentPath ROOT_PATH(Code)



SEPARATOR
final public static char SEPARATOR(Code)
the separator for path-elements



SEPARATOR_STRING
final public static String SEPARATOR_STRING(Code)



VCSIZE_COMPPATH
final public static int VCSIZE_COMPPATH(Code)



VCSIZE_DIR
final public static int VCSIZE_DIR(Code)



VCSIZE_NAME
final public static int VCSIZE_NAME(Code)



log
final static org.apache.log4j.Logger log(Code)



pathpathWithEndTokendirname
final String pathpathWithEndTokendirname(Code)



permittedNameCharacters
final public static String permittedNameCharacters(Code)



permittedPathCharacters
final public static String permittedPathCharacters(Code)




Constructor Detail
ComponentPath
public ComponentPath(String path)(Code)
Creates a ComponentPath from the given path. The given path must contain at least one character!



ComponentPath
public ComponentPath(String path, boolean validatePath)(Code)
Creates a ComponentPath from the given path. If parameter validatePath is true the path gets ComponentPath.validatePath validated before parsing.




Method Detail
append
public ComponentPath append(String name)(Code)



append
public ComponentPath append(ComponentPath toAppend)(Code)



calculateLargestCommonPath
public static ComponentPath calculateLargestCommonPath(ComponentPath[] paths)(Code)
Returns the largest common path among the given paths. If an error occurs or if any of the paths is relative or if the paths have no path in common the ComponentPath.ROOT_PATH is returned.
Parameters:
  paths - a ComponentPath[] value a ComponentPath value



checkPathLength
void checkPathLength(String dir, String name)(Code)



equals
public boolean equals(Object o)(Code)



exchangeParent
public ComponentPath exchangeParent(ComponentPath oldParent, ComponentPath newParent)(Code)
Returns a path where the given oldParent is exchanged with newParent or null if this path is not a ComponentPath.isSubPathOf sub-path of oldParent.
Parameters:
  oldParent - a ComponentPath value
Parameters:
  newParent - a ComponentPath value a ComponentPath value



getDir
public String getDir()(Code)



getName
public String getName()(Code)



getParsedPath
public String[] getParsedPath()(Code)
Returns a String[] containing the elements of this path. See parsePath(String) for further description. a String[] value containing the path elements oran empty String[] if this path is empty.



getPathWithEndToken
public String getPathWithEndToken()(Code)



getStringHash
public String getStringHash()(Code)



hashCode
public int hashCode()(Code)



isAbsolute
public boolean isAbsolute()(Code)



isAbsolutePath
public static boolean isAbsolutePath(String path)(Code)
Returns true if the given path begins with a ComponentPath.SEPARATOR .
Parameters:
  path - a String value a boolean value



isDotDotRelative
public boolean isDotDotRelative()(Code)



isEmpty
public boolean isEmpty()(Code)
Returns true if this path is null or has length zero. a boolean value



isRelative
public boolean isRelative()(Code)



isRoot
public boolean isRoot()(Code)



isSubPathOf
public static boolean isSubPathOf(String subPath, String path)(Code)
Returns true if subPath is a sub-path of path by means of path-elements. For example '/my/path2/sub' is a sub-path of '/my/path2' but '/my/path' is not. Note that two equal paths are not sub-paths of one another and that both path to check must be absolute!
Parameters:
  subPath - a non-empty String, the absolute path to checkwhether it is a sub-path.
Parameters:
  path - a non-empty String, the absolute path to checksubPath against a boolean value



isSubPathOf
public boolean isSubPathOf(ComponentPath path)(Code)
Returns true if this path is a sub-path of path by means of path-elements. For example '/my/path2/sub' is a sub-path of '/my/path2' but '/my/path' is not. Note that two equal paths are not sub-paths of one another and that both path to check must be absolute!
Parameters:
  path - the path to check this path against. a boolean value



parentPath
public ComponentPath parentPath()(Code)



parsePath
public static String[] parsePath(String path) throws ComponentPathException(Code)
Returns a String[] containing the elements of the given path which are determined by means of a ComponentPath.SEPARATOR separator . The path doesn't need to start or end with a separator, so with the default separator '/' either of "/sub/text", "sub/text", "/sub/text/" or "sub/text/" will result in two path elements 'sub' and 'text'.
Note that multiple separator sequences like "///" will be merged into a single separator.
Parameters:
  path - a non-empty String value containg the path toparse. a String[] value containing the path elements oran empty String[] if the path was empty.



prepend
public ComponentPath prepend(ComponentPath toPrepend)(Code)



toAbsolutePath
public ComponentPath toAbsolutePath(ComponentPath rootPath)(Code)



toPath
public String toPath()(Code)



toRelativePath
public ComponentPath toRelativePath(ComponentPath rootPath) throws ComponentPathException(Code)



toString
public String toString()(Code)



validatePath
public static String validatePath(String path)(Code)
FIXME: this method currently doesn't do anything! Validates the given path (and should throw exception if path is invalid). Validating a path means the following:
  1. check whether the length of the path exceeds maximum
  2. check whether path contains any forbidden characters
  3. removeType leading or trailing whitespaces from path
  4. merge multiple occurances of separators into one
  5. MAYBE: call normalize on path that is removeType sequences of a path-element followed by '..'



valueOf
public static PropertyType valueOf(String s) throws PropertyException(Code)
Returns a new ComponentPath object initialized to the value of the specified String.
Parameters:
  s - a String value a PropertyType value



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.