Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadBulkFile(url string, exportDirectory string) (filePath string, err error)
- func GenerateAliases(documentNumber, kind string, publicationDate time.Time) (aliases []string, err error)
- func GetPatentApplicationXmlBulkFileList(start time.Time, end time.Time) (downloadLinks []string, err error)
- func GetPatentGrantXmlBulkFileList(start time.Time, end time.Time) (downloadLinks []string, err error)
- func NewHttpClient() http.Client
- func ProcessBulkFile(sourceFile, destinationFolder string) (err error)
- type Abstract
- type BulkFileResponse
- type Citation
- type Claim
- type ClassificationItem
- type ClassificationSystem
- type Country
- type Description
- type Inventor
- type Owner
- type Product
- type Representative
- type Title
- type UsptoPatentDocumentSimple
- func ProcessApplicationXML15Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
- func ProcessApplicationXML40Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
- func ProcessApplicationXML4Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
- func ProcessGrantXML4Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
- func ProcessXML2Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
- func ProcessXMLFileSimple(filePath string) (patentDoc UsptoPatentDocumentSimple, err error)
- func ProcessXMLSimple(raw []byte) (patentDoc UsptoPatentDocumentSimple, err error)
Constants ¶
const (
// ENDPOINT_HOST is the host of https endpoint of the uspto
ENDPOINT_HOST = "https://developer.uspto.gov"
)
Variables ¶
var ErrCanNotFindParser = errors.New("can not find parser for this document")
var ErrEmptyDocumentNumber = errors.New("empty document number")
var ErrEmptyKind = errors.New("empty kind")
var ErrEmptyPublicationDate = errors.New("empty publication date")
var ErrFileIsNoZip = errors.New("file is not zip")
var ErrNoFilenameInUrl = errors.New("no filename in url")
Functions ¶
func DownloadBulkFile ¶
func GenerateAliases ¶
func GenerateAliases(documentNumber, kind string, publicationDate time.Time) (aliases []string, err error)
GenerateAliases generates alternative ids base on the information in the patent usually it is the document number as well as the kind and the year sometimes leading zeros are removed ############################################################################# Applications 0061044 -> US 2009 0061044 A1: with the year and the kind US 3904033 A: without year ############################################################################# Grants 9265015 -> US 9265015 B2: without year US 9265015: without kind ############################################################################# Examples for real document number values 06335824 | B1 US 20010000059 | A1 US 20140001198 | A1 US 20140001198 | A1 US 20130334279 | A1 US ############################################################################# Examples for identifiers that must match US2013034018A1
func GetPatentApplicationXmlBulkFileList ¶
func GetPatentApplicationXmlBulkFileList(start time.Time, end time.Time) (downloadLinks []string, err error)
GetPatentApplicationXmlBulkFileList returns the download links to the zipped archives between two dates of patent applications
func GetPatentGrantXmlBulkFileList ¶
func GetPatentGrantXmlBulkFileList(start time.Time, end time.Time) (downloadLinks []string, err error)
GetPatentGrantXmlBulkFileList returns the download links to the zipped archives between two dates of patent grants
func NewHttpClient ¶
NewHttpClient builds a http client if the env variables PROXY or HTTP_PROXY are set the http client uses these
func ProcessBulkFile ¶
ProcessBulkFile processes a uspto zip file
Types ¶
type BulkFileResponse ¶
type BulkFileResponse struct { ProductLinkPath string `json:"productLinkPath"` ProductIdentifier int `json:"productIdentifier"` ProductShortName string `json:"productShortName"` ProductDesc string `json:"productDesc"` ProductTitle string `json:"productTitle"` ProductFrequency string `json:"productFrequency"` ProductLevel string `json:"productLevel"` ProductFromDate string `json:"productFromDate"` ProductToDate string `json:"productToDate"` NumberOfFiles int `json:"numberOfFiles"` ParentProduct interface{} `json:"parentProduct"` ProductFiles []struct { FileLinkPath string `json:"fileLinkPath"` FileIdentifier int `json:"fileIdentifier"` FileName string `json:"fileName"` FileSize int `json:"fileSize"` FileDownloadURL string `json:"fileDownloadUrl"` FileFromTime string `json:"fileFromTime"` FileToTime string `json:"fileToTime"` FileType string `json:"fileType"` FileReleaseDate string `json:"fileReleaseDate"` } `json:"productFiles"` }
func GetBulkFileList ¶
func GetBulkFileList(product Product, start time.Time, end time.Time) (res BulkFileResponse, err error)
GetBulkFileList returns a list of available files of a specific USPTO product
type ClassificationItem ¶
type ClassificationItem struct { System ClassificationSystem // cpc, ipc Text string Sequence int Section string Class string SubClass string MainGroup string SubGroup string Version string ClassificationLevel string FirstLater string // F=first or L=later ClassificationValue string // (inventive or non-inventive) ActionDate string // (inventive or non-inventive) OriginalOrReclassified string Source string GeneratingOffice string }
func NewClassificationItemFromString ¶
func NewClassificationItemFromString(text string, sequence int) (c ClassificationItem)
type ClassificationSystem ¶
type ClassificationSystem string
const CPC ClassificationSystem = "CPC"
const IPC ClassificationSystem = "IPC"
const US ClassificationSystem = "US" // US Classification
type Description ¶
type Representative ¶
type UsptoPatentDocumentSimple ¶
type UsptoPatentDocumentSimple struct { ID string Aliases []string File string Lang string Country Country DocNumber string Kind string DatePubl time.Time Status string DtdVersion string Title []Title Abstract []Abstract Claims []Claim Description []Description Citations []Citation Inventors []Inventor Owners []Owner Representatives []Representative ContractingStates []Country Classifications []ClassificationItem // USPTO FieldOfSearch []ClassificationItem }
func ProcessApplicationXML15Simple ¶
func ProcessApplicationXML15Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
func ProcessApplicationXML40Simple ¶
func ProcessApplicationXML40Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
func ProcessApplicationXML4Simple ¶
func ProcessApplicationXML4Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
func ProcessGrantXML4Simple ¶
func ProcessGrantXML4Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
func ProcessXML2Simple ¶
func ProcessXML2Simple(doc *goquery.Document) (patentDoc UsptoPatentDocumentSimple, err error)
func ProcessXMLFileSimple ¶
func ProcessXMLFileSimple(filePath string) (patentDoc UsptoPatentDocumentSimple, err error)
func ProcessXMLSimple ¶
func ProcessXMLSimple(raw []byte) (patentDoc UsptoPatentDocumentSimple, err error)
ProcessXMLSimple transforms the raw response of the xml data into a simple patent
func (*UsptoPatentDocumentSimple) GenerateAliases ¶
func (p *UsptoPatentDocumentSimple) GenerateAliases()
Source Files ¶
- config.go
- document_aliases.go
- download_bulk_file.go
- get_bulk_file_list.go
- http_client.go
- patent_simple.go
- process_bulk_file.go
- process_xml_application_v1_5_simple.go
- process_xml_application_v4_0_simple.go
- process_xml_application_v4_simple.go
- process_xml_grant_v2_simple.go
- process_xml_grant_v4_simple.go
- process_xml_simple.go