org.ceryle.xnode.convert
Class XNodeImporter1_2

java.lang.Object
  extended by org.ceryle.xnode.convert.XNodeImporter
      extended by org.ceryle.xnode.convert.XNodeImporter1_2

public class XNodeImporter1_2
extends XNodeImporter

An implementation of XNodeImporter as a utility for importing from XNode version 1.2 Documents to that of the current version.

Copyright 2001-2007 Murray Altheim. All Rights Reserved.
See LICENSE included with distribution.

Since:
JDK1.4
Version:
$Id: XNodeImporter1_2.java,v 1.2 2007-06-20 01:27:59 altheim Exp $
Author:
Murray Altheim

Field Summary
 
Fields inherited from class org.ceryle.xnode.convert.XNodeImporter
m_doc, m_xnf, m_xns, mh, srvs
 
Constructor Summary
XNodeImporter1_2()
          Default constructor.
 
Method Summary
 void convertProperty(XNode xnode, String name, String value)
          Converts an XNode 1.1 property name to its current (XNode 1.2) incarnation, setting the new property name and value on the provided XNode.
 String getVersion()
          Returns a string identifier for the XNode version this XNodeImporter is designed to import.
 XNode importXNode(Document doc)
          Returns an XNode provided a DOM Document doc.
 
Methods inherited from class org.ceryle.xnode.convert.XNodeImporter
getDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XNodeImporter1_2

public XNodeImporter1_2()
Default constructor.

Method Detail

importXNode

public XNode importXNode(Document doc)
                  throws XNodeException
Returns an XNode provided a DOM Document doc. NOTE: there were neither XNodeCollections nor <xnode:Repository> elements in XNode 1.1.

Overrides:
importXNode in class XNodeImporter
Parameters:
doc - the DOM Document to be processed as XNode content.
Returns:
the recreated XNode.
Throws:
XNodeException - if an error occurs during recreation.

convertProperty

public void convertProperty(XNode xnode,
                            String name,
                            String value)
                     throws XNodeException
Converts an XNode 1.1 property name to its current (XNode 1.2) incarnation, setting the new property name and value on the provided XNode.

Throws:
XNodeException

getVersion

public String getVersion()
Returns a string identifier for the XNode version this XNodeImporter is designed to import.

Specified by:
getVersion in class XNodeImporter


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.