-
Notifications
You must be signed in to change notification settings - Fork 4
Basic examples
#Python
from Plumage import plumage
t = plumage.TSDRReq()
t.getTSDRInfo("75181334", "s") # get info on application ser. no 75/181,334
if t.TSDRMapIsValid:
print "Application serial no: ", t.TSDRMap["ApplicationNumber"]
print "Trademark text: ", t.TSDRMap["MarkVerbalElementText"]
print "Application filing date: ", t.TSDRMap["ApplicationDate"]
print "Registration no: ", t.TSDRMap["RegistrationNumber"]
# Owner info is in most recent (0th) entry in ApplicantList
applicant_list = t.TSDRMap["ApplicantList"]
current_owner_info = applicant_list[0]
print "Owner:", current_owner_info["ApplicantName"]
print "Owner address: ", current_owner_info["ApplicantCombinedAddress"]
# Get most recent event: 0th entry in event list
event_list = t.TSDRMap["MarkEventList"]
most_recent_event = event_list[0]
print "Most recent event: ", most_recent_event["MarkEventDescription"]
print "Event date: ", most_recent_event["MarkEventDate"]#C#
Plumage.TSDRReq t = new Plumage.TSDRReq();
t.getTSDRInfo("75181334", "s"); // get info on application ser. no 75/181,334
if (t.TSDRMapIsValid){
Console.WriteLine("Application serial no: " + t.TSDRMap["ApplicationNumber"]);
Console.WriteLine("Trademark text: " + t.TSDRMap["MarkVerbalElementText"]);
Console.WriteLine("Application filing date: " + t.TSDRMap["ApplicationDate"]);
Console.WriteLine("Registration no: " + t.TSDRMap["RegistrationNumber"]);
// Owner info is in most recent (0th) entry in ApplicantList
ArrayList applicant_list = (ArrayList)t.TSDRMap["ApplicantList"];
Dictionary<string, Object> current_owner_info = (Dictionary<string, Object>)applicant_list[0];
Console.WriteLine("Owner: " + current_owner_info["ApplicantName"]);
Console.WriteLine("Owner address: " + current_owner_info["ApplicantCombinedAddress"]);
// Get most recent event: 0th entry in event list
ArrayList event_list = (ArrayList)t.TSDRMap["MarkEventList"];
Dictionary<string, Object> most_recent_event = (Dictionary<string, Object>)event_list[0];
Console.WriteLine("Most recent event: " + most_recent_event["MarkEventDescription"]);
Console.WriteLine("Event date: " + most_recent_event["MarkEventDate"]);
}Although coded in C#, Plumage is a .NET library, and can be invoked from other .NET languages, e.g. Visual Basic .NET and C++ .NET. (Note, I learned just enough VB and C++ to write and test these examples; they are likely not idiomatic code.)
#Visual Basic .NET
Dim t As Plumage.TSDRReq = New Plumage.TSDRReq
t.getTSDRInfo("75181334", "s") ' get info on application ser. no 75/181,334
If t.TSDRMapIsValid Then
Console.WriteLine("Application serial no: " + t.TSDRMap("ApplicationNumber"))
Console.WriteLine("Trademark text: " + t.TSDRMap("MarkVerbalElementText"))
Console.WriteLine("Application filing date: " + t.TSDRMap("ApplicationDate"))
Console.WriteLine("Registration no: " + t.TSDRMap("RegistrationNumber"))
' Owner info is in most recent (0th) entry in ApplicantList
Dim applicant_list As ArrayList = t.TSDRMap("ApplicantList")
Dim current_owner_info As Dictionary(Of String, Object) = applicant_list(0)
Console.WriteLine("Owner: " + current_owner_info("ApplicantName"))
Console.WriteLine("Owner address: " + current_owner_info("ApplicantCombinedAddress"))
' Get most recent event: 0th entry in event list
Dim event_list As ArrayList = t.TSDRMap("MarkEventList")
Dim most_recent_event As Dictionary(Of String, Object) = event_list(0)
Console.WriteLine("Most recent event: " + most_recent_event("MarkEventDescription"))
Console.WriteLine("Event date: " + most_recent_event("MarkEventDate"))
End If#C++ .NET
Plumage::TSDRReq^ t = gcnew Plumage::TSDRReq;
t->getTSDRInfo("75181334", "s"); // get info on application ser. no 75/181,334
if (t->TSDRMapIsValid){
Console::WriteLine("Application serial no: " + t->TSDRMap["ApplicationNumber"]);
Console::WriteLine("Trademark text: " + t->TSDRMap["MarkVerbalElementText"]);
Console::WriteLine("Application filing date: " + t->TSDRMap["ApplicationDate"]);
Console::WriteLine("Registration no: " + t->TSDRMap["RegistrationNumber"]);
// Owner info is in most recent (0th) entry in ApplicantList
ArrayList^ applicant_list = (ArrayList^)(t->TSDRMap["ApplicantList"]);
Dictionary<String^, Object^>^ current_owner_info = (Dictionary<String^, Object^>^)applicant_list[0];
Console::WriteLine("Owner: " + current_owner_info["ApplicantName"]);
Console::WriteLine("Owner address: " + current_owner_info["ApplicantCombinedAddress"]);
// Get most recent event: 0th entry in event list
ArrayList^ event_list = (ArrayList^)(t->TSDRMap["MarkEventList"]);
Dictionary<String^, Object^>^ most_recent_event = (Dictionary<String^, Object^>^)event_list[0];
Console::WriteLine("Most recent event: " + most_recent_event["MarkEventDescription"]);
Console::WriteLine("Event date: " + most_recent_event["MarkEventDate"]);
};#Sample output In each of the above cases, the examples will print the following information (as of August 2014) on U.S. trademark application serial number 75/181,334.
Application serial no: 75181334
Trademark text: MONTY PYTHON'S FLYING CIRCUS
Application filing date: 1996-10-15-04:00
Registration no: 2564831
Owner: Python (Monty) Pictures Ltd.
Owner address: Room 537/538, The Linen Hall//London//W1R 5TB/GB
Most recent event: CANCELLED SEC. 8 (6-YR)
Event date: 2009-02-07-05:00
In this case, the application has matured to registration, and therefore has a ''registration number'' (2,564,831) in addition to its ''application serial number'' (75/181,334). So in this case, the same date would have been displayed if the getTSDRInfo call had requested data for registration no. 2,564,831 instead of for application serial no. 75/181,334.
Python:
t.getTSDRInfo("2564831", "r") # get info on reg. no 2,564,831C#:
t.getTSDRInfo("2564831", "r"); // get info on reg. no 2,564,831Visual Basic .NET:
t.getTSDRInfo("2564831", "r") ' get info on reg. no 2,564,831C++ .NET:
t->getTSDRInfo("2564831", "r"); // get info on reg. no 2,564,831Note the second parameter has changed from "s" (indicating a serial number) to "r" (indicating a registration number).
A single TSDRReq object may be re