| Hinweis: Diese Seite gibt es auch auf deutsch. 
 Downloadfor Change history see end of page 
  | HitUpros/LomCoder2.javaHitUpros/LomNumber.java
 HitUpros/LomCoderErrors.java
 | These are the elementary classes. The LomCoder2provide the generic
methods for processing eartags, no matter to which country they belong to. That
class calls itself the country specific classes (see below) automatically.The recognition and conversion returns a result which is stored in an object
of the class LomNumber- assumed that no error has been yielded.
Details about the error code can be obtained by the classLomCoderErrors. |  
  | HitUpros/Lom_AT.javaHitUpros/Lom_BE.java
 HitUpros/Lom_BG.java
 HitUpros/Lom_CH.java
 HitUpros/Lom_CY.java
 HitUpros/Lom_CZ.java
 HitUpros/Lom_DE.java
 HitUpros/Lom_DK.java
 HitUpros/Lom_EE.java
 HitUpros/Lom_EL.java
 HitUpros/Lom_ES.java
 HitUpros/Lom_FI.java
 HitUpros/Lom_FR.java
 HitUpros/Lom_HR.java
 HitUpros/Lom_HU.java
 HitUpros/Lom_IE.java
 HitUpros/Lom_IT.java
 HitUpros/Lom_LT.java
 HitUpros/Lom_LU.java
 HitUpros/Lom_LV.java
 HitUpros/Lom_MT.java
 HitUpros/Lom_NL.java
 HitUpros/Lom_PL.java
 HitUpros/Lom_PT.java
 HitUpros/Lom_RO.java
 HitUpros/Lom_SE.java
 HitUpros/Lom_SI.java
 HitUpros/Lom_SK.java
 HitUpros/Lom_UK.java
 HitUpros/Lom_DY.java
 | For each of the 27 countries a class exists that implements the uniform
functions calls on the functionality of the eartag numbers. The abbreviation
after the Lom_is equivalent to the ISO standard.Lom_DYis a particular case: this are eartags which can't be
stored in HIT, so numbers in the "dummy" format were used then. Within
HIT there's a translation table between these numbers and the "real"
ones.
 Note: before May 2004 greek eartag numbers were erroneous marked as GR,
but they have the abbreviationELaccording to the ISO standard.
Therefore the class has been renamed, but the functionality remain unchanged. |  
  | HitUpros/LomCountryInterface.javaHitUpros/LomEU.java
 HitUpros/LomDate.java
HitUpros/HitException.javaHitUpros/HitHelpers.java
 HitUpros/HitSimpleDTS.java
 | LomEUis the base class of all the country classes above. It
contains standardized methods which do preprocessing tasks (like nomalizing
eartag strings etc) supporting the country classes. TheLomCountryInterfacedefines the methods every country class has to implement.The classes HitHelpers,HitSimpleDTSandHitExceptionare subroutine classes that are used within HIT and were partially used from
the eartag processors. [20040902] At the end of August 2004
HitDatehas been dissolved and refactorized into other classes,
mainlyHitSimpleDTS, including a few methods fromHitHelpers. [20100811]
 LomDatehas been created for converting Java into other
programming languages. For example .NET does not have an object type for dates
and therefore no exact replacement forjava.util.Date. This is
being simulated withLomDate. [20201021] HitHelpersandHitSimpleDTSare 
optional: if you delete both files, you can compile the source as is. Both 
classes merely do contain usage examples for the LomCoder. |  
  | HitUpros/LomSchafeZiegen.javaHitUpros/LomSchweine.java
 | LomSchafeZiegenandLomSchweineare classes to
verify (german only) earmarks for sheeps/goats and swines (in that order). |  
  | HitLom/LomsToCSV.javaHitLom/LomObject.javaHitLom/Demo_LomObject.java
 | The package HitLomcontains two programs and a helper object.The program LomsToCSVexpects a text file containing earmarks
and returns (depending on parameters) a CSV (comma separated values) file
with the converted earmarks or bad earmarks including error messages
respectively. Can be used in batch jobs for serial converting. The LomObjectjust simplifies the usage of eartags, e.g. to
allow manipulations via compiled COM or Dot.NET objects in Office products. The
programDemo_LomObjectis a demonstration example in Java (easily
transferable into other programming languages) how to use that simple object. |    Following example is valid for Java and similar OO
programming languages. To check an eartag the method sintEncodeLom()ofLomCoder2is called. Since we expect two return values (numeric
eartag and error code), but only can retrieve one,LomNumbersupports the retrieval of the checked and coded eartag. So an object of LomNumberis instantiated first: 
  LomNumber objLom = new LomNumber();
 After that we call the generic class LomCoder2by its static methodsintEncodeLom()which expects two or three
