org.nlp2rdf.core.util
Class URIGeneratorHelper
java.lang.Object
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
URIGeneratorHelper
public URIGeneratorHelper()
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 Stringtext - contextLength -
- Returns:
getContextAfter
public static String getContextAfter(Span span,
String text,
int contextLength)
- Parameters:
span - the span of the addressed Stringtext - 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.