Class DataTypePath


  • public class DataTypePath
    extends java.lang.Object
    Object to hold a category path and a datatype name. They are held separately so that the datatype name can contain a categoryPath delimiter ("/") character.
    • Constructor Summary

      Constructors 
      Constructor Description
      DataTypePath​(CategoryPath categoryPath, java.lang.String dataTypeName)
      Create DatatypePath
      DataTypePath​(java.lang.String categoryPath, java.lang.String dataTypeName)
      Create DatatypePath
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      CategoryPath getCategoryPath()
      Returns the categoryPath for the datatype represented by this datatype path.
      java.lang.String getDataTypeName()
      Returns the name of the datatype.
      java.lang.String getPath()
      Returns the full path of this datatype.
      int hashCode()  
      boolean isAncestor​(CategoryPath otherCategoryPath)
      Determine if the specified otherCategoryPath is an ancestor of this data type path (i.e., does this data types category or any of its parent hierarchy correspond to the specified categoryPath).
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DataTypePath

        public DataTypePath​(java.lang.String categoryPath,
                            java.lang.String dataTypeName)
        Create DatatypePath
        Parameters:
        categoryPath - the category path for the datatype
        dataTypeName - the name of the datatype.
        Throws:
        java.lang.IllegalArgumentException - if an invalid category path or dataTypeName is given.
      • DataTypePath

        public DataTypePath​(CategoryPath categoryPath,
                            java.lang.String dataTypeName)
        Create DatatypePath
        Parameters:
        categoryPath - the category path for the datatype
        dataTypeName - the name of the datatype.
        Throws:
        java.lang.IllegalArgumentException - if a null category path or dataTypeName is given.
    • Method Detail

      • getCategoryPath

        public CategoryPath getCategoryPath()
        Returns the categoryPath for the datatype represented by this datatype path. (ie. the CategoryPath that contains the DataType that this DataTypePath points to).
        Returns:
        the parent CategoryPath of the DataType that this DataTypePath points to.
      • isAncestor

        public boolean isAncestor​(CategoryPath otherCategoryPath)
        Determine if the specified otherCategoryPath is an ancestor of this data type path (i.e., does this data types category or any of its parent hierarchy correspond to the specified categoryPath).
        Parameters:
        otherCategoryPath - category path
        Returns:
        true if otherCategoryPath is an ancestor of this data type path, else false
      • getDataTypeName

        public java.lang.String getDataTypeName()
        Returns the name of the datatype.
        Returns:
        the name
      • getPath

        public java.lang.String getPath()
        Returns the full path of this datatype. NOTE: if the datatype name contains any "/" characters, then the resulting path string may be ambiguous as to where the category path ends and the datatype name begins.
        Returns:
        the full path
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object