org.mycore.frontend.fileupload
Class MCRMetsModsCommunicator
java.lang.Object
org.mycore.frontend.fileupload.MCRMetsModsCommunicator
public class MCRMetsModsCommunicator
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
url
protected String url
uid
protected String uid
bufferSize
protected static final int bufferSize
- See Also:
- Constant Field Values
MCRMetsModsCommunicator
public MCRMetsModsCommunicator(String url,
String uploadId)
uploadMets
public void uploadMets(String mets_string)
countTotalBytes
protected long countTotalBytes(Vector files)
uploadFile
public void uploadFile(String path,
String mets)
throws Exception
- Throws:
Exception
listFiles
protected Vector[] listFiles(File[] selectedFiles)
throws Exception
- Creates a list of all files in the given directories
- Parameters:
selectedFiles - list of selected files or directories from filechooser
- Throws:
Exception
startUploadSession
protected void startUploadSession(int numFiles)
throws IOException,
MCRUploadException
- Throws:
IOException
MCRUploadException
endUploadSession
protected void endUploadSession()
throws IOException,
MCRUploadException
- Throws:
IOException
MCRUploadException
cancelUploadSession
protected void cancelUploadSession()
throws IOException,
MCRUploadException
- Throws:
IOException
MCRUploadException
send
protected Object send(Hashtable parameters)
throws IOException,
MCRUploadException
- Throws:
IOException
MCRUploadException
doPost
protected InputStream doPost(Hashtable parameters)
throws IOException
- Throws:
IOException
encodeParameters
protected String encodeParameters(Hashtable parameters)
getResponse
protected Hashtable getResponse(InputStream is)
throws IOException,
MCRUploadException
- Throws:
IOException
MCRUploadException
buildMD5StringByString
protected String buildMD5StringByString(String mets)
throws Exception
- Calculates the MD5 checksum of the given mets file *
- Throws:
Exception