package org.verapdf.model.tools;

/**
 * Created by Evgeniy Muravitskiy on 4/27/15.
 *
 * This class specified for creating unique ID`s for every object
 * from model
 */
public final class IDGenerator {

    private static Integer id = 0;

    private IDGenerator(){}

    public static Integer generateID() {
        return id++;
    }
}

@@ -27,16 +27,95 @@
 tools;%0A%0A
+import org.apache.pdfbox.cos.COSBase;%0Aimport org.apache.pdfbox.cos.COSObject;%0A%0A
 /**%0A * C
@@ -158,16 +158,19 @@
 7/15.%0A *
+%3Cp%3E
 %0A * This
@@ -203,15 +203,8 @@
 ing 
-unique 
 ID%60s
@@ -220,19 +220,16 @@
 y object
-%0A *
  from mo
@@ -231,16 +231,17 @@
 om model
+.
 %0A */%0Apub
@@ -287,60 +287,364 @@
 ate 
-static Integer id = 0;%0A%0A    private IDGenerator()%7B%7D%0A
+IDGenerator()%7B%7D%0A%0A    /**%0A     * Generate ID for pdf box object. Current method generate a string of the form 'N M' for%0A     * %7B@link org.apache.pdfbox.cos.COSObject%7D, where 'N' and 'M' are numbers, and %3Ccode%3Enull%3C/code%3E%0A     * for other pdf box objects%0A     * @param pdfBoxObject object of pdf box library%0A     * @return string representation of ID%0A     */
 %0A   
@@ -662,15 +662,14 @@
 tic 
-Integer
+String
  gen
@@ -680,31 +680,232 @@
 eID(
-) %7B%0A        return id++
+COSBase pdfBoxObject) %7B%0A        if (pdfBoxObject instanceof COSObject) %7B%0A            return ((COSObject) pdfBoxObject).getObjectNumber() + %22 %22 + ((COSObject) pdfBoxObject).getGenerationNumber();%0A        %7D%0A        return null
 ;%0A  

Change IDGenerator.generateID