Module jonix.onix3

Class Stock

java.lang.Object
com.tectonica.jonix.onix3.Stock
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixSuperComposite, OnixTag, Serializable

public class Stock extends Object implements OnixComposite.OnixSuperComposite, Serializable

Stock quantity composite

An optional group of data elements which together specify a quantity of stock, repeatable where a supplier has more than one warehouse or supplier location.

Within a single instance of the <Stock> composite, the location name and identifier are both optional. If <Stock> is repeated, at least one identifier or a location name must be included in each instance.

Reference name <Stock>
Short tag <stock>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Stock

      public Stock()
    • Stock

      public Stock(Element element)
  • Method Details

    • _initialize

      public void _initialize()
      Description copied from interface: OnixComposite
      This is an internal API. Since Jonix 8.0, composite objects are being populated lazily. This method initiates the population process, and is invoked internally by the accessor APIs of the composites
      Specified by:
      _initialize in interface OnixComposite
    • exists

      public boolean exists()
      Description copied from interface: OnixTag
      indicates whether this tag exists in the ONIX record
      Specified by:
      exists in interface OnixTag
      Returns:
      whether this tag (<Stock> or <stock>) is explicitly provided in the ONIX XML
    • ifExists

      public void ifExists(Consumer<Stock> action)
    • getXmlElement

      public Element getXmlElement()
      Description copied from interface: OnixComposite
      For advanced use-cases only.
      Specified by:
      getXmlElement in interface OnixComposite
      Returns:
      native representation of the XML element underlying to this tag
    • onHand

      public OnHand onHand()

      The quantity of stock on hand and available to fulfill new orders. Either <StockQuantityCoded> or <OnHand> is mandatory in each occurrence of the <Stock> composite, even if the quantity on hand is zero. Non-repeating.

      Jonix-Comment: this field is required
    • proximity

      public Proximity proximity()

      An ONIX code which specifies the precision of the stock quantity on hand. Optional, non-repeating and may only be used if an <OnHand> value is specified.

      Jonix-Comment: this field is optional
    • reserved

      public Reserved reserved()

      The quantity of stock on hand but unavailable to fulfil new orders for any reason – for example because the stock is reserved to fulfill existing orders or frozen to prevent dispatch. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • onOrder

      public OnOrder onOrder()

      The quantity of stock on order. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • cbo

      public CBO cbo()

      The quantity of stock on order which is already committed to meet backorders. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • locationIdentifiers

      An optional group of data elements which together define the identifier of a stock location in accordance with a specified scheme, and repeatable to allow different types of location identifier to be supported without defining additional data elements.

      Jonix-Comment: this list may be empty
    • locationNames

      public ListOfOnixElement<LocationName,String> locationNames()

      The name of a stock location. Optional, and repeatable to provide parallel names for a single location in multiple languages (eg Baile Átha Cliath and Dublin, or Bruxelles and Brussel). It may if necessary include a postal code (eg 10680 Αθήνα, or 20090 Assago). The language attribute is optional for a single instance of <LocationName>, but must be included in each instance if <LocationName> is repeated.

      Jonix-Comment: this list may be empty
    • stockQuantityCodeds

      A group of data elements which together specify a stock level in a coded way without stating the exact quantity of stock. Either <StockQuantityCoded> or <OnHand> is mandatory in each occurrence of the <Stock> composite, even if the quantity on hand is zero. Repeatable, so that it is possible to provide coded quantities on hand, quantities on order etc separately.

      Jonix-Comment: this list may be empty
    • onOrderDetails

      A repeatable group of data elements which together specify details of a stock shipment currently awaited, normally from overseas. Optional and repeatable if more than a single shipment is outstanding.

      Note that quantities in the <OnOrderDetail> composite must be included in any total quantity on order given in P.26.37 <OnOrder>, and detail need not be given for all outstanding shipments (ie the P.26.37 <OnOrder> must be greater than or equal to the total of the <OnOrder> elements in repeats of the composite).

      Jonix-Comment: this list may be empty
    • velocitys

      An optional group of data elements which together specify the rate of stock depletion – or equally, a rate of accumulation of backorders. Repeatable if the rate of depletion is specified using more than one metric (eg specifying both a minimum and maximum daily sale).

      Jonix-Comment: this list may be empty