yangxk1 commented on code in PR #780:
URL: https://github.com/apache/incubator-graphar/pull/780#discussion_r2597897642


##########
maven-projects/info/src/main/java/org/apache/graphar/info/saver/BaseGraphInfoSaver.java:
##########
@@ -48,13 +53,22 @@ public void save(URI graphInfoUri, GraphInfo graphInfo) 
throws IOException {
 
     @Override
     public void save(URI vertexInfoUri, VertexInfo vertexInfo) throws 
IOException {
+        // if vertexInfoUri is a directory then save to 
${vertexInfo.type}.vertex.yml
+        if (vertexInfoUri.getPath().endsWith("/")) {
+            vertexInfoUri =
+                    URI.create(vertexInfoUri.toString() + vertexInfo.getType() 
+ ".vertex.yaml");
+        }
         Writer vertexWriter = writeYaml(vertexInfoUri);
         vertexInfo.dump(vertexWriter);
         vertexWriter.close();
     }
 
     @Override
     public void save(URI edgeInfoUri, EdgeInfo edgeInfo) throws IOException {
+        // if edgeInfoUri is a directory then save to 
${edgeInfo.getConcat()}.edge.yml

Review Comment:
   use yml



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to