org.mmbase.richtext.processors.xml
Class MmxfSetString

java.lang.Object
  extended byorg.mmbase.richtext.processors.xml.MmxfSetString
All Implemented Interfaces:
Processor, Serializable

public class MmxfSetString
extends Object
implements Processor

Set-processing for an `mmxf' field. This is the counterpart and inverse of MmxfGetString, for more information see the javadoc of that class.

Since:
MMBase-1.8
Version:
$Id: MmxfSetString.java,v 1.8 2006/02/13 18:14:59 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Constructor Summary
MmxfSetString()
           
 
Method Summary
protected  void cleanDanglingIdRels(NodeList clusterNodes, NodeList usedNodes, String type)
          At the end of stage 2 of parseKupu all relations are removed which are not used any more, using this function.
protected  Node getUrlNode(Cloud cloud, String href, Element a)
           
static void main(String[] argv)
          Invocation of the class from the commandline for testing.
protected  String normalizeURL(HttpServletRequest request, String url)
          Normalizes URL to absolute on server
protected  String normalizeURL(String url)
          Adds missing protocol
protected static Document parse(InputStream value)
          Just parses InputStream to Document (without validation).
protected static Document parse(Object value)
          Just parses String to Document
protected  Document parseDocBook(Node editedNode, Document source)
          Receives Docbook XML, and saves as MMXF.
 Object process(Node node, Field field, Object value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MmxfSetString

public MmxfSetString()
Method Detail

parse

protected static Document parse(Object value)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Just parses String to Document

Throws:
ParserConfigurationException
SAXException
IOException

parse

protected static Document parse(InputStream value)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Just parses InputStream to Document (without validation).

Throws:
ParserConfigurationException
SAXException
IOException

normalizeURL

protected String normalizeURL(HttpServletRequest request,
                              String url)
Normalizes URL to absolute on server


normalizeURL

protected String normalizeURL(String url)
Adds missing protocol


getUrlNode

protected Node getUrlNode(Cloud cloud,
                          String href,
                          Element a)

cleanDanglingIdRels

protected void cleanDanglingIdRels(NodeList clusterNodes,
                                   NodeList usedNodes,
                                   String type)
At the end of stage 2 of parseKupu all relations are removed which are not used any more, using this function.


parseDocBook

protected Document parseDocBook(Node editedNode,
                                Document source)
Receives Docbook XML, and saves as MMXF. Docbook is more powerfull as MMXF so this transformation will not be perfect. It is mainly meant for MMBase documentation.


process

public Object process(Node node,
                      Field field,
                      Object value)
Specified by:
process in interface Processor
Parameters:
node - The node object for which the field must be transformed.
field - The field which is set.
value - The (new) field value.

main

public static void main(String[] argv)
Invocation of the class from the commandline for testing. Uses RMMCI (on the default configuration), gets the 'xmltest' node, and get and set processes it.


toString

public String toString()


MMBase build 1.8.1.20060716