« CycloneDX/CryptoProperties/CertificateProperties.pm
↑ Summary
CycloneDX/CryptoProperties/RelatedCryptoMaterialProperties.pm »
| 1 | package SBOM::CycloneDX::Patent; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use SBOM::CycloneDX::BomRef; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use SBOM::CycloneDX::Enum; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use SBOM::CycloneDX::List; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use SBOM::CycloneDX::Timestamp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 1 | ▶ | use Types::Standard qw(Str InstanceOf Enum); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 1 | ▶ | use Types::TypeTiny qw(ArrayLike); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 1 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | |||||||||||
| 19 | 1 | extends 'SBOM::CycloneDX::Base'; | |||||||||
| 20 | |||||||||||
| 21 | has bom_ref => ( | ||||||||||
| 22 | is => 'rw', | ||||||||||
| 23 | isa => InstanceOf ['SBOM::CycloneDX::BomRef'], | ||||||||||
| 24 | 0 | ▶ | coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::BomRef->new($_[0]) } | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 25 | 1 | ); | |||||||||
| 26 | |||||||||||
| 27 | 1 | has patent_number => (is => 'rw', isa => Str, required => 1); | |||||||||
| 28 | |||||||||||
| 29 | 1 | has application_number => (is => 'rw', isa => Str); | |||||||||
| 30 | |||||||||||
| 31 | 1 | has jurisdiction => (is => 'rw', required => 1); | |||||||||
| 32 | |||||||||||
| 33 | 1 | has priority_application => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::Patent::PriorityApplication']); | |||||||||
| 34 | |||||||||||
| 35 | 1 | has publication_number => (is => 'rw', isa => Str); | |||||||||
| 36 | |||||||||||
| 37 | 1 | has title => (is => 'rw', isa => Str); | |||||||||
| 38 | |||||||||||
| 39 | 1 | has abstract => (is => 'rw', isa => Str); | |||||||||
| 40 | |||||||||||
| 41 | has filing_date => ( | ||||||||||
| 42 | is => 'rw', | ||||||||||
| 43 | isa => InstanceOf ['SBOM::CycloneDX::Timestamp'], | ||||||||||
| 44 | 0 | ▶ | coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::Timestamp->new($_[0]) } | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 45 | 1 | ); | |||||||||
| 46 | |||||||||||
| 47 | has grant_date => ( | ||||||||||
| 48 | is => 'rw', | ||||||||||
| 49 | isa => InstanceOf ['SBOM::CycloneDX::Timestamp'], | ||||||||||
| 50 | 0 | ▶ | coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::Timestamp->new($_[0]) } | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 51 | 1 | ); | |||||||||
| 52 | |||||||||||
| 53 | has patent_expiration_date => ( | ||||||||||
| 54 | is => 'rw', | ||||||||||
| 55 | isa => InstanceOf ['SBOM::CycloneDX::Timestamp'], | ||||||||||
| 56 | 0 | ▶ | coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::Timestamp->new($_[0]) } | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 57 | 1 | ); | |||||||||
| 58 | |||||||||||
| 59 | 1 | has patent_legal_status => | |||||||||
| 60 | (is => 'rw', isa => Enum [SBOM::CycloneDX::Enum->values('PATENT_LEGAL_STATUS')], required => 1); | ||||||||||
| 61 | |||||||||||
| 62 | has patent_assignee => ( | ||||||||||
| 63 | is => 'rw', | ||||||||||
| 64 | isa => ArrayLike [ | ||||||||||
| 65 | InstanceOf ['SBOM::CycloneDX::OrganizationalContact'] | InstanceOf ['SBOM::CycloneDX::OrganizationalEntity'] | ||||||||||
| 66 | ], | ||||||||||
| 67 | 0 | ▶ | default => sub { SBOM::CycloneDX::List->new } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 68 | 1 | ); | |||||||||
| 69 | |||||||||||
| 70 | has external_references => ( | ||||||||||
| 71 | is => 'rw', | ||||||||||
| 72 | isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::ExternalReference']], | ||||||||||
| 73 | 0 | ▶ | default => sub { SBOM::CycloneDX::List->new } | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 74 | 1 | ); | |||||||||
| 75 | |||||||||||
| 76 | |||||||||||
| 77 | 0 | ▶ | sub TO_JSON { | ||||||||
|
Subroutine
TO_JSON: not called CC=15 SCAR=54.8
Pod
documented
| |||||||||||
| 78 | |||||||||||
| 79 | 0 | my $self = shift; | |||||||||
| 80 | |||||||||||
| 81 | 0 | my $json = {}; | |||||||||
| 82 | |||||||||||
| 83 | 0 | ▶ | $json->{'bom-ref'} = $self->bom_ref if ($self->bom_ref); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 84 | 0 | ▶ | $json->{patentNumber} = $self->patent_number if ($self->patent_number); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 85 | 0 | ▶ | $json->{applicationNumber} = $self->application_number if ($self->application_number); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 86 | 0 | ▶ | $json->{jurisdiction} = $self->jurisdiction if ($self->jurisdiction); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 87 | 0 | ▶ | $json->{priorityApplication} = $self->priority_application if ($self->priority_application); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 88 | 0 | ▶ | $json->{publicationNumber} = $self->publication_number if ($self->publication_number); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 89 | 0 | ▶ | $json->{title} = $self->title if ($self->title); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 90 | 0 | ▶ | $json->{abstract} = $self->abstract if ($self->abstract); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 91 | 0 | ▶ | $json->{filingDate} = $self->filing_date if ($self->filing_date); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 92 | 0 | ▶ | $json->{grantDate} = $self->grant_date if ($self->grant_date); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 93 | 0 | ▶ | $json->{patentExpirationDate} = $self->patent_expiration_date if ($self->patent_expiration_date); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 94 | 0 | ▶ | $json->{patentLegalStatus} = $self->patent_legal_status if ($self->patent_legal_status); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 95 | 0 | ▶ | $json->{patentAssignee} = $self->patent_assignee if (@{$self->patent_assignee}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 96 | 0 | ▶ | $json->{externalReferences} = $self->external_references if (@{$self->external_references}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 97 | |||||||||||
| 98 | 0 | return $json; | |||||||||
| 99 | |||||||||||
| 100 | } | ||||||||||
| 101 | |||||||||||
| 102 | 1 | 1; | |||||||||
| 103 | |||||||||||
| 104 | =encoding utf-8 | ||||||||||
| 105 | |||||||||||
| 106 | =head1 NAME | ||||||||||
| 107 | |||||||||||
| 108 | SBOM::CycloneDX::Patent - Patent | ||||||||||
| 109 | |||||||||||
| 110 | =head1 SYNOPSIS | ||||||||||
| 111 | |||||||||||
| 112 | SBOM::CycloneDX::Patent->new(); | ||||||||||
| 113 | |||||||||||
| 114 | |||||||||||
| 115 | =head1 DESCRIPTION | ||||||||||
| 116 | |||||||||||
| 117 | L<SBOM::CycloneDX::Patent> A patent is a legal instrument, granted by an | ||||||||||
| 118 | authority, that confers certain rights over an invention for a specified | ||||||||||
| 119 | period, contingent on public disclosure and adherence to relevant legal | ||||||||||
| 120 | requirements. The summary information in this object is aligned with | ||||||||||
| 121 | L<WIPO ST.96|https://www.wipo.int/standards/en/st96/> principles where | ||||||||||
| 122 | applicable. | ||||||||||
| 123 | |||||||||||
| 124 | =head2 METHODS | ||||||||||
| 125 | |||||||||||
| 126 | L<SBOM::CycloneDX::Patent> inherits all methods from L<SBOM::CycloneDX::Base> | ||||||||||
| 127 | and implements the following new ones. | ||||||||||
| 128 | |||||||||||
| 129 | =over | ||||||||||
| 130 | |||||||||||
| 131 | =item SBOM::CycloneDX::Patent->new( %PARAMS ) | ||||||||||
| 132 | |||||||||||
| 133 | Properties: | ||||||||||
| 134 | |||||||||||
| 135 | =over | ||||||||||
| 136 | |||||||||||
| 137 | =item * C<abstract>, A brief summary of the invention described in the | ||||||||||
| 138 | patent. Aligned with C<Abstract> and C<P> in WIPO ST.96. Refer to | ||||||||||
| 139 | L<Abstract in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/Abstract.xsd)>. | ||||||||||
| 140 | |||||||||||
| 141 | =item * C<application_number>, The unique number assigned to a patent application | ||||||||||
| 142 | when it is filed with a patent office. It is used to identify the specific | ||||||||||
| 143 | application and track its progress through the examination process. Aligned | ||||||||||
| 144 | with C<ApplicationNumber> in ST.96. Refer to L<ApplicationIdentificationType in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/ApplicationIdentificationType.xsd>. | ||||||||||
| 145 | |||||||||||
| 146 | =item * C<bom_ref>, An identifier which can be used to reference the object | ||||||||||
| 147 | elsewhere in the BOM. Every C<bom-ref> must be unique within the BOM. | ||||||||||
| 148 | |||||||||||
| 149 | =item * C<external_references>, External references provide a way to document | ||||||||||
| 150 | systems, sites, and information that may be relevant but are not included | ||||||||||
| 151 | with the BOM. They may also establish specific relationships within or | ||||||||||
| 152 | external to the BOM. | ||||||||||
| 153 | |||||||||||
| 154 | =item * C<filing_date>, The date the patent application was filed with the | ||||||||||
| 155 | jurisdiction. Aligned with C<FilingDate> in WIPO ST.96. Refer to | ||||||||||
| 156 | L<FilingDate in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/FilingDate.xsd>. | ||||||||||
| 157 | |||||||||||
| 158 | =item * C<grant_date>, The date the patent was granted by the jurisdiction. | ||||||||||
| 159 | Aligned with C<GrantDate> in WIPO ST.96. Refer to | ||||||||||
| 160 | L<GrantDate in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/PatentNumber.xsd>. | ||||||||||
| 161 | |||||||||||
| 162 | =item * C<jurisdiction>, The jurisdiction or patent office where the priority | ||||||||||
| 163 | application was filed, specified using WIPO ST.3 codes. Aligned with | ||||||||||
| 164 | C<IPOfficeCode> in ST.96. Refer to L<WIPOfficeCode in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Common/IPOfficeCode.xsd>. | ||||||||||
| 165 | |||||||||||
| 166 | =item * C<patent_assignee>, A collection of organisations or individuals to | ||||||||||
| 167 | whom the patent rights are assigned. This supports joint ownership and | ||||||||||
| 168 | allows for flexible representation of both corporate entities and | ||||||||||
| 169 | individual inventors. | ||||||||||
| 170 | |||||||||||
| 171 | See L<SBOM::CycloneDX::OrganizationalEntity> and L<SBOM::CycloneDX::OrganizationalContact>. | ||||||||||
| 172 | |||||||||||
| 173 | =item * C<patent_expiration_date>, The date the patent expires. Derived from | ||||||||||
| 174 | grant or filing date according to jurisdiction-specific rules. | ||||||||||
| 175 | |||||||||||
| 176 | =item * C<patent_legal_status>, Indicates the current legal status of the | ||||||||||
| 177 | patent or patent application, based on the WIPO ST.27 standard. This status | ||||||||||
| 178 | reflects administrative, procedural, or legal events. Values include both | ||||||||||
| 179 | active and inactive states and are useful for determining enforceability, | ||||||||||
| 180 | procedural history, and maintenance status. | ||||||||||
| 181 | |||||||||||
| 182 | =item * C<patent_number>, The unique number assigned to the granted patent by | ||||||||||
| 183 | the issuing authority. Aligned with C<PatentNumber> in WIPO ST.96. Refer to | ||||||||||
| 184 | L<PatentNumber in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/PatentNumber.xsd>. | ||||||||||
| 185 | |||||||||||
| 186 | =item * C<priority_application>, The "priority_application" contains the | ||||||||||
| 187 | essential data necessary to identify and reference an earlier patent filing for | ||||||||||
| 188 | priority rights. In line with WIPO ST.96 guidelines, it includes the | ||||||||||
| 189 | jurisdiction (office code), application number, and filing date-the three key | ||||||||||
| 190 | elements that uniquely specify the priority application in a global patent | ||||||||||
| 191 | context. | ||||||||||
| 192 | |||||||||||
| 193 | See L<SBOM::CycloneDX::Patent::PriorityApplication>. | ||||||||||
| 194 | |||||||||||
| 195 | =item * C<publication_number>, This is the number assigned to a patent | ||||||||||
| 196 | application once it is published. Patent applications are generally | ||||||||||
| 197 | published 18 months after filing (unless an applicant requests | ||||||||||
| 198 | non-publication). This number is distinct from the application number. | ||||||||||
| 199 | |||||||||||
| 200 | Purpose: Identifies the publicly available version of the application. | ||||||||||
| 201 | |||||||||||
| 202 | Format: Varies by jurisdiction, often similar to application numbers but | ||||||||||
| 203 | includes an additional suffix indicating publication. | ||||||||||
| 204 | |||||||||||
| 205 | Example: | ||||||||||
| 206 | |||||||||||
| 207 | - US: US20240000123A1 (indicates the first publication of application | ||||||||||
| 208 | US20240000123) | ||||||||||
| 209 | |||||||||||
| 210 | - Europe: EP23123456A1 (first publication of European application | ||||||||||
| 211 | EP23123456). | ||||||||||
| 212 | |||||||||||
| 213 | WIPO ST.96 v8.0: | ||||||||||
| 214 | - Publication Number field: L<https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/PublicationNumber.xsd> | ||||||||||
| 215 | |||||||||||
| 216 | =item * C<title>, The title of the patent, summarising the invention it | ||||||||||
| 217 | protects. Aligned with C<InventionTitle> in WIPO ST.96. Refer to | ||||||||||
| 218 | L<InventionTitle in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/InventionTitle.xsd>. | ||||||||||
| 219 | |||||||||||
| 220 | =back | ||||||||||
| 221 | |||||||||||
| 222 | =item $patent->abstract | ||||||||||
| 223 | |||||||||||
| 224 | =item $patent->application_number | ||||||||||
| 225 | |||||||||||
| 226 | =item $patent->bom_ref | ||||||||||
| 227 | |||||||||||
| 228 | =item $patent->external_references | ||||||||||
| 229 | |||||||||||
| 230 | =item $patent->filing_date | ||||||||||
| 231 | |||||||||||
| 232 | =item $patent->grant_date | ||||||||||
| 233 | |||||||||||
| 234 | =item $patent->jurisdiction | ||||||||||
| 235 | |||||||||||
| 236 | =item $patent->patent_assignee | ||||||||||
| 237 | |||||||||||
| 238 | =item $patent->patent_expiration_date | ||||||||||
| 239 | |||||||||||
| 240 | =item $patent->patent_legal_status | ||||||||||
| 241 | |||||||||||
| 242 | =item $patent->patent_number | ||||||||||
| 243 | |||||||||||
| 244 | =item $patent->priority_application | ||||||||||
| 245 | |||||||||||
| 246 | =item $patent->publication_number | ||||||||||
| 247 | |||||||||||
| 248 | =item $patent->title | ||||||||||
| 249 | |||||||||||
| 250 | =back | ||||||||||
| 251 | |||||||||||
| 252 | |||||||||||
| 253 | =head1 SUPPORT | ||||||||||
| 254 | |||||||||||
| 255 | =head2 Bugs / Feature Requests | ||||||||||
| 256 | |||||||||||
| 257 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 258 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||||||||||
| 259 | You will be notified automatically of any progress on your issue. | ||||||||||
| 260 | |||||||||||
| 261 | =head2 Source Code | ||||||||||
| 262 | |||||||||||
| 263 | This is open source software. The code repository is available for | ||||||||||
| 264 | public review and contribution under the terms of the license. | ||||||||||
| 265 | |||||||||||
| 266 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||||||||||
| 267 | |||||||||||
| 268 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||||||||||
| 269 | |||||||||||
| 270 | |||||||||||
| 271 | =head1 AUTHOR | ||||||||||
| 272 | |||||||||||
| 273 | =over 4 | ||||||||||
| 274 | |||||||||||
| 275 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||||||||||
| 276 | |||||||||||
| 277 | =back | ||||||||||
| 278 | |||||||||||
| 279 | |||||||||||
| 280 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 281 | |||||||||||
| 282 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||||||||||
| 283 | |||||||||||
| 284 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 285 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 286 | |||||||||||
| 287 | =cut | ||||||||||