Package jadex.bridge

Class ResourceIdentifier

  • All Implemented Interfaces:
    IResourceIdentifier

    public class ResourceIdentifier
    extends java.lang.Object
    implements IResourceIdentifier
    Default implementation for resource identification. Contains only a local identifier and a global identifier that can be used to find the resource.
    • Field Detail

      • IGNORED

        protected static final java.util.Set<java.lang.String> IGNORED
        The ignored directories for determining resource project name.
      • JADEX_PROJECTS

        protected static final java.util.Set<java.lang.String> JADEX_PROJECTS
        The jadex project names.
    • Constructor Detail

      • ResourceIdentifier

        public ResourceIdentifier()
        Create a resource identifier.
    • Method Detail

      • setLocalIdentifier

        public void setLocalIdentifier​(ILocalResourceIdentifier lid)
        Set the local identifier.
        Parameters:
        lid - The lid to set.
      • setGlobalIdentifier

        public void setGlobalIdentifier​(IGlobalResourceIdentifier gid)
        Set the global identifier.
        Parameters:
        gid - The gid to set.
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Test if equals. They are equal when a) global ids are equal b) or global ids are null and local ids are equal.
        Overrides:
        equals in class java.lang.Object
      • isHashGid

        public static boolean isHashGid​(IResourceIdentifier rid)
        Test if the global id is non-null and a hash id.
      • isLocal

        public static boolean isLocal​(IResourceIdentifier rid,
                                      IComponentIdentifier root)
        Test if a rid is local to this platform. Test is performed by MAC address. Root cid is only used as fallback.
      • isJadexRid

        public static boolean isJadexRid​(IResourceIdentifier rid)
        Test if a rid refers to one of the jadex platform modules, i.e. is not application-specific.
      • toString

        public java.lang.String toString()
        Get a string representation of this object.
        Overrides:
        toString in class java.lang.Object