Class Entity

    • Constructor Detail

      • Entity

        public Entity​(String id)
      • Entity

        public Entity​(URI uri)
      • Entity

        public Entity​(URI uri,
                      String name)
    • Method Detail

      • getIdPrefix

        protected abstract String getIdPrefix()
        The entity prefix.
        Returns:
        a String containing the prefix.
      • getIdRegex

        protected abstract String getIdRegex()
        A regular expression an input String should adhere to when deriving the Entity from it.
        Returns:
      • getRegexIdGroup

        protected abstract int getRegexIdGroup()
        The group within the regular expression the actual id is stored in.
        Returns:
      • getUriPrefix

        protected abstract String getUriPrefix()
        The String describing the URI prefix it should match with.
        Returns:
      • getId

        public String getId()
        Returns:
        the Entity ID without prefix.
      • getFormattedId

        public String getFormattedId()
        Returns:
        the Entity ID with prefix.
      • getName

        public String getName()
      • setName

        protected void setName​(String name)
      • toString

        public String toString()
        While uniqueness is based on the id (as each id should only occur once and data belonging to it should be consistent), toString() can be used for testing whether data retrieval from external sources yielded the expected results.
        Overrides:
        toString in class Object
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object