Sets the fields by XFDF merging.

@param xfdf the XFDF form
@throws IOException on error
@throws DocumentException on error
421408
public void setFields(XfdfReader xfdf) throws IOException, DocumentException {
        HashMap fd = xfdf.getFields();
        for (Iterator i = fd.keySet().iterator(); i.hasNext();) {
            String f = (String)i.next();
            String v = xfdf.getFieldValue(f);
            if (v != null)
                setField(f, v);
            List l = xfdf.getListValues(f);
            if (l != null)
            	setListSelection(v, (String[])l.toArray(new String[l.size()]));
        }
    }
649235
public static void setFileData(final File file, final InputStream fileStream, final String contentType) throws FrameworkException, IOException {

		FileHelper.writeToFile(file, fileStream);
		setFileProperties(file, contentType);
	}
963194
void setFields(Field[] fields) {
    this.fields = fields;
    this.resultSetColumnNameIndexMap = null;
    this.cachedMaxResultRowSize = null;
    this.needUpdateFieldFormats = fields != null;
    this.hasBinaryFields = false; // just in case
  }
1200112
public static void setFieldValue(ODocument document, String fieldname, String value) {
        document.field(fieldname, value);
    }
769834
public void setRtfDocument(RtfDocument doc) {
        super.setRtfDocument(doc);
        if(document != null) {
            this.colorNumber = document.getDocumentHeader().getColorNumber(this);
        }
    }
1271451
public void setRtfDocument(RtfDocument doc) {
        this.document = doc;
        if(this.document != null) {
            for(int i = 0; i < this.content.length; i++) {
                try {
                    if(this.content[i] instanceof Element) {
                        this.content[i] = this.document.getMapper().mapElement((Element) this.content[i])[0];
                        ((RtfBasicElement) this.content[i]).setInHeader(true);
                    } else if(this.content[i] instanceof RtfBasicElement){
                        ((RtfBasicElement) this.content[i]).setRtfDocument(this.document);
                        ((RtfBasicElement) this.content[i]).setInHeader(true);
                    }
                } catch(DocumentException de) {
                    de.printStackTrace();
                }
            }
        }
    }
521303
public void configure() throws IOException {
        if (archetypesPomFile != null) {
            archetypesPomArtifactIds = loadArchetypesPomArtifactIds(archetypesPomFile);
        }
        catalogXmlFile.getParentFile().mkdirs();
        LOG.info("Writing catalog: " + catalogXmlFile);
        printWriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(catalogXmlFile), "UTF-8"));

        printWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
            "<archetype-catalog xmlns=\"http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0\"\n" +
            indent + indent + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
            indent + indent + "xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd\">\n" +
            indent + "<archetypes>");

        if (bomFile != null && bomFile.exists()) {
            // read all properties of the bom, so we have default values for ${ } placeholders
            String text = IOHelpers.readFully(bomFile);
            Document doc = archetypeUtils.parseXml(new InputSource(new StringReader(text)));
            Element root = doc.getDocumentElement();

            // lets load all the properties defined in the <properties> element in the bom pom.
            NodeList propertyElements = root.getElementsByTagName("properties");
            if (propertyElements.getLength() > 0)  {
                Element propertyElement = (Element) propertyElements.item(0);
                NodeList children = propertyElement.getChildNodes();
                for (int cn = 0; cn < children.getLength(); cn++) {
                    Node e = children.item(cn);
                    if (e instanceof Element) {
                        versionProperties.put(e.getNodeName(), e.getTextContent());
                    }
                }
            }
            if (LOG.isDebugEnabled()) {
                for (Map.Entry<String, String> entry : versionProperties.entrySet()) {
                    LOG.debug("bom property: {}={}", entry.getKey(), entry.getValue());
                }
            }
        }
    }
577568
public void setFields(FdfReader fdf) {
        HashMap map = fdf.getFields();
        for (Iterator it = map.entrySet().iterator(); it.hasNext();) {
            Map.Entry entry = (Map.Entry) it.next();
            String key = (String) entry.getKey();
            PdfDictionary dic = (PdfDictionary) entry.getValue();
            PdfObject v = dic.get(PdfName.V);
            if (v != null) {
                setField(key, v);
            }
            v = dic.get(PdfName.A); // (plaflamme)
            if (v != null) {
            	setField(key, v);
            }
        }
    }
782110
public static void addAll(Document document) {
        List<Element> elementList = getElements(document);

        List<String> elementIds = getElementsId(elementList);

        addAll(elementList);
    }
915256
public void setDocuments(java.util.Collection<DocumentMetadata> documents) {
        if (documents == null) {
            this.documents = null;
            return;
        }

        this.documents = new java.util.ArrayList<DocumentMetadata>(documents);
    }
273802
public void fromXML(File file) throws DocumentException
    {
        SAXReader reader = new SAXReader();
        fromXML(reader.read(file));

    }
741276
public void write(Writer writer)
        throws IOException
    {
        synchronized(writer)
        {
            for (int i=0;i<_fields.size();i++)
            {
                Field field=(Field)_fields.get(i);
                if (field!=null)
                    field.write(writer,_version);
            }
            writer.write(__CRLF);
        }
    }
45037
@Override
    public void configFields(Configuration conf, String[] fields) throws IOException {
        if (null != fields) {
            super.configFields(conf, fields);
            for (int i = 0; i < fields.length; i++) {
                if(fields[i].trim().equals("")) continue;
                if (!XML11Char.isXML11ValidName(fields[i])) {
                    fields[i] = XMLUtil.getValidName(fields[i]);
                }
            }
        } else {
            throw new IOException("Fields not defined");
        }
    }
494983
public void setOriginalXml(final InputStream originalXml) throws JDOMException, IOException {
        SAXBuilder parser = new SAXBuilder();
        originalDocument = parser.build(originalXml);
    }
388201
public function setFieldValue($document, $field, $value)
    {
        if ($document instanceof Proxy && ! $document->__isInitialized()) {
            //property changes to an uninitialized proxy will not be tracked or persisted,
            //so the proxy needs to be loaded first.
            $document->__load();
        }

        $this->reflFields[$field]->setValue($document, $value);
    }
688123
public void addReadFields(int input, FieldSet readFields) {

		if (input != 0 && input != 1) {
			throw new IndexOutOfBoundsException();
		} else if (input == 0) {
			this.readFields1 = (this.readFields1 == null) ? readFields.clone() : this.readFields1.addFields(readFields);
		} else {
			this.readFields2 = (this.readFields2 == null) ? readFields.clone() : this.readFields2.addFields(readFields);
		}
	}
623298
public void setFields(T0 value0, T1 value1, T2 value2, T3 value3, T4 value4) {
		this.f0 = value0;
		this.f1 = value1;
		this.f2 = value2;
		this.f3 = value3;
		this.f4 = value4;
	}