Java Code Examples for org.apache.jena.riot.system.ParserProfile

The following examples show how to use org.apache.jena.riot.system.ParserProfile. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: RDFstarTools   Source File: LangTurtleStar.java    License: Apache License 2.0 5 votes vote down vote up
public LangTurtleStar(Tokenizer tokens, ParserProfile profile, StreamRDF dest) {
    super(tokens, wrapParserProfileIfNeeded(profile), dest);

    if ( ! (tokens instanceof TokenizerText) )
    	throw new IllegalArgumentException( "The given tokenizer is of an unexpected type (" + tokens.getClass().getName() + ")" );

    setCurrentGraph(null) ;
}
 
Example 2
Source Project: RDFstarTools   Source File: ParserProfileTurtleStar.java    License: Apache License 2.0 5 votes vote down vote up
static public Node createTripleNodeFromEmbeddedTripleToken(
		final ParserProfile profile, final Node scope,
		final Token token, final long line, final long col) 
{
	final Token tokenS = EmbeddedTripleTokenUtils.getSubjectSubToken(token);
	final Token tokenP = EmbeddedTripleTokenUtils.getPredicateSubToken(token);
	final Token tokenO = EmbeddedTripleTokenUtils.getObjectSubToken(token);

	final Node s = profile.create(scope, tokenS);
	final Node p = profile.create(scope, tokenP);
	final Node o = profile.create(scope, tokenO);

	final Triple t = profile.createTriple(s, p, o, token.getLine(), token.getColumn());
	return new Node_Triple(t);
}
 
Example 3
Source Project: RDFstarTools   Source File: LangTurtleStar.java    License: Apache License 2.0 4 votes vote down vote up
static protected ParserProfile wrapParserProfileIfNeeded( ParserProfile profile ) {
    if ( profile instanceof ParserProfileTurtleStar )
    	return profile;
    else
    	return new ParserProfileTurtleStarWrapperImpl(profile);
}
 
Example 4
Source Project: RDFstarTools   Source File: LangTurtleStar.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public ReaderRIOT create(Lang lang, ParserProfile profile) {
    return new TurtleStarReaderRIOT(lang, profile);
}
 
Example 5
Source Project: RDFstarTools   Source File: LangTurtleStar.java    License: Apache License 2.0 4 votes vote down vote up
TurtleStarReaderRIOT(Lang lang, ParserProfile parserProfile) {
    this.lang = lang;
    this.parserProfile = parserProfile;
}
 
Example 6
public ParserProfileTurtleStarWrapperImpl( final ParserProfile profile ) {
	this.profile = profile;
}
 
Example 7
Source Project: xcurator   Source File: ExRIOT_5.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public ParserProfile getParserProfile() {
    return null ;
}
 
Example 8
Source Project: xcurator   Source File: ExRIOT_5.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void setParserProfile(ParserProfile profile) {}