Package jadex.bridge
Class GlobalResourceIdentifier
- java.lang.Object
-
- jadex.bridge.GlobalResourceIdentifier
-
- All Implemented Interfaces:
IGlobalResourceIdentifier
public class GlobalResourceIdentifier extends java.lang.Object implements IGlobalResourceIdentifier
Default implementation for global resource identification.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringidThe id.protected java.net.URIuriThe URI.protected java.lang.StringversioninfoThe version info.
-
Constructor Summary
Constructors Constructor Description GlobalResourceIdentifier()Create a resource identifier.GlobalResourceIdentifier(java.lang.String id, java.net.URI url, java.lang.String versioninfo)Create a resource identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if equals.java.net.URIgetRepositoryInfo()todo: make struct to also allow containing Get the url.java.lang.StringgetResourceId()Get the resource id.java.lang.StringgetVersionInfo()Get the version info.inthashCode()Get the hashcode.voidsetRepositoryInfo(java.net.URI uri)Set the repository info.voidsetResourceId(java.lang.String id)Set the id.voidsetVersionInfo(java.lang.String versioninfo)Set the version info.java.lang.StringtoString()Get a string representation of this object.
-
-
-
Constructor Detail
-
GlobalResourceIdentifier
public GlobalResourceIdentifier()
Create a resource identifier.
-
GlobalResourceIdentifier
public GlobalResourceIdentifier(java.lang.String id, java.net.URI url, java.lang.String versioninfo)Create a resource identifier.- Parameters:
cid- The platform identifier.url- The local URL.
-
-
Method Detail
-
getResourceId
public java.lang.String getResourceId()
Get the resource id. E.g. in case of maven the global coordinates in the form groupid:artifactid:version- Specified by:
getResourceIdin interfaceIGlobalResourceIdentifier- Returns:
- The id.
-
getRepositoryInfo
public java.net.URI getRepositoryInfo()
todo: make struct to also allow containing Get the url.- Specified by:
getRepositoryInfoin interfaceIGlobalResourceIdentifier- Returns:
- The resource url.
-
setResourceId
public void setResourceId(java.lang.String id)
Set the id.- Parameters:
id- The id.
-
setRepositoryInfo
public void setRepositoryInfo(java.net.URI uri)
Set the repository info.- Parameters:
info- The info.
-
getVersionInfo
public java.lang.String getVersionInfo()
Get the version info. Important in case of snapshot versions, here the concrete timestamp of the version is included.- Specified by:
getVersionInfoin interfaceIGlobalResourceIdentifier- Returns:
- The version info.
-
setVersionInfo
public void setVersionInfo(java.lang.String versioninfo)
Set the version info.
-
hashCode
public int hashCode()
Get the hashcode.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test if equals.- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Get a string representation of this object.- Overrides:
toStringin classjava.lang.Object
-
-