org.gcube.vremanagement.softwaregateway.impl.repositorymanager.maven
Class MavenResultTreeParser

java.lang.Object
  extended by org.gcube.vremanagement.softwaregateway.impl.repositorymanager.maven.MavenResultTreeParser

public class MavenResultTreeParser
extends Object

Author:
Luca Frosini (ISTI-CNR)

Field Summary
static String CONTINUE
          Continue Token
static String INDENT
          Second level indent
static String LAST_OF_THIS_LEVEL
          Last in the level token
static String MORE_ON_THIS_LEVEL
          More on this level token
static String MORE_ON_THIS_LEVEL_REGEX
          More on this level toker (regular expression)
 
Constructor Summary
MavenResultTreeParser(File treeFile)
          Constructor
 
Method Summary
static ArtifactCoordinates getArtifactInfo(String artifactCoordinates)
           
 String getScopedDependecy(String scope)
          Build the tree parsing file
 String listDependency()
           
 String[] listDependencyArray()
           
 String printTree()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MORE_ON_THIS_LEVEL

public static final String MORE_ON_THIS_LEVEL
More on this level token

See Also:
Constant Field Values

MORE_ON_THIS_LEVEL_REGEX

public static final String MORE_ON_THIS_LEVEL_REGEX
More on this level toker (regular expression)

See Also:
Constant Field Values

LAST_OF_THIS_LEVEL

public static final String LAST_OF_THIS_LEVEL
Last in the level token

See Also:
Constant Field Values

CONTINUE

public static final String CONTINUE
Continue Token

See Also:
Constant Field Values

INDENT

public static final String INDENT
Second level indent

See Also:
Constant Field Values
Constructor Detail

MavenResultTreeParser

public MavenResultTreeParser(File treeFile)
                      throws Exception
Constructor

Parameters:
treeFile - file to parse
Throws:
Exception - if the file does not exist
Method Detail

getScopedDependecy

public String getScopedDependecy(String scope)
                          throws Exception
Build the tree parsing file

Parameters:
scope - scope to filter
Returns:
xml representation of tree filtered by scope
Throws:
Exception - if parsing tree fails

getArtifactInfo

public static ArtifactCoordinates getArtifactInfo(String artifactCoordinates)
                                           throws Exception
Parameters:
artifactCoordinates - string representing artifact ex. Portal.ThumbnailService.1.00.00:Thumbnailer-service:tar.gz:GHN:1.00.00:runtime
Returns:
ArtifactCoordinates class
Throws:
Exception - if Artifact coordinates differs from template

printTree

public String printTree()
Returns:
String representation of the tree

listDependencyArray

public String[] listDependencyArray()
                             throws Exception
Returns:
List of dependency. Each element is a piece of XML
Throws:
Exception - if fails

listDependency

public String listDependency()
                      throws Exception
Returns:
List of dependency as single XML string
Throws:
Exception - if fails


Copyright © 2013. All Rights Reserved.