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.String
id
The id.protected java.net.URI
uri
The URI.protected java.lang.String
versioninfo
The 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 boolean
equals(java.lang.Object obj)
Test if equals.java.net.URI
getRepositoryInfo()
todo: make struct to also allow containing Get the url.java.lang.String
getResourceId()
Get the resource id.java.lang.String
getVersionInfo()
Get the version info.int
hashCode()
Get the hashcode.void
setRepositoryInfo(java.net.URI uri)
Set the repository info.void
setResourceId(java.lang.String id)
Set the id.void
setVersionInfo(java.lang.String versioninfo)
Set the version info.java.lang.String
toString()
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:
getResourceId
in interfaceIGlobalResourceIdentifier
- Returns:
- The id.
-
getRepositoryInfo
public java.net.URI getRepositoryInfo()
todo: make struct to also allow containing Get the url.- Specified by:
getRepositoryInfo
in 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:
getVersionInfo
in 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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test if equals.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
Get a string representation of this object.- Overrides:
toString
in classjava.lang.Object
-
-