Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.GS1.EPC
Contents
Description
module containing error types, URI class, epc types the types in this file cover all dimensions
- class URI a where
- data ParseFailure
- newtype XMLSnippet = XMLSnippet Text
- newtype MissingTag = MissingTag Text
- newtype EventIdStr = EventIdStr Text
- newtype GS1CompanyPrefix = GS1CompanyPrefix {}
- newtype ItemReference = ItemReference {}
- newtype ExtensionDigit = ExtensionDigit {}
- newtype SerialReference = SerialReference {}
- newtype CheckDigit = CheckDigit {
- unCheckDigit :: Int
- newtype Lot = Lot {}
- newtype IndividualAssetReference = IndividualAssetReference {}
- newtype SerialNumber = SerialNumber {}
- newtype SGLNExtension = SGLNExtension {}
- newtype Uom = Uom {}
- newtype Amount = Amount {}
- newtype AssetType = AssetType {
- unAssetType :: Text
- newtype Lng = Lng {}
- newtype Lat = Lat {}
- newtype LocationReference = LocationReference {}
- newtype DocumentType = DocumentType {}
- newtype ServiceReference = ServiceReference {}
- newtype BizTransactionId = BizTransactionId {}
- newtype TransformationId = TransformationId {}
- newtype EPCISTime = EPCISTime {}
- data SGTINFilterValue
- data Quantity
- = MeasuredQuantity { }
- | ItemCount { }
- data InstanceLabelEPC
- data ClassLabelEPC
- data LocationEPC = SGLN {}
- data SourceDestType
- data BusinessTransactionEPC
- data LocationError
- data BizStep
- = Accepting
- | Arriving
- | Assembling
- | Collecting
- | Commissioning
- | Consigning
- | CreatingClassInstance
- | CycleCounting
- | Decommissioning
- | Departing
- | Destroying
- | Disassembling
- | Dispensing
- | Encoding
- | EnteringExiting
- | Holding
- | Inspecting
- | Installing
- | Killing
- | Loading
- | Other
- | Packing
- | Picking
- | Receiving
- | Removing
- | Repackaging
- | Repairing
- | Replacing
- | Reserving
- | RetailSelling
- | Shipping
- | StagingOutbound
- | StockTaking
- | Stocking
- | Storing
- | Transporting
- | Unloading
- | VoidShipping
- data BizTransactionType
- data BizTransaction = BizTransaction {}
- data Action
- data Disposition
- readURI :: URI a => Text -> Either ParseFailure a
- renderURL :: URI a => a -> Text
- readURIClassLabelEPC :: [Text] -> Either ParseFailure ClassLabelEPC
- readURIInstanceLabelEPC :: [Text] -> Either ParseFailure InstanceLabelEPC
- mkAction :: Text -> Either ParseFailure Action
Documentation
Anything that could be converted into URI
Minimal complete definition
uriPrefix, uriSuffix, readURI
Methods
readURI :: Text -> Either ParseFailure a Source #
renderURL :: a -> Text Source #
Should not be directly implemented unless the format for URIs differs substantially from other URIs
Instances
data ParseFailure Source #
Constructors
InvalidLength XMLSnippet | Length is not correct |
InvalidFormat XMLSnippet | Components Missing, incorrectly structured, wrong payload |
InvalidAction XMLSnippet | When parsing an action failed |
InvalidBizTransaction XMLSnippet | When parsing a bizTransaction failed |
InvalidEventId EventIdStr | When the ` |
TimeZoneError XMLSnippet | Error in parsing timezone |
TagNotFound MissingTag | When a mandatory tag is not found |
MultipleTags Text | When more than the specified number of tags are present |
InvalidDispBizCombination XMLSnippet | When the disposition does not go with the bizstep |
ChildFailure [ParseFailure] | When there is a list of Parsefailures typically applicable to higher level structures, like DWhat, DWhere, etc |
Instances
newtype GS1CompanyPrefix Source #
Assigned by a GS1 Member Organisation to a user/subscriber
Constructors
GS1CompanyPrefix | |
Fields |
Instances
newtype ItemReference Source #
Constructors
ItemReference | |
Fields |
newtype ExtensionDigit Source #
Constructors
ExtensionDigit | |
Fields |
newtype SerialReference Source #
Constructors
SerialReference | |
Fields |
newtype CheckDigit Source #
Calculated according to an algorithm https://en.wikipedia.org/wiki/Global_Location_Number
Constructors
CheckDigit | |
Fields
|
Instances
newtype IndividualAssetReference Source #
Constructors
IndividualAssetReference | |
Fields |
Instances
newtype SerialNumber Source #
Constructors
SerialNumber | |
Fields |
newtype SGLNExtension Source #
Constructors
SGLNExtension | |
Fields |
Constructors
AssetType | |
Fields
|
newtype LocationReference Source #
Constructors
LocationReference | |
Fields |
newtype DocumentType Source #
Constructors
DocumentType | |
Fields |
newtype ServiceReference Source #
Constructors
ServiceReference | |
Fields |
newtype BizTransactionId Source #
Constructors
BizTransactionId | |
Fields |
newtype TransformationId Source #
TransformationId From the spec EPCIS-Standard-1.2-r-2016-09-29.pdf Page 55 Some transformation business processes take place over a long period of time, and so it is more appropriate to represent them as a series of EPCIS events. A TransfomationId may be included in two or more TransformationEvents to link them together. When events share an identical TransformationId, the meaning is that the inputs to any of those events may have contributed in some way to each of the outputs in any of those same events.
Constructors
TransformationId | |
Fields |
The TimeZone will be saved independently
Constructors
EPCISTime | |
Fields |
data SGTINFilterValue Source #
Constructors
AllOthers | |
POSTradeItem | |
FullCaseForTransport | |
Reserved1 | |
InnerPackTradeItemGroupingForHandling | |
Reserved2 | |
UnitLoad | |
UnitInsideTradeItemOrComponentInsideAProductNotIntendedForIndividualSale |
Instances
A quantity can be either the amount and the unit of measurement, or the item count.
Constructors
MeasuredQuantity | |
Fields
| |
ItemCount | |
Fields |
data InstanceLabelEPC Source #
Constructors
GIAI | Global Individual Asset Identifier, e.g. bucket for olives |
Fields | |
SSCC | Serial Shipping Container Code |
Fields | |
SGTIN | Serialsed Global Trade Item Number |
GRAI | Global Returnable Asset Identifier |
Instances
data ClassLabelEPC Source #
data LocationEPC Source #
EPCIS_Guideline.pdf Release 1.2 Ratified Feb 2017 - page 35 4.7.2 In EPCIS, the GLN+extension is represented as a Uniform Resource Identifier (URI) according to the EPC Tag Data Standard. The specific type of URI is called an SGLN, which is capable of representing either a GLN+extension or a GLN without extension. The SGLN for GLN 0614141111114 and extension 987 looks like this: urn:epc:id:sgln:0614141.11111.978
Constructors
SGLN | |
data SourceDestType Source #
EPCIS_Guideline.pdf Release 1.2 Ratified Feb 2017 - page 19 Source List and Destination List: is used to provide additional business context when an EPCIS event is part of a business transfer of ownership, responsibility or custody. As with business transactions, a source or destination is identified by a pair of identifiers: the type of the source or destination and an identifier of the source or destination of that type. The GS1 CBV (section 7.4.2) distinguishes three standard source/destination types: “owning_party”, “possessing_party”, “location”.
Constructors
SDOwningParty | |
SDPossessingParty | |
SDLocation |
data BusinessTransactionEPC Source #
Other GS1 object identifiers include GDTI for documents, GIAI for individual assets, GRAI for returnable assets, GSRN for services, GCN for coupons, and CPID for components or parts.
Instances
CBV-Standard-1-2-r-2016-09-29.pdf Page 17
Constructors
data BizTransactionType Source #
Instances
data BizTransaction Source #
BizTransaction CBV Section 7.3 and Section 8.5
Constructors
BizTransaction | |
Fields |
data Disposition Source #
renderURL :: URI a => a -> Text Source #
Should not be directly implemented unless the format for URIs differs substantially from other URIs