Class ProjectHelper


  • public class ProjectHelper
    extends java.lang.Object
    Computes several strings like a namespace URL based on a project name.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProjectHelper​(java.lang.String projectFullName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getNSPrefix()
      Returns the namespace prefix.
      java.lang.String getNSURL()
      Returns the namespace URL.
      java.lang.String getProjectFullName()  
      java.lang.String getProjectName()
      Returns the simple project name.
      void setProjectFullName​(java.lang.String projectFullName)
      Sets the projects full name which is used for the computations.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProjectHelper

        public ProjectHelper​(java.lang.String projectFullName)
        Parameters:
        projectFullName - The projects full name which should be used for the computations.
    • Method Detail

      • getProjectName

        public java.lang.String getProjectName()
        Returns the simple project name. Example: Will return "project" if the full project name is "org.eclipse.project".
        Returns:
        The simple project name based on the full project name
      • getNSPrefix

        public java.lang.String getNSPrefix()
        Returns the namespace prefix. If the project name contains only one segment this segment will be returned.

        Example: Will return "org.eclipse" if the full project name is "org.eclipse.project".
        Returns:
        The namespace prefix based on the full project name
      • getNSURL

        public java.lang.String getNSURL()
        Returns the namespace URL. Example: Will return "http://eclipse.org/project" if the full project name is "org.eclipse.project".
        Returns:
        The namespace URL based on the full project name
      • getProjectFullName

        public java.lang.String getProjectFullName()
        Returns:
        The full project name which is used for the computations.
      • setProjectFullName

        public void setProjectFullName​(java.lang.String projectFullName)
        Sets the projects full name which is used for the computations.
        Parameters:
        projectFullName - The full name of the project