code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
private String chooseAlternations(final String expression) {
StrBuilder sb = new StrBuilder(expression);
int i = 0;
// Loop until an unescaped pipe symbol appears.
while (UNESCAPED_PIPE_PATTERN.matcher(sb.toString()).find()) {
for (; i < sb.length(); ++i) {
if (sb.charAt(i) == '|') {
if (sb... | java |
public String negateString(final String input, int bad) {
int length = input.length();
Range[] ranges = getRanges();
int[] lengths = new int[ranges.length];
// arrange lengths
for (int i = 0; i < lengths.length; i++) {
Range r = ranges[i];
lengths[i] = r.getMin();
length -= r.getMin();
}
... | java |
public Range[] getRanges() {
Range[] ranges = new Range[nodes.size()];
for (int i = 0; i < ranges.length; i++) {
ranges[i] = nodes.get(i).getRange();
}
return ranges;
} | java |
public String generate(final int[] nodeSizes, final int bad) {
buf.setLength(0);
for (int i = 0; i < nodes.size() && i < nodeSizes.length; i++) {
buf.append(nodes.get(i).getCharacters(nodeSizes[i], bad));
}
String value = buf.toString();
buf.setLength(0);
return value;
} | java |
public String generate(final int bad) {
int[] sizes = new int[nodes.size()];
for (int i = 0; i < sizes.length; i++) {
Range r = nodes.get(i).getRange();
sizes[i] = r.getMin() + r.getRange() / 2;
}
return generate(sizes, bad);
} | java |
public String generate(int total, final int bad) {
if (total < 0) {
if (log.isDebugEnabled()) {
log.debug("Character string cannot have a negative length!");
}
total = 0;
}
Range[] ranges = getRanges();
int[] lengths = new int[ranges.length];
int length = 0;
// first make sure every s... | java |
private static int intFromSubArray(final byte[] bytes, final int from, final int to) {
final byte[] subBytes = Arrays.copyOfRange(bytes, from, to);
final ByteBuffer wrap = ByteBuffer.wrap(subBytes);
return wrap.getInt();
} | java |
void startArchiving() {
if (isArchivingDisabled()) {
return;
}
String archiveName = configuration.get(JFunkConstants.ARCHIVE_FILE);
if (StringUtils.isBlank(archiveName)) {
archiveName = String.format(DIR_PATTERN, moduleMetaData.getModuleName(), Thread.currentThread().getName(),
FORMAT.format(moduleM... | java |
@Override
public String initValuesImpl(final FieldCase ca) {
if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
return null;
}
// If there still is an mandatory case, a value will be generated anyway
if (ca != null || last && constraint.hasNextCase() || generator.isIgnoreOptionalConstraints()) {
... | java |
public static String spacesOptional(final String input) {
String output;
output = input.replaceAll("\\s", "\\\\s?");
return output;
} | java |
public static MozuUrl getDiscountSettingsUrl(Integer catalogId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discountsettings/{catalogId}?responseFields={responseFields}");
formatter.formatUrl("catalogId", catalogId);
formatter.formatUrl("responseFields", respon... | java |
public static Hml read(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return read(reader);
}
} | java |
byte[] readSignResponse() throws IOException {
// Read the first 9 bytes from the InputStream which are the SSH2_AGENT_SIGN_RESPONSE headers.
final byte[] headerBytes = readBytes(9, "SSH2_AGENT_SIGN_RESPONSE");
log.debug("Received SSH2_AGENT_SIGN_RESPONSE message from ssh-agent.");
final SignResponseHea... | java |
public static MozuUrl getTaxableTerritoriesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/taxableterritories");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static MozuUrl updateTaxableTerritoriesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/taxableterritories");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static Iterable<VcfRecord> records(final Readable readable) throws IOException {
checkNotNull(readable);
ParseListener parseListener = new ParseListener();
VcfParser.parse(readable, parseListener);
return parseListener.getRecords();
} | java |
public Constraint createModel(final MathRandom random, final Element element) {
if (element == null) {
return null;
}
Class<? extends Constraint> classObject = null;
Constraint object = null;
try {
classObject = getClassObject(element);
Constructor<? extends Constraint> constructor = getConst... | java |
public Constraint getModel(final Element element) throws IdNotFoundException {
Attribute attr = element.getAttribute(XMLTags.ID);
if (attr == null) {
throw new IdNotFoundException(null);
}
Constraint c = null;
final String id = attr.getValue();
try {
c = getModel(id);
} catch (IdNotFoundExc... | java |
public Constraint getModel(final String id) throws IdNotFoundException {
Constraint e = map.get(id);
if (e == null) {
throw new IdNotFoundException(id);
}
return e;
} | java |
private Class<? extends Constraint> getClassObject(final Element element) throws ClassNotFoundException {
String className = element.getAttributeValue(XMLTags.CLASS);
className = className.indexOf('.') > 0 ? className : getClass().getPackage().getName() + '.' + className;
return Class.forName(className).asSubc... | java |
private Constructor<? extends Constraint> getConstructor(final Class<? extends Constraint> classObject) throws NoSuchMethodException {
return classObject.getConstructor(new Class[] { MathRandom.class, Element.class, Generator.class });
} | java |
private Constraint getObject(final MathRandom random, final Element element, final Constructor<? extends Constraint> constructor)
throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
LOG.debug("Creating constraint: " + element.getAttributes());
Constrain... | java |
private void putToCache(final Element element, final Constraint object) {
String id = element.getAttributeValue(XMLTags.ID);
if (id != null && id.length() > 0) {
Constraint old = putToCache(id, object);
if (old != null) {
LOG.warn("The id=" + id + " for object of type=" + old.getClass().getName()
... | java |
private Constraint putToCache(final String id, final Constraint object) {
Constraint c = this.map.put(id, object);
if (c instanceof DummyConstraint) {
((DummyConstraint) c).constraint = object;
return null;
}
return c;
} | java |
public static Analysis readAnalysis(final Reader reader) throws IOException {
checkNotNull(reader);
try {
JAXBContext context = JAXBContext.newInstance(Analysis.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
SchemaFactory schemaFactory = SchemaFacto... | java |
public static Analysis readAnalysis(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readAnalysis(reader);
}
} | java |
public static Analysis readAnalysis(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readAnalysis(reader);
}
} | java |
public static Analysis readAnalysis(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readAnalysis(reader);
}
} | java |
public static Experiment readExperiment(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readExperiment(reader);
}
} | java |
public static Experiment readExperiment(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readExperiment(reader);
}
} | java |
public static Experiment readExperiment(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readExperiment(reader);
}
} | java |
public static RunSet readRunSet(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readRunSet(reader);
}
} | java |
public static RunSet readRunSet(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readRunSet(reader);
}
} | java |
public static RunSet readRunSet(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readRunSet(reader);
}
} | java |
public static Sample readSample(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readSample(reader);
}
} | java |
public static Sample readSample(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSample(reader);
}
} | java |
public static Sample readSample(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readSample(reader);
}
} | java |
public static Study readStudy(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readStudy(reader);
}
} | java |
public static Study readStudy(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readStudy(reader);
}
} | java |
public static Study readStudy(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readStudy(reader);
}
} | java |
public static Submission readSubmission(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readSubmission(reader);
}
} | java |
public static Submission readSubmission(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSubmission(reader);
}
} | java |
public static Submission readSubmission(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readSubmission(reader);
}
} | java |
protected <T> T getScopedObject(final Key<T> key, final Provider<T> unscoped, final Map<Key<?>, Object> scopeMap) {
// ok, because we know what we'd put in before
@SuppressWarnings("unchecked")
T value = (T) scopeMap.get(key);
if (value == null) {
/*
* no cache instance present, so we use the one we get ... | java |
public static MozuUrl refreshUserAuthTicketUrl(String refreshToken, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/authtickets/refresh?refreshToken={refreshToken}&responseFields={responseFields}");
formatter.formatUrl("refreshToken", refreshToken);
formatter.format... | java |
public static MozuUrl createUserAuthTicketUrl(String responseFields, Integer tenantId)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/adminuser/authtickets/tenants?tenantId={tenantId}&responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("te... | java |
public static MozuUrl deleteUserAuthTicketUrl(String refreshToken)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/adminuser/authtickets/?refreshToken={refreshToken}");
formatter.formatUrl("refreshToken", refreshToken);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;... | java |
public static Iterable<BedRecord> read(final Readable readable) throws IOException {
checkNotNull(readable);
Collect collect = new Collect();
stream(readable, collect);
return collect.records();
} | java |
public static void stream(final Readable readable, final BedListener listener) throws IOException {
checkNotNull(readable);
checkNotNull(listener);
BedLineProcessor lineProcessor = new BedLineProcessor(listener);
CharStreams.readLines(readable, lineProcessor);
} | java |
public void copy(final File source) throws IOException {
if (!source.exists()) {
LOG.warn("File " + source + " cannot be copied as it does not exist");
return;
}
if (equals(source)) {
LOG.info("Skipping copying of " + source + " as it matches the target");
return;
}
File target = isDirect... | java |
public void zip(final File zipFile) throws IOException {
File[] files = listFiles();
if (files.length == 0) {
return;
}
LOG.info("Creating zip file " + zipFile + " from directory " + this);
ZipOutputStream zipOut = null;
try {
zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
fo... | java |
public static Module loadModulesFromProperties(final Module jFunkModule, final String propertiesFile)
throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException {
final List<Module> modules = Lists.newArrayList();
LOG.debug("Using jfunk.props.file=" + propertiesFile);
Propertie... | java |
public Range merge(final Range otherRange) {
int newMin = Math.min(otherRange.min, min);
int newMax = Math.max(otherRange.max, max);
return new Range(newMin, newMax);
} | java |
public Range sumBoundaries(final Range plus) {
int newMin = min + plus.min;
int newMax = max == RANGE_MAX || plus.max == RANGE_MAX ? RANGE_MAX : max + plus.max;
return new Range(newMin, newMax);
} | java |
public Range intersect(final Range outerRange) throws RangeException {
if (min > outerRange.max) {
throw new IllegalArgumentException("range maximum must be greater or equal than " + min);
}
if (max < outerRange.min) {
throw new IllegalArgumentException("range minimum must be less or equal than " + max... | java |
public List<Integer> listValues() {
ArrayList<Integer> list = new ArrayList<Integer>(getRange());
for (int i = getMin(); i <= getMax(); i++) {
list.add(i);
}
return list;
} | java |
public static MozuUrl getCartItemUrl(String cartItemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}?responseFields={responseFields}");
formatter.formatUrl("cartItemId", cartItemId);
formatter.formatUrl("responseFields", responseFields);
... | java |
public static MozuUrl addItemsToCartUrl(Boolean throwErrorOnInvalidItems)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/bulkitems?throwErrorOnInvalidItems={throwErrorOnInvalidItems}");
formatter.formatUrl("throwErrorOnInvalidItems", throwErrorOnInvalidItems);
return new MozuUrl(for... | java |
public static MozuUrl updateCartItemQuantityUrl(String cartItemId, Integer quantity, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}/{quantity}?responseFields={responseFields}");
formatter.formatUrl("cartItemId", cartItemId);
formatter.format... | java |
public static MozuUrl removeAllCartItemsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static MozuUrl deleteCartItemUrl(String cartItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}");
formatter.formatUrl("cartItemId", cartItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static MozuUrl processDigitalWalletUrl(String checkoutId, String digitalWalletType, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/digitalWallet/{digitalWalletType}?responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
... | java |
public static VcfHeader header(final Readable readable) throws IOException {
checkNotNull(readable);
ParseListener parseListener = new ParseListener();
VcfParser.parse(readable, parseListener);
return parseListener.getHeader();
} | java |
@Override
protected String initValuesImpl(final FieldCase ca) {
if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
return null;
}
return field.getString(control.getNext(ca));
} | java |
public static MozuUrl validateTargetRuleUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/targetrules/validate");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static String formatLatitude(final Latitude latitude,
final PointLocationFormatType formatType)
throws FormatterException
{
if (latitude == null)
{
throw new FormatterException("No point location provided");
}
if (formatType == null)
{
t... | java |
public static String formatLongitude(final Longitude longitude,
final PointLocationFormatType formatType)
throws FormatterException
{
if (longitude == null)
{
throw new FormatterException("No point location provided");
}
if (formatType == null)
{
... | java |
public static String formatPointLocation(final PointLocation pointLocation,
final PointLocationFormatType formatType)
throws FormatterException
{
if (pointLocation == null)
{
throw new FormatterException("No point location provided");
}
if (formatTy... | java |
private static String formatISO6709WithDecimals(final PointLocation pointLocation)
{
final Latitude latitude = pointLocation.getLatitude();
final Longitude longitude = pointLocation.getLongitude();
String string = formatLatitudeWithDecimals(latitude) +
formatLongitudeWithDecimals(longi... | java |
private int[] sexagesimalSplit(final double value)
{
final double absValue = Math.abs(value);
int units;
int minutes;
int seconds;
final int sign = value < 0? -1: 1;
// Calculate absolute integer units
units = (int) Math.floor(absValue);
seconds = (int) Math.round((absValue - units) ... | java |
public static <N extends Number & Comparable<? super N>> Point singleton(final N value) {
checkNotNull(value);
return Geometries.point(value.doubleValue(), 0.5d);
} | java |
public static <N extends Number & Comparable<? super N>> Rectangle range(final Range<N> range) {
checkNotNull(range);
if (range.isEmpty()) {
throw new IllegalArgumentException("range must not be empty");
}
if (!range.hasLowerBound() || !range.hasUpperBound()) {
th... | java |
static boolean isLeft(final Fastq fastq) {
checkNotNull(fastq);
return LEFT.matcher(fastq.getDescription()).matches();
} | java |
static boolean isRight(final Fastq fastq) {
checkNotNull(fastq);
return RIGHT.matcher(fastq.getDescription()).matches();
} | java |
static String prefix(final Fastq fastq) {
checkNotNull(fastq);
Matcher m = PREFIX.matcher(fastq.getDescription());
if (!m.matches()) {
throw new PairedEndFastqReaderException("could not parse prefix from description " + fastq.getDescription());
}
return m.group(1);
... | java |
public static GapPenalties create(final int match,
final int replace,
final int insert,
final int delete,
final int extend) {
return new GapPenalties((short) ma... | java |
public static MozuUrl getAvailablePickupFulfillmentActionsUrl(String orderId, String pickupId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/pickups/{pickupId}/actions");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("pickupId", pickupId);
return new MozuUrl(fo... | java |
public static MozuUrl getPickupUrl(String orderId, String pickupId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/pickups/{pickupId}?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("pickupId", pickupId);
f... | java |
public void setParameter(final String name, final String filename, final InputStream is) throws IOException {
boundary();
writeName(name);
write("; filename=\"");
write(filename);
write('"');
newline();
write("Content-Type: ");
String type = URLConnection.guessContentTypeFromName(filename);
if (type =... | java |
public static MozuUrl getTransactionsUrl(Integer accountId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions");
formatter.formatUrl("accountId", accountId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static MozuUrl removeTransactionUrl(Integer accountId, String transactionId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions/{transactionId}");
formatter.formatUrl("accountId", accountId);
formatter.formatUrl("transactionId", transactionId);
ret... | java |
public void send(final Message msg) throws MailException {
Transport transport = null;
try {
if (log.isDebugEnabled()) {
log.debug("Sending mail message [subject={}, recipients={}]", msg.getSubject(),
on(", ").join(msg.getAllRecipients()));
}
transport = sessionProvider.get().getTransport(... | java |
public static MozuUrl getQuoteByNameUrl(Integer customerAccountId, String quoteName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/customers/{customerAccountId}/{quoteName}?responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
f... | java |
public static MozuUrl deleteQuoteUrl(String quoteId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}");
formatter.formatUrl("quoteId", quoteId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static MozuUrl getDBValueUrl(String dbEntryQuery, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/tenantdata/{dbEntryQuery}?responseFields={responseFields}");
formatter.formatUrl("dbEntryQuery", dbEntryQuery);
formatter.formatUrl("responseFields", responseFields);
... | java |
public static MozuUrl createDBValueUrl(String dbEntryQuery)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/tenantdata/{dbEntryQuery}");
formatter.formatUrl("dbEntryQuery", dbEntryQuery);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java |
public static List<String> normalizeTagsForUpload(List<String> list) {
if (isNullOrEmpty(list)) {
return null;
}
List<String> tmp = new ArrayList<String>();
for (String s : list) {
if (s.contains(" ")) {
tmp.add("\"" + s + "\"");
} else... | java |
public static Integer memberTypeToMemberTypeId(JinxConstants.MemberType memberType) {
if (memberType == null) {
return null;
}
Integer type;
switch (memberType) {
case narwhal:
type = 1;
break;
case member:
... | java |
public static JinxConstants.MemberType typeIdToMemberType(Integer typeId) {
if (typeId == null) {
return null;
}
JinxConstants.MemberType memberType;
switch (typeId) {
case 1:
memberType = JinxConstants.MemberType.narwhal;
break;
... | java |
public static Integer groupPrivacyEnumToPrivacyId(JinxConstants.GroupPrivacy privacy) {
if (privacy == null) {
return null;
}
Integer id;
switch (privacy) {
case group_private:
id = 1;
break;
case group_invite_only_publi... | java |
public static JinxConstants.GroupPrivacy privacyIdToGroupPrivacyEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.GroupPrivacy privacy;
switch (id) {
case 1:
privacy = JinxConstants.GroupPrivacy.group_private;
break;... | java |
public static Integer suggestionStatusToFlickrSuggestionStatusId(JinxConstants.SuggestionStatus status) {
if (status == null) {
return null;
}
Integer id;
switch (status) {
case pending:
id = 0;
break;
case approved:
... | java |
public static JinxConstants.SuggestionStatus suggestionStatusIdToSuggestionStatusEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.SuggestionStatus status;
switch (id) {
case 0:
status = JinxConstants.SuggestionStatus.pending;
... | java |
public PhotosetInfo getInfo(String photosetId) throws JinxException {
JinxUtils.validateParams(photosetId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.photosets.getInfo");
params.put("photoset_id", photosetId);
return jinx.flickrGet(params, PhotosetInfo.class);
} | java |
public Domains getCollectionDomains(Date date, String collectionId, Integer perPage, Integer page) throws JinxException {
JinxUtils.validateParams(date);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getCollectionDomains");
params.put("date", JinxUtils.formatDateAsYMD(... | java |
public Stats getPhotosetStats(Date date, String photosetId) throws JinxException {
JinxUtils.validateParams(date, photosetId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getPhotosetStats");
params.put("date", JinxUtils.formatDateAsYMD(date));
params.put("photose... | java |
public Photos getPopularPhotos(Date date, JinxConstants.PopularPhotoSort sort, Integer perPage, Integer page) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getPopularPhotos");
if (date != null) {
params.put("date", JinxUtils.formatDateAsYMD(dat... | java |
public GroupUrls getGroup(String groupId) throws JinxException {
JinxUtils.validateParams(groupId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.getGroup");
params.put("group_id", groupId);
return jinx.flickrGet(params, GroupUrls.class, false);
} | java |
public UserUrls getUserPhotos(String userId) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.getUserPhotos");
if (!JinxUtils.isNullOrEmpty(userId)) {
params.put("user_id", userId);
}
return jinx.flickrGet(params, UserUrls.class);
} | java |
public GalleryInfo lookupGallery(String url) throws JinxException {
JinxUtils.validateParams(url);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.lookupGallery");
params.put("url", url);
return jinx.flickrGet(params, GalleryInfo.class);
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.