Class EarlDocument
- Defined in: node-earl.js
Constructor Attributes | Constructor Name and Description |
---|---|
Class representing an EARL document
See http://www.w3.org/TR/EARL10-Schema/#TestResult
|
Method Summary
Class Detail
EarlDocument()
Class representing an EARL document
See http://www.w3.org/TR/EARL10-Schema/#TestResult
Field Detail
assertions
List of assertions of the EARL document
Method Detail
-
addAssertion(identifier, subject, test)Add an assertion
- Parameters:
- {String} identifier
- Unique string which identify the assertion
- {String} subject
- of the assertion
- {String} test
- name of the tests
-
addTriple(subject, predicate, object)Add a triple to the RDF document
- Parameters:
- {String} subject
- the subject of the RDF triple
- {String} predicate
- the predicate of the RDF triple
- {String} object
- the object ot the RDF triple
-
getAssertion(identifier)Return an assertion given by parameter
- Parameters:
- {String} identifier
- Returns:
- EarlAssertion
-
writeFile(file)Write the EARL document to an N3 file on the disk
- Parameters:
- {String} file
- the file to be wrote on the disk (extension included)