CitationWrapper
|
- |
given an empty citation
|
- |
#constructor
|
- |
should return a CitationWrapper
|
- |
#toString
|
- |
should return undefined
|
- |
should be settable by changing the title
|
- |
test/citations.js |
- |
#constructor
|
- |
should return a CitationWrapper
|
- |
#toString
|
- |
should return the expected string
|
- |
Test whether conversion of Phyx files to an OWL ontology occurs predictably.
|
- |
Test all correct example Phyx files
|
- |
test/examples.js |
- |
should be loadable
|
- |
should validate against our JSON schema
|
- |
should be able to convertible to an OWL Ontology
|
- |
should generate the same OWL ontology as it generated earlier
|
- |
should be convertible to n-quads
|
- |
should generate the same n-quads ontology as it generated earlier
|
- |
Test incorrect example Phyx files that should fail validation
|
- |
test/examples.js |
- |
should not validate against our JSON schema
|
- |
Test whether the expected JSON-LD files pass testing using JPhyloRef.
|
- |
download JPhyloRef
|
- |
has already been downloaded
|
- |
should be downloadable
|
- |
test example JSON-LD files using JPhyloRef
|
- |
test/jphyloref.js |
- |
TaxonNameWrapper
|
- |
#getNomenclaturalCodes
|
- |
should provide a non-empty list with the expected keys
|
- |
#getNomenCodeDetails
|
- |
should provide details for some built-in codes
|
- |
#nomenclaturalCodeDetails
|
- |
should provide nomenclatural code details for an example taxon name
|
- |
TaxonConceptWrapper
|
- |
#nomenCode
|
- |
should return UNKNOWN_CODE if one is not set
|
- |
should return the default nomenclatural code if one is provided
|
- |
PhyxWrapper
|
- |
should use the defaultNomenclaturalCodeIRI for phylogeny nodes
|
- |
should use the inferred nomenclatural code for phylogeny nodes
|
- |
PhylogenyWrapper
|
- |
#constructor
|
- |
when used to wrap an empty object
|
- |
should return a PhylogenyWrapper object
|
- |
#getErrorsInNewickString
|
- |
when given a correct Newick string
|
- |
should return an empty list of errors
|
- |
when given an empty Newick string
|
- |
should return a single "No phylogeny entered" error
|
- |
when given an unbalanced Newick string
|
- |
should report how many parentheses are missing
|
- |
when given an incomplete Newick string
|
- |
should report an error parsing the phylogeny
|
- |
#getNodeLabels
|
- |
For a particular Newick phylogeny
|
- |
should return a list of all node labels by default
|
- |
should return a list of internal labels when asked for internal labels
|
- |
should return a list of terminal labels when asked for terminal labels
|
- |
given a particular phylogeny with additional node properties
|
- |
#getNodeLabels
|
- |
should return the list of node labels from the Newick string
|
- |
#getTaxonomicUnitsForNodeLabel
|
- |
should return the list of taxonomic units using information from additional node properties
|
- |
#getNodeLabelsMatchedBySpecifier
|
- |
should match a specifier to MVZ225749 based on occurrence ID
|
- |
should match a specifier to MVZ191016 based on occurrence ID
|
- |
should match a specifier to node "Rana boylii" based on the parsed scientific name
|
- |
#asJSONLD
|
- |
should preserve an existing @id on input phylogenies
|
- |
should generate a new @id on input phylorefs
|
- |
should generate the phylogeny in JSON-LD as expected
|
- |
#getParsedNewickWithIRIs
|
- |
should be able to parse a provided Newick string as expected
|
- |
PhylorefWrapper
|
- |
given an empty phyloreference
|
- |
#constructor
|
- |
should return a PhylorefWrapper
|
- |
#label
|
- |
should return undefined
|
- |
should be settable by assigning to .label
|
- |
#specifiers
|
- |
should initially return an empty list
|
- |
should initially return a nomenclatural code of unknown
|
- |
when a new external specifier is added using .externalSpecifiers
|
- |
should return a list with the new specifier
|
- |
should return a nomenclatural code of ICZN
|
- |
when a new external specifier is added using .externalSpecifiers
|
- |
should return a list with the new specifier
|
- |
should return two nomenclatural codes, one for each specifier
|
- |
should still return a nomenclatural code of ICZN
|
- |
when a new internal specifier is added using .internalSpecifiers
|
- |
should return a list with the new specifier
|
- |
should return three nomenclatural codes, one for each specifier
|
- |
should change to a default nomenclatural code of owlterms.UNKNOWN_CODE
|
- |
when specifiers are deleted using .deleteSpecifier
|
- |
should return the updated list
|
- |
when a specifier is added using .externalSpecifiers
|
- |
should return the updated list
|
- |
when a specifier is changed to an internal specifier using .setSpecifierType
|
- |
should remain in the list of specifiers
|
- |
when a specifier is added using .internalSpecifiers
|
- |
should be included in the list of all specifiers
|
- |
#getSpecifierType
|
- |
should return the correct specifier type for each specifier
|
- |
#getSpecifierLabel as TaxonomicUnitWrapper
|
- |
should return the correct label for each specifier
|
- |
given a particular phylogeny
|
- |
#getExpectedNodeLabels
|
- |
should be able to determine expected node labels for a phylogeny
|
- |
given an empty phyloreference
|
- |
#getCurrentStatus
|
- |
should return "pso:draft" as the default initial status
|
- |
#setStatus
|
- |
should throw an error if given a mistyped status
|
- |
#getStatusChanges
|
- |
should return the empty list
|
- |
when modified by using .setStatus
|
- |
should return the updated list
|
- |
#asJSONLD
|
- |
should preserve an existing @id on input phylorefs
|
- |
should generate a new @id on input phylorefs
|
- |
should generate the expected equivClass expression for 1 int, 1 ext phyloref
|
- |
should generate the expected equivClass expression for 2 int phyloref
|
- |
test/scripts/phyx2owl.js |
- |
should work without any arguments
|
- |
should support --help
|
- |
should be able to convert brochu_2003.json
|
- |
should be able to convert the entire test/examples/correct directory
|
- |
should give an error if no JSON files could be found
|
- |
bin/resolve.js
|
- |
should work without any arguments
|
- |
should support --help
|
- |
should provide the expected results on the brochu_2003.json example file
|
- |
should correctly report errors with certain phyloreferences
|
- |
SpecimenWrapper
|
- |
#constructor
|
- |
should be able to wrap an empty specimen
|
- |
should be able to extract an occurenceID and catalogNumber from simple specimen IDs
|
- |
should extract institutionCode and catalogNumber from a institutionCode:catalogNumber combination
|
- |
should extract occurenceID, institutionCode and catalogNumber from Darwin Core triples
|
- |
should be able to extract the same occurrenceID from different representations
|
- |
should not attempt to split a URN into occurenceID, institutionCode and catalogNumber
|
- |
should not attempt to split a URL into occurenceID, institutionCode and catalogNumber
|
- |
should be able to create a specimen JSON record from an occurrence ID
|
- |
TaxonNameWrapper
|
- |
#constructor
|
- |
should accept empty taxon names without errors
|
- |
should be able to parse uninomial names as such
|
- |
should be able to parse binomial names into genus and specific epithet
|
- |
should be able to parse trinomial names into genus, specific epithet and infraspecific epithet
|
- |
should ignore authority after a binomial name
|
- |
should be able to use default nomenclatural codes
|
- |
TaxonomicUnitWrapper
|
- |
#constructor given no arguments
|
- |
should create an empty TaxonomicUnitWrapper without a defined label
|
- |
#label given a taxonomic unit
|
- |
should return a wrapped scientific name
|
- |
should return a wrapped specimen identifier preceded by "Specimen"
|
- |
should return specimens with an occurrenceID as well as a taxon concept
|
- |
should ignore occurrence ID if typed as a taxon concept
|
- |
should return a wrapped external reference by surrounding it with "<>"
|
- |
should provide both taxon name and occurrence ID in label, but ignore external reference
|
- |
#fromLabel
|
- |
should return empty lists when inputs are empty or undefined
|
- |
when given a scientific name, it should return a list of a single TU wrapping a scientific name
|
- |
when given a scientific name separated with underscores, it should return a list of a single TU wrapping the scientific name
|
- |
#asOWLEquivClass
|
- |
when given a taxon concept, only the complete name should be present in the equivClass
|
- |
when given a specimen, only the occurrence ID should be present in the equivClass
|
- |
TaxonomicUnitMatcher
|
- |
#matchByNameComplete
|
- |
should be able to match tunit1 and tunit2 by complete name
|
- |
#matchByExternalReferences
|
- |
should be able to match tunit3 and tunit4 by external references
|
- |
#matchByOccurrenceID
|
- |
should be able to match tunit2 and tunit3 by specimen identifiers
|
- |
#matched and #matchReason
|
- |
should match tunit1 and tunit2 on the basis of identical complete names
|
- |
should match tunit3 and tunit4 by identical external reference
|
- |
should match tunit2 and tunit3 by identical specimen identifier
|
- |