|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freecompany.brimstone.core.BrimstoneResolverService
public class BrimstoneResolverService
The Brimstone resolver.
Resolves URIs (URNs) of the form urn:brimstone:<group>/<name>.<type> against a list of Maven-style repositories.
This service only implements the I2Ls operation. The Brimstone-style URI is re-written to a relative URI form, <group>/<type>s/<name>.<type>, and resolved against each of the URIs in the RepositoryList. All of the resulting URIs are returned. Note that not all repositories will have all artifacts, so not all of the URIs will be able to retrieve the identified resource.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.freecompany.brimstone.core.ResolverService |
---|
ResolverService.I2C, ResolverService.I2Cs, ResolverService.I2L, ResolverService.I2Ls, ResolverService.I2N, ResolverService.I2Ns, ResolverService.I2R, ResolverService.I2Rs, ResolverService.IeqI |
Constructor Summary | |
---|---|
BrimstoneResolverService()
Creates a resolver with the default RepositoryList. |
|
BrimstoneResolverService(RepositoryList searchBase)
Creates a resolver with the specified RepositoryList. |
Method Summary | |
---|---|
void |
addSearchBase(java.net.URI uri)
Add a repository to the RepositoryList for this resolver. |
java.util.List<java.net.URI> |
getURLs(java.net.URI uri)
Translate the given URI to a list of locators for the resource. |
boolean |
local()
Returns a boolean indicating whether this resolver only
generates possible matches locally. |
boolean |
resolvable(java.net.URI uri)
Returns true iff the uri's scheme is "urn", the scheme-specific part starts with "brimstone:", and URI matches the rewrite pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BrimstoneResolverService()
public BrimstoneResolverService(RepositoryList searchBase)
searchBase
- the RepositoryList to search for artifacts.Method Detail |
---|
public void addSearchBase(java.net.URI uri)
public boolean local()
ResolverService
boolean
indicating whether this resolver only
generates possible matches locally. Local resolvers will always be
exhausted before remote resolvers are attempted.
local
in interface ResolverService
true
if this resolver only looks locally,
false
if it uses remote resources.public boolean resolvable(java.net.URI uri)
resolvable
in interface ResolverService
public java.util.List<java.net.URI> getURLs(java.net.URI uri)
ResolverService.I2Ls
Note that not all of the returned locators need work. If a resolver knows a list of locations
that, if they exist would have the resource, it may return the corresponding locators. This
differs from ResolverService.I2L
, which shouldn't return a locator that "might" refer to the resource.
getURLs
in interface ResolverService.I2Ls
uri
- the URI to resolve.
null
if no locators are known.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |