当前位置: 首页>>代码示例>>Java>>正文


Java ProcessEntry类代码示例

本文整理汇总了Java中com.rapidminer.repository.ProcessEntry的典型用法代码示例。如果您正苦于以下问题:Java ProcessEntry类的具体用法?Java ProcessEntry怎么用?Java ProcessEntry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProcessEntry类属于com.rapidminer.repository包,在下文中一共展示了ProcessEntry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createProcessEntry

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public ProcessEntry createProcessEntry(String name, String processXML) throws RepositoryException {
	// check for possible invalid name
	if (!RepositoryLocation.isNameValid(name)) {
		throw new RepositoryException(I18N.getMessage(I18N.getErrorBundle(), "repository.illegal_entry_name", name,
				getLocation()));
	}

	SimpleProcessEntry entry = null;
	try {
		entry = new SimpleProcessEntry(name, this, getRepository());
		if (data != null) {
			data.add(entry);
		}
		entry.storeXML(processXML);
	} catch (RepositoryException e) {
		data.remove(data.size() - 1);
		throw e;
	}
	getRepository().fireEntryAdded(entry, this);
	return entry;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:SimpleFolder.java

示例2: openProcess

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
/** Opens the process held by the given entry (in the background) and opens it. */
public static void openProcess(final ProcessEntry processEntry) {
	RepositoryProcessLocation processLocation = new RepositoryProcessLocation(processEntry.getLocation());
	if (RapidMinerGUI.getMainFrame().close()) {
		OpenAction.open(processLocation, true);
	}
	/*
	 * PRE FIX OF BUG 308: When opening process with double click all changes are discarded
	 * ProgressThread openProgressThread = new ProgressThread("open_process") {
	 *
	 * @Override public void run() { try { RepositoryProcessLocation processLocation = new
	 * RepositoryProcessLocation(processEntry.getLocation()); String xml =
	 * processEntry.retrieveXML(); try { final Process process = new Process(xml);
	 * process.setProcessLocation(processLocation); SwingUtilities.invokeLater(new Runnable() {
	 * public void run() { RapidMinerGUI.getMainFrame().setOpenedProcess(process, true,
	 * processEntry.getLocation().toString()); } }); } catch (Exception e) {
	 * RapidMinerGUI.getMainFrame().handleBrokenProxessXML(processLocation, xml, e); } } catch
	 * (Exception e1) { SwingTools.showSimpleErrorMessage("cannot_fetch_data_from_repository",
	 * e1); }
	 *
	 * } }; openProgressThread.start();
	 */
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:RepositoryTree.java

示例3: overwriteProcess

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
private void overwriteProcess(final ProcessEntry processEntry) {
	if (SwingTools.showConfirmDialog("overwrite", ConfirmDialog.YES_NO_OPTION, processEntry.getLocation()) == ConfirmDialog.YES_OPTION) {
		ProgressThread storeProgressThread = new ProgressThread("store_process") {

			@Override
			public void run() {
				getProgressListener().setTotal(100);
				getProgressListener().setCompleted(10);
				try {
					Process process = RapidMinerGUI.getMainFrame().getProcess();
					process.setProcessLocation(new RepositoryProcessLocation(processEntry.getLocation()));
					processEntry.storeXML(process.getRootOperator().getXML(false));
					RapidMinerGUI.addToRecentFiles(process.getProcessLocation());
					RapidMinerGUI.getMainFrame().processHasBeenSaved();
				} catch (Exception e) {
					SwingTools.showSimpleErrorMessage("cannot_store_process_in_repository", e, processEntry.getName());
				} finally {
					getProgressListener().setCompleted(100);
					getProgressListener().complete();
				}
			}
		};
		storeProgressThread.start();
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:26,代码来源:StoreProcessAction.java

示例4: store

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public void store(Process process, ProgressListener listener) throws IOException {		
	try {
		Entry entry = repositoryLocation.locateEntry();
		if (entry == null) {
			Folder folder = repositoryLocation.parent().createFoldersRecursively();
			folder.createProcessEntry(repositoryLocation.getName(), process.getRootOperator().getXML(false));
		} else {
			if (entry instanceof ProcessEntry) {
				boolean isReadOnly = repositoryLocation.getRepository().isReadOnly();
				if (isReadOnly) {
					SwingTools.showSimpleErrorMessage("save_to_read_only_repo", "", repositoryLocation.toString());
				} else {
					((ProcessEntry) entry).storeXML(process.getRootOperator().getXML(false));
				}
			} else {
				throw new RepositoryException("Entry "+repositoryLocation+" is not a process entry.");
			}
		}
		//LogService.getRoot().info("Saved process definition at '" + repositoryLocation + "'.");
		LogService.getRoot().log(Level.INFO, "com.rapidminer.RepositoryProcessLocation.saved_process_definition", repositoryLocation);
	} catch (RepositoryException e) {
		throw new IOException("Cannot store process at "+repositoryLocation+": "+e.getMessage(), e);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:26,代码来源:RepositoryProcessLocation.java

示例5: createProcessEntry

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public ProcessEntry createProcessEntry(String name, String processXML) throws RepositoryException {
	// check for possible invalid name
	if (!RepositoryLocation.isNameValid(name)) {
		throw new RepositoryException(I18N.getMessage(I18N.getErrorBundle(), "repository.illegal_entry_name", name, getLocation()));
	}
			
	SimpleProcessEntry entry = null;
	try {
		entry = new SimpleProcessEntry(name, this, getRepository());
		if (data != null) {
			data.add(entry);
		}
		entry.storeXML(processXML);
	} catch (RepositoryException e) {
		data.remove(data.size()-1);
		throw e;
	}
	getRepository().fireEntryAdded(entry, this);
	return entry;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:22,代码来源:SimpleFolder.java

示例6: getEntry

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
private ProcessEntry getEntry() throws IOException {
	Entry entry;
	try {
		entry = repositoryLocation.locateEntry();
	} catch (RepositoryException e) {
		throw new IOException("Cannot locate entry '" + repositoryLocation + "': " + e, e);
	}
	if (entry == null) {
		throw new IOException("No such entry: " + repositoryLocation);
	} else if (!(entry instanceof ProcessEntry)) {
		throw new IOException("No process entry: " + repositoryLocation);
	} else {
		return (ProcessEntry) entry;
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:16,代码来源:RepositoryProcessLocation.java

示例7: actionPerformed

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public void actionPerformed(Entry entry) {
	if (entry instanceof Folder) {
		storeInFolder(Folder.class.cast(entry));
	}
	if (entry instanceof ProcessEntry) {
		overwriteProcess(ProcessEntry.class.cast(entry));
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:StoreProcessAction.java

示例8: enable

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public void enable() {
	Entry entry = tree.getSelectedEntry();
	if (entry.isReadOnly()) {
		setEnabled(false);
	} else {
		setEnabled((Folder.class.isInstance(entry) || ProcessEntry.class.isInstance(entry)));
	}

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:StoreProcessAction.java

示例9: actionPerformed

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public void actionPerformed(DataEntry data) {
	if (data instanceof IOObjectEntry) {
		com.rapidminer.gui.actions.OpenAction.showAsResult((IOObjectEntry) data);
	} else if (data instanceof ProcessEntry) {
		RepositoryTree.openProcess((ProcessEntry) data);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:9,代码来源:OpenEntryAction.java

示例10: open

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
public static void open(String openLocation, boolean showInfo) {
	try {
		final RepositoryLocation location = new RepositoryLocation(openLocation);
		Entry entry = location.locateEntry();
		if (entry instanceof ProcessEntry) {
			open(new RepositoryProcessLocation(location), showInfo);
		} else if (entry instanceof IOObjectEntry) {
			OpenAction.showAsResult((IOObjectEntry) entry);
		} else {
			throw new RepositoryException("Cannot open entries of type " + entry.getType() + ".");
		}
	} catch (Exception e) {
		SwingTools.showSimpleErrorMessage("while_loading", e, openLocation, e.getMessage());
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:16,代码来源:OpenAction.java

示例11: checkOpenProcessButtonEnabled

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
/**
 * Checks whether the provided repository location is valid and is a process.
 */
private void checkOpenProcessButtonEnabled() {
	final String location = getTextFieldText();
	ProgressThread t = new ProgressThread("check_process_location_available", false, location) {

		@Override
		public void run() {
			boolean enabled = true;
			try {
				// check whether the process can be found
				enabled = RepositoryLocation.getRepositoryLocation(location, getOperator()).locateEntry() instanceof ProcessEntry;
			} catch (UserError | RepositoryException e) {
				enabled = false;
			}
			final boolean enable = enabled;
			SwingUtilities.invokeLater(new Runnable() {

				@Override
				public void run() {
					openProcessButton.setEnabled(enable);
				}
			});
		}
	};
	t.setIndeterminate(true);
	t.start();

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:31,代码来源:ProcessLocationValueCellEditor.java

示例12: createSelectButton

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
private JComponent createSelectButton(final RepositoryLocationChooser chooser) {
    JButton selectButton = new JButton(new ResourceAction("getting_started.open", new Object[0]) {
        private static final long serialVersionUID = 1L;

        public void actionPerformed(ActionEvent e) {
            if(RapidMinerGUI.getMainFrame().close()) {
                try {
                    GettingStartedDialog.logStats("open_process_card", "open_from_location");
                    String e1 = chooser.getRepositoryLocation();
                    if(e1 != null) {
                        try {
                            RepositoryLocation e11 = new RepositoryLocation(e1);
                            Entry entry = e11.locateEntry();
                            if(entry instanceof ProcessEntry) {
                                OpenAction.open(new RepositoryProcessLocation(e11), true);
                                OpenProcessCard.this.owner.dispose();
                            } else if(entry instanceof IOObjectEntry) {
                                OpenAction.showAsResult((IOObjectEntry)entry);
                                OpenProcessCard.this.owner.dispose();
                            } else {
                                SwingTools.showVerySimpleErrorMessage("no_data_or_process", new Object[0]);
                            }
                        } catch (MalformedRepositoryLocationException | RepositoryException var5) {
                            SwingTools.showSimpleErrorMessage("while_loading", var5, new Object[]{e1, var5.getMessage()});
                        }
                    }
                } catch (MalformedRepositoryLocationException var6) {
                    SwingTools.showSimpleErrorMessage("while_loading", var6, new Object[]{"", var6.getMessage()});
                }

            }
        }
    });
    selectButton.setFocusable(false);
    this.styleButton(selectButton);
    return selectButton;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:38,代码来源:OpenProcessCard.java

示例13: createProcessEntry

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
@Override
public ProcessEntry createProcessEntry(String name, String processXML) throws RepositoryException {
	// check for possible invalid name
	if (!RepositoryLocation.isNameValid(name)) {
		throw new RepositoryException(
				I18N.getMessage(I18N.getErrorBundle(), "repository.illegal_entry_name", name, getLocation()));
	}

	SimpleProcessEntry entry = null;
	acquireWriteLock();
	try {
		ensureLoaded();
		entry = new SimpleProcessEntry(name, this, getRepository());
		data.add(entry);
		try {
			entry.storeXML(processXML);
		} catch (RepositoryException e) {
			data.remove(entry);
			throw e;
		}
	} finally {
		releaseWriteLock();
	}
	if (entry != null) {
		getRepository().fireEntryAdded(entry, this);
	}
	return entry;
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:29,代码来源:SimpleFolder.java

示例14: getEntry

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
private ProcessEntry getEntry() throws IOException {
	Entry entry;
	try {
		entry = repositoryLocation.locateEntry();
	} catch (RepositoryException e) {
		throw new IOException("Cannot locate entry '"+repositoryLocation+"': "+e, e);
	}
	if (entry == null) {
		throw new IOException("No such entry: "+repositoryLocation);			
	} else if (!(entry instanceof ProcessEntry)) {
		throw new IOException("No process entry: "+repositoryLocation);
	} else {
		return (ProcessEntry) entry;
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:16,代码来源:RepositoryProcessLocation.java

示例15: openProcess

import com.rapidminer.repository.ProcessEntry; //导入依赖的package包/类
/** Opens the process held by the given entry (in the background) and opens it. */
public static void openProcess(final ProcessEntry processEntry) {
	RepositoryProcessLocation processLocation = new RepositoryProcessLocation(processEntry.getLocation());
	if (RapidMinerGUI.getMainFrame().close()) {
		OpenAction.open(processLocation, true);
	}
	/* PRE FIX OF BUG 308: When opening process with double click all changes are discarded
	ProgressThread openProgressThread = new ProgressThread("open_process") {
	    @Override
	    public void run() {
	         try {
				RepositoryProcessLocation processLocation = new RepositoryProcessLocation(processEntry.getLocation());
				String xml = processEntry.retrieveXML();
				try {
					final Process process = new Process(xml);
					process.setProcessLocation(processLocation);
					SwingUtilities.invokeLater(new Runnable() {
						public void run() {
							RapidMinerGUI.getMainFrame().setOpenedProcess(process, true, processEntry.getLocation().toString());
						}
					});
				} catch (Exception e) {
					RapidMinerGUI.getMainFrame().handleBrokenProxessXML(processLocation, xml, e);
				}
			} catch (Exception e1) {
				SwingTools.showSimpleErrorMessage("cannot_fetch_data_from_repository", e1);
			}

	    }
	};
	openProgressThread.start();*/
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:33,代码来源:RepositoryTree.java


注:本文中的com.rapidminer.repository.ProcessEntry类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。