org.eclipse.mylyn.wikitext.core.parser.markup
Class DefaultIdGenerationStrategy

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.parser.markup.IdGenerationStrategy
      extended by org.eclipse.mylyn.wikitext.core.parser.markup.DefaultIdGenerationStrategy

public class DefaultIdGenerationStrategy
extends IdGenerationStrategy

A default ID generation strategy which removes all non-alphanumeric characters from the heading text to produce an id.

Since:
1.0
Author:
David Green

Constructor Summary
DefaultIdGenerationStrategy()
           
 
Method Summary
 String generateId(String headingText)
          produce an id for use in an HTML anchor from heading text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIdGenerationStrategy

public DefaultIdGenerationStrategy()
Method Detail

generateId

public String generateId(String headingText)
Description copied from class: IdGenerationStrategy
produce an id for use in an HTML anchor from heading text.

Specified by:
generateId in class IdGenerationStrategy
Parameters:
headingText - the text of the heading
Returns:
an Id, or null if no Id could be computed from the given text


Copyright © 2011 FuseSource, Corp.. All Rights Reserved.