org.xwiki.tool.xar
Class XWikiDocument

java.lang.Object
  extended by org.xwiki.tool.xar.XWikiDocument

public class XWikiDocument
extends Object

Parse XWiki document from XML.

Version:
$Id: dee08b5ed112b99fca312d3ce42895dd5cd12fac $

Constructor Summary
XWikiDocument()
           
 
Method Summary
 void fromXML(File file)
          Parse XML file to extract document information.
 String getAuthor()
           
 String getComment()
           
 String getContentAuthor()
           
 String getCreator()
           
 String getDefaultLanguage()
           
 String getEncoding()
           
 String getFullName()
           
static String getFullName(File file)
           
 String getLanguage()
           
 String getMinorEdit()
           
 String getName()
           
 String getParent()
           
 String getSpace()
           
 String getVersion()
           
 void setDefaultLanguage(String defaultLanguage)
           
 void setLanguage(String language)
           
 void setName(String name)
           
 void setSpace(String space)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XWikiDocument

public XWikiDocument()
Method Detail

fromXML

public void fromXML(File file)
             throws org.dom4j.DocumentException
Parse XML file to extract document information.

Parameters:
file - the xml file
Throws:
org.dom4j.DocumentException - error when parsing XML file

getName

public String getName()
Returns:
the name of the document.

setName

public void setName(String name)
Parameters:
name - the name of the document.

getSpace

public String getSpace()
Returns:
the space of the document.

setSpace

public void setSpace(String space)
Parameters:
space - the space of the document.

getLanguage

public String getLanguage()
Returns:
the language of the document.

setLanguage

public void setLanguage(String language)
Parameters:
language - the language of the document.

getDefaultLanguage

public String getDefaultLanguage()
Returns:
the default language of the document.

setDefaultLanguage

public void setDefaultLanguage(String defaultLanguage)
Parameters:
defaultLanguage - the default language of the document.

getCreator

public String getCreator()
Returns:
the creator of the document

getAuthor

public String getAuthor()
Returns:
the author of the document

getContentAuthor

public String getContentAuthor()
Returns:
the content author of the document

getVersion

public String getVersion()
Returns:
the version of the document

getParent

public String getParent()
Returns:
the parent of the document

getComment

public String getComment()
Returns:
the comment of the last save

getMinorEdit

public String getMinorEdit()
Returns:
the minor edit value ("true" or "false")

getEncoding

public String getEncoding()
Returns:
the XML file encoding

getFullName

public String getFullName()
Returns:
the full name of the document.

getFullName

public static String getFullName(File file)
Parameters:
file - the file containing the document.
Returns:
the full name of the document or null, if the document is invalid


Copyright © 2004-2013 XWiki. All Rights Reserved.