org.mevenide.repository
Class RepoPathElement

java.lang.Object
  extended byorg.mevenide.repository.RepoPathElement

public final class RepoPathElement
extends java.lang.Object

Data placeholder for local and remote repository information. Can contain incomplete values, the means of getting more complete data is calling getChildren()

Author:
Milos Kleint (mkleint@codehaus.org)

Field Summary
static int LEVEL_ARTIFACT
          constant returned from getLevel() denotes an instance that has at least the groupId, type and artifactId filled out.
static int LEVEL_GROUP
          constant returned from getLevel(), denotes an instance that has at least the groupId filled out.
static int LEVEL_ROOT
          constant returned from getLevel(), denotes an instance that has nothing filled out.
static int LEVEL_TYPE
          constant returned from getLevel() denotes an instance that has at least the groupId and type filled out.
static int LEVEL_VERSION
          constant returned from getLevel() denotes an instance that has all fields filled out.
 
Constructor Summary
RepoPathElement(IRepositoryReader read)
          Creates a new instance of RepoPathElement
RepoPathElement(IRepositoryReader read, java.lang.String groupId, java.lang.String type, java.lang.String version, java.lang.String artifactId, java.lang.String ext)
           
 
Method Summary
 java.lang.String getArtifactId()
           
 RepoPathElement[] getChildren()
          Get an array of RepoPathElements that share the fields of the current one and have additional differentiating information.
 java.lang.String getExtension()
           
 java.lang.String getGroupId()
           
 int getLevel()
           
 IRepositoryReader getReader()
           
 java.lang.String getRelativeURIPath()
          get path to relative to the root of repository.
 java.lang.String getType()
           
 java.net.URI getURI()
          get uri to the path element.
 java.lang.String getVersion()
           
 boolean isLeaf()
          returns true if all it's fields are filled out, identifying the artifact in an exact manner.
 boolean isRemote()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEVEL_ROOT

public static final int LEVEL_ROOT
constant returned from getLevel(), denotes an instance that has nothing filled out.

See Also:
Constant Field Values

LEVEL_GROUP

public static final int LEVEL_GROUP
constant returned from getLevel(), denotes an instance that has at least the groupId filled out.

See Also:
Constant Field Values

LEVEL_TYPE

public static final int LEVEL_TYPE
constant returned from getLevel() denotes an instance that has at least the groupId and type filled out.

See Also:
Constant Field Values

LEVEL_ARTIFACT

public static final int LEVEL_ARTIFACT
constant returned from getLevel() denotes an instance that has at least the groupId, type and artifactId filled out.

See Also:
Constant Field Values

LEVEL_VERSION

public static final int LEVEL_VERSION
constant returned from getLevel() denotes an instance that has all fields filled out.

See Also:
Constant Field Values
Constructor Detail

RepoPathElement

public RepoPathElement(IRepositoryReader read)
Creates a new instance of RepoPathElement


RepoPathElement

public RepoPathElement(IRepositoryReader read,
                       java.lang.String groupId,
                       java.lang.String type,
                       java.lang.String version,
                       java.lang.String artifactId,
                       java.lang.String ext)
Method Detail

getGroupId

public java.lang.String getGroupId()

getArtifactId

public java.lang.String getArtifactId()

getVersion

public java.lang.String getVersion()

getType

public java.lang.String getType()

getExtension

public java.lang.String getExtension()

isLeaf

public boolean isLeaf()
returns true if all it's fields are filled out, identifying the artifact in an exact manner.


getLevel

public int getLevel()

getRelativeURIPath

public java.lang.String getRelativeURIPath()
get path to relative to the root of repository. really makes sense just for leaf elements.


getURI

public java.net.URI getURI()
get uri to the path element. makes most sense for leaf elements.


getChildren

public RepoPathElement[] getChildren()
                              throws java.lang.Exception
Get an array of RepoPathElements that share the fields of the current one and have additional differentiating information. Eg. for an instance with specified groupId will return an array with same groupId and the all existing types.

Throws:
java.lang.Exception

isRemote

public boolean isRemote()

getReader

public IRepositoryReader getReader()


Copyright © 2003-2005 The Codehaus. All Rights Reserved.