Skip to content

Commit

Permalink
updates links and docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
stopfstedt committed Feb 12, 2024
1 parent 871576c commit 8c1d34c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# MeSH Parser

This PHP code library provides tools for extracting [Medical Subject Headings](https://www.nlm.nih.gov/mesh/)
This PHP code library provides tools for extracting [Medical Subject Headings](https://www.nlm.nih.gov/mesh/meshhome.html)
(MeSH) descriptors and associated data from a given XML file into an object representation.

It expects its input to be compliant with the 2019 or 2020 [MeSH DTDs](https://www.nlm.nih.gov/databases/dtd/).
It expects its input to be compliant with the 2023 or 2024 [MeSH DTDs](https://www.nlm.nih.gov/databases/download/mesh.html).

## Installation

Expand All @@ -15,11 +15,11 @@ composer require ilios/mesh-parser

## Usage

Instantiate `\Ilios\MeSH\Parser` and invoke its `parse()` method with an URI that points at valid MeSH descriptors
Instantiate `\Ilios\MeSH\Parser` and invoke its `parse()` method with a URI that points at valid MeSH descriptors
XML file.
This method call will return an instance of `\Ilios\MeSH\Model\DescriptorSet`; this is the entry point into
the object representation of the descriptors data model.
Use getter methods on this object and its sub-components to traverse and process this model.
Use getter methods on this object and its subcomponents to traverse and process this model.

### Example

Expand All @@ -28,8 +28,8 @@ Use getter methods on this object and its sub-components to traverse and process

require __DIR__ . '/vendor/autoload.php';

// provide an URL or a local file path.
//$uri = 'ftp://nlmpubs.nlm.nih.gov/online/mesh/MESH_FILES/xmlmesh/desc2020.xml';
// provide a URL or a local file path.
//$uri = 'https://nlmpubs.nlm.nih.gov/projects/mesh/MESH_FILES/xmlmesh/desc2024.xml';
$uri = __DIR__ . '/desc2019.xml';

// instantiate the parser and parse the input.
Expand Down
2 changes: 1 addition & 1 deletion src/Ilios/MeSH/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Class Parser
* @package Ilios\MeSH
* @link http://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20160101.dtd
* @link https://nlmpubs.nlm.nih.gov/projects/mesh/MESH_FILES/xmlmesh/DTD/2024/nlmdescriptorrecordset_20240101.dtd
*/
class Parser
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Ilios/MeSH/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testForIncompleteDateFailure(): void
{
$xml = <<<EOL
<?xml version="1.0"?>
<!DOCTYPE DescriptorRecordSet SYSTEM "https://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20170101.dtd">
<!DOCTYPE DescriptorRecordSet SYSTEM "https://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20240101.dtd">
<DescriptorRecordSet LanguageCode="eng">
<DescriptorRecord DescriptorClass="1">
<DescriptorUI>D000000</DescriptorUI>
Expand All @@ -68,7 +68,7 @@ public function testForInvalidStringNodeFailure(): void
{
$xml = <<<EOL
<?xml version="1.0"?>
<!DOCTYPE DescriptorRecordSet SYSTEM "https://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20170101.dtd">
<!DOCTYPE DescriptorRecordSet SYSTEM "https://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20240101.dtd">
<DescriptorRecordSet LanguageCode="eng">
<DescriptorRecord DescriptorClass="1">
<DescriptorUI>D000000</DescriptorUI>
Expand Down
2 changes: 1 addition & 1 deletion tests/Ilios/MeSH/desc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Fake MeSH descriptors set, for testing purposes.
It contains all possible elements defined by the schema.
-->
<!DOCTYPE DescriptorRecordSet SYSTEM "https://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20170101.dtd">
<!DOCTYPE DescriptorRecordSet SYSTEM "https://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20240101.dtd">
<DescriptorRecordSet LanguageCode="eng">
<DescriptorRecord DescriptorClass="1">
<DescriptorUI>D000000</DescriptorUI>
Expand Down

0 comments on commit 8c1d34c

Please sign in to comment.