parameters respectively (eartag as String, theLomNumberobject and
finally if necessary the Date for checking the eartag at this date): 
  String strLom = "DE0196442853";int intError = LomCoder2.sintEncodeLom(strLom,objLom);
 After the call we get an error number and the object objLomnow may contain the encoded (numeric) eartag. For error tracking one has to use
the classLomCoderErrors: using the methodsintGetFehlerSchwere()it does return a 'more general' error code which is equivalent to the Schwere
(=weight) of the HIT system (means 0=Ok, 1=Note, 2=Request, 3=Error, 4=Panic).
If the error weight is 0 or 1, thenobjLomcontains the encoded
eartag (in numeric form). With error weights larger than 1 nothing has been
encoded and the (unfortunately german) error message can be retrieved by the
methodsstrGetError(). 
  int intErrWeight =
  LomCoderErrors.sintGetFehlerSchwere(intError);
 if (intErrWeight > 1)  {String strErrMsg = LomCoderErrors.sstrGetError(intError);
 System.err.println("Error at eartag "+strLom+":
  "+strErrMsg);
 }
 else  {
 System.out.println(strLom+" = "+objLom.getLom())
 }
 To print out the eartag in formatted form, one has to use the
method sstrToFormattedString()of the classLomCoder2: 
  String strFormatted = LomCoder2.sstrToFormattedString(objLom);
 With this call the above eartag example will be printed as DE
01 964 42853then. If you want the 15 digit numerical form of an EU eartag, you
can get it via getLom()ofobjLom(assuming that no
error appeared): 
  String strNumerisch = objLom.getLom();
   To simplify the usage for own purposes (e.g. after a
conversion into a COM or Dot.NET object) there is a class called LomObject.This class combines the procedure described above and provides simple calls: 
  LomObject objLomcoder = new LomObject();String strFormatted = objLomcoder.encodeLom(strLom);
 if (objLomcoder.wasError())   {
 System.err.println("Error: "+objLomcoder.getError());
 }
 else  {
 System.out.println(strFormatted);
 }
 First the eartag will be converted by encodeLom()(for formatted output) ordecodeLom()(for numeric output), thenwasError()checks, if an error occured on the latest conversion. If so, the (german) error
message can be retrieved bygetError(); otherwise theencodeLom()ordecodeLom()call respectively returned the eartag number. It is possible to call  getError()without calling wasError()before: if the eartag could be converted correctly, it returns an empty string.
You also can ignore the error handling (not recommended), because in case of an
error, the methodsencodeLom()ordecodeLom()return an empty string then.   The Zip archive above only contain the sources of the
eartag coding. If you intend to use them precompiled, please download the applet
archive. This one you can call in own application as decribed in the
sections Usage or Simple usage for
external calls above. Starting with May 1st, 2004 10 new countries (EU eastern
enlargement) were added (unfortunately we do not have the coding schemes for all
new countries, so a 15 digit eartag number is required to be accepted). For more
detailed schemes see Alpha-Lom-Codierungen (in
german). Starting with January 1st, 2007 two new countries (BG und RO)
were added. On July 1st, 2013 Croatia (HR) joined the EU.   
| 09-Jul-2018 | Updated lomcoder.zip |  
| 24-Apr-2018 | Updated lomcoder.zip (only renamed) |  
| 28-Apr-2015 | Updated lomcoder3.zip aktualisiert |  
| 10-Jul-2013 | Updated lomcoder3.zip, HR has been added. |  
| 07-Feb-2013 | Updated lomcoder3.zip, RO has been modified (new property codes), added
  swine and sheep/goat earmark numbers. |  
| 01-Aug-2010 | Updated lomcoder3.zip, CH has been added. |  
| 22-Sep-2009 | Updated lomcoder3.zip, since FI eartags had an error in checksum validation. |  
| 12-Feb-2007 | Updated lomcoder3.zip, since BG and RO have been added. |  
| 02-Sep-2004 | Updated lomcoder3.zip, because some methods and classes in HitUpros were
  refactorized. |  
| 02-Sep-2004 | Added english documentation. |  |