All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.fedora.client.FedoraStubWrapper.template Maven / Gradle / Ivy

Go to download

The Fedora Client is a Java Library that allows API access to a Fedora Repository. The client is typically one part of a full Fedora installation.

The newest version!
import java.awt.Dimension;
import java.rmi.RemoteException;
import java.util.ArrayList;
##SPLITTER##
// Run the method in a SwingWorker thread
SwingWorker worker=new SwingWorker(PARMS) {
    public Object construct() {
        try {
##SPLITTER##
        } catch (RemoteException e) {
            thrownException=e;
        }
        return "";
    }
};
worker.start();
// The following code will run in the (safe) 
// Swing event dispatcher thread.
int ms=0;
Dimension d=Administrator.PROGRESS.getSize();
// Devise verbage based on method name
ArrayList words=new ArrayList();
StringBuffer word=new StringBuffer();
boolean lastWasCaps=true;
for (int i=0; i='A' && c<='Z') {
       // char is caps
       if (!lastWasCaps) {
           // new word
           words.add(word.toString());
           word=new StringBuffer();
       }
       word.append(c);
       lastWasCaps=true;
    } else {
       // char is lowercase
       word.append(c);
       lastWasCaps=false;
    }
}
words.add(word.toString());
StringBuffer buf=new StringBuffer();
for (int i=0; i=2000) ms=200;
    } catch (InterruptedException ie) { }
}
Administrator.PROGRESS.setValue(2000);
Administrator.PROGRESS.paintImmediately(0, 0, (int) d.getWidth()-1, (int) d.getHeight()-1);
try {
    Thread.sleep(100);
} catch (InterruptedException ie) { }
Administrator.PROGRESS.setValue(0);
Administrator.PROGRESS.setString("");

// The worker is finished.  
// Throw exception if caught.
if (worker.thrownException!=null) {
    throw (RemoteException) worker.thrownException;
}

// Otherwise, get the value from the 
// worker (returning it if applicable)
##RETURN##(##RETURN_TYPE##) worker.get();




© 2015 - 2025 Weber Informatics LLC | Privacy Policy