Examples of Helper


Examples of de.sub.goobi.helper.Helper

  public static XMLConfiguration getPluginConfig(IPlugin inPlugin) {
    String file = "plugin_" + inPlugin.getClass().getSimpleName() + ".xml";
    XMLConfiguration config;
    try {
      config = new XMLConfiguration(new Helper().getGoobiConfigDirectory() + file);
    } catch (ConfigurationException e) {
      logger.error(e);
      config = new XMLConfiguration();
    }
    config.setListDelimiter('&');
View Full Code Here

Examples of de.sub.goobi.helper.Helper

  XMLConfiguration config;
  private String projektTitel;
  private static final Logger logger = Logger.getLogger(ConfigProjects.class);

  public ConfigProjects(String projectTitle) throws IOException {
    this(projectTitle, new Helper().getGoobiConfigDirectory() + "goobi_projects.xml");
  }
View Full Code Here

Examples of de.sub.goobi.helper.Helper

    * Aufruf als Thread
    * ================================================================*/
   @Override
public void run() {
      setStatusProgress(5);
      Helper help = new Helper();
      String swapPath = null;
      ProzessDAO dao = new ProzessDAO();
      String processDirectory = "";

      if (ConfigMain.getBooleanParameter("useSwapping")) {
    swapPath = ConfigMain.getParameter("swapPath", "");
  } else {
         setStatusMessage("swapping not activated");
         setStatusProgress(-1);
         return;
      }
      if (swapPath == null || swapPath.length() == 0) {
         setStatusMessage("no swappingPath defined");
         setStatusProgress(-1);
         return;
      }
      File swapFile = new File(swapPath);
      if (!swapFile.exists()) {
         setStatusMessage("Swap folder does not exist or is not mounted");
         setStatusProgress(-1);
         return;
      }
      try {
         processDirectory = getProzess().getProcessDataDirectoryIgnoreSwapping();
         //TODO: Don't catch Exception (the super class)
      } catch (Exception e) {
        logger.warn("Exception:", e);
         setStatusMessage("Error while getting process data folder: " + e.getClass().getName() + " - "
               + e.getMessage());
         setStatusProgress(-1);
         return;
      }

      File fileIn = new File(processDirectory);
      File fileOut = new File(swapPath + getProzess().getId() + File.separator);
      if (fileOut.exists()) {
         setStatusMessage(getProzess().getTitel() + ": swappingOutTarget already exists");
         setStatusProgress(-1);
         return;
      }
      fileOut.mkdir();

      /* ---------------------
       * Xml-Datei vorbereiten
      * -------------------*/
      Document doc = new Document();
      Element root = new Element("goobiArchive");
      doc.setRootElement(root);
      Element source = new Element("source").setText(fileIn.getAbsolutePath());
      Element target = new Element("target").setText(fileOut.getAbsolutePath());
      Element title = new Element("title").setText(getProzess().getTitel());
      Element mydate = new Element("date").setText(new Date().toString());
      root.addContent(source);
      root.addContent(target);
      root.addContent(title);
      root.addContent(mydate);

      /* ---------------------
       * Verzeichnisse und Dateien kopieren und anschliessend den Ordner leeren
      * -------------------*/
      setStatusProgress(50);
      try {
        setStatusMessage("copying process folder");
        Helper.copyDirectoryWithCrc32Check(fileIn, fileOut, help.getGoobiDataDirectory().length(), root);
      } catch (IOException e) {
        logger.warn("IOException:", e);
         setStatusMessage("IOException in copyDirectory: " + e.getMessage());
         setStatusProgress(-1);
         return;
View Full Code Here

Examples of de.sub.goobi.helper.Helper

  /**
   * Allgemeiner Konstruktor ()
   */
  public ImportZentralblatt() {
    this.help = new Helper();
  }
View Full Code Here

Examples of de.sub.goobi.helper.Helper

 
  @SuppressWarnings("unchecked")
  private void initializePossibleDigitalCollections() {
    this.possibleDigitalCollection = new ArrayList<String>();
    ArrayList<String> defaultCollections = new ArrayList<String>();
    String filename = new Helper().getGoobiConfigDirectory() + "goobi_digitalCollections.xml";
    if (!(new File(filename).exists())) {
      Helper.setFehlerMeldung("File not found: ", filename);
      return;
    }
    this.digitalCollections = new ArrayList<String>();
View Full Code Here

Examples of de.sub.goobi.helper.Helper

   */
  public String FilterAlleStart() {
    try {
      this.myFilteredDataSource = new UserDefinedStepFilter(true);

      this.myFilteredDataSource.getObservable().addObserver(new Helper().createObserver());
      ((UserDefinedStepFilter) this.myFilteredDataSource).setFilterModes(this.nurOffeneSchritte, this.nurEigeneSchritte);
      this.myFilteredDataSource.setFilter(this.filter);

      Criteria crit = this.myFilteredDataSource.getCriteria();
      if (!this.showAutomaticTasks) {
View Full Code Here

Examples of de.sub.goobi.helper.Helper

      if (tempProz != null && tempProz.getId() != null)
        Helper.getHibernateSession().refresh(tempProz);

      return tempProz;
    } catch (NumberFormatException e) {
      new Helper();
      throw new GoobiException(5, "******** wrapped NumberFormatException ********: " + e.getMessage() + "\n" + Helper.getStacktraceAsString(e));
    } catch (DAOException e) {
      new Helper();
      throw new GoobiException(1400, "******** wrapped DAOException ********: " + e.getMessage() + "\n" + Helper.getStacktraceAsString(e));
    }
  }
View Full Code Here

Examples of de.sub.goobi.helper.Helper

      // UserDefinedFilter
   
      this.myFilteredDataSource = new UserDefinedFilter(this.filter);
   
      // set observable to replace helper.setMessage
      this.myFilteredDataSource.getObservable().addObserver(new Helper().createObserver());

      // // calling the criteria as the result of the filter
      Criteria crit = this.myFilteredDataSource.getCriteria();
     
      // first manipulation of the created criteria
View Full Code Here

Examples of de.sub.goobi.helper.Helper

public class ConfigOpac {
   private XMLConfiguration config;
   private static String configPfad;

   public ConfigOpac() throws IOException {
     configPfad = new Helper().getGoobiConfigDirectory() + "goobi_opac.xml";

      if (!(new File(configPfad)).exists()) {
    throw new IOException("File not found: " + configPfad);
  }
      try {
View Full Code Here

Examples of fr.tm.elibel.smartqvt.qvt.qvtoperational.Helper

      signature.append(",");
      signature.append(type.toString());
    }
    signature.append(")");
    signature.append(currentPackage.toString());
    Helper result = (Helper) getHelperHM.get(signature.toString());
    if (result == null) {
      result = super.getHelper(self, scopedIdentifier, t, cVariables,
          currentPackage, availablePackages, mainTrace);
      getHelperHM.put(signature.toString(), result);
      getHelperNoteHM.put(signature.toString(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.