After reading the documentation and Google's developer guide, I did not find a to add a second address line.
For example, if I want to store this address as a Google contact :
Mr. Ace Person
Amphitheatre Village Premium Outlets
1600 Amphitheatre Pkwy
Mountain View CA 94043
I can add the street as demonstrated in the developer guide :
StructuredPostalAddress postalAddress = new StructuredPostalAddress();
postalAddress.setStreet(new Street("1600 Amphitheatre Pkwy"));
I couldn't find a structured solution to add a "2 line street address".
Obviously I could add one of the two lines as a house-name (setHousename(housename)) or Neighborhood (setNeighborhood(neighborhood)) but this is not quiet right.
Unfortunately, there is no document or feature that support what you want to accomplish. According to the current document pertaining to the element's property which you can choose what appropriate property to work around you 2nd street line. I hope it helps.
Related
I do try to build a factur-x using Mustang library.
For minimum profile, a Buyer legal registration identifier is required.
For this I build a trade party object:
TradeParty recipient = new TradeParty(
"My Client",
"My address",
"06000",
"City",
"FR")
.setID("123 456 789 10111");
My issue is the following:
I'm able to build an XML (that's what I want)
I'm not able to set the organization ID and pass the schemeID to 0002 (for french factur-X).
I didn't find how to set
Here is what is expected:
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">123 456 789 10111</ram:ID>
</ram:SpecifiedLegalOrganization>
I do also have to set the business process type, which is specific for Chorus Pro (in france):
<ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:ID>A1</ram:ID>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
Here, A1 means invoice deposit, A2 means prepaid invoice deposit, ... By default (in the absence of this field), the case A1 is applied.
The output for recipient :
<ram:BuyerTradeParty>
<ram:ID>123 456 789 10111</ram:ID>
<ram:Name>My Client</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>06000</ram:PostcodeCode>
<ram:LineOne>My address</ram:LineOne>
<ram:CityName>City</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:BuyerTradeParty>
SpecifiedLegalOrganisation/ID has been added to Mustang 2.5 https://www.mustangproject.org/mustang-2-5-0/, please report an issue via https://github.com/ZUGFeRD/mustangproject/issues if there are further requirements vis á vis Chorus Pro I am not aware of.
as you indicated (and as described in the english FX spec 1.05 e.g. on page 115 as well as in the technical annex to ZUGFeRD with a cardinality 0..1) BT-23, i.e. ram:BusinessProcessSpecifiedDocumentContextParameter is optional so you can just omit it unless you need other values. Do you require to set anything nonstandard here?
However, so far nobody ever requested being able to set the legalorganisation +ID and scheme ID, which means that probably nobody ever used Mustang so far to write invoices vis á vis the french authorities (only to german ones or for factur-x B2B invoices).
However, I just added the possibility, you can now use someTradeParty.setLegalOrganisation(new LegalOrganisation("0815", "0002")). This will become part of the next release, could you please confirm that this works and is all you need?
Here I'm Scraping the site https://hamrobazaar.com/c6-apparels-and-accessories and i want to store all the sub-categories details in a bean and print them. If i got the details of object accordingly than this also would be much help.
Example:
I want to Scrape Name of the Mask as Kn95 Mask (fda Certified), description as We are Seller..., seller name as Birodh Pokhrel, Address as Damak-5,Damak, price as 210, date, and type as Brand New
If you are good at Jsoup, and Xpath. Please help me to obtain this. Thank You
For the XPath part (jsoup doesn't support it, so maybe you can try with xsoup) :
Some selectors to grab the details from the ads, including the one with yellow background which stays the same for each page. (article title, description, seller, address, price, item condition) :
//font[#style]/b
//b[.="Seller:"]/preceding-sibling::text()[normalize-space()]
//b[.="Seller:"]/following-sibling::a
//b[.="Seller:"]/following-sibling::font
//b[starts-with(.,"Rs.")]
//b[starts-with(.,"Rs.")]/following-sibling::font
Number of elements for each detail : 21
Some selectors to grab the details from the ads, excluding the one with yellow background which stays the same for each page. (article title, description, seller, address, price, item condition) :
//font[#style][not(ancestor::table[#id])]/b
//b[.="Seller:"][not(ancestor::table[#id])]/preceding-sibling::text()[normalize-space()]
//b[.="Seller:"][not(ancestor::table[#id])]/following-sibling::a
//b[.="Seller:"][not(ancestor::table[#id])]/following-sibling::font
//b[not(ancestor::table[#id])][starts-with(.,"Rs.")]
//b[not(ancestor::table[#id])][starts-with(.,"Rs.")]/following-sibling::font
Number of elements for each detail : 20
Side note : be careful with item condition. Some ads are missing this field. So, the number of elements could be lower than 20 or 21.
I am using Google's libPhoneNumber.
I have a ISO2 country code (say: JM :: Jamaica)
I wanted to get the ISD Country code for this country.
I am doing it as follows:
PhoneNumberUtil pnu = PhoneNumberUtil.getInstance();
int isd_cc = pnu.getCountryCodeForRegion("JM");
But it seems to return value : 1
As per wikipedia or countrycode.org the expected value seems to be 1-876
Is this a bug in the libPhoneNumber library. Also, it would be great if someone can suggest a better way to get the ISD Country code.
I am trying to use the FRED API to get the economic data. The examples provided on the FRED website uses series Id to get the observations/values for a particular series. I am not able to find where I can find the series IDs. For example, in the below example it is asking for series id to get the data-
https://api.stlouisfed.org/fred/series/observations?series_id=GNPCA&api_key=*your_key*
Any help is appreciated.
From the documentation on FRED API, fred/category/series, "Get the series in a category."; an example:
https://api.stlouisfed.org/fred/category/series?category_id=125&api_key=abcdefghijklmnopqrstuvwxyz123456
Just go here Federal Reserve Economic Data | FRED | St. Louis Fed and search for the series you're interested in. Alternately, you can browse by several attributes, including Category from there. Once you've searched, if you find it, click one of the results. A search for S&P 500 yielded a link to S&P 500 | FRED | St. Louis Fed, which has a chart of it. You'll see some letters and/or numbers in parentheses right beside the page's title. In this case, it is SP500. THAT is your series ID.
Your complete link will be https://api.stlouisfed.org/fred/series/observations?series_id=SP500&file_type=json&api_key=YourAPIKey. More parameters are here: St. Louis Fed Web Services: fred/series/observations
Perhaps this will help you:
GET https://api.stlouisfed.org/fred/series/search?search_text=**your+search+query**&api_key=**abc123**&file_type=json&observation_start=2016-03-01&observation_end=2016-03-15
This will return JSON data with the series id you are looking for....
{
"realtime_start": "2016-04-06",
"realtime_end": "2016-04-06",
"order_by": "search_rank",
"sort_order": "desc",
"count": 164,
"offset": 0,
"limit": 1000,
"series**s**": [
{
"id": "**FEDFUNDS**",
"realtime_start": "2016-04-06",
"realtime_end": "2016-04-06",
"title": "Effective Federal Funds Rate",
------------------ json result intentionally cut off -------------
There are different ways to get the series id's and category id's found here:
https://research.stlouisfed.org/docs/api/fred/
Using FQL, by means of which finds events that contain a given word. FQL works only in API version <2.1. By which I use the Graph API Explorer to display events. Eg.
search?q=york&type=event
Example of FQL
SELECT Eid, name, location, start_time, description, pic_small, creator, event venue FROM WHERE start_time> "Sun Jun 21 0:00:35 GMT 2015" AND (CONTAINS ("york")
I would like to make a search events by using RestFB not using FQL, but do not know how. The documentation is scarce.
I answered this already on github, but perhaps someone else find this useful.
Your special case is not in the documentation, but you can transfer the knowledge you find in the documentation and solve your problem: http://restfb.com/#searching
Connection<Event> eventList =
facebookClient.fetchConnection("search", Event.class,
Parameter.with("q", "york"), Parameter.with("type", "event"));
Now, you can iterate over the eventList.
Here you can find how this can be done: http://restfb.com/#fetching-connections