* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.bulkeditor;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public class BulkEditorQuery {
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
*/\r
-\r
package eu.etaxonomy.cdm.api.application;\r
\r
import java.util.ArrayList;\r
import eu.etaxonomy.taxeditor.session.CdmEntitySessionManager;\r
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;\r
\r
-\r
/**\r
* CDM Application Configuration class which manages the configuration for remoting\r
* clients\r
*/\r
public static final int HTTP_READ_TIMEOUT = 10 * 60 * 1000;\r
\r
-\r
protected ApplicationContext applicationContext;\r
\r
private ICdmRemoteSource remoteSource;\r
\r
public CdmApplicationRemoteConfiguration(ICdmRemoteSource remoteSource) {\r
this.remoteSource = remoteSource;\r
-\r
}\r
\r
public void setRemoteSource(ICdmRemoteSource remoteSource) {\r
return (IPolytomousKeyService) getService(IPolytomousKeyService.class, "/remoting/polytomouskey.service", new AuthenticatingHttpInvokerRequestExecutor());\r
}\r
\r
-\r
@Override\r
public IPolytomousKeyNodeService getPolytomousKeyNodeService(){\r
return (IPolytomousKeyNodeService) getService(IPolytomousKeyNodeService.class, "/remoting/polytomouskeynode.service", new AuthenticatingHttpInvokerRequestExecutor());\r
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
-
package eu.etaxonomy.cdm.api.application;
import java.util.List;
* FIXME:Remoting extending {@link CdmApplicationController} is a temporary workaround.
* The {@link CdmApplicationController} should be split into a CdmApplicationControllerBase
* class with {@link CdmApplicationController} and this class as subclasses
- *
*/
public class CdmApplicationRemoteController extends CdmApplicationController {
false,
progressMonitor,
listeners);
-
}
public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,
*/
package eu.etaxonomy.taxeditor.molecular.editor;
-
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
import eu.etaxonomy.taxeditor.store.CdmStore;
-
-
/**
* @author pplitzner
* @author Ben Stöver
initSession();
}
-
/**
* Returns the {@link UUID} of the sequence CDM node that should be edited by the {@link AlignmentEditor} this object
* is used with.
return sequenceNodeUuid;
}
-
@Override
public int hashCode() {
final int prime = 31;
return result;
}
-
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
-
public void setSequenceNode(Sequence sequenceNode) {
this.sequenceNode = sequenceNode;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
- */
@Override
public List<Sequence> getRootEntities() {
return Arrays.asList(sequenceNode);
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
- */
@Override
public void merge() {
CdmStore.getService(ISequenceService.class).merge(sequenceNode, true);
-
}
}
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.preference.matching;
-
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
/**
* @author n.hoffmann
* @created Jan 22, 2010
- * @version 1.0
*/
-public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity> extends CdmPreferencePage {
+public abstract class AbstractMatchingPreferences<T extends IdentifiableEntity>
+ extends CdmPreferencePage {
/**
* Fields that will be excluded from the display
private List<MatchMode> matchModeList;
- protected Map<String, ComboFieldEditor> matchModeCombos = new HashMap();
+ protected Map<String, ComboFieldEditor> matchModeCombos = new HashMap<>();
@Override
protected Control createContents(Composite parent) {
top.setLayoutData(layoutData);
-
// final GridLayout gridLayout = new GridLayout();
// gridLayout.numColumns = 2;
//
}
return top;
-
}
@Override
@Override
public boolean performOk() {
- if (matchModeCombos.size() >0){
+ if (matchModeCombos.size() > 0){
for (ComboFieldEditor editor: matchModeCombos.values()){
editor.store();
}
}
return super.performOk();
-
}
+
@Override
protected void performDefaults() {
- if (matchModeCombos.size() >0){
+ if (matchModeCombos.size() > 0){
for (ComboFieldEditor editor: matchModeCombos.values()){
editor.loadDefault();
}
super.performDefaults();
}
-
-
-
-// /**
-// * {@inheritDoc}
-// */
// @Override
// protected void createFieldEditors() {
// if(CdmStore.isActive()) {
/**
* Get names of all declared fields
- *
- * @return
*/
private List<String> getFieldNames(){
- List<Field> fields = new ArrayList<Field>();
+ List<Field> fields = new ArrayList<>();
fields = getAllFields(fields, clazz);
List<String> fieldNames = new ArrayList<String>();
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.preference.matching;
import eu.etaxonomy.cdm.model.name.TaxonName;
*/
public class NonViralNameMatchingPreference extends AbstractMatchingPreferences<TaxonName>{
- /** {@inheritDoc} */
@Override
public void init() {
super.init();
}
}
- /** {@inheritDoc} */
@Override
protected IMatchStrategy getDefaultMatchStrategy() throws MatchException {
return MatchStrategyConfigurator.getDefaultNonViralNameMatchStrategy();
/**
* @author cmathew
* @date 30 Jul 2015
- *
*/
public abstract class CdmPreferencePage extends PreferencePage implements IE4PreferencePage {
-
private boolean isDefaultButtonActivated = true;
protected boolean isAdminPreference = false;
init();
}
-
-
public void init() {
setPreferenceStore(PreferencesUtil.getPreferenceStore());
}
if (getDefaultsButton() != null){
this.getDefaultsButton().setEnabled(isDefaultButtonActivated);
}
-
}
@Override
return activateComp;
}
-
protected GridData createTextGridData() {
GridData sepGrid = new GridData(GridData.FILL_HORIZONTAL);
sepGrid.horizontalSpan = 2;
}
protected void getValues(){
-
}
-
protected Button createAllowOverrideButton(Composite activateComp) {
final Button allowOverrideCheckButton = new Button(activateComp, SWT.CHECK);
String overrideString;
booleanCombo.add(textFalse);
return booleanCombo;
-
}
-
public Combo createCombo(Composite parent, IKeyLabel[] enumValues, IPreferencePredicate predicate, String labelText, boolean isAdminPage) {
final CLabel description = new CLabel(parent, SWT.NULL);
description.setText(labelText);
Combo booleanCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
-
CdmPreference dbPref = PreferencesUtil.getPreferenceFromDB(predicate);
String defaultValue = "";
if (dbPref != null && !isAdminPage && dbPref.getValue() != null){
}catch(NullPointerException e){
defaultValue = "";
}
-
}
booleanCombo.add(Messages.Preference_Use_Default + " ("+defaultValue+")");
}
return booleanCombo;
-
}
public Boolean getBooleanPrefValue(CdmPreference pref) {
public boolean getPrefAllowOverride(CdmPreference pref) {
return pref != null? pref.isAllowOverride(): true;
}
-
-
-
-
-
}