Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2d861692 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- improved prefix generation (added # in the end of needing URIs)

parent c3e085d3
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id$ * $Id$
* *
* Copyright (C) INRIA, 2012 * Copyright (C) INRIA, 2012, 2014
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
...@@ -80,8 +80,8 @@ import fr.inrialpes.exmo.align.impl.edoal.EDOALCell; ...@@ -80,8 +80,8 @@ import fr.inrialpes.exmo.align.impl.edoal.EDOALCell;
import fr.inrialpes.exmo.align.impl.edoal.EDOALVisitor; import fr.inrialpes.exmo.align.impl.edoal.EDOALVisitor;
/** /**
* Renders an alignment in JSON (and practically in JSON-LD) * Renders an alignment in JSON (and in fact in JSON-LD)
* http://json-ld.org/spec/latest/json-ld-syntax/ * IETF RFC 7159 + http://www.w3.org/TR/json-ld/
* *
* application/json <========= media type available * application/json <========= media type available
* *
...@@ -127,6 +127,7 @@ public class JSONRendererVisitor extends IndentedRendererVisitor implements Alig ...@@ -127,6 +127,7 @@ public class JSONRendererVisitor extends IndentedRendererVisitor implements Alig
for ( String[] ext : align.getExtensions() ) { for ( String[] ext : align.getExtensions() ) {
String prefix = ext[0]; String prefix = ext[0];
String name = ext[1]; String name = ext[1];
if ( ! ( prefix.endsWith("#") || prefix.endsWith("/") ) ) prefix += "#";
String tag = nslist.get(prefix); String tag = nslist.get(prefix);
if ( tag == null ) { if ( tag == null ) {
tag = "ns"+gen++; tag = "ns"+gen++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment