forked from awslabs/aws-athena-query-federation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request awslabs#18 from iansrobinson/master
Update rdf4j version
- Loading branch information
Showing
8 changed files
with
117 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 0 additions & 94 deletions
94
neptune-export/src/main/java/com/amazonaws/services/neptune/rdf/StatementHandler.java
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
neptune-export/src/main/java/com/amazonaws/services/neptune/rdf/io/EnhancedTurtleWriter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"). | ||
You may not use this file except in compliance with the License. | ||
A copy of the License is located at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
or in the "license" file accompanying this file. This file is distributed | ||
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
express or implied. See the License for the specific language governing | ||
permissions and limitations under the License. | ||
*/ | ||
|
||
package com.amazonaws.services.neptune.rdf.io; | ||
|
||
import com.amazonaws.services.neptune.io.Status; | ||
import com.amazonaws.services.neptune.rdf.Prefixes; | ||
import org.eclipse.rdf4j.model.Statement; | ||
import org.eclipse.rdf4j.rio.RDFHandlerException; | ||
import org.eclipse.rdf4j.rio.turtle.TurtleWriter; | ||
|
||
import java.io.IOException; | ||
import java.io.Writer; | ||
|
||
public class EnhancedTurtleWriter extends TurtleWriter { | ||
|
||
private final Prefixes prefixes; | ||
private final Status status = new Status(); | ||
|
||
public EnhancedTurtleWriter(Writer writer, Prefixes prefixes) { | ||
super(writer); | ||
this.prefixes = prefixes; | ||
} | ||
|
||
@Override | ||
public void handleStatement(Statement statement) throws RDFHandlerException { | ||
|
||
prefixes.parse(statement.getSubject().stringValue(), this); | ||
prefixes.parse(statement.getPredicate().toString(), this); | ||
prefixes.parse(statement.getObject().stringValue(), this); | ||
|
||
super.handleStatement(statement); | ||
|
||
status.update(); | ||
} | ||
|
||
@Override | ||
protected void writeNamespace(String prefix, String name) | ||
throws IOException { | ||
// Do nothing | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
neptune-export/src/main/java/com/amazonaws/services/neptune/rdf/io/StatementsPrinter.java
This file was deleted.
Oops, something went wrong.