org.gcube.tools.searchtester.plugin.util
Class Util

java.lang.Object
  extended by org.gcube.tools.searchtester.plugin.util.Util

public class Util
extends java.lang.Object

Author:
Andrea Manzi(CERN)

Constructor Summary
Util()
           
 
Method Summary
static java.lang.String checkResults(java.lang.String xml)
           
static java.net.URL createURL(java.lang.String baseAddress, java.lang.String servletName)
           
static java.lang.String getElementFromMetadata(java.lang.String metadataRecord, java.lang.String tag)
           
static java.lang.String getRandomField(java.util.ArrayList<java.lang.String> fields)
           
static java.lang.String getRandomTermFromRandomCollection(java.util.ArrayList<CollectionInfo> collections)
           
static java.lang.String getRandomToken(java.lang.String collectionName)
          s
static java.lang.String getRandomTokenFromSchemas(CollectionInfo col)
           
static CollectionInfo parseColletionInfoXML(CollectionInfo collectionInfo, java.lang.String string, CollectionInfo.Schema... schema)
           
static java.util.ArrayList<CollectionInfo> parseColletionXML(java.lang.String xml)
           
static java.util.ArrayList<java.lang.String> parseVREXML(java.lang.String xml)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

createURL

public static java.net.URL createURL(java.lang.String baseAddress,
                                     java.lang.String servletName)
                              throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

parseVREXML

public static java.util.ArrayList<java.lang.String> parseVREXML(java.lang.String xml)
                                                         throws java.lang.Exception
Throws:
java.lang.Exception

parseColletionXML

public static java.util.ArrayList<CollectionInfo> parseColletionXML(java.lang.String xml)
Parameters:
xml -
Returns:

checkResults

public static java.lang.String checkResults(java.lang.String xml)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getRandomField

public static java.lang.String getRandomField(java.util.ArrayList<java.lang.String> fields)

getRandomToken

public static java.lang.String getRandomToken(java.lang.String collectionName)
s

Parameters:
collectionName -
Returns:

getRandomTokenFromSchemas

public static java.lang.String getRandomTokenFromSchemas(CollectionInfo col)
Parameters:
col -
Returns:

getRandomTermFromRandomCollection

public static java.lang.String getRandomTermFromRandomCollection(java.util.ArrayList<CollectionInfo> collections)
Parameters:
collections -
Returns:

getElementFromMetadata

public static java.lang.String getElementFromMetadata(java.lang.String metadataRecord,
                                                      java.lang.String tag)

parseColletionInfoXML

public static CollectionInfo parseColletionInfoXML(CollectionInfo collectionInfo,
                                                   java.lang.String string,
                                                   CollectionInfo.Schema... schema)
Parameters:
collectionInfo -
string -
Returns:
Throws:
java.lang.Exception