Merge pull request #2 from DieterDePaepe/fixes

Various fixes.
This commit is contained in:
Pieter Colpaert 2016-11-29 11:30:33 +01:00 committed by GitHub
commit 6ef022c8f8
6 changed files with 4727 additions and 3653 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules node_modules
public/js/ttl.js

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) IDLab - Ghent University - imec
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -2,7 +2,7 @@ TurtleValidator
=========== ===========
RDF NTriples/Turtle validator using Ruben Verborgh's [N3 NodeJS library](https://github.com/RubenVerborgh/N3.js). Validate Turtle and Ntriples documents on syntax and XSD datatype errors through command line. RDF NTriples/Turtle validator using Ruben Verborgh's [N3 NodeJS library](https://github.com/RubenVerborgh/N3.js). Validate Turtle and Ntriples documents on syntax and XSD datatype errors through command line.
© 2014, 2015 - MMLab - Ghent University - iMinds © 2014, 2015 - IDLab - Ghent University - imec
Source code: https://github.com/MMLab/TurtleValidator Source code: https://github.com/MMLab/TurtleValidator
Install: Install:

View File

@ -8,15 +8,23 @@
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head> </head>
<body> <body>
<h1>MMLab Turtle Validator</h1> <div class="container">
<h2>Paste your turtle file in here and press validate</h2> <h1>IDLab Turtle Validator</h1>
<form> <p>This is the web version of the NodeJS <a href="https://github.com/mmlab/TurtleValidator">Turtle Validator</a>,
<textarea class="area" id="ta_turtle"></textarea> which is also available as a command line tool.</p>
<input type="button" id="btn_validate" value="Validate!"/> <h2>Paste your turtle file in here and press validate</h2>
</form> <form>
<p id="errors"></p> <div class="form-group">
<p id="warnings"></p> <textarea class="area" id="ta_turtle"></textarea>
<p id="results"></p> </div>
<script src="js/app.js"></script> <div class="form-group">
<input type="button" id="btn_validate" class="btn btn-default" value="Validate!"/>
</div>
</form>
<ul id="errors"></ul>
<ul id="warnings"></ul>
<p id="results"></p>
<script src="js/app.js"></script>
</div>
</body> </body>
</html> </html>

View File

@ -5,15 +5,15 @@ $("#btn_validate").click( function () {
validate($("#ta_turtle").val(), function (feedback) { validate($("#ta_turtle").val(), function (feedback) {
$.each(feedback.warnings, function (index, warning) { $.each(feedback.warnings, function (index, warning) {
$("#warnings").append('<p id="warning' + index + '">' + warning + '<br/>'); $("#warnings").append($('<li id="warning' + index + '">').text(warning));
}); });
$.each(feedback.errors, function (index, error) { $.each(feedback.errors, function (index, error) {
$("#errors").append('<p id="error' + index + '">' + error + '<br/>'); $("#errors").append($('<li id="error' + index + '">').text(error));
}); });
if (feedback.errors.length === 0 && feedback.warnings.length === 0) { if (feedback.errors.length === 0 && feedback.warnings.length === 0) {
$("#results").append("Congrats! We've validated your output and it contains 0 errors or warnings."); $("#results").append("Congrats! Your syntax is correct.");
} }
}); });
}); });

File diff suppressed because it is too large Load Diff