Exemple #1
0
        /**
         * Sets the value of the collection item.
         * @param value
         */
        public void AddItem(String key, String value)
        {
            PdfName            fieldname = new PdfName(key);
            PdfCollectionField field     = (PdfCollectionField)schema.Get(fieldname);

            Put(fieldname, field.GetValue(value));
        }
Exemple #2
0
        /**
         * Sets the value of the collection item.
         * @param value
         */
        public void AddItem(String key, PdfNumber n)
        {
            PdfName            fieldname = new PdfName(key);
            PdfCollectionField field     = (PdfCollectionField)schema.Get(fieldname);

            if (field.fieldType == PdfCollectionField.NUMBER)
            {
                Put(fieldname, n);
            }
        }
Exemple #3
0
        /**
         * Sets the value of the collection item.
         * @param value
         */
        public void AddItem(String key, PdfDate d)
        {
            PdfName            fieldname = new PdfName(key);
            PdfCollectionField field     = (PdfCollectionField)schema.Get(fieldname);

            if (field.fieldType == PdfCollectionField.DATE)
            {
                Put(fieldname, d);
            }
        }
Exemple #4
0
        /**
         * Sets the value of the collection item.
         * @param value
         */
        public void AddItem(String key, PdfString value)
        {
            PdfName            fieldname = new PdfName(key);
            PdfCollectionField field     = (PdfCollectionField)schema.Get(fieldname);

            if (field.fieldType == PdfCollectionField.TEXT)
            {
                Put(fieldname, value);
            }
        }
 /**
  * Adds a Collection field to the Schema.
  * @param name  the name of the collection field
  * @param field a Collection Field
  */
 public void AddField(String name, PdfCollectionField field)
 {
     Put(new PdfName(name), field);
 }