public class MetacatUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static AbstractDatabase |
dbAdapter |
static java.lang.String |
XMLFORMAT |
Constructor and Description |
---|
MetacatUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.lang.String sourceName,
java.lang.String destName)
Copy a file between two locations specified as strings.
|
static java.lang.String |
getLocalReplicationServerName()
Method to get the name of local replication server
|
static java.util.Vector<java.lang.String> |
getOptionList(java.lang.String optiontext) |
static java.lang.String |
normalize(java.lang.String s)
Normalizes a string read from DB.
|
static java.util.Hashtable<java.lang.String,java.lang.String> |
parseQuery(java.lang.String query)
Utility method to parse the query part of a URL into parameters.
|
static java.lang.String |
replaceWhiteSpaceForURL(java.lang.String urlHasWhiteSpace)
A method to replace whitespace in url
|
static void |
writeDebugToDelimiteredFile(java.lang.String debugInfo,
boolean newLine)
Writes debug information into a file in delimitered format
|
static void |
writeDebugToFile(java.lang.String debugInfo)
Writes debug information into a file.
|
static java.io.File |
writeTempUploadFile(org.apache.commons.fileupload.FileItem fi,
java.lang.String fileName)
Write the uploaded file to disk for temporary storage before moving it to
its final Metacat location.
|
public static final java.lang.String XMLFORMAT
public static AbstractDatabase dbAdapter
public static java.util.Hashtable<java.lang.String,java.lang.String> parseQuery(java.lang.String query) throws java.net.MalformedURLException
java.net.MalformedURLException
public static java.util.Vector<java.lang.String> getOptionList(java.lang.String optiontext)
public static java.lang.String normalize(java.lang.String s)
public static java.lang.String getLocalReplicationServerName()
public static java.lang.String replaceWhiteSpaceForURL(java.lang.String urlHasWhiteSpace)
public static void writeDebugToFile(java.lang.String debugInfo)
public static void writeDebugToDelimiteredFile(java.lang.String debugInfo, boolean newLine)
debugInfo
- the debug informationnewLine
- append the debug info to a line or notpublic static java.io.File writeTempUploadFile(org.apache.commons.fileupload.FileItem fi, java.lang.String fileName) throws java.lang.Exception
filePart
- the FilePart object containing the file form elementfileName
- the name of the file to be written to diskjava.lang.Exception
public static void copyFile(java.lang.String sourceName, java.lang.String destName) throws java.io.IOException
sourceName
- the source file to read from diskdestName
- the destination file on diskjava.io.IOException
Copyright © 2020 Regents of the University of California. All Rights Reserved.