Skip to content

Commit

Permalink
Implementation ESTW Supplement Table: Sskz
Browse files Browse the repository at this point in the history
  • Loading branch information
TruongQuangSB committed Dec 11, 2024
1 parent 2bad794 commit 70bdb74
Show file tree
Hide file tree
Showing 18 changed files with 542 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ public interface CacheId {
*/
public static final String ETCS_TABLE_PART_ID_PREFIX = "org.eclipse.set.feature.table.etcs";

/**
* The prefix of ETCS Supplement table part
*/
public static final String ESTW_SUPPLEMENT_PART_ID_PREFIX = "org.eclipse.set.feature.table.supplement-estw";

/**
* The ESTW category
*/
Expand All @@ -281,6 +286,11 @@ public interface CacheId {
*/
public static final String ETCS_CATEGORY = "etcs"; //$NON-NLS-1$

/**
* The ESTW Supplement category
*/
public static final String ESTW_SUPPLEMENT_CATEGORY = "supplement-estw";

/**
* Rounding result of BigDecimal.divide to place after comma
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ Service-Component: OSGI-INF/org.eclipse.set.feature.table.pt1.messages.Messages.
OSGI-INF/org.eclipse.set.feature.table.pt1.sskt.SsktTransformationService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.sskw.SskwDescriptionService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.sskw.SskwTransformationService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.sskz.SskzDescriptionService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.sskz.SskzTransformationService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.ssla.SslaDescriptionService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.ssla.SslaTransformationService.xml,
OSGI-INF/org.eclipse.set.feature.table.pt1.sslb.SslbDescriptionService.xml,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,10 @@ ToolboxTableNameSszwPlanningNumber=42/10
ToolboxTableNameSszwShort=Sszw
SszwTableView_Heading=ETCS Melde- und Kommandoanschaltung Weichen – Sszw

SskzDescriptionService_ViewName=Sskz (Zuordnungstabelle FEAK/FEAS)
SskzDescriptionService_ViewTooltip=Zuordnungstabelle FEAK/FEAS
ToolboxTableNameSskzLong=Zuordnungstabelle FEAK/FEAS
ToolboxTableNameSskzPlanningNumber=???
ToolboxTableNameSskzShort=Sskz
SskzTableView_Heading=Zuordnungstabelle FEAK/FEAS – Sskz

Original file line number Diff line number Diff line change
Expand Up @@ -717,4 +717,34 @@ private void bindBundleLocalization(
* ETCS Melde- und Kommandoanschaltung Weichen – Sszw
*/
public String SszwTableView_Heading;

/**
* Sskz (Zuordnungstabelle FEAK/FEAS)
*/
public String SskzDescriptionService_ViewName;

/**
* Zuordnungstabelle FEAK/FEAS
*/
public String SskzDescriptionService_ViewTooltip;

/**
* Sskz
*/
public String ToolboxTableNameSskzShort;

/**
* Zuordnungstabelle FEAK/FEAS
*/
public String ToolboxTableNameSskzLong;

/**
* ???
*/
public String ToolboxTableNameSskzPlanningNumber;

/**
* Zuordnungstabelle FEAK/FEAS – Sskz
*/
public String SskzTableView_Heading;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* Copyright (c) 2024 DB InfraGO AG and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*/
package org.eclipse.set.feature.table.pt1.sskz;

/**
* Symbolic addressing for Sskz columns.
*
* @author Truong
*/
@SuppressWarnings("nls")
public class SskzColumns {
/**
* Sskz.Betriebl_Bez_FEAx
*/
public static final String Betribl_Bez_FEAx = "A";

/**
* Sskz.Betriebl_Bez_Feldelem
*/
public static final String Betriebl_Bez_Feldelem = "B";

/**
* Sskz.Techn_Bez_OC
*/
public static final String Techn_Bez_OC = "C";

/**
* Sskz.Tueranschlag
*/
public static final String Tueranschlag = "D";

/**
* Sskz.Montage
*/
public static final String Montage = "E";

/**
* Sskz.Blattnummer
*/
public static final String Blattnummer = "F";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Copyright (c) 2024 DB InfraGO AG and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*/
package org.eclipse.set.feature.table.pt1.sskz;

import org.eclipse.set.core.services.part.PartDescriptionService;
import org.eclipse.set.feature.table.AbstractESTWSupplementTableDesciption;
import org.eclipse.set.feature.table.pt1.messages.Messages;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

/**
* Part description for Sskz table view.
*
* @author Truong
*/
@Component(service = PartDescriptionService.class)
public class SskzDescriptionService
extends AbstractESTWSupplementTableDesciption {
@Reference
Messages messages;

@Override
protected String getToolboxViewName() {
return messages.SskzDescriptionService_ViewName;
}

@Override
protected String getToolboxViewTooltip() {
return messages.SskzDescriptionService_ViewTooltip;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Copyright (c) 2024 DB InfraGO AG and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*/
package org.eclipse.set.feature.table.pt1.sskz;

import org.eclipse.set.core.services.enumtranslation.EnumTranslationService;
import org.eclipse.set.feature.table.PlanPro2TableTransformationService;
import org.eclipse.set.feature.table.pt1.AbstractPlanPro2TableTransformationService;
import org.eclipse.set.feature.table.pt1.messages.Messages;
import org.eclipse.set.ppmodel.extensions.container.MultiContainer_AttributeGroup;
import org.eclipse.set.ppmodel.extensions.utils.TableNameInfo;
import org.eclipse.set.utils.table.TableModelTransformator;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

/**
* Service for creating the Sskz table model. org.eclipse.set.feature.table
*
* @author Truong
*/
@Component(service = {
PlanPro2TableTransformationService.class }, immediate = true, property = {
"table.category=supplement-estw", "table.shortcut=sskz" })
public class SskzTransformationService
extends AbstractPlanPro2TableTransformationService {

@Reference
private Messages messages;

@Reference
private EnumTranslationService enumTranslationService;

/**
* constructor.
*/
public SskzTransformationService() {
super();
}

@Override
protected String getTableHeading() {
return messages.SskzTableView_Heading;
}

@Override
public TableNameInfo getTableNameInfo() {
return new TableNameInfo(messages.ToolboxTableNameSskzLong,
messages.ToolboxTableNameSskzPlanningNumber,
messages.ToolboxTableNameSskzShort);
}

@Override
public TableModelTransformator<MultiContainer_AttributeGroup> createTransformator() {
return new SskzTransformator(cols, enumTranslationService);
}
}
Loading

0 comments on commit 70bdb74

Please sign in to comment.