{"id":19292152,"url":"https://github.com/nasa-pds/pds4-jparser","last_synced_at":"2026-06-11T02:01:40.715Z","repository":{"id":43273662,"uuid":"193800615","full_name":"NASA-PDS/pds4-jparser","owner":"NASA-PDS","description":"Java Library providing APIs for parsing and exporting information on PDS4 products, including table and image objects to various formats including CSV, PNG, VICAR, FITs, etc.","archived":false,"fork":false,"pushed_at":"2026-05-27T00:15:52.000Z","size":41709,"stargazers_count":5,"open_issues_count":10,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-05-27T02:06:39.149Z","etag":null,"topics":["nasa","nasa-pds","pds4"],"latest_commit_sha":null,"homepage":"https://nasa-pds.github.io/pds4-jparser/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NASA-PDS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-26T00:16:21.000Z","updated_at":"2026-05-27T00:15:52.000Z","dependencies_parsed_at":"2023-10-04T21:45:34.062Z","dependency_job_id":"55850381-e485-4bfc-9d09-31c1bdb67190","html_url":"https://github.com/NASA-PDS/pds4-jparser","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/NASA-PDS/pds4-jparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fpds4-jparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fpds4-jparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fpds4-jparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fpds4-jparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NASA-PDS","download_url":"https://codeload.github.com/NASA-PDS/pds4-jparser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-PDS%2Fpds4-jparser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34178819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nasa","nasa-pds","pds4"],"created_at":"2024-11-09T22:29:27.289Z","updated_at":"2026-06-11T02:01:40.691Z","avatar_url":"https://github.com/NASA-PDS.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDS4 JParser\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5725957.svg)](https://doi.org/10.5281/zenodo.5725957) [![🤪 Unstable integration \u0026 delivery](https://github.com/NASA-PDS/pds4-jparser/actions/workflows/unstable-cicd.yaml/badge.svg)](https://github.com/NASA-PDS/pds4-jparser/actions/workflows/unstable-cicd.yaml) [![😌 Stable integration \u0026 delivery](https://github.com/NASA-PDS/pds4-jparser/actions/workflows/stable-cicd.yaml/badge.svg)](https://github.com/NASA-PDS/pds4-jparser/actions/workflows/stable-cicd.yaml)\n\nJava library providing APIs for parsing and exporting information\non PDS4 table and image objects to various formats including CSV, PNG, Vicar, \nFits, etc. The software is packaged in a JAR file.\n\nPlease visit the website https://NASA-PDS.github.io/pds4-jparser/ for information on installation, use, operation, and also *development* of this software.\n\n**Looking for a Python library? See the [Planetary Data Reader (pdr)](https://github.com/MillionConcepts/pdr)**\n\n\n# System Requirements\nCurrent software requires:\n* Java 17 or higher\n* Maven 3\n\n# Documentation\nThe documentation including release notes, installation and operation of the \nsoftware should be online at https://NASA-PDS.github.io/pds4-jparser/. If it is not \naccessible, you can execute the \"mvn site:run\" command and view the \ndocumentation locally at http://localhost:8080.\n\n# Build\n\nThe software can be compiled and built with the \"mvn compile\" command but in order \nto create the JAR file, you must execute the \"mvn compile jar:jar\" command. \n\nIn order to create a complete distribution package, execute the \nfollowing commands: \n\n```\nmvn site\nmvn package\n```\n\n# Upgrading the PDS4 Information Model (IM) Version\n\npds4-jparser generates its JAXB Java classes from a pinned PDS4 IM schema version. When a new IM release introduces new root product types, no corresponding Java class exists in the generated sources. Any downstream tool that processes a label with that root element will receive a JAXB `UnmarshalException`, causing product-level processing to be silently skipped. Keeping this library in sync with the IM ensures all current PDS4 product types can be parsed correctly.\n\n**When to upgrade:** a new IM release introduces product types not covered by the current version, a downstream tool reports `UnmarshalException: unexpected element ... local:\"Product_Xyz\"`, or the PDS release cycle requires support for a new IM version.\n\n## Step-by-step upgrade procedure\n\n**Step 1 — Add the new schema files**\n\nDownload the new XSD files from the [PDS4 IM release page](https://pds.nasa.gov/datastandards/schema/released/) and place them in a new versioned directory:\n\n```\nsrc/build/resources/schema/\u003cNEW_VERSION\u003e/\n  PDS4_PDS_\u003cNEW_VERSION\u003e.xsd\n  PDS4_DISP_\u003cNEW_VERSION\u003e.xsd\n```\n\n**Step 2 — Update `model-version` in `pom.xml`**\n\nIn the `\u003cproperties\u003e` section, update the pinned version:\n\n```xml\n\u003cmodel-version\u003eNEW_VERSION\u003c/model-version\u003e\n```\n\n**Step 3 — Regenerate JAXB classes**\n\n```bash\nmvn clean generate-sources\n```\n\nInspect `target/generated-sources/main/java/gov/nasa/arc/pds/xml/generated/` for new `Product*.java` classes introduced by the new IM version.\n\n**Step 4 — Wire new product types into `Label.java`**\n\nFor each new `Product_Xyz` class, add a dispatch branch in `getDataObjects(Product)`:\n\n```java\n} else if (product instanceof ProductXyz) {\n    return getDataObjects((ProductXyz) product);\n}\n```\n\nThen add a private handler method. If the product type has `File_Area_*` children, iterate over them (see existing handlers for `ProductAncillary` or `ProductObservational` as templates). If it has no file areas, return `Collections.emptyList()` and document why (see `getDataObjects(ProductResource)` as an example).\n\n**Step 5 — Update `ProductType.java`**\n\nAdd an enum constant for each new product type and import the generated class:\n\n```java\n/** A PDS4 Xyz product (introduced in IM X000). */\nPRODUCT_XYZ(ProductXyz.class),\n```\n\n**Step 6 — Fix type-change compilation errors (if any)**\n\nOccasionally a schema upgrade changes the Java type of a generated field (e.g. `int` → `BigInteger`). Compile to surface these:\n\n```bash\nmvn compile\n```\n\nUpdate affected source files to use the new type (e.g. replace `field == 3` with `field.intValueExact() == 3` for `BigInteger` fields).\n\n**Step 7 — Verify**\n\n```bash\nmvn clean package\n```\n\nRun the full test suite. If test labels for the new product type are available, validate them manually:\n\n```java\nLabel label = Label.open(new File(\"Product_Xyz_label.xml\"));\nSystem.out.println(label.getProductType());    // should print PRODUCT_XYZ\nSystem.out.println(label.getObjects().size()); // 0 or more, depending on file areas\n```\n\n# Operational Release\n\n## Run pre-build software\n\nWhen new PDS4 Information Model is available, run the following script to download the latest IM and \npush to git.\n\n```\n$ build/pre-build.sh\n\npre-build.sh \u003cdev_or_ops\u003e \u003cIM version\u003e\n     dev_or_ops - still in dev or released\n     IM Version - e.g. 1D00\n\n# For dev release of IM\nbuild/pre-build.sh dev 1E00\n\nFor operation release of IM\nbuild/pre-build.sh ops 1E00\n```\n\n\n## Release with ConMan\n\nFor internal JPL use, the ConMan software package can be used for releasing software, otherwise the following sections outline how to complete these steps manually.\n\n## Manual Release\n\nNote that GitHub Actions are enabled for the repository of this software so that automated SNAPSHOT and stable releases are available. Manual release instructions follow below.\n\n\n### Update Version Numbers\n\nUpdate pom.xml for the release version or use the Maven Versions Plugin using [semantic versioning](https://semver.org/). For IM release candidates and operational releases, PDS4 JParser will be built and deployed as an operational release and versioned and re-build if needed.\n\n```\nVERSION=1.1.0\nmvn versions:set -DnewVersion=$VERSION\n```\n\n### Update Changelog\nUpdate Changelog using [ Changelog Generator](https://github.com/github-changelog-generator/github-changelog-generator). Note: Make sure you set `$CHANGELOG_GITHUB_TOKEN` in your `.bash_profile` or use the `--token` flag.\n```\ngithub_changelog_generator --future-release v$VERSION\n```\n\n### Commit Changes\nCommit changes using following template commit message:\n```\n[RELEASE] PDS4 Java Parser Library v$VERSION\n```\n\n### Build and Deploy Software to [Sonatype Maven Repo](https://repo.maven.apache.org/maven2/gov/nasa/pds/).\n\n```\nmvn clean site deploy -P release\n```\n\nNote: If you have issues with GPG, be sure to make sure you've created your GPG key, sent to server, and have the following in your `~/.m2/settings.xml`:\n```\n\u003cprofiles\u003e\n  \u003cprofile\u003e\n    \u003cactivation\u003e\n      \u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\n    \u003c/activation\u003e\n    \u003cproperties\u003e\n      \u003cgpg.executable\u003egpg\u003c/gpg.executable\u003e\n      \u003cgpg.keyname\u003eKEY_NAME\u003c/gpg.keyname\u003e\n      \u003cgpg.passphrase\u003eKEY_PASSPHRASE\u003c/gpg.passphrase\u003e\n    \u003c/properties\u003e\n  \u003c/profile\u003e\n\u003c/profiles\u003e\n\n```\n\n### Push Tagged Release\n```\ngit tag v$VERSION\ngit push --tags\n```\n\n### Deploy Site to Github Pages\n\nFrom cloned repo:\n```\ngit checkout gh-pages\n\n# Create specific version site\nmv target/site $VERSION\nrm -fr target\n\n# Sync latest version to ops \nrsync -av $VERSION/* .\ngit add .\ngit commit -m \"Deploy v$VERSION docs\"\ngit push origin gh-pages\n```\n\n### Update Versions For Development\n\nUpdate `pom.xml` with the next SNAPSHOT version either manually or using Github Versions Plugin, e.g.:\n```\ngit checkout main\nVERSION=1.16.0-SNAPSHOT\nmvn versions:set -DnewVersion=$VERSION\ngit add pom.xml\ngit commit -m \"Update version for $VERSION development\"\ngit push -u origin main\n```\n\n### Complete Release in Github\nCurrently the process to create more formal release notes and attach Assets is done manually through the [Github UI](https://github.com/NASA-PDS/pds4-jparser/releases/new) but should eventually be automated via script.\n\n## Snapshot Release\n1. Checkout the main branch.\n\n2. Deploy software to Sonatype Maven repo:\n```\nmvn clean site deploy\n```\n\n# JAR Dependency Reference\n\n## Official Releases\nhttps://search.maven.org/search?q=g:gov.nasa.pds%20AND%20a:pds4-jparser\u0026core=gav\n\n## Snapshots\nhttps://oss.sonatype.org/content/repositories/snapshots/gov/nasa/pds/pds4-jparser\n\nIf you want to access snapshots, add the following to your `~/.m2/settings.xml`:\n```\n\u003cprofiles\u003e\n  \u003cprofile\u003e\n     \u003cid\u003eallow-snapshots\u003c/id\u003e\n     \u003cactivation\u003e\u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\u003c/activation\u003e\n     \u003crepositories\u003e\n       \u003crepository\u003e\n         \u003cid\u003esnapshots-repo\u003c/id\u003e\n         \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n         \u003creleases\u003e\u003cenabled\u003efalse\u003c/enabled\u003e\u003c/releases\u003e\n         \u003csnapshots\u003e\u003cenabled\u003etrue\u003c/enabled\u003e\u003c/snapshots\u003e\n       \u003c/repository\u003e\n     \u003c/repositories\u003e\n   \u003c/profile\u003e\n\u003c/profiles\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-pds%2Fpds4-jparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasa-pds%2Fpds4-jparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-pds%2Fpds4-jparser/lists"}