Hi,

having a look at PDFBox, I see a lot of classes implementing the COSObjectable interface, wrapping a COSDictionary and giving access to this dictionary. Would it make sense to create a COSDictionariable class like the following? Mentioned classes could extend this.

public class COSDictionariable implements COSObjectable
{

    COSDictionary dictionary;

    public COSDictionariable()
    {
        this.dictionary = new COSDictionary();
    }

    public COSDictionariable(COSDictionary dictionary)
    {
        this.dictionary = dictionary;
    }


    public COSBase getCOSObject()
    {
        return this.dictionary;
    }

    // or public?
    protected COSDictionary getCOSDictionary()
    {
        return this.dictionary;
    }

}

--
Johannes Koch
Fraunhofer Institute for Applied Information Technology FIT
Web Compliance Center
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142628    Fax: +49-2241-142065

Reply via email to