org.eclipse.ocl.examples.xtext.markup
Class MarkupToHTML

java.lang.Object
  extended by org.eclipse.emf.ecore.util.Switch<T>
      extended by org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch<HTMLBuffer>
          extended by org.eclipse.ocl.examples.xtext.markup.MarkupToHTML

public class MarkupToHTML
extends MarkupSwitch<HTMLBuffer>

MarkupToHTML gives an HTML presentation of the markup.


Nested Class Summary
static class MarkupToHTML.InvalidMarkupException
           
 
Field Summary
protected  java.lang.Object context
           
protected  HTMLBuffer s
           
 
Fields inherited from class org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch
modelPackage
 
Constructor Summary
MarkupToHTML(MetaModelManager metaModelManager, java.lang.Object context)
           
 
Method Summary
 HTMLBuffer caseBulletElement(BulletElement object)
          Returns the result of interpreting the object as an instance of 'Bullet Element'.
 HTMLBuffer caseCompoundElement(CompoundElement object)
          Returns the result of interpreting the object as an instance of 'Compound Element'.
 HTMLBuffer caseFigureElement(FigureElement object)
          Returns the result of interpreting the object as an instance of 'Figure Element'.
 HTMLBuffer caseFigureRefElement(FigureRefElement object)
          Returns the result of interpreting the object as an instance of 'Figure Ref Element'.
 HTMLBuffer caseFontElement(FontElement object)
          Returns the result of interpreting the object as an instance of 'Font Element'.
 HTMLBuffer caseFootnoteElement(FootnoteElement object)
          Returns the result of interpreting the object as an instance of 'Footnote Element'.
 HTMLBuffer caseHeadingElement(HeadingElement object)
          Returns the result of interpreting the object as an instance of 'Heading Element'.
 HTMLBuffer caseNewLineElement(NewLineElement object)
          Returns the result of interpreting the object as an instance of 'New Line Element'.
 HTMLBuffer caseNullElement(NullElement object)
          Returns the result of interpreting the object as an instance of 'Null Element'.
 HTMLBuffer caseOCLCodeElement(OCLCodeElement object)
          Returns the result of interpreting the object as an instance of 'OCL Code Element'.
 HTMLBuffer caseOCLEvalElement(OCLEvalElement object)
          Returns the result of interpreting the object as an instance of 'OCL Eval Element'.
 HTMLBuffer caseOCLTextElement(OCLTextElement object)
          Returns the result of interpreting the object as an instance of 'OCL Text Element'.
 HTMLBuffer caseTextElement(TextElement object)
          Returns the result of interpreting the object as an instance of 'Text Element'.
protected  ExpressionInOCL createQuery(java.lang.String oclString)
           
 HTMLBuffer defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
protected  OCL getOCL()
           
 java.lang.String toString()
           
static java.lang.String toString(MetaModelManager metaModelManager, java.lang.Object context, MarkupElement element)
           
 
Methods inherited from class org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch
caseMarkup, caseMarkupElement, doSwitch, isSwitchFor
 
Methods inherited from class org.eclipse.emf.ecore.util.Switch
doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

context

@Nullable
protected final java.lang.Object context

s

@NonNull
protected final HTMLBuffer s
Constructor Detail

MarkupToHTML

public MarkupToHTML(@NonNull
                    MetaModelManager metaModelManager,
                    @Nullable
                    java.lang.Object context)
Method Detail

toString

public static java.lang.String toString(@NonNull
                                        MetaModelManager metaModelManager,
                                        @Nullable
                                        java.lang.Object context,
                                        @NonNull
                                        MarkupElement element)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

caseBulletElement

public HTMLBuffer caseBulletElement(BulletElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Bullet Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseBulletElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Bullet Element'.
See Also:
doSwitch(EObject)

caseCompoundElement

public HTMLBuffer caseCompoundElement(CompoundElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Compound Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseCompoundElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Compound Element'.
See Also:
doSwitch(EObject)

caseFigureElement

public HTMLBuffer caseFigureElement(FigureElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Figure Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFigureElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Figure Element'.
See Also:
doSwitch(EObject)

caseFigureRefElement

public HTMLBuffer caseFigureRefElement(FigureRefElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Figure Ref Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFigureRefElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Figure Ref Element'.
See Also:
doSwitch(EObject)

caseFontElement

public HTMLBuffer caseFontElement(FontElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Font Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFontElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Font Element'.
See Also:
doSwitch(EObject)

caseFootnoteElement

public HTMLBuffer caseFootnoteElement(FootnoteElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Footnote Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFootnoteElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Footnote Element'.
See Also:
doSwitch(EObject)

caseHeadingElement

public HTMLBuffer caseHeadingElement(HeadingElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Heading Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseHeadingElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Heading Element'.
See Also:
doSwitch(EObject)

caseNewLineElement

public HTMLBuffer caseNewLineElement(NewLineElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'New Line Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseNewLineElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'New Line Element'.
See Also:
doSwitch(EObject)

caseNullElement

public HTMLBuffer caseNullElement(NullElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Null Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseNullElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Null Element'.
See Also:
doSwitch(EObject)

caseOCLCodeElement

public HTMLBuffer caseOCLCodeElement(OCLCodeElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'OCL Code Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseOCLCodeElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'OCL Code Element'.
See Also:
doSwitch(EObject)

caseOCLEvalElement

public HTMLBuffer caseOCLEvalElement(OCLEvalElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'OCL Eval Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseOCLEvalElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'OCL Eval Element'.
See Also:
doSwitch(EObject)

caseOCLTextElement

public HTMLBuffer caseOCLTextElement(OCLTextElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'OCL Text Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseOCLTextElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'OCL Text Element'.
See Also:
doSwitch(EObject)

caseTextElement

public HTMLBuffer caseTextElement(TextElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Text Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseTextElement in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Text Element'.
See Also:
doSwitch(EObject)

createQuery

@NonNull
protected ExpressionInOCL createQuery(@NonNull
                                              java.lang.String oclString)
                               throws ParserException
Throws:
ParserException

defaultCase

public HTMLBuffer defaultCase(org.eclipse.emf.ecore.EObject object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.

Overrides:
defaultCase in class MarkupSwitch<HTMLBuffer>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
Switch.doSwitch(org.eclipse.emf.ecore.EObject)

getOCL

@NonNull
protected OCL getOCL()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object