org.nlp2rdf.core.util
Class URIGeneratorHelper

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

public class URIGeneratorHelper
extends Object

Author:
Sebastian Hellmann - http://bis.informatik.uni-leipzig.de/SebastianHellmann Created: 29.06.11

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


Constructor Summary
URIGeneratorHelper()
           
 
Method Summary
static URIGenerator determineGenerator(com.hp.hpl.jena.ontology.OntModel model)
          determines the respective generator from a model currently it is only recognized if the respective class is assigned once.
static URIGenerator determineGenerator(String recipe)
           
static String getContextAfter(opennlp.tools.util.Span span, String text, int contextLength)
           
static String getContextBefore(opennlp.tools.util.Span span, String text, int contextLength)
           
static String getFirstCharacters(String anchoredPart, int firstCharLength)
          return the first characters of the anchored part urlencoded
static List<opennlp.tools.util.Span> getSpans(List<IString> strings, String prefix, String text, URIGenerator uriGenerator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIGeneratorHelper

public URIGeneratorHelper()
Method Detail

getSpans

public static List<opennlp.tools.util.Span> getSpans(List<IString> strings,
                                                     String prefix,
                                                     String text,
                                                     URIGenerator uriGenerator)

determineGenerator

public static URIGenerator determineGenerator(String recipe)

determineGenerator

public static URIGenerator determineGenerator(com.hp.hpl.jena.ontology.OntModel model)
determines the respective generator from a model currently it is only recognized if the respective class is assigned once. No heuristic is used to determine the URI Recipe, otherwise.

Parameters:
model -
Returns:

getContextBefore

public static String getContextBefore(opennlp.tools.util.Span span,
                                      String text,
                                      int contextLength)

getContextAfter

public static String getContextAfter(opennlp.tools.util.Span span,
                                     String text,
                                     int contextLength)

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.