Пример #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));
        }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #5
0
 /**
  * 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);
 }