Click or drag to resize

EpcClass Class

An electronic product code (EPC) "class". An EPC Class is an identifier for objects that do not have individual instances identified. An EPC can be constructed from an EPC Class by adding a serial number.
Inheritance Hierarchy
SystemObject
  GS1.EPC.ApiEpcClass

Namespace: GS1.EPC.Api
Assembly: epc-epconly (in epc-epconly.dll) Version: 2.1.0.28145 (2.1.0.0)
Syntax
C#
public abstract class EpcClass

The EpcClass type exposes the following members.

Properties
 NameDescription
Public propertyComponents Returns the components that comprise this EpcClass. Each component is one of the dot-delimited strings following the prefix of the URI, with any %xx escape sequences replaced by the corresponding character.

If c is an EpcClass instance, then Epc.fromComponents(c.getEpcScheme(), c.getComponents()) returns an EpcClass instance that is equal to c.

Example: the getComponents method for EPC URI urn:epc:idpat:sgtin:0614141.112345.* returns an array containing the strings "0614141" and "112345".

Public propertyEpcClassScheme Returns the EPC Class scheme of this EPC.
Public propertyEpcClassUri Returns the EPC Class URI corresponding to this EPC Class.
Top
Methods
 NameDescription
Public methodEquals Returns true if the specified object is an Epc instance that denotes the same EPC (i.e., has the identical EPC URI).
(Overrides ObjectEquals(Object))
Public methodStatic memberFromComponents Creates an EpcClass instance from the specified EPC Class scheme and components. Depending on the scheme, the resulting EpcClass instance will have an EPC Class URI that consists of one of the following:
  • (If the scheme corresponds to an EPC Scheme) urn:epc:idpat:, the specified EPC class scheme name, a colon (:) character, the specified components separated by dot (.) characters with %xx escape sequences as required to conform to URI syntax, another dot, and a wildcard asterisk (*)
  • (If the scheme is an EPC Class Scheme not based on an EPC Scheme) urn:epc:class:, the specified EPC class scheme name, a colon (:) character, and the specified components separated by dot (.) characters with %xx escape sequences as required to conform to URI syntax

Example: fromComponents(EpcClassScheme.SGTIN, "0614141", "112345") returns an EpcClass instance whose EPC Class URI is urn:epc:idpat:sgtin:0614141.112345.*.

Example: fromComponents(EpcClassScheme.LGTIN, "0614141", "112345", "a/b") returns an EpcClass instance whose EPC Class URI is urn:epc:class:lgtin:0614141.112345.a%2Fb.

Public methodStatic memberFromEpcClassUri Creates an EpcClass instance by parsing the specified string as a pure identity EPC pattern URI or an EPC Class URI.
Public methodGetHashCode Returns the hash code of the current object
(Overrides ObjectGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToEpc Creates an Epc instance based on this EPC Class by adding a serial number.
Public methodToGs1ElementString Creates a new Gs1ElementString instance based on this EPC Class.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also