org.xwiki.wikistream.type
Class WikiStreamType

java.lang.Object
  extended by org.xwiki.wikistream.type.WikiStreamType
All Implemented Interfaces:
Comparable<WikiStreamType>

@Unstable
public class WikiStreamType
extends Object
implements Comparable<WikiStreamType>

Combination of supported wikis and their export types.

Since:
5.2M2
Version:
$Id: 437924bf5db39915799987a0d625621a3aa9ea29 $

Field Summary
static WikiStreamType CONFLUENCE_XML
          The Confluence XML format.
static String DATA_XML
          Data format identifier for XML.
static WikiStreamType WIKI_XML
          Generic WIKI XML Syntax.
static WikiStreamType XWIKI_INSTANCE
          The database stream based on oldcore APIs.
static WikiStreamType XWIKI_XAR_11
          The XAR format.
 
Constructor Summary
WikiStreamType(WikiType type, String dataFormat)
           
WikiStreamType(WikiType type, String dataFormat, String version)
           
 
Method Summary
 int compareTo(WikiStreamType o)
           
 boolean equals(Object object)
           
 String getDataFormat()
           
 WikiType getType()
           
 String getVersion()
           
 int hashCode()
           
 String serialize()
           
 String toString()
           
static WikiStreamType unserialize(String str)
          Create a new WikiStreamType from a String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_XML

public static final String DATA_XML
Data format identifier for XML.

See Also:
Constant Field Values

WIKI_XML

public static final WikiStreamType WIKI_XML
Generic WIKI XML Syntax.


XWIKI_XAR_11

public static final WikiStreamType XWIKI_XAR_11
The XAR format.

Since:
5.3RC1

XWIKI_INSTANCE

public static final WikiStreamType XWIKI_INSTANCE
The database stream based on oldcore APIs.


CONFLUENCE_XML

public static final WikiStreamType CONFLUENCE_XML
The Confluence XML format.

Constructor Detail

WikiStreamType

public WikiStreamType(WikiType type,
                      String dataFormat)
Parameters:
type - the type of Wiki
dataFormat - the export data format

WikiStreamType

public WikiStreamType(WikiType type,
                      String dataFormat,
                      String version)
Parameters:
type - the type of Wiki
dataFormat - the export data format
version - the version
Method Detail

getType

public WikiType getType()
Returns:
the wiki

getDataFormat

public String getDataFormat()
Returns:
the export data format

getVersion

public String getVersion()
Returns:
the version

serialize

public String serialize()
Returns:
a String representation of the WikiStreamType

unserialize

public static WikiStreamType unserialize(String str)
Create a new WikiStreamType from a String.

Parameters:
str - the String to parse
Returns:
a WikiStreamType

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

compareTo

public int compareTo(WikiStreamType o)
Specified by:
compareTo in interface Comparable<WikiStreamType>


Copyright © 2004–2014 XWiki. All rights reserved.