Documentation
¶
Index ¶
- func Int32Ptr(i int32) *int32
- func IntPtr(i int) *int
- func StringPtr(s string) *string
- type APIError
- type Abstract
- type Bibliography
- type Bold
- type Claim
- type ClaimText
- type Claims
- type Client
- func (c *Client) DownloadBulkFile(ctx context.Context, fileDownloadURI string, w io.Writer) error
- func (c *Client) DownloadBulkFileWithProgress(ctx context.Context, fileDownloadURI string, w io.Writer, ...) error
- func (c *Client) DownloadXML(ctx context.Context, url string) (*XMLDocument, error)
- func (c *Client) DownloadXMLWithType(ctx context.Context, url string, expectedType DocumentType) (*XMLDocument, error)
- func (c *Client) GetAppealDecision(ctx context.Context, documentIdentifier string) (*generated.AppealDecisionDataResponse, error)
- func (c *Client) GetAppealDecisionsByAppealNumber(ctx context.Context, appealNumber string) (*generated.AppealDecisionDataResponse, error)
- func (c *Client) GetBulkProduct(ctx context.Context, productID string) (*generated.BdssResponseProductBag, error)
- func (c *Client) GetInterferenceDecision(ctx context.Context, documentIdentifier string) (*generated.InterferenceDecisionDataResponse, error)
- func (c *Client) GetInterferenceDecisionsByNumber(ctx context.Context, interferenceNumber string) (*generated.InterferenceDecisionDataResponse, error)
- func (c *Client) GetPatent(ctx context.Context, patentNumber string) (*generated.PatentDataResponse, error)
- func (c *Client) GetPatentAdjustment(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentAssignment(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentAssociatedDocuments(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentAttorney(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentContinuity(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentDocuments(ctx context.Context, applicationNumber string) (*generated.DocumentBag, error)
- func (c *Client) GetPatentForeignPriority(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentMetaData(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentTransactions(ctx context.Context, applicationNumber string) (any, error)
- func (c *Client) GetPatentXML(ctx context.Context, patentNumber string) (*XMLDocument, error)
- func (c *Client) GetPetitionDecision(ctx context.Context, recordID string, includeDocuments bool) (*generated.PetitionDecisionIdentifierResponseBag, error)
- func (c *Client) GetStatusCodes(ctx context.Context) (*generated.StatusCodeSearchResponse, error)
- func (c *Client) GetTrialDecision(ctx context.Context, documentIdentifier string) (*generated.DecisionDataResponse, error)
- func (c *Client) GetTrialDecisionsByTrialNumber(ctx context.Context, trialNumber string) (*generated.DecisionDataResponse, error)
- func (c *Client) GetTrialDocument(ctx context.Context, documentIdentifier string) (*generated.DocumentDataResponse, error)
- func (c *Client) GetTrialDocumentsByTrialNumber(ctx context.Context, trialNumber string) (*generated.DocumentDataResponse, error)
- func (c *Client) GetTrialProceeding(ctx context.Context, trialNumber string) (*generated.ProceedingDataResponse, error)
- func (c *Client) GetXMLURLForApplication(ctx context.Context, patentNumber string) (string, DocumentType, error)
- func (c *Client) ResolvePatentNumber(ctx context.Context, patentNumber string) (string, error)
- func (c *Client) SearchAppealDecisions(ctx context.Context, query string, offset, limit int32) (*generated.AppealDecisionDataResponse, error)
- func (c *Client) SearchAppealDecisionsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
- func (c *Client) SearchBulkProducts(ctx context.Context, query string, offset, limit int) (*generated.BdssResponseBag, error)
- func (c *Client) SearchInterferenceDecisions(ctx context.Context, query string, offset, limit int32) (*generated.InterferenceDecisionDataResponse, error)
- func (c *Client) SearchInterferenceDecisionsDownload(ctx context.Context, req generated.PatentDownloadRequest) ([]byte, error)
- func (c *Client) SearchPatents(ctx context.Context, query string, offset, limit int32) (*generated.PatentDataResponse, error)
- func (c *Client) SearchPatentsDownload(ctx context.Context, req generated.PatentDownloadRequest) ([]byte, error)
- func (c *Client) SearchPetitions(ctx context.Context, query string, offset, limit int32) (*generated.PetitionDecisionResponseBag, error)
- func (c *Client) SearchPetitionsDownload(ctx context.Context, req generated.PetitionDecisionDownloadRequest) ([]byte, error)
- func (c *Client) SearchTrialDecisions(ctx context.Context, query string, offset, limit int32) (*generated.DecisionDataResponse, error)
- func (c *Client) SearchTrialDecisionsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
- func (c *Client) SearchTrialDocuments(ctx context.Context, query string, offset, limit int32) (*generated.DocumentDataResponse, error)
- func (c *Client) SearchTrialDocumentsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
- func (c *Client) SearchTrialProceedings(ctx context.Context, query string, offset, limit int32) (*generated.ProceedingDataResponse, error)
- func (c *Client) SearchTrialProceedingsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
- type Config
- type Description
- type DocumentID
- type DocumentType
- type DrawingsInfo
- type Figure
- type Heading
- type Image
- type Italic
- type Paragraph
- type PatentApplication
- type PatentGrant
- type PatentNumber
- type PatentNumberType
- type Sub
- type Sup
- type Text
- type XMLDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶ added in v1.2.1
APIError represents an error returned by the USPTO API with status code
func (*APIError) IsRetryable ¶ added in v1.2.1
IsRetryable returns true for transient errors (429, 5xx) that should be retried
type Abstract ¶ added in v1.1.0
type Abstract struct {
ID string `xml:"id,attr"`
Lang string `xml:"lang,attr"`
Paragraphs []Paragraph `xml:"p"`
}
Abstract represents the patent abstract
func (*Abstract) ExtractAbstractText ¶ added in v1.1.0
ExtractAbstractText extracts full text from the abstract
type Bibliography ¶ added in v1.1.0
type Bibliography struct {
PublicationReference *DocumentID `xml:"publication-reference>document-id"`
ApplicationReference *DocumentID `xml:"application-reference>document-id"`
InventionTitle []Text `xml:"invention-title"`
}
Bibliography contains bibliographic data
type Bold ¶ added in v1.1.0
type Bold struct {
Text string `xml:",chardata"`
}
Bold represents bold text
type Claim ¶ added in v1.1.0
type Claim struct {
ID string `xml:"id,attr"`
Num string `xml:"num,attr"`
ClaimText []ClaimText `xml:"claim-text"`
}
Claim represents a single claim with possibly nested claim-text
func (*Claim) ExtractClaimText ¶ added in v1.1.0
ExtractClaimText recursively extracts full text from a claim
type ClaimText ¶ added in v1.1.0
type ClaimText struct {
ID string `xml:"id,attr"`
Text string `xml:",chardata"`
// Nested claim-text elements for dependent claims
NestedClaims []ClaimText `xml:"claim-text"`
// Support for formatting elements
Sub []Sub `xml:"sub"`
Sup []Sup `xml:"sup"`
I []Italic `xml:"i"`
B []Bold `xml:"b"`
}
ClaimText represents claim text with support for nested claim-text elements This recursive structure handles the hierarchical nature of claim dependencies
type Claims ¶ added in v1.1.0
type Claims struct {
ID string `xml:"id,attr"`
Lang string `xml:"lang,attr"`
ClaimList []Claim `xml:"claim"`
}
Claims represents the claims section
func (*Claims) ExtractAllClaimsText ¶ added in v1.1.0
ExtractAllClaimsText extracts text from all claims
func (*Claims) ExtractAllClaimsTextFormatted ¶ added in v1.1.0
ExtractAllClaimsTextFormatted returns formatted claim text with claim numbers
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main USPTO ODP API client
func (*Client) DownloadBulkFile ¶ added in v1.0.0
DownloadBulkFile downloads a file directly using the FileDownloadURI from the API response
func (*Client) DownloadBulkFileWithProgress ¶ added in v1.0.0
func (c *Client) DownloadBulkFileWithProgress(ctx context.Context, fileDownloadURI string, w io.Writer, progress func(bytesComplete int64, bytesTotal int64)) error
DownloadBulkFileWithProgress downloads a file directly using FileDownloadURI with progress tracking
func (*Client) DownloadXML ¶ added in v1.1.0
DownloadXML downloads and parses an XML document from a given URL If you know the document type, use DownloadXMLWithType for better performance
func (*Client) DownloadXMLWithType ¶ added in v1.1.0
func (c *Client) DownloadXMLWithType(ctx context.Context, url string, expectedType DocumentType) (*XMLDocument, error)
DownloadXMLWithType downloads and parses an XML document with a known type hint
func (*Client) GetAppealDecision ¶ added in v1.2.0
func (c *Client) GetAppealDecision(ctx context.Context, documentIdentifier string) (*generated.AppealDecisionDataResponse, error)
GetAppealDecision retrieves a specific PTAB appeal decision by document identifier
func (*Client) GetAppealDecisionsByAppealNumber ¶ added in v1.2.0
func (c *Client) GetAppealDecisionsByAppealNumber(ctx context.Context, appealNumber string) (*generated.AppealDecisionDataResponse, error)
GetAppealDecisionsByAppealNumber retrieves all decisions for a specific appeal number
func (*Client) GetBulkProduct ¶ added in v1.0.0
func (c *Client) GetBulkProduct(ctx context.Context, productID string) (*generated.BdssResponseProductBag, error)
GetBulkProduct retrieves a specific bulk data product
func (*Client) GetInterferenceDecision ¶ added in v1.2.0
func (c *Client) GetInterferenceDecision(ctx context.Context, documentIdentifier string) (*generated.InterferenceDecisionDataResponse, error)
GetInterferenceDecision retrieves a specific PTAB interference decision by document identifier
func (*Client) GetInterferenceDecisionsByNumber ¶ added in v1.2.0
func (c *Client) GetInterferenceDecisionsByNumber(ctx context.Context, interferenceNumber string) (*generated.InterferenceDecisionDataResponse, error)
GetInterferenceDecisionsByNumber retrieves all decisions for a specific interference number
func (*Client) GetPatent ¶ added in v1.0.0
func (c *Client) GetPatent(ctx context.Context, patentNumber string) (*generated.PatentDataResponse, error)
GetPatent retrieves patent data by application, grant, or publication number
func (*Client) GetPatentAdjustment ¶ added in v1.0.0
GetPatentAdjustment retrieves patent term adjustment data
func (*Client) GetPatentAssignment ¶ added in v1.0.0
GetPatentAssignment retrieves patent assignment data
func (*Client) GetPatentAssociatedDocuments ¶ added in v1.0.0
func (c *Client) GetPatentAssociatedDocuments(ctx context.Context, applicationNumber string) (any, error)
GetPatentAssociatedDocuments retrieves associated documents
func (*Client) GetPatentAttorney ¶ added in v1.0.0
GetPatentAttorney retrieves patent attorney information
func (*Client) GetPatentContinuity ¶ added in v1.0.0
GetPatentContinuity retrieves patent continuity data
func (*Client) GetPatentDocuments ¶ added in v1.0.0
func (c *Client) GetPatentDocuments(ctx context.Context, applicationNumber string) (*generated.DocumentBag, error)
GetPatentDocuments retrieves patent documents list
func (*Client) GetPatentForeignPriority ¶ added in v1.0.0
func (c *Client) GetPatentForeignPriority(ctx context.Context, applicationNumber string) (any, error)
GetPatentForeignPriority retrieves foreign priority data
func (*Client) GetPatentMetaData ¶ added in v1.0.0
GetPatentMetaData retrieves patent metadata
func (*Client) GetPatentTransactions ¶ added in v1.0.0
GetPatentTransactions retrieves patent transaction history
func (*Client) GetPatentXML ¶ added in v1.1.0
GetPatentXML retrieves and parses the XML document for a patent Accepts application numbers, grant numbers, or publication numbers
func (*Client) GetPetitionDecision ¶ added in v1.0.0
func (c *Client) GetPetitionDecision(ctx context.Context, recordID string, includeDocuments bool) (*generated.PetitionDecisionIdentifierResponseBag, error)
GetPetitionDecision retrieves a specific petition decision
func (*Client) GetStatusCodes ¶ added in v1.0.0
GetStatusCodes retrieves all patent status codes
func (*Client) GetTrialDecision ¶ added in v1.2.0
func (c *Client) GetTrialDecision(ctx context.Context, documentIdentifier string) (*generated.DecisionDataResponse, error)
GetTrialDecision retrieves a specific PTAB trial decision by document identifier
func (*Client) GetTrialDecisionsByTrialNumber ¶ added in v1.2.0
func (c *Client) GetTrialDecisionsByTrialNumber(ctx context.Context, trialNumber string) (*generated.DecisionDataResponse, error)
GetTrialDecisionsByTrialNumber retrieves all decisions for a specific trial number
func (*Client) GetTrialDocument ¶ added in v1.2.0
func (c *Client) GetTrialDocument(ctx context.Context, documentIdentifier string) (*generated.DocumentDataResponse, error)
GetTrialDocument retrieves a specific PTAB trial document by document identifier
func (*Client) GetTrialDocumentsByTrialNumber ¶ added in v1.2.0
func (c *Client) GetTrialDocumentsByTrialNumber(ctx context.Context, trialNumber string) (*generated.DocumentDataResponse, error)
GetTrialDocumentsByTrialNumber retrieves all documents for a specific trial number
func (*Client) GetTrialProceeding ¶ added in v1.2.0
func (c *Client) GetTrialProceeding(ctx context.Context, trialNumber string) (*generated.ProceedingDataResponse, error)
GetTrialProceeding retrieves a specific PTAB trial proceeding by trial number
func (*Client) GetXMLURLForApplication ¶ added in v1.1.0
func (c *Client) GetXMLURLForApplication(ctx context.Context, patentNumber string) (string, DocumentType, error)
GetXMLURLForApplication retrieves the XML URL and document type for a patent
func (*Client) ResolvePatentNumber ¶ added in v1.1.0
ResolvePatentNumber resolves any patent number format (application, grant, or publication) to its application number by searching the USPTO API when necessary. For application numbers, returns the normalized number directly. For grant and publication numbers, performs an API search to find the corresponding application number.
func (*Client) SearchAppealDecisions ¶ added in v1.2.0
func (c *Client) SearchAppealDecisions(ctx context.Context, query string, offset, limit int32) (*generated.AppealDecisionDataResponse, error)
SearchAppealDecisions searches PTAB appeal decisions
func (*Client) SearchAppealDecisionsDownload ¶ added in v1.2.0
func (c *Client) SearchAppealDecisionsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
SearchAppealDecisionsDownload downloads appeal decisions search results
func (*Client) SearchBulkProducts ¶ added in v1.0.0
func (c *Client) SearchBulkProducts(ctx context.Context, query string, offset, limit int) (*generated.BdssResponseBag, error)
SearchBulkProducts searches for bulk data products
func (*Client) SearchInterferenceDecisions ¶ added in v1.2.0
func (c *Client) SearchInterferenceDecisions(ctx context.Context, query string, offset, limit int32) (*generated.InterferenceDecisionDataResponse, error)
SearchInterferenceDecisions searches PTAB interference decisions
func (*Client) SearchInterferenceDecisionsDownload ¶ added in v1.2.0
func (c *Client) SearchInterferenceDecisionsDownload(ctx context.Context, req generated.PatentDownloadRequest) ([]byte, error)
SearchInterferenceDecisionsDownload downloads interference decisions search results
func (*Client) SearchPatents ¶ added in v1.0.0
func (c *Client) SearchPatents(ctx context.Context, query string, offset, limit int32) (*generated.PatentDataResponse, error)
SearchPatents searches for patent applications
func (*Client) SearchPatentsDownload ¶ added in v1.0.0
func (c *Client) SearchPatentsDownload(ctx context.Context, req generated.PatentDownloadRequest) ([]byte, error)
SearchPatentsDownload downloads patent search results
func (*Client) SearchPetitions ¶ added in v1.0.0
func (c *Client) SearchPetitions(ctx context.Context, query string, offset, limit int32) (*generated.PetitionDecisionResponseBag, error)
SearchPetitions searches for petition decisions
func (*Client) SearchPetitionsDownload ¶ added in v1.0.0
func (c *Client) SearchPetitionsDownload(ctx context.Context, req generated.PetitionDecisionDownloadRequest) ([]byte, error)
SearchPetitionsDownload downloads petition search results
func (*Client) SearchTrialDecisions ¶ added in v1.2.0
func (c *Client) SearchTrialDecisions(ctx context.Context, query string, offset, limit int32) (*generated.DecisionDataResponse, error)
SearchTrialDecisions searches PTAB trial decisions
func (*Client) SearchTrialDecisionsDownload ¶ added in v1.2.0
func (c *Client) SearchTrialDecisionsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
SearchTrialDecisionsDownload downloads trial decisions search results
func (*Client) SearchTrialDocuments ¶ added in v1.2.0
func (c *Client) SearchTrialDocuments(ctx context.Context, query string, offset, limit int32) (*generated.DocumentDataResponse, error)
SearchTrialDocuments searches PTAB trial documents
func (*Client) SearchTrialDocumentsDownload ¶ added in v1.2.0
func (c *Client) SearchTrialDocumentsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
SearchTrialDocumentsDownload downloads trial documents search results
func (*Client) SearchTrialProceedings ¶ added in v1.2.0
func (c *Client) SearchTrialProceedings(ctx context.Context, query string, offset, limit int32) (*generated.ProceedingDataResponse, error)
SearchTrialProceedings searches PTAB trial proceedings
func (*Client) SearchTrialProceedingsDownload ¶ added in v1.2.0
func (c *Client) SearchTrialProceedingsDownload(ctx context.Context, req generated.DownloadRequest) ([]byte, error)
SearchTrialProceedingsDownload downloads trial proceedings search results
type Config ¶
type Config struct {
BaseURL string
APIKey string
UserAgent string
MaxRetries int
RetryDelay int // seconds
Timeout int // seconds
}
Config holds client configuration
type Description ¶ added in v1.1.0
type Description struct {
ID string `xml:"id,attr"`
Lang string `xml:"lang,attr"`
Headings []Heading `xml:"heading"`
Paragraphs []Paragraph `xml:"p"`
}
Description represents the detailed description section
func (*Description) ExtractDescriptionText ¶ added in v1.1.0
func (d *Description) ExtractDescriptionText() string
ExtractDescriptionText extracts full text from the description
type DocumentID ¶ added in v1.1.0
type DocumentID struct {
Country string `xml:"country"`
DocNumber string `xml:"doc-number"`
Kind string `xml:"kind"`
Date string `xml:"date"`
}
DocumentID represents document identification
type DocumentType ¶ added in v1.1.0
type DocumentType int
DocumentType identifies the type of XML document
const ( DocumentTypeUnknown DocumentType = iota DocumentTypeGrant DocumentTypeApplication )
type DrawingsInfo ¶ added in v1.1.0
DrawingsInfo contains drawing/figure information
type Heading ¶ added in v1.1.0
type Heading struct {
ID string `xml:"id,attr"`
Level string `xml:"level,attr"`
Text string `xml:",chardata"`
}
Heading represents a section heading
type Image ¶ added in v1.1.0
type Image struct {
ID string `xml:"id,attr"`
He string `xml:"he,attr"`
Wi string `xml:"wi,attr"`
File string `xml:"file,attr"`
Alt string `xml:"alt,attr"`
ImgContent string `xml:"img-content,attr"`
ImgFormat string `xml:"img-format,attr"`
}
Image represents an image reference
type Italic ¶ added in v1.1.0
type Italic struct {
Text string `xml:",chardata"`
}
Italic represents italic text
type Paragraph ¶ added in v1.1.0
type Paragraph struct {
ID string `xml:"id,attr"`
Num string `xml:"num,attr"`
Text string `xml:",chardata"`
// Support for nested elements
Sub []Sub `xml:"sub"`
Sup []Sup `xml:"sup"`
I []Italic `xml:"i"`
B []Bold `xml:"b"`
}
Paragraph represents a text paragraph with possible nested elements
type PatentApplication ¶ added in v1.1.0
type PatentApplication struct {
XMLName xml.Name `xml:"us-patent-application"`
Lang string `xml:"lang,attr"`
DTDVersion string `xml:"dtd-version,attr"`
File string `xml:"file,attr"`
Status string `xml:"status,attr"`
ID string `xml:"id,attr"`
Country string `xml:"country,attr"`
DateProduced string `xml:"date-produced,attr"`
DatePubl string `xml:"date-publ,attr"`
Bibliography *Bibliography `xml:"us-bibliographic-data-application"`
Abstract *Abstract `xml:"abstract"`
DrawingsInfo *DrawingsInfo `xml:"drawings"`
Description *Description `xml:"description"`
Claims *Claims `xml:"claims"`
}
PatentApplication represents a patent application XML document (ICE DTD 4.6)
type PatentGrant ¶ added in v1.1.0
type PatentGrant struct {
XMLName xml.Name `xml:"us-patent-grant"`
Lang string `xml:"lang,attr"`
DTDVersion string `xml:"dtd-version,attr"`
File string `xml:"file,attr"`
Status string `xml:"status,attr"`
ID string `xml:"id,attr"`
Country string `xml:"country,attr"`
DateProduced string `xml:"date-produced,attr"`
DatePubl string `xml:"date-publ,attr"`
Bibliography *Bibliography `xml:"us-bibliographic-data-grant"`
Abstract *Abstract `xml:"abstract"`
DrawingsInfo *DrawingsInfo `xml:"drawings"`
Description *Description `xml:"description"`
Claims *Claims `xml:"claims"`
}
PatentGrant represents a patent grant XML document (ICE DTD 4.7)
type PatentNumber ¶ added in v1.1.0
type PatentNumber struct {
Original string // Original input
Normalized string // Normalized format (digits only)
ApplicationNo string // Application number if derivable
Type PatentNumberType // Type of number
Country string // Country code (usually "US")
}
PatentNumber represents a normalized patent number
func NormalizePatentNumber ¶ added in v1.1.0
func NormalizePatentNumber(input string) (*PatentNumber, error)
NormalizePatentNumber normalizes various patent number formats to application numbers Accepts formats like:
- Application: "17248024", "17/248,024", "17/248024"
- Grant: "11646472", "11,646,472", "US 11,646,472 B2"
- Publication: "20250087686", "US20250087686A1", "US 2025/0087686 A1"
func (*PatentNumber) FormatAsApplication ¶ added in v1.1.0
func (pn *PatentNumber) FormatAsApplication() string
FormatAsApplication formats number as application (e.g., 17/248,024)
func (*PatentNumber) FormatAsGrant ¶ added in v1.1.0
func (pn *PatentNumber) FormatAsGrant() string
FormatAsGrant formats number as grant (e.g., 11,646,472)
func (*PatentNumber) FormatAsPublication ¶ added in v1.1.0
func (pn *PatentNumber) FormatAsPublication() string
FormatAsPublication formats number as publication (e.g., 2025/0087686)
func (*PatentNumber) String ¶ added in v1.1.0
func (pn *PatentNumber) String() string
String returns a human-readable representation
func (*PatentNumber) ToApplicationNumber ¶ added in v1.1.0
func (pn *PatentNumber) ToApplicationNumber() string
ToApplicationNumber converts a patent number to application number format For application numbers, returns as-is For grant/publication numbers, returns the normalized number which can be used with the API
type PatentNumberType ¶ added in v1.1.0
type PatentNumberType int
PatentNumberType indicates the type of patent number
const ( PatentNumberTypeUnknown PatentNumberType = iota PatentNumberTypeApplication PatentNumberTypeGrant PatentNumberTypePublication )
type Sub ¶ added in v1.1.0
type Sub struct {
Text string `xml:",chardata"`
}
Sub represents subscript text
type Sup ¶ added in v1.1.0
type Sup struct {
Text string `xml:",chardata"`
}
Sup represents superscript text
type Text ¶ added in v1.1.0
type Text struct {
ID string `xml:"id,attr"`
Lang string `xml:"lang,attr"`
Text string `xml:",chardata"`
}
Text represents simple text with language attribute
type XMLDocument ¶ added in v1.1.0
type XMLDocument struct {
// Grant fields (us-patent-grant)
Grant *PatentGrant `xml:"us-patent-grant"`
// Application fields (us-patent-application)
Application *PatentApplication `xml:"us-patent-application"`
}
XMLDocument represents either a patent grant or application XML document
func ParseApplicationXML ¶ added in v1.1.0
func ParseApplicationXML(data []byte) (*XMLDocument, error)
ParseApplicationXML parses patent application XML data (us-patent-application)
func ParseGrantXML ¶ added in v1.1.0
func ParseGrantXML(data []byte) (*XMLDocument, error)
ParseGrantXML parses patent grant XML data (us-patent-grant)
func ParseXML ¶ added in v1.1.0
func ParseXML(data []byte) (*XMLDocument, error)
ParseXML parses XML data and auto-detects the document type
func ParseXMLWithType ¶ added in v1.1.0
func ParseXMLWithType(data []byte, expectedType DocumentType) (*XMLDocument, error)
ParseXMLWithType parses XML data with a known document type hint
func (*XMLDocument) GetAbstract ¶ added in v1.1.0
func (d *XMLDocument) GetAbstract() *Abstract
GetAbstract returns the abstract section
func (*XMLDocument) GetClaims ¶ added in v1.1.0
func (d *XMLDocument) GetClaims() *Claims
GetClaims returns the claims section
func (*XMLDocument) GetDescription ¶ added in v1.1.0
func (d *XMLDocument) GetDescription() *Description
GetDescription returns the description section
func (*XMLDocument) GetDocumentType ¶ added in v1.1.0
func (d *XMLDocument) GetDocumentType() DocumentType
GetDocumentType returns the type of document (grant or application)
func (*XMLDocument) GetTitle ¶ added in v1.1.0
func (d *XMLDocument) GetTitle() string
GetTitle returns the invention title from either grant or application
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gen
command
Command gen processes USPTO ODP swagger files and generates Go code.
|
Command gen processes USPTO ODP swagger files and generates Go code. |
|
Package generated provides primitives to interact with the openapi HTTP API.
|
Package generated provides primitives to interact with the openapi HTTP API. |