Package jadex.bridge
Class ResourceIdentifier
- java.lang.Object
- 
- jadex.bridge.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 SummaryFields Modifier and Type Field Description static booleanENABLE_HASHESprotected IGlobalResourceIdentifiergidThe global identifier.protected static java.util.Set<java.lang.String>IGNOREDThe ignored directories for determining resource project name.protected static java.util.Set<java.lang.String>JADEX_PROJECTSThe jadex project names.protected ILocalResourceIdentifierlidThe local identifier.
 - 
Constructor SummaryConstructors Constructor Description ResourceIdentifier()Create a resource identifier.ResourceIdentifier(ILocalResourceIdentifier lid, IGlobalResourceIdentifier gid)Create a resource identifier.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if equals.IGlobalResourceIdentifiergetGlobalIdentifier()Get the global identifier.ILocalResourceIdentifiergetLocalIdentifier()Get the local identifier.inthashCode()Get the hashcode.static booleanisHashGid(IResourceIdentifier rid)Test if the global id is non-null and a hash id.static booleanisJadexRid(IResourceIdentifier rid)Test if a rid refers to one of the jadex platform modules, i.e.static booleanisLocal(IResourceIdentifier rid, IComponentIdentifier root)Test if a rid is local to this platform.static IResourceIdentifierridFromProperties(Properties rid, IComponentIdentifier root)Create a rid from properties.static PropertiesridToProperties(IResourceIdentifier rid, IComponentIdentifier root)Create properties from rid.voidsetGlobalIdentifier(IGlobalResourceIdentifier gid)Set the global identifier.voidsetLocalIdentifier(ILocalResourceIdentifier lid)Set the local identifier.java.lang.StringtoString()Get a string representation of this object.
 
- 
- 
- 
Field Detail- 
ENABLE_HASHESpublic static final boolean ENABLE_HASHES - See Also:
- Constant Field Values
 
 - 
IGNOREDprotected static final java.util.Set<java.lang.String> IGNORED The ignored directories for determining resource project name.
 - 
JADEX_PROJECTSprotected static final java.util.Set<java.lang.String> JADEX_PROJECTS The jadex project names.
 - 
lidprotected ILocalResourceIdentifier lid The local identifier.
 - 
gidprotected IGlobalResourceIdentifier gid The global identifier.
 
- 
 - 
Constructor Detail- 
ResourceIdentifierpublic ResourceIdentifier() Create a resource identifier.
 - 
ResourceIdentifierpublic ResourceIdentifier(ILocalResourceIdentifier lid, IGlobalResourceIdentifier gid) Create a resource identifier.- Parameters:
- lid- The local identifier.
- gid- The global idenfifier.
 
 
- 
 - 
Method Detail- 
getLocalIdentifierpublic ILocalResourceIdentifier getLocalIdentifier() Get the local identifier. The local identifier consists of the platform component identifier and the URL of the resource.- Specified by:
- getLocalIdentifierin interface- IResourceIdentifier
- Returns:
- The local identifier.
 
 - 
getGlobalIdentifierpublic IGlobalResourceIdentifier getGlobalIdentifier() Get the global identifier.- Specified by:
- getGlobalIdentifierin interface- IResourceIdentifier
- Returns:
- The global identifier.
 
 - 
setLocalIdentifierpublic void setLocalIdentifier(ILocalResourceIdentifier lid) Set the local identifier.- Parameters:
- lid- The lid to set.
 
 - 
setGlobalIdentifierpublic void setGlobalIdentifier(IGlobalResourceIdentifier gid) Set the global identifier.- Parameters:
- gid- The gid to set.
 
 - 
hashCodepublic int hashCode() Get the hashcode.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic 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:
- equalsin class- java.lang.Object
 
 - 
isHashGidpublic static boolean isHashGid(IResourceIdentifier rid) Test if the global id is non-null and a hash id.
 - 
ridToPropertiespublic static Properties ridToProperties(IResourceIdentifier rid, IComponentIdentifier root) Create properties from rid.- Parameters:
- The- resource identifier.
- Returns:
- rid The resource identifier properties.
 
 - 
ridFromPropertiespublic static IResourceIdentifier ridFromProperties(Properties rid, IComponentIdentifier root) Create a rid from properties.- Parameters:
- rid- The resource identifier properties.
- Returns:
- The resource identifier.
 
 - 
isLocalpublic 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.
 - 
isJadexRidpublic static boolean isJadexRid(IResourceIdentifier rid) Test if a rid refers to one of the jadex platform modules, i.e. is not application-specific.
 - 
toStringpublic java.lang.String toString() Get a string representation of this object.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-