// Path: pdfparse-lib/src/main/java/org/pdfparse/parser/Diagnostics.java
// public class Diagnostics {
//     ParserSettings settings;
// 
//     public Diagnostics(ParserSettings settings) {
//         this.settings = settings;
//     }
// 
// 
//     private static void checkAndLog(boolean canContinue, String message) {
//         if (canContinue)
//             System.err.println(message);
//         else
//             throw new EParseError(message);
//     }
// 
//     public static boolean softAssertSyntaxCompliance(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreSyntaxCompliance, message);
//         return condition;
//     }
// 
//     public static boolean softAssertSupportedFeatures(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreNonSupportedFeatures, message);
//         return condition;
//     }
// 
//     public static boolean softAssertDataIntegrity(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreDataIntegrityErrors, message);
//         return condition;
//     }
// 
//     public static boolean softAssertStructure(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreStructureErrors, message);
//         return condition;
//     }
// 
//     public static void debugMessage(ParserSettings settings, String msg) {
//         if (settings.debugMessages) {
//             System.out.println(msg);
//         }
//     }
// 
// 
//     public static void debugMessage(ParserSettings settings, String msg, Object... args) {
//         if (settings.debugMessages) {
//             System.out.println(String.format(msg, args));
//         }
//     }
// }
// 
// Path: pdfparse-lib/src/main/java/org/pdfparse/parser/ObjectRetriever.java
// public interface ObjectRetriever {
//     COSObject getObject(COSReference ref);
// 
//     COSDictionary getDictionary(COSReference ref);
// 
//     COSStream getStream(COSReference ref);
// 
// }
// 
// Path: pdfparse-lib/src/main/java/org/pdfparse/parser/ParserSettings.java
// public class ParserSettings {
//     public static final boolean PRETTY_PRINT = true;
//     public static final int MIN_PDF_RAW_CONTENT_LENGTH = 10;
//     public static final int MAX_SCAN_RANGE = 100;
// 
//     public boolean debugMessages = true;
//     public boolean ignoreSyntaxCompliance = true;
//     public boolean ignoreStructureErrors = true;
//     public boolean ignoreDataIntegrityErrors = false;
//     public boolean ignoreNonSupportedFeatures = true;
// 
//     public boolean allowScan = true;
//     public int headerLookupRange = 100;
//     public int eofLookupRange = 1024; // Same as Acrobat implementation
// 
// 
//     public void setSyntaxComplianceChecks(boolean value) {
//         ignoreSyntaxCompliance = !value;
//     }
// }


import org.pdfparse.cos.*;
import org.pdfparse.exception.EParseError;
import org.pdfparse.parser.Diagnostics;
import org.pdfparse.parser.ObjectRetriever;
import org.pdfparse.parser.ParserSettings;
import java.util.ArrayList;
/*
 * Copyright (c) 2013 Anton Golinko
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 */

package org.pdfparse.model;




public class PDFDocCatalog {
    private COSDictionary dRoot;
    private COSDictionary dPages;
    private ObjectRetriever retriever;
    private ArrayList<PDFPage> pages;

    private ParserSettings settings;

    public PDFDocCatalog(ObjectRetriever retriever, ParserSettings settings, COSDictionary dic) {
        dRoot = dic;
        this.retriever = retriever;

        this.settings = settings;
// Path: pdfparse-lib/src/main/java/org/pdfparse/parser/Diagnostics.java
// public class Diagnostics {
//     ParserSettings settings;
// 
//     public Diagnostics(ParserSettings settings) {
//         this.settings = settings;
//     }
// 
// 
//     private static void checkAndLog(boolean canContinue, String message) {
//         if (canContinue)
//             System.err.println(message);
//         else
//             throw new EParseError(message);
//     }
// 
//     public static boolean softAssertSyntaxCompliance(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreSyntaxCompliance, message);
//         return condition;
//     }
// 
//     public static boolean softAssertSupportedFeatures(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreNonSupportedFeatures, message);
//         return condition;
//     }
// 
//     public static boolean softAssertDataIntegrity(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreDataIntegrityErrors, message);
//         return condition;
//     }
// 
//     public static boolean softAssertStructure(ParserSettings settings, boolean condition, String message) {
//         if (!condition)
//             checkAndLog(settings.ignoreStructureErrors, message);
//         return condition;
//     }
// 
//     public static void debugMessage(ParserSettings settings, String msg) {
//         if (settings.debugMessages) {
//             System.out.println(msg);
//         }
//     }
// 
// 
//     public static void debugMessage(ParserSettings settings, String msg, Object... args) {
//         if (settings.debugMessages) {
//             System.out.println(String.format(msg, args));
//         }
//     }
// }
// 
// Path: pdfparse-lib/src/main/java/org/pdfparse/parser/ObjectRetriever.java
// public interface ObjectRetriever {
//     COSObject getObject(COSReference ref);
// 
//     COSDictionary getDictionary(COSReference ref);
// 
//     COSStream getStream(COSReference ref);
// 
// }
// 
// Path: pdfparse-lib/src/main/java/org/pdfparse/parser/ParserSettings.java
// public class ParserSettings {
//     public static final boolean PRETTY_PRINT = true;
//     public static final int MIN_PDF_RAW_CONTENT_LENGTH = 10;
//     public static final int MAX_SCAN_RANGE = 100;
// 
//     public boolean debugMessages = true;
//     public boolean ignoreSyntaxCompliance = true;
//     public boolean ignoreStructureErrors = true;
//     public boolean ignoreDataIntegrityErrors = false;
//     public boolean ignoreNonSupportedFeatures = true;
// 
//     public boolean allowScan = true;
//     public int headerLookupRange = 100;
//     public int eofLookupRange = 1024; // Same as Acrobat implementation
// 
// 
//     public void setSyntaxComplianceChecks(boolean value) {
//         ignoreSyntaxCompliance = !value;
//     }
// }


// Path: pdfparse-lib/src/main/java/org/pdfparse/model/PDFDocCatalog.java
import org.pdfparse.cos.*;
import org.pdfparse.exception.EParseError;
import org.pdfparse.parser.Diagnostics;
import org.pdfparse.parser.ObjectRetriever;
import org.pdfparse.parser.ParserSettings;
import java.util.ArrayList;

/*
 * Copyright (c) 2013 Anton Golinko
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 */

package org.pdfparse.model;




public class PDFDocCatalog {
    private COSDictionary dRoot;
    private COSDictionary dPages;
    private ObjectRetriever retriever;
    private ArrayList<PDFPage> pages;

    private ParserSettings settings;

    public PDFDocCatalog(ObjectRetriever retriever, ParserSettings settings, COSDictionary dic) {
        dRoot = dic;
        this.retriever = retriever;

        this.settings = settings;
        Diagnostics.softAssertSyntaxCompliance(settings,