org.eaglei.datatools.etl.utils
Class ETLUtils
java.lang.Object
org.eaglei.datatools.etl.utils.ETLUtils
public class ETLUtils
- extends java.lang.Object
- Author:
- Sravan Cheriyala
|
Method Summary |
static java.lang.String |
evaluateExpression(java.util.Map<java.lang.String,java.lang.String> columnMap,
java.lang.String expressionString)
Evaluates the object Expression ,that is it converts $1 $2 .. |
static java.lang.String |
formXML(java.lang.String aText)
|
static java.lang.String |
forRegex(java.lang.String aRegexFragment)
|
static java.util.Set<java.lang.String> |
getExpressionsInMapFile(java.io.InputStream mapStream)
|
static java.lang.String[] |
getLabelAndRootURI(com.hp.hpl.jena.rdf.model.Model tempModel,
java.util.Map<java.lang.String,java.lang.String> columnMap)
|
static java.util.List<java.lang.String> |
getReourceURIFromModel(com.hp.hpl.jena.rdf.model.Model model)
|
static com.hp.hpl.jena.rdf.model.Model |
getsubModelByExpression(java.lang.String expression,
com.hp.hpl.jena.rdf.model.Model rdfModel)
this utility method returns the subModel given by the Expression such as EX:e+$1 etc FIXME:write more documentation |
static java.lang.String |
getTypeOfModel(com.hp.hpl.jena.rdf.model.Model rdfModel)
|
static boolean |
isLabelPresentInMap(com.hp.hpl.jena.rdf.model.Model rdfModel)
|
static boolean |
isLabelPresentInMap(com.hp.hpl.jena.rdf.model.Statement[] statementAry)
|
static boolean |
isSubjectExpressionPresentInModel(java.lang.String expression,
com.hp.hpl.jena.rdf.model.Model rdfModel)
|
static java.io.InputStream |
replaceColumnNamesWithColumnNumbers(java.io.InputStream mapStream,
java.util.Map<java.lang.String,java.lang.Integer> columnNameToNumberMap)
|
static java.util.List<com.hp.hpl.jena.rdf.model.Statement> |
replaceExpressionWithURI(com.hp.hpl.jena.rdf.model.Statement[] statementAry,
com.hp.hpl.jena.rdf.model.Resource subject,
java.lang.String expressionString)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ETLUtils
public ETLUtils()
getsubModelByExpression
public static com.hp.hpl.jena.rdf.model.Model getsubModelByExpression(java.lang.String expression,
com.hp.hpl.jena.rdf.model.Model rdfModel)
- this utility method returns the subModel given by the Expression such as EX:e+$1 etc FIXME:write more documentation
isSubjectExpressionPresentInModel
public static boolean isSubjectExpressionPresentInModel(java.lang.String expression,
com.hp.hpl.jena.rdf.model.Model rdfModel)
isLabelPresentInMap
public static boolean isLabelPresentInMap(com.hp.hpl.jena.rdf.model.Model rdfModel)
isLabelPresentInMap
public static boolean isLabelPresentInMap(com.hp.hpl.jena.rdf.model.Statement[] statementAry)
getTypeOfModel
public static java.lang.String getTypeOfModel(com.hp.hpl.jena.rdf.model.Model rdfModel)
throws java.lang.NoSuchFieldException
- Throws:
java.lang.NoSuchFieldException
evaluateExpression
public static java.lang.String evaluateExpression(java.util.Map<java.lang.String,java.lang.String> columnMap,
java.lang.String expressionString)
throws java.lang.Exception
- Evaluates the object Expression ,that is it converts $1 $2 .. in to Excel Columns
- Parameters:
rdf123Exp - row - objectString -
- Returns:
-
- Throws:
java.lang.Exception
getLabelAndRootURI
public static java.lang.String[] getLabelAndRootURI(com.hp.hpl.jena.rdf.model.Model tempModel,
java.util.Map<java.lang.String,java.lang.String> columnMap)
throws java.lang.Exception
- Throws:
java.lang.Exception
replaceExpressionWithURI
public static java.util.List<com.hp.hpl.jena.rdf.model.Statement> replaceExpressionWithURI(com.hp.hpl.jena.rdf.model.Statement[] statementAry,
com.hp.hpl.jena.rdf.model.Resource subject,
java.lang.String expressionString)
getReourceURIFromModel
public static java.util.List<java.lang.String> getReourceURIFromModel(com.hp.hpl.jena.rdf.model.Model model)
replaceColumnNamesWithColumnNumbers
public static java.io.InputStream replaceColumnNamesWithColumnNumbers(java.io.InputStream mapStream,
java.util.Map<java.lang.String,java.lang.Integer> columnNameToNumberMap)
throws java.io.IOException
- Throws:
java.io.IOException
getExpressionsInMapFile
public static java.util.Set<java.lang.String> getExpressionsInMapFile(java.io.InputStream mapStream)
throws java.io.IOException
- Throws:
java.io.IOException
formXML
public static java.lang.String formXML(java.lang.String aText)
forRegex
public static java.lang.String forRegex(java.lang.String aRegexFragment)
Copyright © 2009-2011 Eagle-I. All Rights Reserved.