Hi,

while adding functionality to PDFBOX parsing I stumbled upon the distinct objects COSName and COSString.

Both represents strings and both can be entries in a dictionary or array. Thus when reading a dictionary or array entry I have to test if it may be a COSName or a COSString if I want to have the string value. At least in case of COSDictionary this is done in getNameAsString method. But for COSArray no such method exists.

So one solution would be to add a getNameAsString method to COSArray but I would propose to add an interface COSStringValue with a method getStringValue which will be implemented by COSName and COSString. This would allow more elegant and maintainable code.

What do you think?
I could create necessary patched for one of the solutions.


Regards,
Timo

--

 Timo Boehme
 OntoChem GmbH
 H.-Damerow-Str. 4
 06120 Halle/Saale
 T: +49 345 4780472
 F: +49 345 4780471
 [email protected]

_____________________________________________________________________

 OntoChem GmbH
 Geschäftsführer: Dr. Lutz Weber
 Sitz: Halle / Saale
 Registergericht: Stendal
 Registernummer: HRB 215461
_____________________________________________________________________

Reply via email to