org.topbraid.strings.classexpressions
Class ProseGenerator

java.lang.Object
  extended by org.topbraid.strings.classexpressions.ProseGenerator
All Implemented Interfaces:
ILabelsPlugin

public class ProseGenerator
extends java.lang.Object
implements ILabelsPlugin


Field Summary
static java.lang.String AND
           
static java.lang.String NOT
           
static java.lang.String[] NUMBERS
           
static java.lang.String OR
           
static java.lang.String SPACE
           
 
Constructor Summary
ProseGenerator()
           
ProseGenerator(boolean useLabels)
           
 
Method Summary
 void appendLabel(java.lang.StringBuffer buffer, com.hp.hpl.jena.rdf.model.RDFNode node, boolean multiLine)
           
 void appendNestedLabel(java.lang.StringBuffer buffer, com.hp.hpl.jena.rdf.model.RDFNode node, boolean multiLine)
           
 void appendNestedLabel(java.lang.StringBuffer buffer, com.hp.hpl.jena.rdf.model.RDFNode node, boolean multiLine, boolean plural)
           
protected  void appendURIResource(java.lang.StringBuffer buffer, java.lang.String str, com.hp.hpl.jena.rdf.model.Resource resource)
           
 boolean isKeyword(java.lang.String word)
          Checks if a given string is a keyword (such as 'max') in this plugin.
 boolean isSuitable(com.hp.hpl.jena.rdf.model.RDFNode node)
          Checks if this plugin is suitable to render a given node into text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AND

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

NOT

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

OR

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

SPACE

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

NUMBERS

public static final java.lang.String[] NUMBERS
Constructor Detail

ProseGenerator

public ProseGenerator()

ProseGenerator

public ProseGenerator(boolean useLabels)
Method Detail

appendLabel

public void appendLabel(java.lang.StringBuffer buffer,
                        com.hp.hpl.jena.rdf.model.RDFNode node,
                        boolean multiLine)
Specified by:
appendLabel in interface ILabelsPlugin

appendNestedLabel

public void appendNestedLabel(java.lang.StringBuffer buffer,
                              com.hp.hpl.jena.rdf.model.RDFNode node,
                              boolean multiLine)
Specified by:
appendNestedLabel in interface ILabelsPlugin

appendNestedLabel

public void appendNestedLabel(java.lang.StringBuffer buffer,
                              com.hp.hpl.jena.rdf.model.RDFNode node,
                              boolean multiLine,
                              boolean plural)

appendURIResource

protected void appendURIResource(java.lang.StringBuffer buffer,
                                 java.lang.String str,
                                 com.hp.hpl.jena.rdf.model.Resource resource)

isKeyword

public boolean isKeyword(java.lang.String word)
Description copied from interface: ILabelsPlugin
Checks if a given string is a keyword (such as 'max') in this plugin.

Specified by:
isKeyword in interface ILabelsPlugin
Parameters:
word - the word to check
Returns:
true if word is a keyword

isSuitable

public boolean isSuitable(com.hp.hpl.jena.rdf.model.RDFNode node)
Description copied from interface: ILabelsPlugin
Checks if this plugin is suitable to render a given node into text.

Specified by:
isSuitable in interface ILabelsPlugin
Parameters:
node - the node to check
Returns:
true if this can create a string representation of the node