java.lang.Object | |
↳ | com.pdftron.collab.utils.XfdfUtils |
Utility class for XFDF
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | OP_ADD | ||||||||||
String | OP_MODIFY | ||||||||||
String | OP_REMOVE | ||||||||||
String | XFDF_ADD | ||||||||||
String | XFDF_DELETE | ||||||||||
String | XFDF_END | ||||||||||
String | XFDF_MODIFY | ||||||||||
String | XFDF_START |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
XfdfUtils() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static ArrayList<AnnotationEntity> |
convToAnnotations(String xfdfJSON, String xfdfCommand, String documentId, String userName)
Converts JSON with annotation properties to list of
AnnotationEntity
| ||||||||||
static ArrayList<AnnotationEntity> |
convToAnnotations(String xfdfJSON, String xfdfCommand, String documentId, String userName, AnnotationDao annotationDao)
Converts JSON with annotation properties to list of
AnnotationEntity
This version will fetch from existing annotation entity
| ||||||||||
static Date |
deserializeDate(String dateStr)
Converts date string to java.util.Date
| ||||||||||
static void |
fillAnnotationEntity(String documentId, AnnotationEntity input)
Parse required fields for
AnnotationEntity from its XFDF information
| ||||||||||
static boolean | isValidInsertEntity(AnnotationEntity entity) | ||||||||||
static Pair<String, HashMap<String, AnnotationEntity>> |
parseAndProcessXfdf(String documentId, String xfdf)
Parses XFDF string into map of properties, also return processed XFDF string
| ||||||||||
static Pair<String, HashMap<String, AnnotationEntity>> | parseAndProcessXfdfCommand(String documentId, String xfdfCommand) | ||||||||||
static AnnotationEntity |
parseAnnotationEntity(String documentId, JSONObject annotation)
Parse XFDF information from JSON into
AnnotationEntity
| ||||||||||
static ReplyEntity |
parseReplyEntity(AnnotationEntity annotation)
Parse reply information from
AnnotationEntity
| ||||||||||
static HashMap<String, AnnotationEntity> |
parseXfdf(String documentId, String xfdf)
Parses XFDF string into map of properties
| ||||||||||
static String | prepareAnnotation(String action, ArrayList<AnnotationEntity> annotationEntities, String documentId, String userName) | ||||||||||
static AnnotationEntity |
toAnnotationEntity(PDFDoc pdfDoc, String documentId, Annot annot)
Converts
Annot to AnnotationEntity | ||||||||||
static String | validateXfdf(String xfdf, String action) | ||||||||||
static String |
validateXfdf(String xfdf)
Utility method to return a valid XFDF command string
| ||||||||||
static String |
wrapDeleteXfdf(String id)
Gets delete XFDF command
| ||||||||||
static AnnotationEntity |
xfdfToAnnotationEntity(String documentId, JSONObject annotation)
Creates
AnnotationEntity from JSON that contains required information
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Converts JSON with annotation properties to list of AnnotationEntity
JSONException |
---|
Converts JSON with annotation properties to list of AnnotationEntity
This version will fetch from existing annotation entity
JSONException |
---|
Converts date string to java.util.Date
Parse required fields for AnnotationEntity
from its XFDF information
Parses XFDF string into map of properties, also return processed XFDF string
Parse XFDF information from JSON into AnnotationEntity
Parse reply information from AnnotationEntity
Parses XFDF string into map of properties
JSONException |
---|
Converts Annot
to AnnotationEntity
pdfDoc | the PDF document |
---|---|
annot | the annotation |
PDFNetException |
---|
Utility method to return a valid XFDF command string
Gets delete XFDF command
Creates AnnotationEntity
from JSON that contains required information