org.openptk.structure
Interface ConverterIF

All Known Implementing Classes:
Converter, HtmlConverter, JsonConverter, PlainConverter, XmlConverter

public interface ConverterIF

This interface defines the methods used to implement the following features:

Author:
Scott Fehrman, Sun Microsystems, Inc.

Field Summary
static java.lang.String PROP_CHILDREN
           
static java.lang.String PROP_NAMEVALUE
           
static java.lang.String PROP_VALUE
           
static java.lang.String VALUE_CHILDREN_DISCRETE
           
static java.lang.String VALUE_CHILDREN_LIST
           
static java.lang.String VALUE_NAMEVALUE_COLLAPSED
           
static java.lang.String VALUE_NAMEVALUE_EXPANDED
           
static java.lang.String VALUE_VALUE_MULTI
           
static java.lang.String VALUE_VALUE_SINGLE
           
 
Method Summary
 StructureIF decode(java.lang.String string)
          Convert the String of encoded data into a StructureIF object.
 java.lang.String encode(StructureIF struct)
          Convert the Structure into a formated String.
 ElementIF getStructInfo(java.lang.String structId)
          Get Structure Information using provided Id.
 java.lang.String[] getStructInfoIds()
          Return Array of Structure Information Ids.
 ConverterType getType()
          Return the Converter's Type.
 void setStructInfo(java.lang.String structId, ElementIF element)
          Set Structure Information using the provided Id.
 

Field Detail

PROP_CHILDREN

static final java.lang.String PROP_CHILDREN
See Also:
Constant Field Values

PROP_NAMEVALUE

static final java.lang.String PROP_NAMEVALUE
See Also:
Constant Field Values

PROP_VALUE

static final java.lang.String PROP_VALUE
See Also:
Constant Field Values

VALUE_CHILDREN_DISCRETE

static final java.lang.String VALUE_CHILDREN_DISCRETE
See Also:
Constant Field Values

VALUE_CHILDREN_LIST

static final java.lang.String VALUE_CHILDREN_LIST
See Also:
Constant Field Values

VALUE_NAMEVALUE_COLLAPSED

static final java.lang.String VALUE_NAMEVALUE_COLLAPSED
See Also:
Constant Field Values

VALUE_NAMEVALUE_EXPANDED

static final java.lang.String VALUE_NAMEVALUE_EXPANDED
See Also:
Constant Field Values

VALUE_VALUE_MULTI

static final java.lang.String VALUE_VALUE_MULTI
See Also:
Constant Field Values

VALUE_VALUE_SINGLE

static final java.lang.String VALUE_VALUE_SINGLE
See Also:
Constant Field Values
Method Detail

decode

StructureIF decode(java.lang.String string)
                   throws ConverterException
Convert the String of encoded data into a StructureIF object.

Parameters:
string - Encoded representation of the data
Returns:
StructureIF Structure of the data
Throws:
ConverterException

encode

java.lang.String encode(StructureIF struct)
                        throws ConverterException
Convert the Structure into a formated String.

Parameters:
struct - StructureIF of data
Returns:
String encoded representation of the data
Throws:
ConverterException

getStructInfo

ElementIF getStructInfo(java.lang.String structId)
Get Structure Information using provided Id.

Parameters:
structId - Structure Information Id
Returns:
ElementIF Information about the Structure

getStructInfoIds

java.lang.String[] getStructInfoIds()
Return Array of Structure Information Ids.

Returns:
String Array of Ids

getType

ConverterType getType()
Return the Converter's Type.

Returns:
ConverterType

setStructInfo

void setStructInfo(java.lang.String structId,
                   ElementIF element)
Set Structure Information using the provided Id.

Parameters:
structId - Structure Information Id
element - Structure Information


View/submit a bug or feature

For further API reference and developer documentation, see www.openptk.org. That documentation contains more detailed, developer-targeted descriptions, definitions of terms, workarounds, and working code examples.

Copyright (C) 2008-2012, Project OpenPTK. All Rights Reserved