org.ops4j.pax.url.mvn.internal
Class Parser

java.lang.Object
  extended by org.ops4j.pax.url.mvn.internal.Parser

public class Parser
extends java.lang.Object

Parser for mvn: protocol.

Since:
August 10, 2007
Author:
Alin Dreghiciu
See Also:
Connection

Field Summary
static java.lang.String FILE_SEPARATOR
          Final artifact path separator.
 
Constructor Summary
Parser(java.lang.String path)
          Creates a new protocol parser.
 
Method Summary
 java.lang.String getArtifact()
          Returns the artifact id.
 java.lang.String getArtifactLocalMetdataPath()
          Returns the complete path to artifact local metadata file.
 java.lang.String getArtifactMetdataPath()
          Returns the complete path to artifact metadata file.
 java.lang.String getArtifactPath()
          Returns the complete path to artifact as stated by Maven 2 repository layout.
 java.lang.String getArtifactPath(java.lang.String version)
          Returns the complete path to artifact as stated by Maven 2 repository layout.
 java.lang.String getClassifier()
          Returns the artifact classifier.
 java.lang.String getGroup()
          Returns the group id of the artifact.
 MavenRepositoryURL getRepositoryURL()
          Returns the repository URL if present, null otherwise
 java.lang.String getSnapshotPath(java.lang.String version, java.lang.String timestamp, java.lang.String buildnumber)
          Returns the complete path to artifact for a snapshot file.
 java.lang.String getSnapshotVersion(java.lang.String version, java.lang.String timestamp, java.lang.String buildnumber)
          Returns the version for an artifact for a snapshot version.
 java.lang.String getType()
          Returns the artifact type.
 java.lang.String getVersion()
          Returns the artifact version.
 java.lang.String getVersionLocalMetadataPath(java.lang.String version)
          Returns the path to local metdata file corresponding to this artifact version.
 java.lang.String getVersionMetadataPath(java.lang.String version)
          Returns the path to metdata file corresponding to this artifact version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SEPARATOR

public static final java.lang.String FILE_SEPARATOR
Final artifact path separator.

See Also:
Constant Field Values
Constructor Detail

Parser

public Parser(java.lang.String path)
       throws java.net.MalformedURLException
Creates a new protocol parser.

Parameters:
path - the path part of the url (without starting mvn:)
Throws:
java.net.MalformedURLException - if provided path does not comply to expected syntax or an malformed repository URL
Method Detail

getRepositoryURL

public MavenRepositoryURL getRepositoryURL()
Returns the repository URL if present, null otherwise

Returns:
repository URL

getGroup

public java.lang.String getGroup()
Returns the group id of the artifact.

Returns:
group Id

getArtifact

public java.lang.String getArtifact()
Returns the artifact id.

Returns:
artifact id

getVersion

public java.lang.String getVersion()
Returns the artifact version.

Returns:
version

getType

public java.lang.String getType()
Returns the artifact type.

Returns:
type

getClassifier

public java.lang.String getClassifier()
Returns the artifact classifier.

Returns:
classifier

getArtifactPath

public java.lang.String getArtifactPath()
Returns the complete path to artifact as stated by Maven 2 repository layout.

Returns:
artifact path

getArtifactPath

public java.lang.String getArtifactPath(java.lang.String version)
Returns the complete path to artifact as stated by Maven 2 repository layout.

Parameters:
version - The version of the artifact.
Returns:
artifact path

getSnapshotVersion

public java.lang.String getSnapshotVersion(java.lang.String version,
                                           java.lang.String timestamp,
                                           java.lang.String buildnumber)
Returns the version for an artifact for a snapshot version.

Parameters:
version - The version of the snapshot.
timestamp - The timestamp of the snapshot.
buildnumber - The buildnumber of the snapshot.
Returns:
artifact path

getSnapshotPath

public java.lang.String getSnapshotPath(java.lang.String version,
                                        java.lang.String timestamp,
                                        java.lang.String buildnumber)
Returns the complete path to artifact for a snapshot file.

Parameters:
version - The version of the snapshot.
timestamp - The timestamp of the snapshot.
buildnumber - The buildnumber of the snapshot.
Returns:
artifact path

getVersionMetadataPath

public java.lang.String getVersionMetadataPath(java.lang.String version)
Returns the path to metdata file corresponding to this artifact version.

Parameters:
version - The version of the the metadata.
Returns:
metadata file path

getVersionLocalMetadataPath

public java.lang.String getVersionLocalMetadataPath(java.lang.String version)
Returns the path to local metdata file corresponding to this artifact version.

Parameters:
version - The version of the the metadata.
Returns:
metadata file path

getArtifactLocalMetdataPath

public java.lang.String getArtifactLocalMetdataPath()
Returns the complete path to artifact local metadata file.

Returns:
artifact path

getArtifactMetdataPath

public java.lang.String getArtifactMetdataPath()
Returns the complete path to artifact metadata file.

Returns:
artifact path


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.