PdfDictionary dataObject = (PdfDictionary)File.resolve(baseObject);
if(!dataObject.get(PdfName.Type).equals(PdfName.Annot))
return null;
PdfName annotationType = (PdfName)dataObject.get(PdfName.Subtype);
if(annotationType.equals(PdfName.Text))
return new Note(baseObject,container);
else if(annotationType.equals(PdfName.Link))
return new Link(baseObject,container);
else if(annotationType.equals(PdfName.FreeText))
return new CalloutNote(baseObject,container);
else if(annotationType.equals(PdfName.Line))
return new Line(baseObject,container);
else if(annotationType.equals(PdfName.Square))
return new Rectangle(baseObject,container);
else if(annotationType.equals(PdfName.Circle))
return new Ellipse(baseObject,container);
else if(annotationType.equals(PdfName.Polygon))
return new Polygon(baseObject,container);
else if(annotationType.equals(PdfName.PolyLine))
return new Polyline(baseObject,container);
else if(annotationType.equals(PdfName.Highlight)
|| annotationType.equals(PdfName.Underline)
|| annotationType.equals(PdfName.Squiggly)
|| annotationType.equals(PdfName.StrikeOut))
return new TextMarkup(baseObject,container);
else if(annotationType.equals(PdfName.Stamp))
return new RubberStamp(baseObject,container);
else if(annotationType.equals(PdfName.Caret))
return new Caret(baseObject,container);
else if(annotationType.equals(PdfName.Ink))
return new Scribble(baseObject,container);
else if(annotationType.equals(PdfName.Popup))
return new Popup(baseObject,container);
else if(annotationType.equals(PdfName.FileAttachment))
return new FileAttachment(baseObject,container);
else if(annotationType.equals(PdfName.Sound))
return new Sound(baseObject,container);
else if(annotationType.equals(PdfName.Movie))
return new Movie(baseObject,container);
else if(annotationType.equals(PdfName.Widget))
return new Widget(baseObject,container);
//TODO
// else if(annotationType.equals(PdfName.Screen)) return new Screen(baseObject,container);
// else if(annotationType.equals(PdfName.PrinterMark)) return new PrinterMark(baseObject,container);
// else if(annotationType.equals(PdfName.TrapNet)) return new TrapNet(baseObject,container);