diff --git a/build.gradle b/build.gradle index 1abfe87..a41aca4 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group = 'com.labelzoom.api' -version = '1.0.2' +version = '1.0.3' repositories { mavenCentral() diff --git a/src/main/java/com/labelzoom/api/input/LabelReader.java b/src/main/java/com/labelzoom/api/input/LabelReader.java index bb6b703..50cc95d 100644 --- a/src/main/java/com/labelzoom/api/input/LabelReader.java +++ b/src/main/java/com/labelzoom/api/input/LabelReader.java @@ -1,6 +1,6 @@ package com.labelzoom.api.input; -import com.labelzoom.api.model.ILabel; +import com.labelzoom.api.model.components.ILabel; public interface LabelReader { diff --git a/src/main/java/com/labelzoom/api/model/BarcodeStyle.java b/src/main/java/com/labelzoom/api/model/BarcodeStyle.java new file mode 100644 index 0000000..d45fb3c --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/BarcodeStyle.java @@ -0,0 +1,42 @@ +package com.labelzoom.api.model; + +public enum BarcodeStyle +{ + Unknown(-1), + Aztec(0), + Code11(1), + Interleaved2of5(2), + Code39(3), + Code49(4), + PlanetCode(5), + PDF417(7), + EAN_8(8), + UPC_E(9), + Code93(10), + CODABLOCK(11), + Code128(12), + UPSMaxiCode(13), + EAN_13(14), + Micro_PDF417(15), + Industrial2of5(18), + Standard2of5(19), + ANSICodabar(20), + LOGMARS(21), + MSI(22), + Aztec2(24), + Plessey(25), + QRCode(26), + GS1Databar(27), + UPC_EAN(28), + UPC_A(30), + DataMatrix(33), + PostNet(35); + + private int value; + BarcodeStyle(final int value) { + this.value = value; + } + public int getValue() { + return value; + } +} diff --git a/src/main/java/com/labelzoom/api/model/HorizontalAlignment.java b/src/main/java/com/labelzoom/api/model/HorizontalAlignment.java new file mode 100644 index 0000000..8134cc9 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/HorizontalAlignment.java @@ -0,0 +1,6 @@ +package com.labelzoom.api.model; + +public enum HorizontalAlignment +{ + Left, Center, Right +} diff --git a/src/main/java/com/labelzoom/api/model/ILabel.java b/src/main/java/com/labelzoom/api/model/ILabel.java deleted file mode 100644 index 2c146d7..0000000 --- a/src/main/java/com/labelzoom/api/model/ILabel.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.labelzoom.api.model; - -public interface ILabel -{ -} diff --git a/src/main/java/com/labelzoom/api/model/Justification.java b/src/main/java/com/labelzoom/api/model/Justification.java new file mode 100644 index 0000000..a04e909 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/Justification.java @@ -0,0 +1,6 @@ +package com.labelzoom.api.model; + +public enum Justification +{ + Left, Right, Auto +} diff --git a/src/main/java/com/labelzoom/api/model/Orientation.java b/src/main/java/com/labelzoom/api/model/Orientation.java new file mode 100644 index 0000000..dcb1b01 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/Orientation.java @@ -0,0 +1,6 @@ +package com.labelzoom.api.model; + +public enum Orientation +{ + Horizontal, Vertical; +} diff --git a/src/main/java/com/labelzoom/api/model/PageOrientation.java b/src/main/java/com/labelzoom/api/model/PageOrientation.java new file mode 100644 index 0000000..5bd73c2 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/PageOrientation.java @@ -0,0 +1,17 @@ +package com.labelzoom.api.model; + +public enum PageOrientation +{ + Landscape (1), + Portrait (2), + ReverseLandscape (3), + ReversePortrait (4); + + private final int value; + PageOrientation(final int value) { + this.value = value; + } + public int getValue() { + return value; + } +} diff --git a/src/main/java/com/labelzoom/api/model/PositioningMode.java b/src/main/java/com/labelzoom/api/model/PositioningMode.java new file mode 100644 index 0000000..fef470e --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/PositioningMode.java @@ -0,0 +1,6 @@ +package com.labelzoom.api.model; + +public enum PositioningMode +{ + Origin, Typeset +} diff --git a/src/main/java/com/labelzoom/api/model/components/IAddressBlock.java b/src/main/java/com/labelzoom/api/model/components/IAddressBlock.java new file mode 100644 index 0000000..406fad2 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IAddressBlock.java @@ -0,0 +1,19 @@ +package com.labelzoom.api.model.components; + +public interface IAddressBlock extends IFontComponent +{ + boolean isUseLocalizedAddressFormat(); + void setUseLocalizedAddressFormat(boolean useLocalizedAddressFormat); + + int getStaticAddressFormat(); + void setStaticAddressFormat(int addressFormat); + + boolean isShowContactName(); + void setShowContactName(boolean showContactName); + + boolean isShowCountry(); + void setShowCountry(boolean showCountry); + + String getAddressId(); + void setAddressId(String addressId); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IComponent.java b/src/main/java/com/labelzoom/api/model/components/IComponent.java new file mode 100644 index 0000000..03582be --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IComponent.java @@ -0,0 +1,27 @@ +package com.labelzoom.api.model.components; + +import com.labelzoom.api.model.Justification; +import com.labelzoom.api.model.PositioningMode; + +public interface IComponent extends Cloneable +{ + int getLeft(); + void setLeft(int left); + + int getTop(); + void setTop(int top); + + float getRotation(); + void setRotation(float rotation); + + boolean isReverse(); + void setReverse(); + + Justification getJustification(); + void setJustification(Justification justification); + + PositioningMode getPositioningMode(); + void setPositioningMode(PositioningMode positioningMode); + + int getZIndex(); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IContainer.java b/src/main/java/com/labelzoom/api/model/components/IContainer.java new file mode 100644 index 0000000..82f0561 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IContainer.java @@ -0,0 +1,6 @@ +package com.labelzoom.api.model.components; + +public interface IContainer extends IComponent +{ + Iterable getChildren(); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IDataCommand.java b/src/main/java/com/labelzoom/api/model/components/IDataCommand.java new file mode 100644 index 0000000..0966776 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IDataCommand.java @@ -0,0 +1,10 @@ +package com.labelzoom.api.model.components; + +public interface IDataCommand extends Cloneable +{ + String getLanguage(); + void setLanguage(String language); + + String getDataCommand(); + void setDataCommand(String dataCommand); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IDynamicField.java b/src/main/java/com/labelzoom/api/model/components/IDynamicField.java new file mode 100644 index 0000000..ddccdba --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IDynamicField.java @@ -0,0 +1,16 @@ +package com.labelzoom.api.model.components; + +import java.util.regex.Pattern; + +public interface IDynamicField +{ + Pattern SIMPLE_EXPRESSION_PATTERN = Pattern.compile("\"\\$\\{([A-Za-z0-9_]+)\\}\""); + Pattern VARIABLE_EXPRESSION_PATTERN = Pattern.compile("\\$\\{([A-Za-z0-9_]+)\\}"); + Pattern VARIABLE_NAME_PATTERN = Pattern.compile("^([A-Za-z0-9_]+)$"); + + void setExpression(String expression); + String getExpression(); + + void setFieldValue(String value); + String getFieldValue(); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IFontComponent.java b/src/main/java/com/labelzoom/api/model/components/IFontComponent.java new file mode 100644 index 0000000..46fc442 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IFontComponent.java @@ -0,0 +1,13 @@ +package com.labelzoom.api.model.components; + +public interface IFontComponent extends IComponent, ISuppressible +{ + String getFont(); + void setFont(String font); + + float getFontSize(); + void setFontSize(float fontSize); + + float getHorizontalScaling(); + void setHorizontalScaling(float horizontalScaling); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IImage.java b/src/main/java/com/labelzoom/api/model/components/IImage.java new file mode 100644 index 0000000..9af2b8c --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IImage.java @@ -0,0 +1,20 @@ +package com.labelzoom.api.model.components; + +import java.awt.image.RenderedImage; + +public interface IImage extends IComponent +{ + IImageWrapper getImage(); + void setImage(IImageWrapper imageWrapper); + + float getHorizontalScaling(); + void setHorizontalScaling(float horizontalScaling); + + float getVerticalScaling(); + void setVerticalScaling(float verticalScaling); + + interface IImageWrapper + { + RenderedImage getImage(); + } +} diff --git a/src/main/java/com/labelzoom/api/model/components/ILabel.java b/src/main/java/com/labelzoom/api/model/components/ILabel.java new file mode 100644 index 0000000..20a0d26 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/ILabel.java @@ -0,0 +1,45 @@ +package com.labelzoom.api.model.components; + +import com.labelzoom.api.model.PageOrientation; + +import java.util.Comparator; +import java.util.List; +import java.util.UUID; + +public interface ILabel +{ + String DEFAULT_LAYER_NAME = "background"; + + int getWidth(); + void setWidth(int width); + + int getHeight(); + void setHeight(int height); + + boolean isHighRes(); + void setHighRes(boolean highRes); + + PageOrientation getOrientation(); + void setOrientation(PageOrientation orientation); + + List getLayers(); + void setLayers(List layers); + + IDataCommand getDataCommand(); + void setDataCommand(IDataCommand dataCommand); + + String getSchemaLocation(); + void setSchemaLocation(String schemaLocation); + + String getSchemaVersion(); + void setSchemaVersion(String schemaVersion); + + UUID getId(); + void setId(UUID id); + + List getElements(); + List getSortedElements(); + void setElements(List elements); + + void addElement(IComponent element); +} diff --git a/src/main/java/com/labelzoom/api/model/components/ILayer.java b/src/main/java/com/labelzoom/api/model/components/ILayer.java new file mode 100644 index 0000000..b89a541 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/ILayer.java @@ -0,0 +1,12 @@ +package com.labelzoom.api.model.components; + +import java.util.List; + +public interface ILayer +{ + String getName(); + void setName(String name); + + List getElements(); + void setElements(List elements); +} diff --git a/src/main/java/com/labelzoom/api/model/components/ILine.java b/src/main/java/com/labelzoom/api/model/components/ILine.java new file mode 100644 index 0000000..5c5b8ab --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/ILine.java @@ -0,0 +1,15 @@ +package com.labelzoom.api.model.components; + +import com.labelzoom.api.model.Orientation; + +public interface ILine extends IComponent +{ + Orientation getOrientation(); + void setOrientation(Orientation orientation); + + int getThickness(); + void setThickness(int thickness); + + int getLength(); + void setLength(int length); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IRectangle.java b/src/main/java/com/labelzoom/api/model/components/IRectangle.java new file mode 100644 index 0000000..eaeb4a1 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IRectangle.java @@ -0,0 +1,13 @@ +package com.labelzoom.api.model.components; + +public interface IRectangle extends IComponent +{ + int getWidth(); + void setWidth(int width); + + int getHeight(); + void setHeight(int height); + + int getThickness(); + void setThickness(int thickness); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IStaticText.java b/src/main/java/com/labelzoom/api/model/components/IStaticText.java new file mode 100644 index 0000000..341fff1 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IStaticText.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components; + +public interface IStaticText extends IFontComponent +{ + String getText(); + void setText(String text); +} diff --git a/src/main/java/com/labelzoom/api/model/components/ISuppressible.java b/src/main/java/com/labelzoom/api/model/components/ISuppressible.java new file mode 100644 index 0000000..a5c58e9 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/ISuppressible.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components; + +public interface ISuppressible +{ + boolean isBlankWhenNull(); + void setBlankWhenNull(boolean blankWhenNull); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IVariableField.java b/src/main/java/com/labelzoom/api/model/components/IVariableField.java new file mode 100644 index 0000000..111660d --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IVariableField.java @@ -0,0 +1,23 @@ +package com.labelzoom.api.model.components; + +/* Copyright (C) 2021, LabelZoom, a subsidiary of RJF Technology Solutions, Inc. + * All rights reserved. Proprietary and confidential. + * + * This file is subject to the license terms found at + * https://www.labelzoom.net/end-user-license-agreement/ + * + * The methods and techniques described herein are considered + * confidential and/or trade secrets. + * No part of this file may be copied, modified, propagated, + * or distributed except as authorized by the license. + */ + +@Deprecated +public interface IVariableField +{ + void setDataField(String fldnam); + String getDataField(); + + void setFieldValue(String value); + String getFieldValue(); +} diff --git a/src/main/java/com/labelzoom/api/model/components/IVariableText.java b/src/main/java/com/labelzoom/api/model/components/IVariableText.java new file mode 100644 index 0000000..6789024 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/IVariableText.java @@ -0,0 +1,18 @@ +package com.labelzoom.api.model.components; + +import com.labelzoom.api.model.HorizontalAlignment; + +public interface IVariableText extends IFontComponent, IDynamicField +{ + boolean isAutoSize(); + void setAutoSize(boolean autoSize); + + int getWidth(); + void setWidth(int width); + + int getHeight(); + void setHeight(int height); + + HorizontalAlignment getHorizontalAlignment(); + void setHorizontalAlignment(HorizontalAlignment alignment); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcode.java new file mode 100644 index 0000000..0f2df4a --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcode.java @@ -0,0 +1,12 @@ +package com.labelzoom.api.model.components.barcodes; + +import com.labelzoom.api.model.BarcodeStyle; +import com.labelzoom.api.model.components.IComponent; +import com.labelzoom.api.model.components.IDynamicField; +import com.labelzoom.api.model.components.ISuppressible; + +public interface IBarcode extends IComponent, IDynamicField, ISuppressible +{ + BarcodeStyle getBarcodeStyle(); + void setBarcodeStyle(BarcodeStyle barcodeStyle); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcodeWithCheckDigit.java b/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcodeWithCheckDigit.java new file mode 100644 index 0000000..8809323 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcodeWithCheckDigit.java @@ -0,0 +1,11 @@ +package com.labelzoom.api.model.components.barcodes; + +/** + * ***NOTE*** When adding additional fields to barcodes, the BarcodeDeserializer must also be updated + */ +public interface IBarcodeWithCheckDigit extends IBarcode +{ + void setCheckDigitEnabled(boolean value); + + boolean isCheckDigitEnabled(); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcodeWithWideToNarrowRatio.java b/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcodeWithWideToNarrowRatio.java new file mode 100644 index 0000000..ec92768 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/IBarcodeWithWideToNarrowRatio.java @@ -0,0 +1,11 @@ +package com.labelzoom.api.model.components.barcodes; + +/** + * ***NOTE*** When adding additional fields to barcodes, the BarcodeDeserializer must also be updated + */ +public interface IBarcodeWithWideToNarrowRatio extends IBarcode +{ + void setWideToNarrowRatio(float value); + + float getWideToNarrowRatio(); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeAnsiCodabar.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeAnsiCodabar.java new file mode 100644 index 0000000..8e3e1ba --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeAnsiCodabar.java @@ -0,0 +1,13 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeAnsiCodabar extends ILinearBarcode, IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio +{ + char getStartCharacter(); + void setStartCharacter(char character); + + char getStopCharacter(); + void setStopCharacter(char character); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode11.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode11.java new file mode 100644 index 0000000..ef61726 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode11.java @@ -0,0 +1,8 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeCode11 extends ILinearBarcode, IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode128.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode128.java new file mode 100644 index 0000000..962a51c --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode128.java @@ -0,0 +1,9 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; + +public interface IBarcodeCode128 extends ILinearBarcode, IBarcodeWithCheckDigit +{ + char getUccCaseMode(); + void setUccCaseMode(char uccCaseMode); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode39.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode39.java new file mode 100644 index 0000000..3acc4c2 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode39.java @@ -0,0 +1,8 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeCode39 extends ILinearBarcode, IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode93.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode93.java new file mode 100644 index 0000000..a312188 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeCode93.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; + +public interface IBarcodeCode93 extends ILinearBarcode, IBarcodeWithCheckDigit +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeEAN13.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeEAN13.java new file mode 100644 index 0000000..c9df3c4 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeEAN13.java @@ -0,0 +1,5 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +public interface IBarcodeEAN13 extends ILinearBarcode +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeEAN8.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeEAN8.java new file mode 100644 index 0000000..9324b03 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeEAN8.java @@ -0,0 +1,5 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +public interface IBarcodeEAN8 extends ILinearBarcode +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeIndustrial2of5.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeIndustrial2of5.java new file mode 100644 index 0000000..e72b70d --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeIndustrial2of5.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeIndustrial2of5 extends ILinearBarcode, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeInterleaved2of5.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeInterleaved2of5.java new file mode 100644 index 0000000..6ba108a --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeInterleaved2of5.java @@ -0,0 +1,8 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeInterleaved2of5 extends ILinearBarcode, IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeLogmars.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeLogmars.java new file mode 100644 index 0000000..66f4c86 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeLogmars.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeLogmars extends ILinearBarcode, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeMsi.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeMsi.java new file mode 100644 index 0000000..22b6afc --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeMsi.java @@ -0,0 +1,12 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeMsi extends ILinearBarcode, IBarcodeWithWideToNarrowRatio +{ + char getCheckDigit(); + void setCheckDigit(char checkDigit); + + boolean isCheckDigitOnHumanReadable(); + void setCheckDigitOnHumanReadable(boolean checkDigitOnHumanReadable); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePlanetCode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePlanetCode.java new file mode 100644 index 0000000..e34c761 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePlanetCode.java @@ -0,0 +1,5 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +public interface IBarcodePlanetCode extends ILinearBarcode +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePlessey.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePlessey.java new file mode 100644 index 0000000..72314ad --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePlessey.java @@ -0,0 +1,8 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodePlessey extends ILinearBarcode, IBarcodeWithCheckDigit, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePostal.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePostal.java new file mode 100644 index 0000000..eb06798 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodePostal.java @@ -0,0 +1,9 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodePostal extends ILinearBarcode, IBarcodeWithWideToNarrowRatio +{ + char getPostalCodeType(); + void setPostalCodeType(char postalCodeType); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeStandard2of5.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeStandard2of5.java new file mode 100644 index 0000000..19f3736 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeStandard2of5.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithWideToNarrowRatio; + +public interface IBarcodeStandard2of5 extends ILinearBarcode, IBarcodeWithWideToNarrowRatio +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCA.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCA.java new file mode 100644 index 0000000..a7b2b0b --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCA.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; + +public interface IBarcodeUPCA extends ILinearBarcode, IBarcodeWithCheckDigit +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCE.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCE.java new file mode 100644 index 0000000..5de0ae8 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCE.java @@ -0,0 +1,7 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.components.barcodes.IBarcodeWithCheckDigit; + +public interface IBarcodeUPCE extends ILinearBarcode, IBarcodeWithCheckDigit +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCEANExtensions.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCEANExtensions.java new file mode 100644 index 0000000..34f1e2d --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/IBarcodeUPCEANExtensions.java @@ -0,0 +1,5 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +public interface IBarcodeUPCEANExtensions extends ILinearBarcode +{ +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ILinearBarcode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ILinearBarcode.java new file mode 100644 index 0000000..49e428f --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/linear/ILinearBarcode.java @@ -0,0 +1,46 @@ +package com.labelzoom.api.model.components.barcodes.linear; + +import com.labelzoom.api.model.BarcodeStyle; +import com.labelzoom.api.model.components.barcodes.IBarcode; + +public interface ILinearBarcode extends IBarcode +{ + enum BarcodeSize + { + Smallest(1), + Smaller(2), + Normal(3), + Large(4), + XLarge(5), + XXLarge(6), + XXXLarge(7), + XXXXLarge(8), + XXXXXLarge(9); + + private int value; + BarcodeSize(final int value) { + this.value = value; + } + public int getValue() { + return value; + } + } + + enum HumanReadableStyle + { + Above, + Below + } + + BarcodeSize getBarcodeSize(); + void setBarcodeSize(BarcodeSize size); + + int getHeight(); + void setHeight(int height); + + boolean isHumanReadableEnabled(); + void setHumanReadableEnabled(); + + HumanReadableStyle getHumanReadablePosition(); + void setHumanReadablePosition(HumanReadableStyle position); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/I2DBarcode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/I2DBarcode.java new file mode 100644 index 0000000..b9473b8 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/I2DBarcode.java @@ -0,0 +1,8 @@ +package com.labelzoom.api.model.components.barcodes.twod; + +import com.labelzoom.api.model.components.barcodes.IBarcode; + +public interface I2DBarcode extends IBarcode +{ + +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeAztec.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeAztec.java new file mode 100644 index 0000000..736eb8e --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeAztec.java @@ -0,0 +1,22 @@ +package com.labelzoom.api.model.components.barcodes.twod; + +public interface IBarcodeAztec extends I2DBarcode +{ + int getMagnificationFactor(); + void setMagnificationFactor(int magnificationFactor); + + boolean isEcicIndicator(); + void setEcicIndicator(boolean ecicIndicator); + + int getErrorControlIndicator(); + void setErrorControlIndicator(int errorControlIndicator); + + boolean isMenuSymbolIndicator(); + void setMenuSymbolIndicator(boolean menuSymbolIndicator); + + int getNumberOfSymbolsForStructuredAppend(); + void setNumberOfSymbolsForStructuredAppend(int numberOfSymbolsForStructuredAppend); + + String getIdFieldForStructuredAppend(); + void setIdFieldForStructuredAppend(String idFieldForStructuredAppend); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeDataMatrix.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeDataMatrix.java new file mode 100644 index 0000000..419fb81 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeDataMatrix.java @@ -0,0 +1,25 @@ +package com.labelzoom.api.model.components.barcodes.twod; + +public interface IBarcodeDataMatrix extends I2DBarcode +{ + int getSymbolHeight(); + void setSymbolHeight(int symbolHeight); + + int getQuality(); + void setQuality(int quality); + + int getColumns(); + void setColumns(int columns); + + int getRows(); + void setRows(int rows); + + int getFormatId(); + void setFormatId(int formatId); + + char getEscapeSequenceCharacter(); + void setEscapeSequenceCharacter(char escapeSequenceCharacter); + + int getAspectRatio(); + void setAspectRatio(int aspectRatio); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeMaxicode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeMaxicode.java new file mode 100644 index 0000000..c9f32de --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeMaxicode.java @@ -0,0 +1,13 @@ +package com.labelzoom.api.model.components.barcodes.twod; + +public interface IBarcodeMaxicode extends I2DBarcode +{ + int getMode(); + void setMode(int mode); + + int getSymbolNumber(); + void setSymbolNumber(int symbolNumber); + + int getTotalSymbols(); + void setTotalSymbols(int totalSymbols); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodePDF417.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodePDF417.java new file mode 100644 index 0000000..7971e70 --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodePDF417.java @@ -0,0 +1,19 @@ +package com.labelzoom.api.model.components.barcodes.twod; + +public interface IBarcodePDF417 extends I2DBarcode +{ + int getRowHeight(); + void setRowHeight(int rowHeight); + + int getSecurityLevel(); + void setSecurityLevel(int securityLevel); + + int getColumns(); + void setColumns(int columns); + + int getRows(); + void setRows(int rows); + + boolean isTruncateRightRow(); + void setTruncateRightRow(boolean truncateRightRow); +} diff --git a/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeQRCode.java b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeQRCode.java new file mode 100644 index 0000000..edb0b3b --- /dev/null +++ b/src/main/java/com/labelzoom/api/model/components/barcodes/twod/IBarcodeQRCode.java @@ -0,0 +1,16 @@ +package com.labelzoom.api.model.components.barcodes.twod; + +public interface IBarcodeQRCode extends I2DBarcode +{ + int getModel(); + void setModel(int model); + + int getMagnificationFactor(); + void setMagnificationFactor(int magnificationFactor); + + char getErrorCorrection(); + void setErrorCorrection(char errorCorrection); + + int getMaskValue(); + void setMaskValue(int maskValue); +} diff --git a/src/main/java/com/labelzoom/api/output/LabelWriter.java b/src/main/java/com/labelzoom/api/output/LabelWriter.java index 380c2c5..ca5dfae 100644 --- a/src/main/java/com/labelzoom/api/output/LabelWriter.java +++ b/src/main/java/com/labelzoom/api/output/LabelWriter.java @@ -1,6 +1,6 @@ package com.labelzoom.api.output; -import com.labelzoom.api.model.ILabel; +import com.labelzoom.api.model.components.ILabel; public interface LabelWriter { diff --git a/src/main/java/com/labelzoom/api/services/BarcodeRenderingService.java b/src/main/java/com/labelzoom/api/services/BarcodeRenderingService.java new file mode 100644 index 0000000..53cfa79 --- /dev/null +++ b/src/main/java/com/labelzoom/api/services/BarcodeRenderingService.java @@ -0,0 +1,13 @@ +package com.labelzoom.api.services; + +import com.labelzoom.api.model.components.barcodes.IBarcode; +import org.w3c.dom.Document; + +import java.awt.image.BufferedImage; + +public interface BarcodeRenderingService +{ + BufferedImage renderBarcodeToRaster(IBarcode barcode); + + Document renderBarcodeToVector(IBarcode barcode); +}