Documentation
¶
Overview ¶
Package dpmaconnect provides a Go client for the DPMA Connect Plus API (DPMAregister web services) for accessing German patent, design, and trademark data from the German Patent and Trade Mark Office (DPMA).
Usage:
config := dpmaconnect.DefaultConfig() config.Username = "your-username" config.Password = "your-password" client, err := dpmaconnect.NewClient(config)
The client is safe for concurrent use by multiple goroutines.
Index ¶
- Constants
- func FormatDate(date time.Time) string
- func FormatPublicationWeek(year, week int) (string, error)
- func NormalizePublicationDocNumber(docNumber string) string
- func ParsePublicationWeek(pubWeek string) (year, week int, err error)
- func ValidateDesignQuery(q string) error
- func ValidatePatentQuery(q string) error
- func ValidatePeriod(period string) error
- func ValidateTrademarkQuery(q string) error
- type APIError
- type AuthError
- type Client
- func (c *Client) GetApplicantCitationsXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetApplicantCitationsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetDesignBibliographicDataXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetDesignBibliographicDataXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetDesignImage(ctx context.Context, designNumber, imageNumber string) ([]byte, error)
- func (c *Client) GetDesignImages(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetDesignImagesStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetDesignInfo(ctx context.Context, designNumber string) ([]byte, error)
- func (c *Client) GetDesignInfoParsed(ctx context.Context, designNumber string) (*DesignInfo, error)
- func (c *Client) GetDesignRegisterExtract(ctx context.Context, date time.Time, period string) ([]byte, error)
- func (c *Client) GetDesignRegisterExtractStream(ctx context.Context, date time.Time, period string, dst io.Writer) error
- func (c *Client) GetDesignThumbnail(ctx context.Context, designNumber, thumbnailNumber string) ([]byte, error)
- func (c *Client) GetDisclosureDocumentsPDF(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetDisclosureDocumentsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetDisclosureDocumentsXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetDisclosureDocumentsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetEuropeanPatentSpecificationsPDF(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetEuropeanPatentSpecificationsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetEuropeanPatentSpecificationsXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetEuropeanPatentSpecificationsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetPatentInfo(ctx context.Context, registeredNumber string) ([]byte, error)
- func (c *Client) GetPatentInfoByPublicationNumber(ctx context.Context, publicationNumber string) (*PatentInfo, error)
- func (c *Client) GetPatentInfoByRegisteredNumber(ctx context.Context, registeredNumber string) (*PatentInfo, error)
- func (c *Client) GetPatentInfoParsed(ctx context.Context, patentNumber string) (*PatentInfo, error)
- func (c *Client) GetPatentPublicationPDF(ctx context.Context, documentID string) ([]byte, error)
- func (c *Client) GetPatentRegisterExtract(ctx context.Context, date time.Time, period string) ([]byte, error)
- func (c *Client) GetPatentRegisterExtractStream(ctx context.Context, date time.Time, period string, dst io.Writer) error
- func (c *Client) GetPatentSpecificationsPDF(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetPatentSpecificationsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetPatentSpecificationsXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetPatentSpecificationsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetPublicationDataXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetPublicationDataXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetSearchableFullText(ctx context.Context, documentID string) ([]byte, error)
- func (c *Client) GetTrademarkBibDataApplied(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetTrademarkBibDataAppliedStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetTrademarkBibDataRegistered(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetTrademarkBibDataRegisteredStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetTrademarkBibDataRejected(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetTrademarkBibDataRejectedStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetTrademarkImage(ctx context.Context, applicationNumber string) ([]byte, error)
- func (c *Client) GetTrademarkInfo(ctx context.Context, applicationNumber string) ([]byte, error)
- func (c *Client) GetTrademarkInfoParsed(ctx context.Context, applicationNumber string) (*TrademarkInfo, error)
- func (c *Client) GetTrademarkRegisterExtract(ctx context.Context, date time.Time, period string) ([]byte, error)
- func (c *Client) GetTrademarkRegisterExtractStream(ctx context.Context, date time.Time, period string, dst io.Writer) error
- func (c *Client) GetTrademarkThumbnail(ctx context.Context, applicationNumber string) ([]byte, error)
- func (c *Client) GetUtilityModelsPDF(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetUtilityModelsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetUtilityModelsXML(ctx context.Context, year, week int) ([]byte, error)
- func (c *Client) GetUtilityModelsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
- func (c *Client) GetVersion(ctx context.Context, service string) (string, error)
- func (c *Client) SearchDesigns(ctx context.Context, query string) ([]byte, error)
- func (c *Client) SearchDesignsParsed(ctx context.Context, query string) (*DesignSearchResult, error)
- func (c *Client) SearchPatents(ctx context.Context, query string) ([]byte, error)
- func (c *Client) SearchPatentsParsed(ctx context.Context, query string) (*PatentSearchResult, error)
- func (c *Client) SearchTrademarks(ctx context.Context, query string) ([]byte, error)
- func (c *Client) SearchTrademarksParsed(ctx context.Context, query string) (*TrademarkSearchResult, error)
- type Config
- type DataNotAvailableError
- type DesignClass
- type DesignEntry
- type DesignExtensionInfo
- type DesignHit
- type DesignInfo
- type DesignPriority
- type DesignPublication
- type DesignRecord
- type DesignSearchResult
- type DesignView
- type ErrorResponse
- type HitCounter
- type NotFoundError
- type Party
- type PatentCitation
- type PatentClassification
- type PatentDesignatedRegion
- type PatentDocumentRef
- type PatentEvent
- type PatentEventPublication
- type PatentHit
- type PatentIPCClass
- type PatentInfo
- type PatentNumberSystem
- type PatentPriorityClaim
- type PatentPublication
- type PatentRelation
- type PatentSearchIPC
- type PatentSearchResult
- type PublicationNumber
- type RateLimitError
- type RegisteredNumberClass
- type ResolutionLoopErrordeprecated
- type TrademarkClass
- type TrademarkHit
- type TrademarkInfo
- type TrademarkRecord
- type TrademarkSearchResult
- type XMLParseError
Examples ¶
Constants ¶
const ( PeriodDaily = "daily" PeriodWeekly = "weekly" PeriodMonthly = "monthly" PeriodYearly = "yearly" )
Period constants for register extract queries
const ( ServicePatent = "DPMAregisterPatService" ServiceDesign = "DPMAregisterGsmService" ServiceTrademark = "DPMAregisterMarkeService" )
Service name constants for GetVersion
const ( RelationUtilityModelBasis = "utility-model-basis" RelationDivision = "division" RelationAddition = "addition" )
Relation types of PatentRelation.Type: the related-documents child element names.
const DefaultUserAgent = "dpma-connect-plus-go/" + Version + " (patent.dev; +https://github.com/patent-dev/dpma-connect-plus)"
DefaultUserAgent identifies this library in outbound requests.
const Version = "0.5.0"
Version is the library version. It surfaces through the default User-Agent.
Variables ¶
This section is empty.
Functions ¶
func FormatDate ¶
FormatDate formats a time.Time into YYYY-MM-DD format for register extract queries. The date is formatted in the input's location (no timezone conversion). Example: FormatDate(time.Date(2024, 10, 23, 0, 0, 0, 0, time.UTC)) returns "2024-10-23"
Example ¶
package main
import (
"fmt"
"time"
dpma "github.com/patent-dev/dpma-connect-plus"
)
func main() {
date := time.Date(2024, 10, 23, 0, 0, 0, 0, time.UTC)
fmt.Println(dpma.FormatDate(date))
}
Output: 2024-10-23
func FormatPublicationWeek ¶
FormatPublicationWeek formats year and week into YYYYWW format. Returns an error if year < 1 or week is outside [1, 53]. Example: FormatPublicationWeek(2024, 45) returns "202445"
Example ¶
package main
import (
"fmt"
dpma "github.com/patent-dev/dpma-connect-plus"
)
func main() {
pubWeek, err := dpma.FormatPublicationWeek(2024, 45)
if err != nil {
panic(err)
}
fmt.Println(pubWeek)
}
Output: 202445
func NormalizePublicationDocNumber ¶ added in v0.5.0
NormalizePublicationDocNumber removes whitespace and the leading zeros the register pads a publication doc-number with: "000010027360" becomes "10027360", "112019001234" stays as it is. A value of zeros only becomes "0".
func ParsePublicationWeek ¶
ParsePublicationWeek parses a publication week string (YYYYWW) into year and week integers Returns an error if the format is invalid
func ValidateDesignQuery ¶
ValidateDesignQuery parses and validates a query against design field codes. Returns nil if valid, or an error describing the validation failure.
func ValidatePatentQuery ¶
ValidatePatentQuery parses and validates a query against patent field codes. Returns nil if valid, or an error describing the validation failure.
Example ¶
package main
import (
"fmt"
dpma "github.com/patent-dev/dpma-connect-plus"
)
func main() {
// A valid query against the patent field codes returns nil.
fmt.Println(dpma.ValidatePatentQuery("TI=Elektrofahrzeug AND INH=Siemens"))
// An unknown field code is rejected.
fmt.Println(dpma.ValidatePatentQuery("MARKE=test") != nil)
}
Output: <nil> true
func ValidatePeriod ¶
ValidatePeriod checks that a period string is one of the valid values.
func ValidateTrademarkQuery ¶
ValidateTrademarkQuery parses and validates a query against trademark field codes. Returns nil if valid, or an error describing the validation failure.
Types ¶
type AuthError ¶ added in v0.3.5
AuthError is returned for HTTP 401/403 responses that carry no DPMA error XML (real DPMA authentication failures arrive without a Transaction body). Responses that do carry error XML keep their content-typed *APIError.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main DPMA Connect Plus API client. It is safe for concurrent use by multiple goroutines.
func NewClient ¶
NewClient creates a new DPMA Connect Plus API client
Example ¶
package main
import (
"fmt"
dpma "github.com/patent-dev/dpma-connect-plus"
)
func main() {
config := dpma.DefaultConfig()
config.Username = "your-username"
config.Password = "your-password"
client, err := dpma.NewClient(config)
if err != nil {
panic(err)
}
fmt.Println(client != nil)
}
Output: true
func (*Client) GetApplicantCitationsXML ¶
GetApplicantCitationsXML downloads applicant citations as XML for a publication week
func (*Client) GetApplicantCitationsXMLStream ¶
func (c *Client) GetApplicantCitationsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetApplicantCitationsXMLStream downloads applicant citations as XML and writes to dst
func (*Client) GetDesignBibliographicDataXML ¶
GetDesignBibliographicDataXML downloads design bibliographic data as XML for a publication week
func (*Client) GetDesignBibliographicDataXMLStream ¶
func (c *Client) GetDesignBibliographicDataXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetDesignBibliographicDataXMLStream downloads design bibliographic data as XML and writes to dst
func (*Client) GetDesignImage ¶
func (c *Client) GetDesignImage(ctx context.Context, designNumber, imageNumber string) ([]byte, error)
GetDesignImage downloads a design image by design number and image number
func (*Client) GetDesignImages ¶
GetDesignImages downloads design images for a publication week
func (*Client) GetDesignImagesStream ¶
GetDesignImagesStream downloads design images and writes to dst
func (*Client) GetDesignInfo ¶
GetDesignInfo retrieves design information by design number
func (*Client) GetDesignInfoParsed ¶
GetDesignInfoParsed retrieves design info and returns parsed data.
func (*Client) GetDesignRegisterExtract ¶
func (c *Client) GetDesignRegisterExtract(ctx context.Context, date time.Time, period string) ([]byte, error)
GetDesignRegisterExtract downloads design register extract data for a date and period
func (*Client) GetDesignRegisterExtractStream ¶
func (c *Client) GetDesignRegisterExtractStream(ctx context.Context, date time.Time, period string, dst io.Writer) error
GetDesignRegisterExtractStream downloads design register extract data and writes to dst
func (*Client) GetDesignThumbnail ¶
func (c *Client) GetDesignThumbnail(ctx context.Context, designNumber, thumbnailNumber string) ([]byte, error)
GetDesignThumbnail downloads a design thumbnail by design number and thumbnail number
func (*Client) GetDisclosureDocumentsPDF ¶
GetDisclosureDocumentsPDF downloads disclosure documents as PDF for a publication week
func (*Client) GetDisclosureDocumentsPDFStream ¶
func (c *Client) GetDisclosureDocumentsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
GetDisclosureDocumentsPDFStream downloads disclosure documents as PDF and writes to dst
func (*Client) GetDisclosureDocumentsXML ¶
GetDisclosureDocumentsXML downloads disclosure documents (A) as XML for a publication week
func (*Client) GetDisclosureDocumentsXMLStream ¶
func (c *Client) GetDisclosureDocumentsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetDisclosureDocumentsXMLStream downloads disclosure documents as XML and writes to dst
func (*Client) GetEuropeanPatentSpecificationsPDF ¶
func (c *Client) GetEuropeanPatentSpecificationsPDF(ctx context.Context, year, week int) ([]byte, error)
GetEuropeanPatentSpecificationsPDF downloads European patent specifications as PDF for a publication week
func (*Client) GetEuropeanPatentSpecificationsPDFStream ¶
func (c *Client) GetEuropeanPatentSpecificationsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
GetEuropeanPatentSpecificationsPDFStream downloads European patent specifications as PDF and writes to dst
func (*Client) GetEuropeanPatentSpecificationsXML ¶
func (c *Client) GetEuropeanPatentSpecificationsXML(ctx context.Context, year, week int) ([]byte, error)
GetEuropeanPatentSpecificationsXML downloads European patent specifications as XML for a publication week
func (*Client) GetEuropeanPatentSpecificationsXMLStream ¶
func (c *Client) GetEuropeanPatentSpecificationsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetEuropeanPatentSpecificationsXMLStream downloads European patent specifications as XML and writes to dst
func (*Client) GetPatentInfo ¶
GetPatentInfo retrieves patent information by registered number (digits only, including check digit).
func (*Client) GetPatentInfoByPublicationNumber ¶
func (c *Client) GetPatentInfoByPublicationNumber(ctx context.Context, publicationNumber string) (*PatentInfo, error)
GetPatentInfoByPublicationNumber resolves a publication number (e.g. "DE102019200907A1", "EP4780303A1") to a registered number via search and returns the parsed patent info. The search hit's leading-registered-number is fetched as reported (see GetPatentInfoByRegisteredNumber), so resolution is always exactly one search followed by one fetch.
func (*Client) GetPatentInfoByRegisteredNumber ¶ added in v0.4.0
func (c *Client) GetPatentInfoByRegisteredNumber(ctx context.Context, registeredNumber string) (*PatentInfo, error)
GetPatentInfoByRegisteredNumber fetches and parses the register record for a registered number exactly as given. Use it for a number the register itself reported (a search hit's leading-registered-number): those come in forms such as "CN2019089592" that cannot be told apart from a publication number by shape, so they must not go through GetPatentInfoParsed's classification.
func (*Client) GetPatentInfoParsed ¶
GetPatentInfoParsed retrieves patent info and returns parsed bibliographic data. Accepts a registered number ("100273629", "E247834666" for an EP file) or a publication number with country prefix and/or kind code ("DE10027362C2", "DE102019200907A1", "EP4780303A1"). Anything that is not a registered number is resolved via a publication number search automatically.
func (*Client) GetPatentPublicationPDF ¶
GetPatentPublicationPDF downloads a single patent publication in PDF format
func (*Client) GetPatentRegisterExtract ¶
func (c *Client) GetPatentRegisterExtract(ctx context.Context, date time.Time, period string) ([]byte, error)
GetPatentRegisterExtract downloads patent register extract data for a date and period
func (*Client) GetPatentRegisterExtractStream ¶
func (c *Client) GetPatentRegisterExtractStream(ctx context.Context, date time.Time, period string, dst io.Writer) error
GetPatentRegisterExtractStream downloads patent register extract data and writes to dst
func (*Client) GetPatentSpecificationsPDF ¶
GetPatentSpecificationsPDF downloads patent specifications as PDF for a publication week
func (*Client) GetPatentSpecificationsPDFStream ¶
func (c *Client) GetPatentSpecificationsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
GetPatentSpecificationsPDFStream downloads patent specifications as PDF and writes to dst
func (*Client) GetPatentSpecificationsXML ¶
GetPatentSpecificationsXML downloads patent specifications (B, C) as XML for a publication week
func (*Client) GetPatentSpecificationsXMLStream ¶
func (c *Client) GetPatentSpecificationsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetPatentSpecificationsXMLStream downloads patent specifications as XML and writes to dst
func (*Client) GetPublicationDataXML ¶
GetPublicationDataXML downloads publication data as XML for a publication week
func (*Client) GetPublicationDataXMLStream ¶
func (c *Client) GetPublicationDataXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetPublicationDataXMLStream downloads publication data as XML and writes to dst
func (*Client) GetSearchableFullText ¶
GetSearchableFullText retrieves the searchable full text for a document
func (*Client) GetTrademarkBibDataApplied ¶
GetTrademarkBibDataApplied downloads trademark bibliographic data (applied) for a publication week
func (*Client) GetTrademarkBibDataAppliedStream ¶
func (c *Client) GetTrademarkBibDataAppliedStream(ctx context.Context, year, week int, dst io.Writer) error
GetTrademarkBibDataAppliedStream downloads trademark bib data (applied) and writes to dst
func (*Client) GetTrademarkBibDataRegistered ¶
GetTrademarkBibDataRegistered downloads trademark bibliographic data (registered) for a publication week
func (*Client) GetTrademarkBibDataRegisteredStream ¶
func (c *Client) GetTrademarkBibDataRegisteredStream(ctx context.Context, year, week int, dst io.Writer) error
GetTrademarkBibDataRegisteredStream downloads trademark bib data (registered) and writes to dst
func (*Client) GetTrademarkBibDataRejected ¶
GetTrademarkBibDataRejected downloads trademark bibliographic data (rejected) for a publication week
func (*Client) GetTrademarkBibDataRejectedStream ¶
func (c *Client) GetTrademarkBibDataRejectedStream(ctx context.Context, year, week int, dst io.Writer) error
GetTrademarkBibDataRejectedStream downloads trademark bib data (rejected) and writes to dst
func (*Client) GetTrademarkImage ¶
GetTrademarkImage downloads a trademark image by application number
func (*Client) GetTrademarkInfo ¶
GetTrademarkInfo retrieves trademark information by application number
func (*Client) GetTrademarkInfoParsed ¶
func (c *Client) GetTrademarkInfoParsed(ctx context.Context, applicationNumber string) (*TrademarkInfo, error)
GetTrademarkInfoParsed retrieves trademark info and returns parsed data.
func (*Client) GetTrademarkRegisterExtract ¶
func (c *Client) GetTrademarkRegisterExtract(ctx context.Context, date time.Time, period string) ([]byte, error)
GetTrademarkRegisterExtract downloads trademark register extract data for a date and period
func (*Client) GetTrademarkRegisterExtractStream ¶
func (c *Client) GetTrademarkRegisterExtractStream(ctx context.Context, date time.Time, period string, dst io.Writer) error
GetTrademarkRegisterExtractStream downloads trademark register extract data and writes to dst
func (*Client) GetTrademarkThumbnail ¶
func (c *Client) GetTrademarkThumbnail(ctx context.Context, applicationNumber string) ([]byte, error)
GetTrademarkThumbnail downloads a trademark thumbnail by application number
func (*Client) GetUtilityModelsPDF ¶
GetUtilityModelsPDF downloads utility models as PDF for a publication week
func (*Client) GetUtilityModelsPDFStream ¶
func (c *Client) GetUtilityModelsPDFStream(ctx context.Context, year, week int, dst io.Writer) error
GetUtilityModelsPDFStream downloads utility models as PDF and writes to dst
func (*Client) GetUtilityModelsXML ¶
GetUtilityModelsXML downloads utility models (U) as XML for a publication week
func (*Client) GetUtilityModelsXMLStream ¶
func (c *Client) GetUtilityModelsXMLStream(ctx context.Context, year, week int, dst io.Writer) error
GetUtilityModelsXMLStream downloads utility models as XML and writes to dst
func (*Client) GetVersion ¶
GetVersion retrieves version information for a service
func (*Client) SearchDesigns ¶
SearchDesigns executes a design expert search query
func (*Client) SearchDesignsParsed ¶
func (c *Client) SearchDesignsParsed(ctx context.Context, query string) (*DesignSearchResult, error)
SearchDesignsParsed executes a design search and returns parsed results.
func (*Client) SearchPatents ¶
SearchPatents executes a patent/utility model expert search query
func (*Client) SearchPatentsParsed ¶
func (c *Client) SearchPatentsParsed(ctx context.Context, query string) (*PatentSearchResult, error)
SearchPatentsParsed executes a patent search and returns parsed results.
func (*Client) SearchTrademarks ¶
SearchTrademarks executes a trademark expert search query
func (*Client) SearchTrademarksParsed ¶
func (c *Client) SearchTrademarksParsed(ctx context.Context, query string) (*TrademarkSearchResult, error)
SearchTrademarksParsed executes a trademark search and returns parsed results.
type Config ¶
type Config struct {
BaseURL string
Username string
Password string
Timeout time.Duration // HTTP client timeout (default: 20 minutes for bulk downloads)
HTTPClient *http.Client // Optional custom HTTP client; if set, Timeout is ignored
UserAgent string // UserAgent overrides the outbound User-Agent header.
}
Config holds client configuration.
If HTTPClient is set, Timeout is ignored and the custom client's timeout applies instead. Callers should configure timeouts on the custom client directly.
type DataNotAvailableError ¶
type DataNotAvailableError struct{}
DataNotAvailableError represents data unavailable for requested period
func (*DataNotAvailableError) Error ¶
func (e *DataNotAvailableError) Error() string
type DesignClass ¶ added in v0.3.1
type DesignClass struct {
ClassificationKindCode string
ClassificationVersion string
Comment string
ClassNumber string
Description string
}
DesignClass represents an indication-product classification entry.
type DesignEntry ¶ added in v0.3.1
type DesignEntry struct {
DesignIdentifier string
RegistrationNumber string
RegistrationDate string
Title string
TotalSpecimen string
Status string
Classes []DesignClass
Priorities []DesignPriority
Representations []DesignView // representation sheet views
PreferedView *DesignView
Records []DesignRecord // register-event history
Applicants []Party // design-level applicants
Representatives []Party
Extension DesignExtensionInfo
Publications []DesignPublication // PublicationDetails/Publication
}
DesignEntry represents one design within a registration.
type DesignExtensionInfo ¶ added in v0.3.1
type DesignExtensionInfo struct {
RegisterNumber string
DesignFileNumber string
DesignNumber string
DateOfCaptureInSystem string
TypeOfDeposit string
DefermentStatus string
TermProtectionObtained string
PaymentDeadline string
KindOfFee string
DestructionPaperFile string
DesignDescriptionNotPublished string
CancellationDate string
}
DesignExtensionInfo holds the DE_ST86Extension scalar fields.
type DesignHit ¶
type DesignHit struct {
DesignIdentifier string
ApplicationNumber string
RegistrationNumber string
TotalRepresentationSheet string
FirstRepresentationSheetFilename string
Title string
Applicant string
Representative string
StaffName string
ClassNumber string
Status string
ApplicationDate string
RegistrationDate string
PublicationDate string
}
DesignHit represents a single design search result entry.
type DesignInfo ¶
type DesignInfo struct {
RegistrationOfficeCode string
ApplicationNumber string
ApplicationReference string
ApplicationDate string
TotalDesign string
Designs []DesignEntry // all designs in a multi-design registration
Applicants []Party // application-level applicants
CorrespondenceParty Party
RawXML []byte // original XML response bytes
// Convenience fields mirroring the first design (back-compat).
DesignIdentifier string
RegistrationNumber string
RegistrationDate string
Title string
Status string
ClassNumber string
ClassDescription string
// ApplicationApplicants are the application-level applicants as sent.
// Applicants above is replaced by the first design's applicants when that
// design lists its own, so this field keeps the application-level list.
ApplicationApplicants []Party
// SchemaLocation, TransactionIdentifier and TransactionCode are the ST86
// envelope values.
SchemaLocation string
TransactionIdentifier string
TransactionCode string
}
DesignInfo holds parsed design register info (ST86).
func ParseDesignInfo ¶
func ParseDesignInfo(data []byte) (*DesignInfo, error)
ParseDesignInfo parses a design info XML response (ST86 format).
type DesignPriority ¶ added in v0.3.1
DesignPriority represents a priority claim of a design.
type DesignPublication ¶ added in v0.5.0
DesignPublication is one PublicationDetails/Publication entry of a design.
type DesignRecord ¶ added in v0.3.1
type DesignRecord struct {
FilingDate string
LanguageCode string
PublicationIdentifier string
PublicationSubsection string
PublicationDate string
LegalStatus string
}
DesignRecord represents one design register-event (DesignRecord) entry.
type DesignSearchResult ¶
type DesignSearchResult struct {
TotalHits int
DocumentHits int
DatabaseHits int
// MaxHitsReached is true when the query matched more than the 10000-hit cap
// and the returned list is truncated (see PatentSearchResult.MaxHitsReached).
MaxHitsReached bool
Hits []DesignHit
RawXML []byte // original XML response bytes
// MessageDE, MessageEN, ListMaxHitsReached, DocumentHitsCounter and
// DatabaseHitsCounter: see PatentSearchResult.
MessageDE string
MessageEN string
ListMaxHitsReached bool
DocumentHitsCounter HitCounter
DatabaseHitsCounter HitCounter
}
DesignSearchResult holds parsed design search results.
func ParseDesignSearch ¶
func ParseDesignSearch(data []byte) (*DesignSearchResult, error)
ParseDesignSearch parses a design search XML response.
type DesignView ¶ added in v0.3.1
type DesignView struct {
Filename string
Format string
Number string
Height string
Width string
Unit string
}
DesignView represents an image/representation view.
type ErrorResponse ¶
type ErrorResponse struct {
XMLName xml.Name `xml:"Transaction"`
TradeMarkBody transactionBody `xml:"TradeMarkTransactionBody"`
DesignBody transactionBody `xml:"DesignTransactionBody"`
PatentBody transactionBody `xml:"PatentTransactionBody"`
}
ErrorResponse represents the XML error response structure from DPMA API. The DPMA API uses different body element names depending on the service:
- TradeMarkTransactionBody (trademark service)
- DesignTransactionBody (design service)
- PatentTransactionBody (patent service)
All share the same nested TransactionErrorDetails structure. We parse all three variants and use whichever has error content.
type HitCounter ¶ added in v0.5.0
HitCounter is one <Counter> child of a search response, verbatim: Text is the element text (a number, or on capped lists the truncation notice the register writes in its place) and MaxHitsReached its maxHitsReched attribute (the register's own spelling).
type NotFoundError ¶
NotFoundError represents resource not found errors
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type Party ¶
type Party struct {
Text string // full free-format line as returned by the office, if present
Name string
Address string
Street string
Postcode string
Country string
Sequence string // @sequence attribute, when present
AppType string // applicant @app-type attribute, when present
// County, State, CountryCode and PostOfficeBox are the ST66/ST86 address
// elements AddressCounty, AddressState, FormattedAddressCountryCode and
// AddressPostOfficeBox, verbatim. Country above is a convenience pick of the
// first non-empty of County, State and CountryCode (the register writes the
// country code into any of them); these fields carry each element as sent.
County string
State string
CountryCode string
PostOfficeBox string
}
Party represents a person or organization (applicant, inventor, agent, etc.)
type PatentCitation ¶ added in v0.5.0
type PatentCitation struct {
Sequence string
NonPatent bool
Country string
DocNumber string
Kind string
Date string
Text string
RelevanceIndicators []string
}
PatentCitation is one references-cited entry. A patent citation (patcit) carries the cited document-id; the register writes the whole cited publication into DocNumber (e.g. "DE000010151502A1") and leaves Country, Kind and Date absent. A non-patent citation (nplcit) carries Text and has NonPatent set. RelevanceIndicators are the relevance-ind elements (X, Y, A...).
type PatentClassification ¶ added in v0.3.1
type PatentClassification struct {
Sequence string
Symbol string // <text>
VersionIndicator string // <ipc-version-indicator>
SymbolPosition string // <symbol-position>, when present
}
PatentClassification represents a classification-ipcr entry with version.
type PatentDesignatedRegion ¶ added in v0.4.0
PatentDesignatedRegion is one designation-pct/regional entry: the region (e.g. EP) and the states designated under it.
type PatentDocumentRef ¶
type PatentDocumentRef struct {
Country string
Number string
Date string
Kind string // document-id/kind, when present
}
PatentDocumentRef represents an application or document reference.
func (PatentDocumentRef) MatchesPublicationNumber ¶ added in v0.5.0
func (r PatentDocumentRef) MatchesPublicationNumber(publicationNumber string) bool
MatchesPublicationNumber is PatentPublication.MatchesNumber for a document reference such as a PatentInfo.RegionalPublications entry (EP and WO publications, which the register lists without kind code).
type PatentEvent ¶ added in v0.3.1
type PatentEvent struct {
TypeOfProcedure string
ProceduralStatus string
DateOfProceduralStatus string
PublicationInfo *PatentEventPublication
IPCMainClass *PatentIPCClass
PreviousIPCMainClass *PatentIPCClass
PublishedDocuments []string
DateLastRegisterUpdate string
// Party changes. The register sends each party list twice: as verbatim
// lines (Applicants, PreviousApplicants, Inventors, PreviousInventors,
// Representative, PreviousRepresentative) and structured (the *Parties
// fields, from the *-structured elements). Both are kept as sent.
Applicants []string
ApplicantParties []Party
PreviousApplicants []string
PreviousApplicantParties []Party
Inventors []string
InventorParties []Party
PreviousInventors []string
PreviousInventorParties []Party
Representative string
RepresentativeParties []Party
RepresentativeType string
PreviousRepresentative string
PreviousRepresentativeParties []Party
PreviousRepresentativeType string
// Further optional event fields of the register schema, verbatim.
DateOfCapture string
IPCSecondaryClasses []PatentIPCClass
PreviousIPCSecondaryClasses []PatentIPCClass
ThirdPartyRequest string
BPatGFileNumber string
SuspendedUntil string
Information string
DateOfReceipt string
BasicPatentFileNumber string
}
PatentEvent represents one legal-event / prosecution-history entry.
type PatentEventPublication ¶ added in v0.3.1
type PatentEventPublication struct {
IssueNumber string
Year string
PublicationDate string
PublicationType string
Part string
}
PatentEventPublication represents the publication-info of an event.
type PatentHit ¶
type PatentHit struct {
LeadingRegisteredNumber string
RegisteredNumber string
Type string // "Patent", "Utility model"
LegalStatus string
Title string
Applicants []string
Inventors []string
Agent string
IPCClasses []string // main + further classification symbols
Classifications []PatentSearchIPC // main + further with edition
MainClassification PatentSearchIPC // main classification with edition
FurtherClassifications []PatentSearchIPC // further classifications with edition
ApplicationDate string
PublicationDate string
RegistrationDate string
// NumberSystem, Country and ReceivingOffice classify the record by its
// LeadingRegisteredNumber (see ClassifyRegisteredNumber): the register also
// lists GDR patents, European files and PCT applications, so a hit is not
// necessarily a German file. They are derived from the number's form, not
// sent as separate elements; all three are empty for an unrecognised form.
NumberSystem PatentNumberSystem
Country string
ReceivingOffice string
}
PatentHit represents a single patent search result entry.
type PatentIPCClass ¶ added in v0.3.1
PatentIPCClass represents an ipc-main-class / previous-ipc-main-class.
type PatentInfo ¶
type PatentInfo struct {
SchemaVersion string // @schema-version
Publications []PatentPublication
// ApplicationRef is the register file's own application reference: the
// first application-reference element (DE for a national file or a
// validated EP, EP for a pending EP application, WO for a PCT application
// before the DE phase). ApplicationRefs carries every one of them in
// document order, e.g. DE, EP and WO for a validated EP that started as a PCT.
ApplicationRef PatentDocumentRef
ApplicationRefs []PatentDocumentRef
// RegionalPublications and RegionalFilings carry the
// pct-or-regional-publishing-data and pct-or-regional-filing-data elements:
// the EP and WO publication numbers and filing dates of a right that did not
// start as a German national filing.
RegionalPublications []PatentDocumentRef
RegionalFilings []PatentDocumentRef
// DesignatedRegions carries designation-of-states/designation-pct/regional:
// each region (e.g. EP) with the states designated under it.
DesignatedRegions []PatentDesignatedRegion
Title string
TitleLang string
IPCClasses []string // classification symbols (back-compat convenience)
Classifications []PatentClassification
Applicants []Party
Inventors []Party
Agents []Party // representatives
CorrespondenceParty Party // parties/correspondence-address
PriorityClaims []PatentPriorityClaim
IPRightType string // patent, gebrauchsmuster, schutzzertifikat, etc.
Status string // anhaengig-in-kraft, nicht-anhaengig-erloschen
AgentType string // office-specific agent-type
Abstract string
FilingDate string
FirstPubDate string
DateLastRegisterUpdate string
// GrantPubDate is office-specific-bib-data/date-of-publication-of-grant.
GrantPubDate string
// PCTNationalPhaseEntryDate is date-pct-national-phase-entry-pat.
PCTNationalPhaseEntryDate string
// DueDate and DueDateFee are the next fee due date and the fee it refers to
// (e.g. "pat-zer-jahr-12"), verbatim.
DueDate string
DueDateFee string
// PublicationLanguageEP and PublicationLanguageWO are
// language-of-publication-ep / -wo, verbatim (e.g. "EN - Englisch").
PublicationLanguageEP string
PublicationLanguageWO string
Events []PatentEvent // legal-event / prosecution history
RawXML []byte // original XML response bytes
// Citations carries references-cited/citation: the patcit entries, then
// the nplcit entries, each with the register's own Sequence.
// ReferencesCitedHash is the references-cited @hash attribute.
Citations []PatentCitation
ReferencesCitedHash string
// RelatedDocuments carries related-documents: each utility-model-basis,
// division and addition relation with its parent and child files.
RelatedDocuments []PatentRelation
}
PatentInfo holds parsed patent register info (ST36 bibliographic data).
func ParsePatentInfo ¶
func ParsePatentInfo(data []byte) (*PatentInfo, error)
ParsePatentInfo parses a patent info XML response (ST36 format).
type PatentNumberSystem ¶ added in v0.5.0
type PatentNumberSystem string
PatentNumberSystem names the numbering system of a register record's leading-registered-number.
const ( // NumberSystemDE is a German file number: digits only, check digit last // ("100273602" for 100 27 360.2, "82337144" for G 82 33 714.4). NumberSystemDE PatentNumberSystem = "DE" // NumberSystemDD is a patent of the former GDR: "DD" and the patent number // ("DD136869"). NumberSystemDD PatentNumberSystem = "DD" // NumberSystemEP is a European application: "E" and the EPO application // number with its check digit ("E247834666" for 24 78 3466.6). NumberSystemEP PatentNumberSystem = "EP" // NumberSystemPCT is a PCT application: receiving office, year and serial // ("CN2019089592" for PCT/CN2019/089592). NumberSystemPCT PatentNumberSystem = "PCT" )
Number systems the patent register reports in search hits.
type PatentPriorityClaim ¶ added in v0.3.1
PatentPriorityClaim represents a priority-claim entry.
type PatentPublication ¶
type PatentPublication struct {
Sequence string
Country string
Number string
Kind string
Date string
}
PatentPublication represents a publication reference within patent info.
func (PatentPublication) MatchesNumber ¶ added in v0.5.0
func (p PatentPublication) MatchesNumber(publicationNumber string) bool
MatchesNumber reports whether the publication reference is the publication a caller wrote as publicationNumber (e.g. "DE10027360A1"), see PublicationNumber.Matches. The register's zero padding is ignored.
type PatentRelation ¶ added in v0.5.0
type PatentRelation struct {
Type string
Parents []PatentDocumentRef
Children []PatentDocumentRef
}
PatentRelation is one related-documents relation: Type is the element name (RelationUtilityModelBasis, RelationDivision, RelationAddition), Parents and Children are the parent-doc and child-doc files as the register lists them. The register file itself appears on one of the two sides.
type PatentSearchIPC ¶ added in v0.3.1
PatentSearchIPC is a classification symbol with its edition (patent search).
type PatentSearchResult ¶
type PatentSearchResult struct {
TotalHits int
DocumentHits int // <Counter><DocumentHits>; 0 when the cap notice replaces the number (see MaxHitsReached)
DatabaseHits int // <Counter><DatabaseHits>
// MaxHitsReached is true when the query matched more than the 10000-hit cap
// and the returned list is truncated. DPMA then replaces the DocumentHits
// count with the notice text ("Result list is limited - Not all results are
// returned"), so DatabaseHits carries the register-wide total.
MaxHitsReached bool
Hits []PatentHit
RawXML []byte // original XML response bytes
// MessageDE and MessageEN are the Message_DE / Message_EN attributes of the
// hit list (e.g. the truncation notice of a capped list), verbatim.
MessageDE string
MessageEN string
// ListMaxHitsReached is the hit list's own maxHitsReached attribute;
// DocumentHitsCounter and DatabaseHitsCounter are the two <Counter> children
// as sent. MaxHitsReached above is the summary of these flags.
ListMaxHitsReached bool
DocumentHitsCounter HitCounter
DatabaseHitsCounter HitCounter
}
PatentSearchResult holds parsed patent search results.
func ParsePatentSearch ¶
func ParsePatentSearch(data []byte) (*PatentSearchResult, error)
ParsePatentSearch parses a patent search XML response.
type PublicationNumber ¶ added in v0.5.0
type PublicationNumber struct {
Country string // two-letter office code, empty when the input had none
Number string // digits, leading zeros removed
Kind string // kind code ("A1", "B4", "U1"), empty when the input had none
}
PublicationNumber is a publication number split into its parts. Number holds the digits without leading zeros, so the register's zero-padded form ("000010027360") and the usual written form ("10027360") compare equal.
func ParsePublicationNumber ¶ added in v0.5.0
func ParsePublicationNumber(s string) (pn PublicationNumber, ok bool)
ParsePublicationNumber splits a publication number into country, number and kind code. It accepts the forms callers write ("DE10027360A1", "de 100 27 360 A1", "EP4780303", "10027360") and the forms the register writes: a zero-padded doc-number ("000010027360") and the combined published-documents / citation form ("DD000000136869A1", "US000005371412A"). Whitespace is ignored and letters are upper-cased. ok is false when the input is not an optional two-letter country, digits, and an optional kind code (one letter, optionally followed by one digit).
func (PublicationNumber) Matches ¶ added in v0.5.0
func (pn PublicationNumber) Matches(other PublicationNumber) bool
Matches reports whether two publication numbers denote the same publication: the numbers are equal, and country and kind code are equal wherever BOTH sides state them. A side that omits the country or the kind code does not constrain it, so "DE10027360" matches both the A1 and the B4 publication.
type RateLimitError ¶ added in v0.3.5
RateLimitError is returned for HTTP 429 responses. RetryAfter is the value of the Retry-After header in seconds when known (0 otherwise).
func (*RateLimitError) Error ¶ added in v0.3.5
func (e *RateLimitError) Error() string
type RegisteredNumberClass ¶ added in v0.5.0
type RegisteredNumberClass struct {
// System is the numbering system, empty when the form is not recognised.
System PatentNumberSystem
// Country is the code the register itself uses for such a record: "DE",
// "DD", "EP", or "WO" for a PCT application.
Country string
// ReceivingOffice is the PCT receiving office ("CN"), PCT only.
ReceivingOffice string
}
RegisteredNumberClass is the result of ClassifyRegisteredNumber.
func ClassifyRegisteredNumber ¶ added in v0.5.0
func ClassifyRegisteredNumber(leading string) RegisteredNumberClass
ClassifyRegisteredNumber classifies a leading-registered-number AS REPORTED BY THE REGISTER in a search hit (PatentHit.LeadingRegisteredNumber). It is a pure function of the number's form:
digits only -> German file (DE) "E" + digits -> European file (EP) two letters + ten digits -> PCT application (WO, receiving office = the letters) "DD" + digits -> GDR patent (DD)
Do not feed it user input: a publication number such as "DE10027362" has the shape of a PCT registered number, which is why the register's own value is required. Anything else yields the zero value.
type ResolutionLoopError
deprecated
added in
v0.3.5
type ResolutionLoopError struct {
Number string
}
ResolutionLoopError was returned when resolving a patent number kept producing another non-registered number instead of terminating.
Deprecated: resolution is now always one search followed by one direct fetch of the reported registered number, so it cannot loop and this error is no longer returned. The type is kept so existing errors.As checks still compile.
func (*ResolutionLoopError) Error ¶ added in v0.3.5
func (e *ResolutionLoopError) Error() string
type TrademarkClass ¶
type TrademarkClass struct {
Number string
Description string
DescriptionLang string // GoodsServicesDescription @languageCode
}
TrademarkClass represents a Nice classification entry.
type TrademarkHit ¶
type TrademarkHit struct {
Number string
RegistrationOfficeCode string
ApplicationNumber string
MarkText string
MarkDescriptionText string // MarkDescriptionDetails/DescriptionText
MarkFeature string // wortmarke, wort-bildmarke, etc.
Classification string
Status string
ApplicationDate string
RegistrationDate string
Applicant string
Representative string
}
TrademarkHit represents a single trademark search result entry.
type TrademarkInfo ¶
type TrademarkInfo struct {
RegistrationOfficeCode string
ApplicationNumber string
RegistrationNumber string
ApplicationDate string
RegistrationDate string
ExpiryDate string
TerminationDate string
Status string
KindMark string
MarkFeature string
OppositionPeriodStartDate string
OppositionPeriodEndDate string
MarkText string
MarkTextLang string // MarkVerbalElementText @languageCode
StandardCharacterIndicator string // MarkStandardCharacterIndicator
ProposedLeadingClassNumber string
Applicants []Party
Representatives []Party
CorrespondenceParty Party
Classifications []TrademarkClass
Records []TrademarkRecord // register-event history
FileNumber string // de:FileNumber
MarkFeatureDPMA string // de:MarkFeatureDPMA
RawXML []byte // original XML response bytes
// SchemaLocation, TransactionIdentifier and TransactionCode are the ST66
// envelope values; PublicationDates are PublicationDetails/Publication dates.
SchemaLocation string
TransactionIdentifier string
TransactionCode string
PublicationDates []string
}
TrademarkInfo holds parsed trademark register info (ST66).
func ParseTrademarkInfo ¶
func ParseTrademarkInfo(data []byte) (*TrademarkInfo, error)
ParseTrademarkInfo parses a trademark info XML response (ST66 format).
type TrademarkRecord ¶ added in v0.3.1
type TrademarkRecord struct {
RecordIdentifier string
BasicRecordKind string
PublicationIdentifier string
PublicationSection string
PublicationDate string
CurrentStatusCode string
CurrentStatusDate string
LegalGround string // de:Record5f/de:LegalGround
CancellationDate string // de:Record5f/de:CancellationDate
CorrectionText string // de:CorrectionIncomplete/de:CorrectionText
ImageCorrected string // de:CorrectionIncomplete/de:ImageCorrected
ReceiptDeclarationDate string // de:TransferIncomplete/de:ReceiptDeclarationDate
PreviousHolder *Party
NewHolder *Party
// NewCorrespondenceParty is de:TransferIncomplete/de:CorrespondenceAddressDetails/
// de:NewCorrespondenceAddress, nil when the record has none.
NewCorrespondenceParty *Party
}
TrademarkRecord represents one register-event (MarkRecord) entry, including the de:-namespaced extension details (ownership transfer, cancellation, correction history).
type TrademarkSearchResult ¶
type TrademarkSearchResult struct {
TotalHits int
DocumentHits int
DatabaseHits int
// MaxHitsReached is true when the query matched more than the 10000-hit cap
// and the returned list is truncated (see PatentSearchResult.MaxHitsReached).
MaxHitsReached bool
Hits []TrademarkHit
RawXML []byte // original XML response bytes
// ListMaxHitsReached, DocumentHitsCounter and DatabaseHitsCounter: see
// PatentSearchResult.
ListMaxHitsReached bool
DocumentHitsCounter HitCounter
DatabaseHitsCounter HitCounter
}
TrademarkSearchResult holds parsed trademark search results.
func ParseTrademarkSearch ¶
func ParseTrademarkSearch(data []byte) (*TrademarkSearchResult, error)
ParseTrademarkSearch parses a trademark search XML response.
type XMLParseError ¶
type XMLParseError struct {
Operation string // e.g. "ParsePatentSearch"
Err error // underlying xml.Unmarshal error
}
XMLParseError indicates a failure to parse XML response data.
func (*XMLParseError) Error ¶
func (e *XMLParseError) Error() string
func (*XMLParseError) Unwrap ¶
func (e *XMLParseError) Unwrap() error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package generated provides primitives to interact with the openapi HTTP API.
|
Package generated provides primitives to interact with the openapi HTTP API. |
|
Package query provides a query parser and validator for DPMAregister expert search syntax.
|
Package query provides a query parser and validator for DPMAregister expert search syntax. |