org.nlp2rdf.core.util
Class URIGeneratorHelper

java.lang.Object
  extended by org.nlp2rdf.core.util.URIGeneratorHelper

public class URIGeneratorHelper
extends Object

Author:
Sebastian Hellmann Created: 29.06.11

This class contains static helper methods for handling and validating a model


Constructor Summary
URIGeneratorHelper()
           
 
Method Summary
static URIGenerator determineGenerator(String recipe, int contextLength)
          Based on the recipe string as sepicfied the method returns an urigenerator object default for contextlength should be 10 if client did not provide anything else
static String getContextAfter(Span span, String text, int contextLength)
           
static String getContextBefore(Span span, String text, int contextLength)
           
static String getFirstCharacters(String anchoredPart, int firstCharLength)
          return the first characters of the anchored part urlencoded
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIGeneratorHelper

public URIGeneratorHelper()
Method Detail

determineGenerator

public static URIGenerator determineGenerator(String recipe,
                                              int contextLength)
Based on the recipe string as sepicfied the method returns an urigenerator object default for contextlength should be 10 if client did not provide anything else

Parameters:
recipe -
contextLength - default is 10 and it is legal to put it here as a "Magic Number"
Returns:

getContextBefore

public static String getContextBefore(Span span,
                                      String text,
                                      int contextLength)
Parameters:
span - the span of the addressed String
text -
contextLength -
Returns:

getContextAfter

public static String getContextAfter(Span span,
                                     String text,
                                     int contextLength)
Parameters:
span - the span of the addressed String
text -
contextLength -
Returns:

getFirstCharacters

public static String getFirstCharacters(String anchoredPart,
                                        int firstCharLength)
return the first characters of the anchored part urlencoded

Parameters:
anchoredPart -
firstCharLength -
Returns:


Copyright © 2011. All Rights Reserved.