repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java
UrlsApi.lookupGroup
public GroupUrls lookupGroup(String url) throws JinxException { JinxUtils.validateParams(url); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.urls.lookupGroup"); params.put("url", url); return jinx.flickrGet(params, GroupUrls.class, false); }
java
public GroupUrls lookupGroup(String url) throws JinxException { JinxUtils.validateParams(url); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.urls.lookupGroup"); params.put("url", url); return jinx.flickrGet(params, GroupUrls.class, false); }
[ "public", "GroupUrls", "lookupGroup", "(", "String", "url", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "url", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "pa...
Returns a group NSID, given the url to a group's page or photo pool. This method does not require authentication. @param url url to the group's page or photo pool. Required. @return group NSID and name. @throws JinxException if the url is missing, or if there are any errors. @see <a href="https://www.flickr.com/servi...
[ "Returns", "a", "group", "NSID", "given", "the", "url", "to", "a", "group", "s", "page", "or", "photo", "pool", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java#L131-L137
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java
UrlsApi.lookupUser
public UserUrls lookupUser(String url) throws JinxException { JinxUtils.validateParams(url); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.urls.lookupUser"); params.put("url", url); return jinx.flickrGet(params, UserUrls.class); }
java
public UserUrls lookupUser(String url) throws JinxException { JinxUtils.validateParams(url); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.urls.lookupUser"); params.put("url", url); return jinx.flickrGet(params, UserUrls.class); }
[ "public", "UserUrls", "lookupUser", "(", "String", "url", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "url", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "para...
Returns a user NSID, given the url to a user's photos or profile. This method does not require authentication. @param url url to the user's profile or photos page. Required. @return user id and username. @throws JinxException if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.urls.looku...
[ "Returns", "a", "user", "NSID", "given", "the", "url", "to", "a", "user", "s", "photos", "or", "profile", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java#L149-L155
train
zanata/openprops
orig/Properties.java
Properties.storeToXML
public synchronized void storeToXML(OutputStream os, String comment) throws IOException { if (os == null) throw new NullPointerException(); storeToXML(os, comment, "UTF-8"); }
java
public synchronized void storeToXML(OutputStream os, String comment) throws IOException { if (os == null) throw new NullPointerException(); storeToXML(os, comment, "UTF-8"); }
[ "public", "synchronized", "void", "storeToXML", "(", "OutputStream", "os", ",", "String", "comment", ")", "throws", "IOException", "{", "if", "(", "os", "==", "null", ")", "throw", "new", "NullPointerException", "(", ")", ";", "storeToXML", "(", "os", ",", ...
Emits an XML document representing all of the properties contained in this table. <p> An invocation of this method of the form <tt>props.storeToXML(os, comment)</tt> behaves in exactly the same way as the invocation <tt>props.storeToXML(os, comment, "UTF-8");</tt>. @param os the output stream on which to emit the XML...
[ "Emits", "an", "XML", "document", "representing", "all", "of", "the", "properties", "contained", "in", "this", "table", "." ]
46510e610a765e4a91b302fc0d6a2123ed589603
https://github.com/zanata/openprops/blob/46510e610a765e4a91b302fc0d6a2123ed589603/orig/Properties.java#L893-L899
train
zanata/openprops
orig/Properties.java
Properties.list
public void list(PrintStream out) { out.println("-- listing properties --"); Hashtable h = new Hashtable(); enumerate(h); for (Enumeration e = h.keys() ; e.hasMoreElements() ;) { String key = (String)e.nextElement(); String val = (String)h.get(key); if...
java
public void list(PrintStream out) { out.println("-- listing properties --"); Hashtable h = new Hashtable(); enumerate(h); for (Enumeration e = h.keys() ; e.hasMoreElements() ;) { String key = (String)e.nextElement(); String val = (String)h.get(key); if...
[ "public", "void", "list", "(", "PrintStream", "out", ")", "{", "out", ".", "println", "(", "\"-- listing properties --\"", ")", ";", "Hashtable", "h", "=", "new", "Hashtable", "(", ")", ";", "enumerate", "(", "h", ")", ";", "for", "(", "Enumeration", "e"...
Prints this property list out to the specified output stream. This method is useful for debugging. @param out an output stream. @throws ClassCastException if any key in this property list is not a string.
[ "Prints", "this", "property", "list", "out", "to", "the", "specified", "output", "stream", ".", "This", "method", "is", "useful", "for", "debugging", "." ]
46510e610a765e4a91b302fc0d6a2123ed589603
https://github.com/zanata/openprops/blob/46510e610a765e4a91b302fc0d6a2123ed589603/orig/Properties.java#L1024-L1036
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/GroupsApi.java
GroupsApi.browse
@Deprecated public Response browse(String categoryId) throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.groups.browse"); return jinx.flickrGet(params, Response.class); }
java
@Deprecated public Response browse(String categoryId) throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.groups.browse"); return jinx.flickrGet(params, Response.class); }
[ "@", "Deprecated", "public", "Response", "browse", "(", "String", "categoryId", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"method\"", ...
This is a legacy method and will not return anything useful. @param categoryId (Optional) Category id to fetch a list of groups and sub-categories for. If not specified, it defaults to zero, the root of the category tree. @return object with response from Flickr indicating ok or fail. @throws JinxException if required...
[ "This", "is", "a", "legacy", "method", "and", "will", "not", "return", "anything", "useful", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/GroupsApi.java#L54-L59
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/Jinx.java
Jinx.setoAuthAccessToken
public void setoAuthAccessToken(OAuthAccessToken oAuthAccessToken) { this.oAuthAccessToken = oAuthAccessToken; this.accessToken = new Token(oAuthAccessToken.getOauthToken(), oAuthAccessToken.getOauthTokenSecret()); }
java
public void setoAuthAccessToken(OAuthAccessToken oAuthAccessToken) { this.oAuthAccessToken = oAuthAccessToken; this.accessToken = new Token(oAuthAccessToken.getOauthToken(), oAuthAccessToken.getOauthTokenSecret()); }
[ "public", "void", "setoAuthAccessToken", "(", "OAuthAccessToken", "oAuthAccessToken", ")", "{", "this", ".", "oAuthAccessToken", "=", "oAuthAccessToken", ";", "this", ".", "accessToken", "=", "new", "Token", "(", "oAuthAccessToken", ".", "getOauthToken", "(", ")", ...
Set the oauth access token. @param oAuthAccessToken the oauth access token.
[ "Set", "the", "oauth", "access", "token", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/Jinx.java#L360-L363
train
nobuoka/android-lib-ZXingCaptureActivity
src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java
CaptureActivityIntents.setDecodeHintAllowedLengths
public static void setDecodeHintAllowedLengths(Intent intent, int[] lengths) { intent.putExtra(DecodeHintType.ALLOWED_LENGTHS.name(), lengths); }
java
public static void setDecodeHintAllowedLengths(Intent intent, int[] lengths) { intent.putExtra(DecodeHintType.ALLOWED_LENGTHS.name(), lengths); }
[ "public", "static", "void", "setDecodeHintAllowedLengths", "(", "Intent", "intent", ",", "int", "[", "]", "lengths", ")", "{", "intent", ".", "putExtra", "(", "DecodeHintType", ".", "ALLOWED_LENGTHS", ".", "name", "(", ")", ",", "lengths", ")", ";", "}" ]
Set allowed lengths of encoded data. @param intent Target intent. @param lengths allowed lengths.
[ "Set", "allowed", "lengths", "of", "encoded", "data", "." ]
17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6
https://github.com/nobuoka/android-lib-ZXingCaptureActivity/blob/17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6/src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java#L80-L82
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java
PlacesApi.getInfo
public PlaceInfo getInfo(String placeId, String woeId) throws JinxException { if (JinxUtils.isNullOrEmpty(placeId)) { JinxUtils.validateParams(woeId); } Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.places.getInfo"); if (JinxUtils.isNullOrEmpty(placeId)) { pa...
java
public PlaceInfo getInfo(String placeId, String woeId) throws JinxException { if (JinxUtils.isNullOrEmpty(placeId)) { JinxUtils.validateParams(woeId); } Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.places.getInfo"); if (JinxUtils.isNullOrEmpty(placeId)) { pa...
[ "public", "PlaceInfo", "getInfo", "(", "String", "placeId", ",", "String", "woeId", ")", "throws", "JinxException", "{", "if", "(", "JinxUtils", ".", "isNullOrEmpty", "(", "placeId", ")", ")", "{", "JinxUtils", ".", "validateParams", "(", "woeId", ")", ";", ...
Get information about a place. Authentication This method does not require authentication. You must provide a valid placesId or woeId. If you provide both, the placesId will be used. @param placeId 4yya valid Flickr place id. @param woeId a Where On Earth (WOE) id. @return information about the specified place. @thr...
[ "Get", "information", "about", "a", "place", ".", "Authentication", "This", "method", "does", "not", "require", "authentication", ".", "You", "must", "provide", "a", "valid", "placesId", "or", "woeId", ".", "If", "you", "provide", "both", "the", "placesId", ...
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java#L154-L166
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java
PlacesApi.getPlacesForBoundingBox
public Places getPlacesForBoundingBox(String boundingBox, JinxConstants.PlaceTypeId placeTypeId) throws JinxException { JinxUtils.validateParams(boundingBox, placeTypeId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.places.placesForBoundingBox"); params.put("bbox", boundin...
java
public Places getPlacesForBoundingBox(String boundingBox, JinxConstants.PlaceTypeId placeTypeId) throws JinxException { JinxUtils.validateParams(boundingBox, placeTypeId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.places.placesForBoundingBox"); params.put("bbox", boundin...
[ "public", "Places", "getPlacesForBoundingBox", "(", "String", "boundingBox", ",", "JinxConstants", ".", "PlaceTypeId", "placeTypeId", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "boundingBox", ",", "placeTypeId", ")", ";", "Map", "<...
Return all the locations of a matching place type for a bounding box. <p>The maximum allowable size of a bounding box (the distance between the SW and NE corners) is governed by the place type you are requesting. Allowable sizes are as follows:</p> <ul> <li>neighbourhood: 3km (1.8mi)</li> <li>locality: 7km (4.3mi)</li...
[ "Return", "all", "the", "locations", "of", "a", "matching", "place", "type", "for", "a", "bounding", "box", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java#L294-L301
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java
PlacesApi.getPlacesForContacts
public Places getPlacesForContacts(JinxConstants.PlaceTypeId placeTypeId, String placeId, String woeId, Integer threshold, JinxConstants.Contacts contacts, Date minimumUploadDate, Date maximumUploadDate, Date ...
java
public Places getPlacesForContacts(JinxConstants.PlaceTypeId placeTypeId, String placeId, String woeId, Integer threshold, JinxConstants.Contacts contacts, Date minimumUploadDate, Date maximumUploadDate, Date ...
[ "public", "Places", "getPlacesForContacts", "(", "JinxConstants", ".", "PlaceTypeId", "placeTypeId", ",", "String", "placeId", ",", "String", "woeId", ",", "Integer", "threshold", ",", "JinxConstants", ".", "Contacts", "contacts", ",", "Date", "minimumUploadDate", "...
Return a list of the top 100 unique places clustered by a given placetype for a user's contacts. Authentication This method requires authentication with 'read' permission. @param placeTypeId ID for a specific place type to cluster photos by. Required. @param placeId a Flickr Places identifier to use ...
[ "Return", "a", "list", "of", "the", "top", "100", "unique", "places", "clustered", "by", "a", "given", "placetype", "for", "a", "user", "s", "contacts", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PlacesApi.java#L333-L368
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/ReflectionApi.java
ReflectionApi.getMethods
public Methods getMethods() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.reflection.getMethods"); return jinx.flickrGet(params, Methods.class, false); }
java
public Methods getMethods() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.reflection.getMethods"); return jinx.flickrGet(params, Methods.class, false); }
[ "public", "Methods", "getMethods", "(", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"method\"", ",", "\"flickr.reflection.getMethods\"", ")"...
Returns a list of available Flickr API methods. Authentication This method does not require authentication. @return available Flickr API methods. @throws JinxException if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.reflection.getMethods.html">flickr.reflection.getMethods</a>
[ "Returns", "a", "list", "of", "available", "Flickr", "API", "methods", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/ReflectionApi.java#L56-L60
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/ReflectionApi.java
ReflectionApi.getMethodInfo
public MethodInfo getMethodInfo(String methodName) throws JinxException { JinxUtils.validateParams(methodName); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.reflection.getMethodInfo"); params.put("method_name", methodName); return jinx.flickrGet(params, MethodInfo.class...
java
public MethodInfo getMethodInfo(String methodName) throws JinxException { JinxUtils.validateParams(methodName); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.reflection.getMethodInfo"); params.put("method_name", methodName); return jinx.flickrGet(params, MethodInfo.class...
[ "public", "MethodInfo", "getMethodInfo", "(", "String", "methodName", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "methodName", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ...
Returns information for a given Flickr API method. Authentication This method does not require authentication. @param methodName the name of the method to fetch information for. Required. @return information about the method. @throws JinxException if required parameters are missing, or if there are any errors. @see ...
[ "Returns", "information", "for", "a", "given", "Flickr", "API", "method", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/ReflectionApi.java#L74-L80
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/TagsApi.java
TagsApi.getClusters
public Clusters getClusters(String tag) throws JinxException { JinxUtils.validateParams(tag); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getClusters"); params.put("tag", tag); return jinx.flickrGet(params, Clusters.class, false); }
java
public Clusters getClusters(String tag) throws JinxException { JinxUtils.validateParams(tag); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getClusters"); params.put("tag", tag); return jinx.flickrGet(params, Clusters.class, false); }
[ "public", "Clusters", "getClusters", "(", "String", "tag", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "tag", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "par...
Gives you a list of tag clusters for the given tag. This method does not require authentication. @param tag the tag to fetch clusters for. Required. @return tag clusters for the given tag. @throws JinxException if required parameters are missing, or if there are any errors. @see <a href="https://www.flickr.com/servic...
[ "Gives", "you", "a", "list", "of", "tag", "clusters", "for", "the", "given", "tag", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/TagsApi.java#L107-L113
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/TagsApi.java
TagsApi.getListPhoto
public PhotoTagList getListPhoto(String photoId) throws JinxException { JinxUtils.validateParams(photoId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getListPhoto"); params.put("photo_id", photoId); return jinx.flickrGet(params, PhotoTagList.class, false); }
java
public PhotoTagList getListPhoto(String photoId) throws JinxException { JinxUtils.validateParams(photoId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getListPhoto"); params.put("photo_id", photoId); return jinx.flickrGet(params, PhotoTagList.class, false); }
[ "public", "PhotoTagList", "getListPhoto", "(", "String", "photoId", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "photoId", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ...
Get the tag list for a given photo. This method does not require authentication. @return tags list for the photo. Required. @throws JinxException if required parameter is missing, or if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.tags.getListPhoto.html">flickr.tags.getListPhoto</a>
[ "Get", "the", "tag", "list", "for", "a", "given", "photo", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/TagsApi.java#L147-L153
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/TagsApi.java
TagsApi.getMostFrequentlyUsed
public TagsForUser getMostFrequentlyUsed() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getMostFrequentlyUsed"); return jinx.flickrGet(params, TagsForUser.class); }
java
public TagsForUser getMostFrequentlyUsed() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getMostFrequentlyUsed"); return jinx.flickrGet(params, TagsForUser.class); }
[ "public", "TagsForUser", "getMostFrequentlyUsed", "(", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"method\"", ",", "\"flickr.tags.getMostFreq...
Returns a list of most frequently used tags for a user. This method requires authentication with 'read' permission. @return most frequently used tags for the calling user. @throws JinxException if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.tags.getMostFrequentlyUsed.html">flickr.ta...
[ "Returns", "a", "list", "of", "most", "frequently", "used", "tags", "for", "a", "user", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/TagsApi.java#L228-L232
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/TagsApi.java
TagsApi.getRelated
public RelatedTags getRelated(String tag) throws JinxException { JinxUtils.validateParams(tag); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getRelated"); params.put("tag", tag); return jinx.flickrGet(params, RelatedTags.class); }
java
public RelatedTags getRelated(String tag) throws JinxException { JinxUtils.validateParams(tag); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.tags.getRelated"); params.put("tag", tag); return jinx.flickrGet(params, RelatedTags.class); }
[ "public", "RelatedTags", "getRelated", "(", "String", "tag", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "tag", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "p...
Returns a list of tags 'related' to the given tag, based on clustered usage analysis. This method does not require authentication. @param tag tag to fetch related tags for. Required. @return related tags. @throws JinxException if required parameters are missing, or if there are any errors. @see <a href="https://www.f...
[ "Returns", "a", "list", "of", "tags", "related", "to", "the", "given", "tag", "based", "on", "clustered", "usage", "analysis", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/TagsApi.java#L245-L251
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/response/people/Person.java
Person.getPhotosFirstDateTaken
public String getPhotosFirstDateTaken() { return (person == null || person.photos == null || person.photos.firstDateTaken == null) ? null : person.photos.firstDateTaken._content; }
java
public String getPhotosFirstDateTaken() { return (person == null || person.photos == null || person.photos.firstDateTaken == null) ? null : person.photos.firstDateTaken._content; }
[ "public", "String", "getPhotosFirstDateTaken", "(", ")", "{", "return", "(", "person", "==", "null", "||", "person", ".", "photos", "==", "null", "||", "person", ".", "photos", ".", "firstDateTaken", "==", "null", ")", "?", "null", ":", "person", ".", "p...
Get the mysql datetime of the first photo taken by the user. You can use {@link JinxUtils#parseMySqlDatetimeToDate(String)} to convert this value to a Date object. @return mysql datetime of the first photo taken by the user, or null if the value was not returned.
[ "Get", "the", "mysql", "datetime", "of", "the", "first", "photo", "taken", "by", "the", "user", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/response/people/Person.java#L209-L211
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/response/people/Person.java
Person.getPhotosFirstDate
public String getPhotosFirstDate() { return (person == null || person.photos == null || person.photos.firstDate == null) ? null : person.photos.firstDate._content; }
java
public String getPhotosFirstDate() { return (person == null || person.photos == null || person.photos.firstDate == null) ? null : person.photos.firstDate._content; }
[ "public", "String", "getPhotosFirstDate", "(", ")", "{", "return", "(", "person", "==", "null", "||", "person", ".", "photos", "==", "null", "||", "person", ".", "photos", ".", "firstDate", "==", "null", ")", "?", "null", ":", "person", ".", "photos", ...
Get the unix timestamp of the first photo uploaded by the user. You can use {@link JinxUtils#parseTimestampToDate(String)} to convert this value to a Date object. @return unix timestamp of the first photo uploaded by the user, or null if the value was not returned.
[ "Get", "the", "unix", "timestamp", "of", "the", "first", "photo", "uploaded", "by", "the", "user", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/response/people/Person.java#L220-L222
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/CamerasApi.java
CamerasApi.getBrandModels
public CameraModels getBrandModels(String brandId) throws JinxException { JinxUtils.validateParams(brandId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.cameras.getBrandModels"); params.put("brand", brandId); return jinx.flickrGet(params, CameraModels.class, false); }
java
public CameraModels getBrandModels(String brandId) throws JinxException { JinxUtils.validateParams(brandId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.cameras.getBrandModels"); params.put("brand", brandId); return jinx.flickrGet(params, CameraModels.class, false); }
[ "public", "CameraModels", "getBrandModels", "(", "String", "brandId", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "brandId", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")"...
Retrieve all the models for a given camera brand. This method does not require authentication. @param brandId (Required) the ID of the requested brand (as returned from {@link net.jeremybrooks.jinx.api.CamerasApi#getBrands()}). @return All camera models for a given camera brand. @throws JinxException if there are any ...
[ "Retrieve", "all", "the", "models", "for", "a", "given", "camera", "brand", ".", "This", "method", "does", "not", "require", "authentication", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/CamerasApi.java#L70-L77
train
vsima/uber-java-client
src/main/java/com/victorsima/uber/Utils.java
Utils.generateAuthorizeUrl
public static String generateAuthorizeUrl(String oAuthUri, String clientId, String[] scope){ StringBuilder sb = new StringBuilder(oAuthUri); sb.append("/oauth/authorize?response_type=code"); sb.append("&client_id=" + clientId); if (scope != null) { sb.append("&scope="); ...
java
public static String generateAuthorizeUrl(String oAuthUri, String clientId, String[] scope){ StringBuilder sb = new StringBuilder(oAuthUri); sb.append("/oauth/authorize?response_type=code"); sb.append("&client_id=" + clientId); if (scope != null) { sb.append("&scope="); ...
[ "public", "static", "String", "generateAuthorizeUrl", "(", "String", "oAuthUri", ",", "String", "clientId", ",", "String", "[", "]", "scope", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "oAuthUri", ")", ";", "sb", ".", "append", "(", ...
Generates the initial url for the OAuth authorization flow @return oauth authorize url
[ "Generates", "the", "initial", "url", "for", "the", "OAuth", "authorization", "flow" ]
7cb081728db6286d949024c1b4c85dd74d275472
https://github.com/vsima/uber-java-client/blob/7cb081728db6286d949024c1b4c85dd74d275472/src/main/java/com/victorsima/uber/Utils.java#L40-L54
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java
PhotosGeoApi.correctLocation
public Response correctLocation(String photoId, String placeId, String woeId, String foursquareId) throws JinxException { JinxUtils.validateParams(photoId); if (JinxUtils.isNullOrEmpty(placeId)) { JinxUtils.validateParams(woeId); } Map<String, String> params = new TreeMap<>(); params.put("meth...
java
public Response correctLocation(String photoId, String placeId, String woeId, String foursquareId) throws JinxException { JinxUtils.validateParams(photoId); if (JinxUtils.isNullOrEmpty(placeId)) { JinxUtils.validateParams(woeId); } Map<String, String> params = new TreeMap<>(); params.put("meth...
[ "public", "Response", "correctLocation", "(", "String", "photoId", ",", "String", "placeId", ",", "String", "woeId", ",", "String", "foursquareId", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "photoId", ")", ";", "if", "(", "J...
This method requires authentication with 'write' permission. @param photoId (Required) The ID of the photo whose WOE location is being corrected. @param placeId A Flickr Places ID. (While optional, you must pass either a valid Places ID or a WOE ID.) @param woeId A Where On Earth (WOE) ID. (While opti...
[ "This", "method", "requires", "authentication", "with", "write", "permission", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java#L94-L112
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/GalleriesApi.java
GalleriesApi.galleryInfo
public GalleryInfo galleryInfo(String galleryId) throws JinxException { JinxUtils.validateParams(galleryId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.galleries.getInfo"); params.put("gallery_id", galleryId); return jinx.flickrPost(params, GalleryInfo.class); }
java
public GalleryInfo galleryInfo(String galleryId) throws JinxException { JinxUtils.validateParams(galleryId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.galleries.getInfo"); params.put("gallery_id", galleryId); return jinx.flickrPost(params, GalleryInfo.class); }
[ "public", "GalleryInfo", "galleryInfo", "(", "String", "galleryId", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "galleryId", ")", ";", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")"...
This method does not require authentication. @param galleryId Required. The gallery ID you are requesting information for. @return information about the gallery. @throws JinxException if required parameters are null or empty, or if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.gallerie...
[ "This", "method", "does", "not", "require", "authentication", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/GalleriesApi.java#L176-L182
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PushApi.java
PushApi.getSubscriptions
public Subscriptions getSubscriptions() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.push.getSubscriptions"); return jinx.flickrGet(params, Subscriptions.class); }
java
public Subscriptions getSubscriptions() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.push.getSubscriptions"); return jinx.flickrGet(params, Subscriptions.class); }
[ "public", "Subscriptions", "getSubscriptions", "(", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"method\"", ",", "\"flickr.push.getSubscriptio...
Returns a list of the subscriptions for the logged-in user. (this method is experimental and may change) This method requires authentication with 'read' permission. @return subscriptions for the logged in user. @throws JinxException if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.pu...
[ "Returns", "a", "list", "of", "the", "subscriptions", "for", "the", "logged", "-", "in", "user", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PushApi.java#L62-L66
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PushApi.java
PushApi.getTopics
public Topics getTopics() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.push.getTopics"); return jinx.flickrGet(params, Topics.class); }
java
public Topics getTopics() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.push.getTopics"); return jinx.flickrGet(params, Topics.class); }
[ "public", "Topics", "getTopics", "(", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"method\"", ",", "\"flickr.push.getTopics\"", ")", ";", ...
Get all available push topics. (this method is experimental and may change) This method does not require authentication. @return all the different flavors of topics. @throws JinxException if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.push.getTopics.html">flickr.push.getTopics</a>
[ "Get", "all", "available", "push", "topics", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PushApi.java#L79-L83
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PushApi.java
PushApi.subscribe
public Response subscribe(String topic, String callbackUrl, JinxConstants.VerificationMode mode, String verificationToken, Integer leaseSeconds, Integer woeIds, List<String> placeIds, Float latitude, Float longitude, Integer radius, Jin...
java
public Response subscribe(String topic, String callbackUrl, JinxConstants.VerificationMode mode, String verificationToken, Integer leaseSeconds, Integer woeIds, List<String> placeIds, Float latitude, Float longitude, Integer radius, Jin...
[ "public", "Response", "subscribe", "(", "String", "topic", ",", "String", "callbackUrl", ",", "JinxConstants", ".", "VerificationMode", "mode", ",", "String", "verificationToken", ",", "Integer", "leaseSeconds", ",", "Integer", "woeIds", ",", "List", "<", "String"...
Subscribe to a push feed. (this method is experimental and may change) This method requires authentication with 'read' permission. @param topic the type of subscription. See {@link #getTopics()}. Required. @param callbackUrl the url for the subscription endpoint. Limited to 255 bytes, and must be u...
[ "Subscribe", "to", "a", "push", "feed", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PushApi.java#L137-L182
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PushApi.java
PushApi.unsubscribe
public Response unsubscribe(String topic, String callbackUrl, JinxConstants.VerificationMode mode, String verificationToken) throws JinxException { JinxUtils.validateParams(topic, callbackUrl, mode); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.push.unsubscribe"); params.pu...
java
public Response unsubscribe(String topic, String callbackUrl, JinxConstants.VerificationMode mode, String verificationToken) throws JinxException { JinxUtils.validateParams(topic, callbackUrl, mode); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.push.unsubscribe"); params.pu...
[ "public", "Response", "unsubscribe", "(", "String", "topic", ",", "String", "callbackUrl", ",", "JinxConstants", ".", "VerificationMode", "mode", ",", "String", "verificationToken", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "topic...
Unsubscribe from a push feed. (this method is experimental and may change) This method requires authentication with 'read' permission. @param topic the type of subscription. Required. @param callbackUrl url for the subscription endpoint. Must be the same url used when subscribing. Required. @param ...
[ "Unsubscribe", "from", "a", "push", "feed", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PushApi.java#L200-L211
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/logger/StdoutLogger.java
StdoutLogger.log
public void log(String message, Throwable t) { System.out.println(message); System.out.println(getStackTrace(t)); }
java
public void log(String message, Throwable t) { System.out.println(message); System.out.println(getStackTrace(t)); }
[ "public", "void", "log", "(", "String", "message", ",", "Throwable", "t", ")", "{", "System", ".", "out", ".", "println", "(", "message", ")", ";", "System", ".", "out", ".", "println", "(", "getStackTrace", "(", "t", ")", ")", ";", "}" ]
Log message to stdout, along with exception information. @param message the message to log. @param t the Throwable to log.
[ "Log", "message", "to", "stdout", "along", "with", "exception", "information", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/logger/StdoutLogger.java#L50-L53
train
nobuoka/android-lib-ZXingCaptureActivity
src/main/java/info/vividcode/android/zxing/camera/CameraManager.java
CameraManager.stopPreview
public synchronized void stopPreview() { if (autoFocusManager != null) { autoFocusManager.stop(); autoFocusManager = null; } if (camera != null && previewing) { camera.stopPreview(); previewCallback.setHandler(null, 0); previewing = false; } }
java
public synchronized void stopPreview() { if (autoFocusManager != null) { autoFocusManager.stop(); autoFocusManager = null; } if (camera != null && previewing) { camera.stopPreview(); previewCallback.setHandler(null, 0); previewing = false; } }
[ "public", "synchronized", "void", "stopPreview", "(", ")", "{", "if", "(", "autoFocusManager", "!=", "null", ")", "{", "autoFocusManager", ".", "stop", "(", ")", ";", "autoFocusManager", "=", "null", ";", "}", "if", "(", "camera", "!=", "null", "&&", "pr...
Tells the camera to stop drawing preview frames.
[ "Tells", "the", "camera", "to", "stop", "drawing", "preview", "frames", "." ]
17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6
https://github.com/nobuoka/android-lib-ZXingCaptureActivity/blob/17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6/src/main/java/info/vividcode/android/zxing/camera/CameraManager.java#L155-L165
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/response/photos/Photos.java
Photos.getPerPage
public Integer getPerPage() { int ret = 0; if (photos != null) { int pp; if (photos.perpage == null) { pp = 0; } else { pp = photos.perpage; } int pP; if (photos.perPage == null ) { pP = 0; } else { pP = photos.perPage; } if (pp > pP) { ret = pp; } else { ret ...
java
public Integer getPerPage() { int ret = 0; if (photos != null) { int pp; if (photos.perpage == null) { pp = 0; } else { pp = photos.perpage; } int pP; if (photos.perPage == null ) { pP = 0; } else { pP = photos.perPage; } if (pp > pP) { ret = pp; } else { ret ...
[ "public", "Integer", "getPerPage", "(", ")", "{", "int", "ret", "=", "0", ";", "if", "(", "photos", "!=", "null", ")", "{", "int", "pp", ";", "if", "(", "photos", ".", "perpage", "==", "null", ")", "{", "pp", "=", "0", ";", "}", "else", "{", ...
Get the number of photos per page. This value is returned by flickr as "per_page" and "perpage", depending on the method that was called. This class can parse either value, and will return whichever one was found. @return number of photos per page.
[ "Get", "the", "number", "of", "photos", "per", "page", ".", "This", "value", "is", "returned", "by", "flickr", "as", "per_page", "and", "perpage", "depending", "on", "the", "method", "that", "was", "called", ".", "This", "class", "can", "parse", "either", ...
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/response/photos/Photos.java#L52-L76
train
zanata/openprops
src/main/java/org/fedorahosted/openprops/Properties.java
Properties.getComment
public String getComment(String key) { String raw = getRawComment(key); return cookComment(raw); }
java
public String getComment(String key) { String raw = getRawComment(key); return cookComment(raw); }
[ "public", "String", "getComment", "(", "String", "key", ")", "{", "String", "raw", "=", "getRawComment", "(", "key", ")", ";", "return", "cookComment", "(", "raw", ")", ";", "}" ]
Returns the comment for the specified key, or null if there is none. Any embedded newline sequences will be replaced by \n characters. @param key @return
[ "Returns", "the", "comment", "for", "the", "specified", "key", "or", "null", "if", "there", "is", "none", ".", "Any", "embedded", "newline", "sequences", "will", "be", "replaced", "by", "\\", "n", "characters", "." ]
46510e610a765e4a91b302fc0d6a2123ed589603
https://github.com/zanata/openprops/blob/46510e610a765e4a91b302fc0d6a2123ed589603/src/main/java/org/fedorahosted/openprops/Properties.java#L1288-L1291
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/PhotoUtils.java
PhotoUtils.getImageForSize
public static BufferedImage getImageForSize(JinxConstants.PhotoSize size, Photo photo) throws JinxException { if (photo == null || size == null) { throw new JinxException("Cannot look up null photo or size."); } BufferedImage image; try { image = ImageIO.read(getUrlForSize(size, photo)); } catch (JinxEx...
java
public static BufferedImage getImageForSize(JinxConstants.PhotoSize size, Photo photo) throws JinxException { if (photo == null || size == null) { throw new JinxException("Cannot look up null photo or size."); } BufferedImage image; try { image = ImageIO.read(getUrlForSize(size, photo)); } catch (JinxEx...
[ "public", "static", "BufferedImage", "getImageForSize", "(", "JinxConstants", ".", "PhotoSize", "size", ",", "Photo", "photo", ")", "throws", "JinxException", "{", "if", "(", "photo", "==", "null", "||", "size", "==", "null", ")", "{", "throw", "new", "JinxE...
Get an image for a photo at a specific size. @param size Required. The the desired size. @param photo Required. The photo to get the image for. @return buffered image data from Flickr. @throws JinxException if any parameter is null, or if there are any errors.
[ "Get", "an", "image", "for", "a", "photo", "at", "a", "specific", "size", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/PhotoUtils.java#L54-L67
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/PhotoUtils.java
PhotoUtils.getImageForSize
public static BufferedImage getImageForSize(JinxConstants.PhotoSize size, PhotoInfo info) throws JinxException { if (info == null || size == null) { throw new JinxException("Cannot look up null photo or size."); } BufferedImage image; try { image = ImageIO.read(getUrlForSize(size, info)); } catch (JinxE...
java
public static BufferedImage getImageForSize(JinxConstants.PhotoSize size, PhotoInfo info) throws JinxException { if (info == null || size == null) { throw new JinxException("Cannot look up null photo or size."); } BufferedImage image; try { image = ImageIO.read(getUrlForSize(size, info)); } catch (JinxE...
[ "public", "static", "BufferedImage", "getImageForSize", "(", "JinxConstants", ".", "PhotoSize", "size", ",", "PhotoInfo", "info", ")", "throws", "JinxException", "{", "if", "(", "info", "==", "null", "||", "size", "==", "null", ")", "{", "throw", "new", "Jin...
Get an image for photo info at a specific size. @param size Required. The the desired size. @param info Required. The photo info describing the photo. @return buffered image data from Flickr. @throws JinxException if any parameter is null, or if there are any errors.
[ "Get", "an", "image", "for", "photo", "info", "at", "a", "specific", "size", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/PhotoUtils.java#L77-L90
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/PhotoUtils.java
PhotoUtils.getUrlForSize
public static URL getUrlForSize( JinxConstants.PhotoSize size, String photoId, String secret, String farm, String server, String originalFormat, String originalSecret) throws JinxException { JinxUtils.validateParams(photoId, size, farm, server); if (size == JinxConstants.PhotoSize.SIZE_ORIGINAL) { JinxUtils.v...
java
public static URL getUrlForSize( JinxConstants.PhotoSize size, String photoId, String secret, String farm, String server, String originalFormat, String originalSecret) throws JinxException { JinxUtils.validateParams(photoId, size, farm, server); if (size == JinxConstants.PhotoSize.SIZE_ORIGINAL) { JinxUtils.v...
[ "public", "static", "URL", "getUrlForSize", "(", "JinxConstants", ".", "PhotoSize", "size", ",", "String", "photoId", ",", "String", "secret", ",", "String", "farm", ",", "String", "server", ",", "String", "originalFormat", ",", "String", "originalSecret", ")", ...
Get the URL for a specific size of photo. @param size Required. The the desired size. @param photoId Required. The ID of the photo. @param secret The secret of the photo. Required for all sizes except SIZE_ORIGINAL. @param farm Required. The farm of the photo. @param server R...
[ "Get", "the", "URL", "for", "a", "specific", "size", "of", "photo", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/PhotoUtils.java#L138-L212
train
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PrefsApi.java
PrefsApi.getContentType
public Person getContentType() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.prefs.getContentType"); return jinx.flickrGet(params, Person.class); }
java
public Person getContentType() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.prefs.getContentType"); return jinx.flickrGet(params, Person.class); }
[ "public", "Person", "getContentType", "(", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"method\"", ",", "\"flickr.prefs.getContentType\"", "...
Returns the default content type preference for the user. Authentication This method requires authentication with 'read' permission. @return person object with nsid and contentType fields set. @throws JinxException if there are any errors. @see <a href="https://www.flickr.com/services/api/flickr.prefs.getContentType...
[ "Returns", "the", "default", "content", "type", "preference", "for", "the", "user", "." ]
ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PrefsApi.java#L57-L61
train
datacleaner/AnalyzerBeans
env/cluster/src/main/java/org/eobjects/analyzer/cluster/http/SlaveServletHelper.java
SlaveServletHelper.cancelJob
public boolean cancelJob(String slaveJobId) { final AnalysisResultFuture resultFuture = _runningJobs.remove(slaveJobId); if (resultFuture != null) { resultFuture.cancel(); return true; } return false; }
java
public boolean cancelJob(String slaveJobId) { final AnalysisResultFuture resultFuture = _runningJobs.remove(slaveJobId); if (resultFuture != null) { resultFuture.cancel(); return true; } return false; }
[ "public", "boolean", "cancelJob", "(", "String", "slaveJobId", ")", "{", "final", "AnalysisResultFuture", "resultFuture", "=", "_runningJobs", ".", "remove", "(", "slaveJobId", ")", ";", "if", "(", "resultFuture", "!=", "null", ")", "{", "resultFuture", ".", "...
Cancels a slave job, referred by it's id. @param slaveJobId @return whether or not the job was (found and) cancelled.
[ "Cancels", "a", "slave", "job", "referred", "by", "it", "s", "id", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/cluster/src/main/java/org/eobjects/analyzer/cluster/http/SlaveServletHelper.java#L309-L316
train
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java
AbstractJpaEventStore.entityExists
protected final boolean entityExists(final String entityName) { final Set<EntityType<?>> entityTypes = getEm().getMetamodel().getEntities(); for (final EntityType<?> entityType : entityTypes) { if (entityType.getName().equals(entityName)) { return true; } ...
java
protected final boolean entityExists(final String entityName) { final Set<EntityType<?>> entityTypes = getEm().getMetamodel().getEntities(); for (final EntityType<?> entityType : entityTypes) { if (entityType.getName().equals(entityName)) { return true; } ...
[ "protected", "final", "boolean", "entityExists", "(", "final", "String", "entityName", ")", "{", "final", "Set", "<", "EntityType", "<", "?", ">", ">", "entityTypes", "=", "getEm", "(", ")", ".", "getMetamodel", "(", ")", ".", "getEntities", "(", ")", ";...
Returns if an entity with agiven name exists. @param entityName Entity to test. @return TRUE if the entity is known, else FALSE.
[ "Returns", "if", "an", "entity", "with", "agiven", "name", "exists", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java#L340-L348
train
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java
AbstractJpaEventStore.createJpqlStreamSelect
protected final String createJpqlStreamSelect(final StreamId streamId) { if (streamId.isProjection()) { throw new IllegalArgumentException("Projections do not have a stream table : " + streamId); } final List<KeyValue> params = new ArrayList<>(streamId.getParameters()); ...
java
protected final String createJpqlStreamSelect(final StreamId streamId) { if (streamId.isProjection()) { throw new IllegalArgumentException("Projections do not have a stream table : " + streamId); } final List<KeyValue> params = new ArrayList<>(streamId.getParameters()); ...
[ "protected", "final", "String", "createJpqlStreamSelect", "(", "final", "StreamId", "streamId", ")", "{", "if", "(", "streamId", ".", "isProjection", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Projections do not have a stream table : \"", ...
Creates the JPQL to select the stream itself. @param streamId Unique stream identifier. @return JPQL that selects the stream with the given identifier.
[ "Creates", "the", "JPQL", "to", "select", "the", "stream", "itself", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java#L388-L409
train
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java
AbstractJpaEventStore.findStream
@NotNull protected final JpaStream findStream(@NotNull final StreamId streamId) { Contract.requireArgNotNull("streamId", streamId); verifyStreamEntityExists(streamId); final String sql = createJpqlStreamSelect(streamId); final TypedQuery<JpaStream> query = getEm().createQuer...
java
@NotNull protected final JpaStream findStream(@NotNull final StreamId streamId) { Contract.requireArgNotNull("streamId", streamId); verifyStreamEntityExists(streamId); final String sql = createJpqlStreamSelect(streamId); final TypedQuery<JpaStream> query = getEm().createQuer...
[ "@", "NotNull", "protected", "final", "JpaStream", "findStream", "(", "@", "NotNull", "final", "StreamId", "streamId", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"streamId\"", ",", "streamId", ")", ";", "verifyStreamEntityExists", "(", "streamId", ")",...
Reads the stream with the given identifier from the DB and returns it. @param streamId Stream to load. @return Stream.
[ "Reads", "the", "stream", "with", "the", "given", "identifier", "from", "the", "DB", "and", "returns", "it", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java#L419-L441
train
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java
AbstractJpaEventStore.createNativeSqlEventSelect
private final String createNativeSqlEventSelect(final StreamId streamId, final List<NativeSqlCondition> conditions) { final StringBuilder sb = new StringBuilder("SELECT " + JPA_EVENT_PREFIX + ".* FROM " + JpaEvent.TABLE_NAME + " " + JPA_EVENT_PREFIX + ", " + nativeEventsTableNam...
java
private final String createNativeSqlEventSelect(final StreamId streamId, final List<NativeSqlCondition> conditions) { final StringBuilder sb = new StringBuilder("SELECT " + JPA_EVENT_PREFIX + ".* FROM " + JpaEvent.TABLE_NAME + " " + JPA_EVENT_PREFIX + ", " + nativeEventsTableNam...
[ "private", "final", "String", "createNativeSqlEventSelect", "(", "final", "StreamId", "streamId", ",", "final", "List", "<", "NativeSqlCondition", ">", "conditions", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"SELECT \"", "+", "J...
Creates a native SQL select using the parameters from the stream identifier and optional other arguments. @param streamId Unique stream identifier that has the parameter values. @param additionalParams Parameters to add in addition to the ones from the stream identifier. @return JPQL for selecting the events.
[ "Creates", "a", "native", "SQL", "select", "using", "the", "parameters", "from", "the", "stream", "identifier", "and", "optional", "other", "arguments", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java#L491-L503
train
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/JpaStream.java
JpaStream.delete
public void delete(final boolean hardDelete) { if (hardDelete) { this.state = StreamState.HARD_DELETED.dbValue(); } else { this.state = StreamState.SOFT_DELETED.dbValue(); } }
java
public void delete(final boolean hardDelete) { if (hardDelete) { this.state = StreamState.HARD_DELETED.dbValue(); } else { this.state = StreamState.SOFT_DELETED.dbValue(); } }
[ "public", "void", "delete", "(", "final", "boolean", "hardDelete", ")", "{", "if", "(", "hardDelete", ")", "{", "this", ".", "state", "=", "StreamState", ".", "HARD_DELETED", ".", "dbValue", "(", ")", ";", "}", "else", "{", "this", ".", "state", "=", ...
Marks the stream as deleted. @param hardDelete Hard or soft deletion.
[ "Marks", "the", "stream", "as", "deleted", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/JpaStream.java#L63-L69
train
datacleaner/AnalyzerBeans
env/xml-config/src/main/java/org/eobjects/analyzer/configuration/DatastoreXmlExternalizer.java
DatastoreXmlExternalizer.removeDatastore
public boolean removeDatastore(final String datastoreName) { final Element datastoreCatalogElement = getDatastoreCatalogElement(); final NodeList childNodes = datastoreCatalogElement.getChildNodes(); final int length = childNodes.getLength(); for (int i = 0; i < length; i++) { ...
java
public boolean removeDatastore(final String datastoreName) { final Element datastoreCatalogElement = getDatastoreCatalogElement(); final NodeList childNodes = datastoreCatalogElement.getChildNodes(); final int length = childNodes.getLength(); for (int i = 0; i < length; i++) { ...
[ "public", "boolean", "removeDatastore", "(", "final", "String", "datastoreName", ")", "{", "final", "Element", "datastoreCatalogElement", "=", "getDatastoreCatalogElement", "(", ")", ";", "final", "NodeList", "childNodes", "=", "datastoreCatalogElement", ".", "getChildN...
Removes a datastore by it's name, if it exists and is recognizeable by the externalizer. @param datastoreName @return true if a datastore element was removed from the XML document.
[ "Removes", "a", "datastore", "by", "it", "s", "name", "if", "it", "exists", "and", "is", "recognizeable", "by", "the", "externalizer", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/DatastoreXmlExternalizer.java#L129-L155
train
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java
SimpleSerializerDeserializerRegistry.add
public final void add(@NotNull final SerializedDataType type, final String contentType, @NotNull final SerDeserializer serDeserializer) { this.addSerializer(type, serDeserializer); this.addDeserializer(type, contentType, serDeserializer); }
java
public final void add(@NotNull final SerializedDataType type, final String contentType, @NotNull final SerDeserializer serDeserializer) { this.addSerializer(type, serDeserializer); this.addDeserializer(type, contentType, serDeserializer); }
[ "public", "final", "void", "add", "(", "@", "NotNull", "final", "SerializedDataType", "type", ",", "final", "String", "contentType", ",", "@", "NotNull", "final", "SerDeserializer", "serDeserializer", ")", "{", "this", ".", "addSerializer", "(", "type", ",", "...
Convenience method that adds both, a new serializer and deserializer to the registry. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" (without parameters - Only base type). @param serDeserializer Serializer and deserializer.
[ "Convenience", "method", "that", "adds", "both", "a", "new", "serializer", "and", "deserializer", "to", "the", "registry", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java#L59-L65
train
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java
SimpleSerializerDeserializerRegistry.addDeserializer
public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType, @NotNull final Deserializer deserializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); Contract.requireArgNotNull("deserial...
java
public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType, @NotNull final Deserializer deserializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); Contract.requireArgNotNull("deserial...
[ "public", "final", "void", "addDeserializer", "(", "@", "NotNull", "final", "SerializedDataType", "type", ",", "final", "String", "contentType", ",", "@", "NotNull", "final", "Deserializer", "deserializer", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"t...
Adds a new deserializer to the registry. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" (without parameters - Only base type). @param deserializer Deserializer.
[ "Adds", "a", "new", "deserializer", "to", "the", "registry", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java#L78-L88
train
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java
SimpleSerializerDeserializerRegistry.setDefaultContentType
public final void setDefaultContentType(@NotNull final SerializedDataType type, final EnhancedMimeType contentType) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); contentTypes.put(type, contentType); }
java
public final void setDefaultContentType(@NotNull final SerializedDataType type, final EnhancedMimeType contentType) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("contentType", contentType); contentTypes.put(type, contentType); }
[ "public", "final", "void", "setDefaultContentType", "(", "@", "NotNull", "final", "SerializedDataType", "type", ",", "final", "EnhancedMimeType", "contentType", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"type\"", ",", "type", ")", ";", "Contract", "."...
Sets the default content type to use if no content type is given. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" (without parameters - Only base type).
[ "Sets", "the", "default", "content", "type", "to", "use", "if", "no", "content", "type", "is", "given", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java#L99-L107
train
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java
SimpleSerializerDeserializerRegistry.addSerializer
public final void addSerializer(@NotNull final SerializedDataType type, @NotNull final Serializer serializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("serializer", serializer); serMap.put(type, serializer); }
java
public final void addSerializer(@NotNull final SerializedDataType type, @NotNull final Serializer serializer) { Contract.requireArgNotNull("type", type); Contract.requireArgNotNull("serializer", serializer); serMap.put(type, serializer); }
[ "public", "final", "void", "addSerializer", "(", "@", "NotNull", "final", "SerializedDataType", "type", ",", "@", "NotNull", "final", "Serializer", "serializer", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"type\"", ",", "type", ")", ";", "Contract", ...
Adds a new serializer to the registry. @param type Type of the data. @param serializer Serializer.
[ "Adds", "a", "new", "serializer", "to", "the", "registry", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/SimpleSerializerDeserializerRegistry.java#L117-L125
train
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/ProgramEvaluator.java
ProgramEvaluator.compileProgram
public void compileProgram() { program.inputs().forEach(var -> var.calculateFuzzySpace()); program.outputs().forEach(var -> var.calculateFuzzySpace()); program.rules().forEach(rule -> { updateMemberReferenceCount(rule.getCondition()); rule.assignmentMembers().forEach(member -> member.incrReferenceCount());...
java
public void compileProgram() { program.inputs().forEach(var -> var.calculateFuzzySpace()); program.outputs().forEach(var -> var.calculateFuzzySpace()); program.rules().forEach(rule -> { updateMemberReferenceCount(rule.getCondition()); rule.assignmentMembers().forEach(member -> member.incrReferenceCount());...
[ "public", "void", "compileProgram", "(", ")", "{", "program", ".", "inputs", "(", ")", ".", "forEach", "(", "var", "->", "var", ".", "calculateFuzzySpace", "(", ")", ")", ";", "program", ".", "outputs", "(", ")", ".", "forEach", "(", "var", "->", "va...
Compile the program
[ "Compile", "the", "program" ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/ProgramEvaluator.java#L27-L35
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/job/builder/TransformerJobBuilder.java
TransformerJobBuilder.getOutputColumnByName
public MutableInputColumn<?> getOutputColumnByName(String name) { if (StringUtils.isNullOrEmpty(name)) { return null; } final List<MutableInputColumn<?>> outputColumns = getOutputColumns(); for (MutableInputColumn<?> inputColumn : outputColumns) { if (name.equals...
java
public MutableInputColumn<?> getOutputColumnByName(String name) { if (StringUtils.isNullOrEmpty(name)) { return null; } final List<MutableInputColumn<?>> outputColumns = getOutputColumns(); for (MutableInputColumn<?> inputColumn : outputColumns) { if (name.equals...
[ "public", "MutableInputColumn", "<", "?", ">", "getOutputColumnByName", "(", "String", "name", ")", "{", "if", "(", "StringUtils", ".", "isNullOrEmpty", "(", "name", ")", ")", "{", "return", "null", ";", "}", "final", "List", "<", "MutableInputColumn", "<", ...
Gets an output column by name. @see #getOutputColumns() @param name @return
[ "Gets", "an", "output", "column", "by", "name", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/job/builder/TransformerJobBuilder.java#L240-L252
train
ktoso/janbanery
janbanery-core/src/main/java/pl/project13/janbanery/exceptions/kanbanery/InvalidEntityKanbaneryException.java
InvalidEntityKanbaneryException.mostSpecializedException
public static InvalidEntityKanbaneryException mostSpecializedException(String response) { //todo refactor this!!! if (response == null || "".equals(response)) { return new InvalidEntityKanbaneryException(response); } else if (TaskAlreadyInFirstColumnException.isBestExceptionFor(response)) { retu...
java
public static InvalidEntityKanbaneryException mostSpecializedException(String response) { //todo refactor this!!! if (response == null || "".equals(response)) { return new InvalidEntityKanbaneryException(response); } else if (TaskAlreadyInFirstColumnException.isBestExceptionFor(response)) { retu...
[ "public", "static", "InvalidEntityKanbaneryException", "mostSpecializedException", "(", "String", "response", ")", "{", "//todo refactor this!!!", "if", "(", "response", "==", "null", "||", "\"\"", ".", "equals", "(", "response", ")", ")", "{", "return", "new", "I...
May be used as "Exception factory" to determine the "best" exception to be thrown for such JSON response. For example we may throw "TaskAlreadyInFirstColumnException" if the JSON contains a message informing us about this. @param response the JSON server response, containing a error messages @return the "best" excepti...
[ "May", "be", "used", "as", "Exception", "factory", "to", "determine", "the", "best", "exception", "to", "be", "thrown", "for", "such", "JSON", "response", ".", "For", "example", "we", "may", "throw", "TaskAlreadyInFirstColumnException", "if", "the", "JSON", "c...
cd77b774814c7fbb2a0c9c55d4c3f7e76affa636
https://github.com/ktoso/janbanery/blob/cd77b774814c7fbb2a0c9c55d4c3f7e76affa636/janbanery-core/src/main/java/pl/project13/janbanery/exceptions/kanbanery/InvalidEntityKanbaneryException.java#L56-L85
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/reference/DatastoreSynonymCatalog.java
DatastoreSynonymCatalog.init
@Initialize public void init() { logger.info("Initializing dictionary: {}", this); Datastore datastore = getDatastore(); DatastoreConnection dataContextProvider = datastore.openConnection(); getDatastoreConnections().add(dataContextProvider); }
java
@Initialize public void init() { logger.info("Initializing dictionary: {}", this); Datastore datastore = getDatastore(); DatastoreConnection dataContextProvider = datastore.openConnection(); getDatastoreConnections().add(dataContextProvider); }
[ "@", "Initialize", "public", "void", "init", "(", ")", "{", "logger", ".", "info", "(", "\"Initializing dictionary: {}\"", ",", "this", ")", ";", "Datastore", "datastore", "=", "getDatastore", "(", ")", ";", "DatastoreConnection", "dataContextProvider", "=", "da...
Initializes a DatastoreConnection, which will keep the connection open
[ "Initializes", "a", "DatastoreConnection", "which", "will", "keep", "the", "connection", "open" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/reference/DatastoreSynonymCatalog.java#L98-L104
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/ClassLoaderUtils.java
ClassLoaderUtils.getParentClassLoader
public static ClassLoader getParentClassLoader() { logger.debug("getParentClassLoader() invoked, web start mode: {}", IS_WEB_START); if (IS_WEB_START) { return Thread.currentThread().getContextClassLoader(); } else { return ClassLoaderUtils.class.getClassLoader(); } }
java
public static ClassLoader getParentClassLoader() { logger.debug("getParentClassLoader() invoked, web start mode: {}", IS_WEB_START); if (IS_WEB_START) { return Thread.currentThread().getContextClassLoader(); } else { return ClassLoaderUtils.class.getClassLoader(); } }
[ "public", "static", "ClassLoader", "getParentClassLoader", "(", ")", "{", "logger", ".", "debug", "(", "\"getParentClassLoader() invoked, web start mode: {}\"", ",", "IS_WEB_START", ")", ";", "if", "(", "IS_WEB_START", ")", "{", "return", "Thread", ".", "currentThread...
Gets an appropriate classloader for usage when performing classpath lookups and scanning. @return
[ "Gets", "an", "appropriate", "classloader", "for", "usage", "when", "performing", "classpath", "lookups", "and", "scanning", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/ClassLoaderUtils.java#L58-L65
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/result/AbstractCrosstabResultReducer.java
AbstractCrosstabResultReducer.createMasterCrosstab
protected Crosstab<Serializable> createMasterCrosstab(Collection<? extends R> results) { final R firstResult = results.iterator().next(); final Crosstab<?> firstCrosstab = firstResult.getCrosstab(); final Class<?> valueClass = firstCrosstab.getValueClass(); final CrosstabDimension dimen...
java
protected Crosstab<Serializable> createMasterCrosstab(Collection<? extends R> results) { final R firstResult = results.iterator().next(); final Crosstab<?> firstCrosstab = firstResult.getCrosstab(); final Class<?> valueClass = firstCrosstab.getValueClass(); final CrosstabDimension dimen...
[ "protected", "Crosstab", "<", "Serializable", ">", "createMasterCrosstab", "(", "Collection", "<", "?", "extends", "R", ">", "results", ")", "{", "final", "R", "firstResult", "=", "results", ".", "iterator", "(", ")", ".", "next", "(", ")", ";", "final", ...
Builds the master crosstab, including all dimensions and categories that will be included in the final result. By default this method will use the first result's crosstab dimensions and categories, assuming that they are all the same. Subclasses can override this method to build the other dimensions. @param results ...
[ "Builds", "the", "master", "crosstab", "including", "all", "dimensions", "and", "categories", "that", "will", "be", "included", "in", "the", "final", "result", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/result/AbstractCrosstabResultReducer.java#L98-L109
train
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/SharedPrefsBrowser.java
SharedPrefsBrowser.startFragment
public void startFragment(Fragment fragment, String tag, boolean canAddToBackstack) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction().replace(R.id.fragmentContainer, fragment); if (canAddToBackstack) { transaction.addToBackStack(tag); } transaction.commit(); }
java
public void startFragment(Fragment fragment, String tag, boolean canAddToBackstack) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction().replace(R.id.fragmentContainer, fragment); if (canAddToBackstack) { transaction.addToBackStack(tag); } transaction.commit(); }
[ "public", "void", "startFragment", "(", "Fragment", "fragment", ",", "String", "tag", ",", "boolean", "canAddToBackstack", ")", "{", "FragmentTransaction", "transaction", "=", "getSupportFragmentManager", "(", ")", ".", "beginTransaction", "(", ")", ".", "replace", ...
Start given Fragment @param fragment : Fragment Instance to start. @param tag : Tag to be notified when adding to backstack @param canAddToBackstack : pass <code>true</code> if you want to add this item in backstack. pass <code>false</code> otherwise
[ "Start", "given", "Fragment" ]
c04d567c4d0fc5e0f8cda308ca85df19c6b3b838
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/SharedPrefsBrowser.java#L36-L43
train
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/Variable.java
Variable.calculateFuzzySpace
public void calculateFuzzySpace() { double start = getFrom().doubleValue(); double stop = getTo().doubleValue(); double step = getStep().doubleValue(); // enumerate the variable range members().forEach(member -> { if (member.haveFunctionCall()) { for (double i = start; i <= stop; i += step) { mem...
java
public void calculateFuzzySpace() { double start = getFrom().doubleValue(); double stop = getTo().doubleValue(); double step = getStep().doubleValue(); // enumerate the variable range members().forEach(member -> { if (member.haveFunctionCall()) { for (double i = start; i <= stop; i += step) { mem...
[ "public", "void", "calculateFuzzySpace", "(", ")", "{", "double", "start", "=", "getFrom", "(", ")", ".", "doubleValue", "(", ")", ";", "double", "stop", "=", "getTo", "(", ")", ".", "doubleValue", "(", ")", ";", "double", "step", "=", "getStep", "(", ...
Calculate the full fuzzy space for this variable.
[ "Calculate", "the", "full", "fuzzy", "space", "for", "this", "variable", "." ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/Variable.java#L269-L302
train
schaloner/deadbolt
app/controllers/deadbolt/Deadbolt.java
Deadbolt.accessFailed
static void accessFailed() throws Throwable { String controllerClassName = getControllerClass().getName(); Logger.debug("Deadbolt: Access failure on [%s]", controllerClassName); String responseFormat = null; if (getActionAnnotation(JSON.class) != null) {...
java
static void accessFailed() throws Throwable { String controllerClassName = getControllerClass().getName(); Logger.debug("Deadbolt: Access failure on [%s]", controllerClassName); String responseFormat = null; if (getActionAnnotation(JSON.class) != null) {...
[ "static", "void", "accessFailed", "(", ")", "throws", "Throwable", "{", "String", "controllerClassName", "=", "getControllerClass", "(", ")", ".", "getName", "(", ")", ";", "Logger", ".", "debug", "(", "\"Deadbolt: Access failure on [%s]\"", ",", "controllerClassNam...
Generic access failure forwarding point.
[ "Generic", "access", "failure", "forwarding", "point", "." ]
8a3a3f6b51e224eda39b3f7f8d5ce5869995e966
https://github.com/schaloner/deadbolt/blob/8a3a3f6b51e224eda39b3f7f8d5ce5869995e966/app/controllers/deadbolt/Deadbolt.java#L331-L370
train
schaloner/deadbolt
app/controllers/deadbolt/Deadbolt.java
Deadbolt.hasAllRoles
public static boolean hasAllRoles(RoleHolder roleHolder, String[] roleNames) { boolean hasRole = false; if (roleHolder != null) { List<? extends Role> roles = roleHolder.getRoles(); if (roles != null) { ...
java
public static boolean hasAllRoles(RoleHolder roleHolder, String[] roleNames) { boolean hasRole = false; if (roleHolder != null) { List<? extends Role> roles = roleHolder.getRoles(); if (roles != null) { ...
[ "public", "static", "boolean", "hasAllRoles", "(", "RoleHolder", "roleHolder", ",", "String", "[", "]", "roleNames", ")", "{", "boolean", "hasRole", "=", "false", ";", "if", "(", "roleHolder", "!=", "null", ")", "{", "List", "<", "?", "extends", "Role", ...
Checks if the current user has all of the specified roles. @param roleHolder the object requiring authorisation @param roleNames the role names @return true iff the current user has all of the specified roles
[ "Checks", "if", "the", "current", "user", "has", "all", "of", "the", "specified", "roles", "." ]
8a3a3f6b51e224eda39b3f7f8d5ce5869995e966
https://github.com/schaloner/deadbolt/blob/8a3a3f6b51e224eda39b3f7f8d5ce5869995e966/app/controllers/deadbolt/Deadbolt.java#L379-L419
train
schaloner/deadbolt
app/controllers/deadbolt/Deadbolt.java
Deadbolt.hasRoles
public static boolean hasRoles(List<String> roleNames) throws Throwable { DEADBOLT_HANDLER.beforeRoleCheck(); RoleHolder roleHolder = getRoleHolder(); return roleHolder != null && roleHolder.getRoles() != null && hasAllRoles(roleHolder, ...
java
public static boolean hasRoles(List<String> roleNames) throws Throwable { DEADBOLT_HANDLER.beforeRoleCheck(); RoleHolder roleHolder = getRoleHolder(); return roleHolder != null && roleHolder.getRoles() != null && hasAllRoles(roleHolder, ...
[ "public", "static", "boolean", "hasRoles", "(", "List", "<", "String", ">", "roleNames", ")", "throws", "Throwable", "{", "DEADBOLT_HANDLER", ".", "beforeRoleCheck", "(", ")", ";", "RoleHolder", "roleHolder", "=", "getRoleHolder", "(", ")", ";", "return", "rol...
Checks if the current user has the specified role. @param roleNames the names of the required roles @return true iff the current user has the specified role
[ "Checks", "if", "the", "current", "user", "has", "the", "specified", "role", "." ]
8a3a3f6b51e224eda39b3f7f8d5ce5869995e966
https://github.com/schaloner/deadbolt/blob/8a3a3f6b51e224eda39b3f7f8d5ce5869995e966/app/controllers/deadbolt/Deadbolt.java#L473-L483
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/result/CrosstabNavigator.java
CrosstabNavigator.put
public void put(E value, boolean createCategories) throws IllegalArgumentException, NullPointerException { if (createCategories) { for (int i = 0; i < categories.length; i++) { String category = categories[i]; CrosstabDimension dimension = crosstab.getDimension(i); ...
java
public void put(E value, boolean createCategories) throws IllegalArgumentException, NullPointerException { if (createCategories) { for (int i = 0; i < categories.length; i++) { String category = categories[i]; CrosstabDimension dimension = crosstab.getDimension(i); ...
[ "public", "void", "put", "(", "E", "value", ",", "boolean", "createCategories", ")", "throws", "IllegalArgumentException", ",", "NullPointerException", "{", "if", "(", "createCategories", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "categories...
Puts the given value to the navigated position in the crosstab. @param value the value to put. @param createCategories if true, the chosen categories will automatically be created if they do not already exists in the dimensions of the crosstab. @throws IllegalArgumentException if the position or value is invalid, typi...
[ "Puts", "the", "given", "value", "to", "the", "navigated", "position", "in", "the", "crosstab", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/result/CrosstabNavigator.java#L64-L73
train
datacleaner/AnalyzerBeans
components/html-rendering/src/main/java/org/eobjects/analyzer/result/renderer/TableBodyElement.java
TableBodyElement.getHeaderValue
protected String getHeaderValue(HtmlRenderingContext context, int col, String columnName) { return context.escapeHtml(columnName); }
java
protected String getHeaderValue(HtmlRenderingContext context, int col, String columnName) { return context.escapeHtml(columnName); }
[ "protected", "String", "getHeaderValue", "(", "HtmlRenderingContext", "context", ",", "int", "col", ",", "String", "columnName", ")", "{", "return", "context", ".", "escapeHtml", "(", "columnName", ")", ";", "}" ]
Overrideable method for defining the literal HTML table header of a particular column. @param context @param col @param columnName @return
[ "Overrideable", "method", "for", "defining", "the", "literal", "HTML", "table", "header", "of", "a", "particular", "column", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/html-rendering/src/main/java/org/eobjects/analyzer/result/renderer/TableBodyElement.java#L122-L124
train
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/NativeSqlCondition.java
NativeSqlCondition.asWhereConditionWithParam
public final String asWhereConditionWithParam() { if (table == null) { return column + operator + ":" + column; } return table + "." + column + operator + ":" + column; }
java
public final String asWhereConditionWithParam() { if (table == null) { return column + operator + ":" + column; } return table + "." + column + operator + ":" + column; }
[ "public", "final", "String", "asWhereConditionWithParam", "(", ")", "{", "if", "(", "table", "==", "null", ")", "{", "return", "column", "+", "operator", "+", "\":\"", "+", "column", ";", "}", "return", "table", "+", "\".\"", "+", "column", "+", "operato...
Returns the 'where' condition with a parameter. @return Native SQL 'where' with column name as parameter.
[ "Returns", "the", "where", "condition", "with", "a", "parameter", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/NativeSqlCondition.java#L113-L118
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/job/runner/RowProcessingPublisher.java
RowProcessingPublisher.sortConsumers
public static List<RowProcessingConsumer> sortConsumers(List<RowProcessingConsumer> consumers) { final RowProcessingConsumerSorter sorter = new RowProcessingConsumerSorter(consumers); final List<RowProcessingConsumer> sortedConsumers = sorter.createProcessOrderedConsumerList(); if (logger.isDebu...
java
public static List<RowProcessingConsumer> sortConsumers(List<RowProcessingConsumer> consumers) { final RowProcessingConsumerSorter sorter = new RowProcessingConsumerSorter(consumers); final List<RowProcessingConsumer> sortedConsumers = sorter.createProcessOrderedConsumerList(); if (logger.isDebu...
[ "public", "static", "List", "<", "RowProcessingConsumer", ">", "sortConsumers", "(", "List", "<", "RowProcessingConsumer", ">", "consumers", ")", "{", "final", "RowProcessingConsumerSorter", "sorter", "=", "new", "RowProcessingConsumerSorter", "(", "consumers", ")", "...
Sorts a list of consumers into their execution order @param consumers @return
[ "Sorts", "a", "list", "of", "consumers", "into", "their", "execution", "order" ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/job/runner/RowProcessingPublisher.java#L200-L212
train
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/job/runner/RowProcessingPublisher.java
RowProcessingPublisher.processRows
public void processRows(RowProcessingMetrics rowProcessingMetrics) { final RowProcessingQueryOptimizer queryOptimizer = getQueryOptimizer(); final Query finalQuery = queryOptimizer.getOptimizedQuery(); final RowIdGenerator idGenerator; if (finalQuery.getFirstRow() == null) { ...
java
public void processRows(RowProcessingMetrics rowProcessingMetrics) { final RowProcessingQueryOptimizer queryOptimizer = getQueryOptimizer(); final Query finalQuery = queryOptimizer.getOptimizedQuery(); final RowIdGenerator idGenerator; if (finalQuery.getFirstRow() == null) { ...
[ "public", "void", "processRows", "(", "RowProcessingMetrics", "rowProcessingMetrics", ")", "{", "final", "RowProcessingQueryOptimizer", "queryOptimizer", "=", "getQueryOptimizer", "(", ")", ";", "final", "Query", "finalQuery", "=", "queryOptimizer", ".", "getOptimizedQuer...
Fires the actual row processing. This method assumes that consumers have been initialized and the publisher is ready to start processing. @return true if no errors occurred during processing @param rowProcessingMetrics @see #runRowProcessing(Queue, TaskListener)
[ "Fires", "the", "actual", "row", "processing", ".", "This", "method", "assumes", "that", "consumers", "have", "been", "initialized", "and", "the", "publisher", "is", "ready", "to", "start", "processing", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/job/runner/RowProcessingPublisher.java#L255-L340
train
datacleaner/AnalyzerBeans
env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbPojoDatastoreAdaptor.java
JaxbPojoDatastoreAdaptor.createPojoDatastore
public AbstractDatastoreType createPojoDatastore(final Datastore datastore, final Set<Column> columns, final int maxRowsToQuery) { final PojoDatastoreType datastoreType = new PojoDatastoreType(); datastoreType.setName(datastore.getName()); datastoreType.setDescription(datastore.getDe...
java
public AbstractDatastoreType createPojoDatastore(final Datastore datastore, final Set<Column> columns, final int maxRowsToQuery) { final PojoDatastoreType datastoreType = new PojoDatastoreType(); datastoreType.setName(datastore.getName()); datastoreType.setDescription(datastore.getDe...
[ "public", "AbstractDatastoreType", "createPojoDatastore", "(", "final", "Datastore", "datastore", ",", "final", "Set", "<", "Column", ">", "columns", ",", "final", "int", "maxRowsToQuery", ")", "{", "final", "PojoDatastoreType", "datastoreType", "=", "new", "PojoDat...
Creates a serialized POJO copy of a datastore. @param datastore the datastore to copy @param columns the columns to include, or null if all tables/columns should be included. @param maxRowsToQuery the maximum number of records to query and include in the datastore copy. Keep this number reasonably low, or else the cop...
[ "Creates", "a", "serialized", "POJO", "copy", "of", "a", "datastore", "." ]
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbPojoDatastoreAdaptor.java#L463-L502
train
fuinorg/event-store-commons
spi/src/main/java/org/fuin/esc/spi/Data.java
Data.valueOf
public static Data valueOf(final String type, final Object obj) { return new Data(type, mimeType(obj), content(obj)); }
java
public static Data valueOf(final String type, final Object obj) { return new Data(type, mimeType(obj), content(obj)); }
[ "public", "static", "Data", "valueOf", "(", "final", "String", "type", ",", "final", "Object", "obj", ")", "{", "return", "new", "Data", "(", "type", ",", "mimeType", "(", "obj", ")", ",", "content", "(", "obj", ")", ")", ";", "}" ]
Creates a new instance from a given object. @param type Name of the type. @param obj Object to convert. @return Either JSON or XML UTF-8 encoded content without a version.
[ "Creates", "a", "new", "instance", "from", "a", "given", "object", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/spi/src/main/java/org/fuin/esc/spi/Data.java#L223-L225
train
datacleaner/AnalyzerBeans
components/pattern-finder/src/main/java/org/eobjects/analyzer/beans/stringpattern/PatternFinder.java
PatternFinder.run
public void run(R row, String value, int distinctCount) { final List<Token> tokens; boolean match = false; try { tokens = _tokenizer.tokenize(value); } catch (RuntimeException e) { throw new IllegalStateException("Error occurred while tokenizing value: " + value, ...
java
public void run(R row, String value, int distinctCount) { final List<Token> tokens; boolean match = false; try { tokens = _tokenizer.tokenize(value); } catch (RuntimeException e) { throw new IllegalStateException("Error occurred while tokenizing value: " + value, ...
[ "public", "void", "run", "(", "R", "row", ",", "String", "value", ",", "int", "distinctCount", ")", "{", "final", "List", "<", "Token", ">", "tokens", ";", "boolean", "match", "=", "false", ";", "try", "{", "tokens", "=", "_tokenizer", ".", "tokenize",...
This method should be invoked by the user of the PatternFinder. Invoke it for each value in your dataset. Repeated values are handled correctly but if available it is more effecient to handle only the distinct values and their corresponding distinct counts. @param row the row containing the value @param value the stri...
[ "This", "method", "should", "be", "invoked", "by", "the", "user", "of", "the", "PatternFinder", ".", "Invoke", "it", "for", "each", "value", "in", "your", "dataset", ".", "Repeated", "values", "are", "handled", "correctly", "but", "if", "available", "it", ...
f82dae080d80d2a647b706a5fb22b3ea250613b3
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/pattern-finder/src/main/java/org/eobjects/analyzer/beans/stringpattern/PatternFinder.java#L71-L109
train
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/java/NameMap.java
NameMap.map
public String map(String name) { String mapped = super.get(name); if (mapped == null) { mapped = String.format("%s%03d", BASENAME, count.incrementAndGet()); super.put(name, mapped); } return mapped; }
java
public String map(String name) { String mapped = super.get(name); if (mapped == null) { mapped = String.format("%s%03d", BASENAME, count.incrementAndGet()); super.put(name, mapped); } return mapped; }
[ "public", "String", "map", "(", "String", "name", ")", "{", "String", "mapped", "=", "super", ".", "get", "(", "name", ")", ";", "if", "(", "mapped", "==", "null", ")", "{", "mapped", "=", "String", ".", "format", "(", "\"%s%03d\"", ",", "BASENAME", ...
Map a variable name @param name is the full name @return the mapped name
[ "Map", "a", "variable", "name" ]
e8aa46313bb1d1328865f26f99455124aede828c
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/java/NameMap.java#L29-L36
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.createFromFile
public static KAFDocument createFromFile(File file) throws IOException { KAFDocument kaf = null; try { kaf = ReadWriteManager.load(file); } catch(JDOMException e) { e.printStackTrace(); } return kaf; }
java
public static KAFDocument createFromFile(File file) throws IOException { KAFDocument kaf = null; try { kaf = ReadWriteManager.load(file); } catch(JDOMException e) { e.printStackTrace(); } return kaf; }
[ "public", "static", "KAFDocument", "createFromFile", "(", "File", "file", ")", "throws", "IOException", "{", "KAFDocument", "kaf", "=", "null", ";", "try", "{", "kaf", "=", "ReadWriteManager", ".", "load", "(", "file", ")", ";", "}", "catch", "(", "JDOMExc...
Creates a new KAFDocument and loads the contents of the file passed as argument @param file an existing KAF file to be loaded into the library.
[ "Creates", "a", "new", "KAFDocument", "and", "loads", "the", "contents", "of", "the", "file", "passed", "as", "argument" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L396-L404
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.createFromStream
public static KAFDocument createFromStream(Reader stream) throws IOException, JDOMException { KAFDocument kaf = null; kaf = ReadWriteManager.load(stream); return kaf; }
java
public static KAFDocument createFromStream(Reader stream) throws IOException, JDOMException { KAFDocument kaf = null; kaf = ReadWriteManager.load(stream); return kaf; }
[ "public", "static", "KAFDocument", "createFromStream", "(", "Reader", "stream", ")", "throws", "IOException", ",", "JDOMException", "{", "KAFDocument", "kaf", "=", "null", ";", "kaf", "=", "ReadWriteManager", ".", "load", "(", "stream", ")", ";", "return", "ka...
Creates a new KAFDocument loading the content read from the reader given on argument. @param stream Reader to read KAF content.
[ "Creates", "a", "new", "KAFDocument", "loading", "the", "content", "read", "from", "the", "reader", "given", "on", "argument", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L409-L413
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.addLinguisticProcessor
public LinguisticProcessor addLinguisticProcessor(String layer, String name) { LinguisticProcessor lp = new LinguisticProcessor(name, layer); //lp.setBeginTimestamp(timestamp); // no default timestamp List<LinguisticProcessor> layerLps = lps.get(layer); if (layerLps == null) { layerLps = new ArrayList<Linguist...
java
public LinguisticProcessor addLinguisticProcessor(String layer, String name) { LinguisticProcessor lp = new LinguisticProcessor(name, layer); //lp.setBeginTimestamp(timestamp); // no default timestamp List<LinguisticProcessor> layerLps = lps.get(layer); if (layerLps == null) { layerLps = new ArrayList<Linguist...
[ "public", "LinguisticProcessor", "addLinguisticProcessor", "(", "String", "layer", ",", "String", "name", ")", "{", "LinguisticProcessor", "lp", "=", "new", "LinguisticProcessor", "(", "name", ",", "layer", ")", ";", "//lp.setBeginTimestamp(timestamp); // no default times...
Adds a linguistic processor to the document header. The timestamp is added implicitly.
[ "Adds", "a", "linguistic", "processor", "to", "the", "document", "header", ".", "The", "timestamp", "is", "added", "implicitly", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L436-L446
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.linguisticProcessorExists
public boolean linguisticProcessorExists(String layer, String name, String version) { List<LinguisticProcessor> layerLPs = lps.get(layer); if (layerLPs == null) { return false; } for (LinguisticProcessor lp : layerLPs) { if (lp.version == null) { return false; } else if (lp.name.equals(name) &...
java
public boolean linguisticProcessorExists(String layer, String name, String version) { List<LinguisticProcessor> layerLPs = lps.get(layer); if (layerLPs == null) { return false; } for (LinguisticProcessor lp : layerLPs) { if (lp.version == null) { return false; } else if (lp.name.equals(name) &...
[ "public", "boolean", "linguisticProcessorExists", "(", "String", "layer", ",", "String", "name", ",", "String", "version", ")", "{", "List", "<", "LinguisticProcessor", ">", "layerLPs", "=", "lps", ".", "get", "(", "layer", ")", ";", "if", "(", "layerLPs", ...
Returns wether the given linguistic processor is already defined or not. Both name and version must be exactly the same.
[ "Returns", "wether", "the", "given", "linguistic", "processor", "is", "already", "defined", "or", "not", ".", "Both", "name", "and", "version", "must", "be", "exactly", "the", "same", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L479-L493
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newTerm
public Term newTerm(String id, Span<WF> span) { idManager.updateCounter(AnnotationType.TERM, id); Term newTerm = new Term(id, span, false); annotationContainer.add(newTerm, Layer.TERMS, AnnotationType.TERM); addToWfTermIndex(newTerm.getSpan().getTargets(), newTerm); // Rodrirekin hitz egin hau kentzeko return newT...
java
public Term newTerm(String id, Span<WF> span) { idManager.updateCounter(AnnotationType.TERM, id); Term newTerm = new Term(id, span, false); annotationContainer.add(newTerm, Layer.TERMS, AnnotationType.TERM); addToWfTermIndex(newTerm.getSpan().getTargets(), newTerm); // Rodrirekin hitz egin hau kentzeko return newT...
[ "public", "Term", "newTerm", "(", "String", "id", ",", "Span", "<", "WF", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "TERM", ",", "id", ")", ";", "Term", "newTerm", "=", "new", "Term", "(", "id", ",", "span"...
Creates a Term object to load an existing term. It receives the ID as an argument. The Term is added to the document object. @param id term's ID. @param type type of term. There are two types of term: open and close. @param lemma the lemma of the term. @param pos part of speech of the term. @param wfs the list of word ...
[ "Creates", "a", "Term", "object", "to", "load", "an", "existing", "term", ".", "It", "receives", "the", "ID", "as", "an", "argument", ".", "The", "Term", "is", "added", "to", "the", "document", "object", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L582-L588
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newDep
public Dep newDep(Term from, Term to, String rfunc) { Dep newDep = new Dep(from, to, rfunc); annotationContainer.add(newDep, Layer.DEPS, AnnotationType.DEP); return newDep; }
java
public Dep newDep(Term from, Term to, String rfunc) { Dep newDep = new Dep(from, to, rfunc); annotationContainer.add(newDep, Layer.DEPS, AnnotationType.DEP); return newDep; }
[ "public", "Dep", "newDep", "(", "Term", "from", ",", "Term", "to", ",", "String", "rfunc", ")", "{", "Dep", "newDep", "=", "new", "Dep", "(", "from", ",", "to", ",", "rfunc", ")", ";", "annotationContainer", ".", "add", "(", "newDep", ",", "Layer", ...
Creates a new dependency. The Dep is added to the document object. @param from the origin term of the dependency. @param to the target term of the dependency. @param rfunc relational function of the dependency. @return a new dependency.
[ "Creates", "a", "new", "dependency", ".", "The", "Dep", "is", "added", "to", "the", "document", "object", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L691-L695
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newChunk
public Chunk newChunk(String id, String phrase, Span<Term> span) { idManager.updateCounter(AnnotationType.CHUNK, id); Chunk newChunk = new Chunk(id, span); newChunk.setPhrase(phrase); annotationContainer.add(newChunk, Layer.CHUNKS, AnnotationType.CHUNK); return newChunk; }
java
public Chunk newChunk(String id, String phrase, Span<Term> span) { idManager.updateCounter(AnnotationType.CHUNK, id); Chunk newChunk = new Chunk(id, span); newChunk.setPhrase(phrase); annotationContainer.add(newChunk, Layer.CHUNKS, AnnotationType.CHUNK); return newChunk; }
[ "public", "Chunk", "newChunk", "(", "String", "id", ",", "String", "phrase", ",", "Span", "<", "Term", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "CHUNK", ",", "id", ")", ";", "Chunk", "newChunk", "=", "new", ...
Creates a chunk object to load an existing chunk. It receives it's ID as an argument. The Chunk is added to the document object. @param id chunk's ID. @param head the chunk head. @param phrase type of the phrase. @param terms the list of the terms in the chunk. @return a new chunk.
[ "Creates", "a", "chunk", "object", "to", "load", "an", "existing", "chunk", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "Chunk", "is", "added", "to", "the", "document", "object", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L704-L710
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newChunk
public Chunk newChunk(String phrase, Span<Term> span) { String newId = idManager.getNextId(AnnotationType.CHUNK); Chunk newChunk = new Chunk(newId, span); newChunk.setPhrase(phrase); annotationContainer.add(newChunk, Layer.CHUNKS, AnnotationType.CHUNK); return newChunk; }
java
public Chunk newChunk(String phrase, Span<Term> span) { String newId = idManager.getNextId(AnnotationType.CHUNK); Chunk newChunk = new Chunk(newId, span); newChunk.setPhrase(phrase); annotationContainer.add(newChunk, Layer.CHUNKS, AnnotationType.CHUNK); return newChunk; }
[ "public", "Chunk", "newChunk", "(", "String", "phrase", ",", "Span", "<", "Term", ">", "span", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "CHUNK", ")", ";", "Chunk", "newChunk", "=", "new", "Chunk", "(", ...
Creates a new chunk. It assigns an appropriate ID to it. The Chunk is added to the document object. @param head the chunk head. @param phrase type of the phrase. @param terms the list of the terms in the chunk. @return a new chunk.
[ "Creates", "a", "new", "chunk", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "Chunk", "is", "added", "to", "the", "document", "object", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L718-L724
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newEntity
public Entity newEntity(String id, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.ENTITY, id); Entity newEntity = new Entity(id, references); annotationContainer.add(newEntity, Layer.ENTITIES, AnnotationType.ENTITY); return newEntity; }
java
public Entity newEntity(String id, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.ENTITY, id); Entity newEntity = new Entity(id, references); annotationContainer.add(newEntity, Layer.ENTITIES, AnnotationType.ENTITY); return newEntity; }
[ "public", "Entity", "newEntity", "(", "String", "id", ",", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "ENTITY", ",", "id", ")", ";", "Entity", "newEntity", "=", "new"...
Creates an Entity object to load an existing entity. It receives the ID as an argument. The entity is added to the document object. @param id the ID of the named entity. @param type entity type. 8 values are posible: Person, Organization, Location, Date, Time, Money, Percent, Misc. @param references it contains one or ...
[ "Creates", "an", "Entity", "object", "to", "load", "an", "existing", "entity", ".", "It", "receives", "the", "ID", "as", "an", "argument", ".", "The", "entity", "is", "added", "to", "the", "document", "object", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L732-L737
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newEntity
public Entity newEntity(List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.ENTITY); Entity newEntity = new Entity(newId, references); annotationContainer.add(newEntity, Layer.ENTITIES, AnnotationType.ENTITY); return newEntity; }
java
public Entity newEntity(List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.ENTITY); Entity newEntity = new Entity(newId, references); annotationContainer.add(newEntity, Layer.ENTITIES, AnnotationType.ENTITY); return newEntity; }
[ "public", "Entity", "newEntity", "(", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "ENTITY", ")", ";", "Entity", "newEntity", "=", "new", "Entity", ...
Creates a new Entity. It assigns an appropriate ID to it. The entity is added to the document object. @param type entity type. 8 values are posible: Person, Organization, Location, Date, Time, Money, Percent, Misc. @param references it contains one or more span elements. A span can be used to reference the different oc...
[ "Creates", "a", "new", "Entity", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "entity", "is", "added", "to", "the", "document", "object", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L744-L749
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newCoref
public Coref newCoref(String id, List<Span<Term>> mentions) { idManager.updateCounter(AnnotationType.COREF, id); Coref newCoref = new Coref(id, mentions); annotationContainer.add(newCoref, Layer.COREFERENCES, AnnotationType.COREF); return newCoref; }
java
public Coref newCoref(String id, List<Span<Term>> mentions) { idManager.updateCounter(AnnotationType.COREF, id); Coref newCoref = new Coref(id, mentions); annotationContainer.add(newCoref, Layer.COREFERENCES, AnnotationType.COREF); return newCoref; }
[ "public", "Coref", "newCoref", "(", "String", "id", ",", "List", "<", "Span", "<", "Term", ">", ">", "mentions", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "COREF", ",", "id", ")", ";", "Coref", "newCoref", "=", "new", "Co...
Creates a coreference object to load an existing Coref. It receives it's ID as an argument. The Coref is added to the document. @param id the ID of the coreference. @param references different mentions (list of targets) to the same entity. @return a new coreference.
[ "Creates", "a", "coreference", "object", "to", "load", "an", "existing", "Coref", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "Coref", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L756-L761
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newCoref
public Coref newCoref(List<Span<Term>> mentions) { String newId = idManager.getNextId(AnnotationType.COREF); Coref newCoref = new Coref(newId, mentions); annotationContainer.add(newCoref, Layer.COREFERENCES, AnnotationType.COREF); return newCoref; }
java
public Coref newCoref(List<Span<Term>> mentions) { String newId = idManager.getNextId(AnnotationType.COREF); Coref newCoref = new Coref(newId, mentions); annotationContainer.add(newCoref, Layer.COREFERENCES, AnnotationType.COREF); return newCoref; }
[ "public", "Coref", "newCoref", "(", "List", "<", "Span", "<", "Term", ">", ">", "mentions", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "COREF", ")", ";", "Coref", "newCoref", "=", "new", "Coref", "(", "...
Creates a new coreference. It assigns an appropriate ID to it. The Coref is added to the document. @param references different mentions (list of targets) to the same entity. @return a new coreference.
[ "Creates", "a", "new", "coreference", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "Coref", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L767-L772
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newTimex3
public Timex3 newTimex3(String id, String type) { idManager.updateCounter(AnnotationType.TIMEX3, id); Timex3 newTimex3 = new Timex3(id, type); annotationContainer.add(newTimex3, Layer.TIME_EXPRESSIONS, AnnotationType.TIMEX3); return newTimex3; }
java
public Timex3 newTimex3(String id, String type) { idManager.updateCounter(AnnotationType.TIMEX3, id); Timex3 newTimex3 = new Timex3(id, type); annotationContainer.add(newTimex3, Layer.TIME_EXPRESSIONS, AnnotationType.TIMEX3); return newTimex3; }
[ "public", "Timex3", "newTimex3", "(", "String", "id", ",", "String", "type", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "TIMEX3", ",", "id", ")", ";", "Timex3", "newTimex3", "=", "new", "Timex3", "(", "id", ",", "type", ")",...
Creates a timeExpressions object to load an existing Timex3. It receives it's ID as an argument. The Timex3 is added to the document. @param id the ID of the coreference. @param references different mentions (list of targets) to the same entity. @return a new timex3.
[ "Creates", "a", "timeExpressions", "object", "to", "load", "an", "existing", "Timex3", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "Timex3", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L779-L784
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newTimex3
public Timex3 newTimex3(String type) { String newId = idManager.getNextId(AnnotationType.TIMEX3); Timex3 newTimex3 = new Timex3(newId, type); annotationContainer.add(newTimex3, Layer.TIME_EXPRESSIONS, AnnotationType.TIMEX3); return newTimex3; }
java
public Timex3 newTimex3(String type) { String newId = idManager.getNextId(AnnotationType.TIMEX3); Timex3 newTimex3 = new Timex3(newId, type); annotationContainer.add(newTimex3, Layer.TIME_EXPRESSIONS, AnnotationType.TIMEX3); return newTimex3; }
[ "public", "Timex3", "newTimex3", "(", "String", "type", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "TIMEX3", ")", ";", "Timex3", "newTimex3", "=", "new", "Timex3", "(", "newId", ",", "type", ")", ";", "an...
Creates a new timeExpressions. It assigns an appropriate ID to it. The Coref is added to the document. @param references different mentions (list of targets) to the same entity. @return a new timex3.
[ "Creates", "a", "new", "timeExpressions", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "Coref", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L790-L795
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newFactvalue
public Factvalue newFactvalue(WF wf, String prediction) { Factvalue factuality = new Factvalue(wf, prediction); annotationContainer.add(factuality, Layer.FACTUALITY_LAYER, AnnotationType.FACTVALUE); return factuality; }
java
public Factvalue newFactvalue(WF wf, String prediction) { Factvalue factuality = new Factvalue(wf, prediction); annotationContainer.add(factuality, Layer.FACTUALITY_LAYER, AnnotationType.FACTVALUE); return factuality; }
[ "public", "Factvalue", "newFactvalue", "(", "WF", "wf", ",", "String", "prediction", ")", "{", "Factvalue", "factuality", "=", "new", "Factvalue", "(", "wf", ",", "prediction", ")", ";", "annotationContainer", ".", "add", "(", "factuality", ",", "Layer", "."...
Creates a factualitylayer object and add it to the document @param term the Term of the coreference. @return a new factuality.
[ "Creates", "a", "factualitylayer", "object", "and", "add", "it", "to", "the", "document" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L877-L881
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newProperty
public Feature newProperty(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.PROPERTY, id); Feature newProperty = new Feature(id, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
java
public Feature newProperty(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.PROPERTY, id); Feature newProperty = new Feature(id, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
[ "public", "Feature", "newProperty", "(", "String", "id", ",", "String", "lemma", ",", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "PROPERTY", ",", "id", ")", ";", "Fea...
Creates a new property. It receives it's ID as an argument. The property is added to the document. @param id the ID of the property. @param lemma the lemma of the property. @param references different mentions (list of targets) to the same property. @return a new coreference.
[ "Creates", "a", "new", "property", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "property", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L902-L907
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newProperty
public Feature newProperty(String lemma, List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.PROPERTY); Feature newProperty = new Feature(newId, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
java
public Feature newProperty(String lemma, List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.PROPERTY); Feature newProperty = new Feature(newId, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
[ "public", "Feature", "newProperty", "(", "String", "lemma", ",", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "PROPERTY", ")", ";", "Feature", "newPro...
Creates a new property. It assigns an appropriate ID to it. The property is added to the document. @param lemma the lemma of the property. @param references different mentions (list of targets) to the same property. @return a new coreference.
[ "Creates", "a", "new", "property", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "property", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L914-L919
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newCategory
public Feature newCategory(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.CATEGORY, id); Feature newCategory = new Feature(id, lemma, references); annotationContainer.add(newCategory, Layer.CATEGORIES, AnnotationType.CATEGORY); return newCategory; }
java
public Feature newCategory(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.CATEGORY, id); Feature newCategory = new Feature(id, lemma, references); annotationContainer.add(newCategory, Layer.CATEGORIES, AnnotationType.CATEGORY); return newCategory; }
[ "public", "Feature", "newCategory", "(", "String", "id", ",", "String", "lemma", ",", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "CATEGORY", ",", "id", ")", ";", "Fea...
Creates a new category. It receives it's ID as an argument. The category is added to the document. @param id the ID of the category. @param lemma the lemma of the category. @param references different mentions (list of targets) to the same category. @return a new coreference.
[ "Creates", "a", "new", "category", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "category", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L927-L932
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newCategory
public Feature newCategory(String lemma, List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.CATEGORY); Feature newCategory = new Feature(newId, lemma, references); annotationContainer.add(newCategory, Layer.CATEGORIES, AnnotationType.CATEGORY); return newCategory; }
java
public Feature newCategory(String lemma, List<Span<Term>> references) { String newId = idManager.getNextId(AnnotationType.CATEGORY); Feature newCategory = new Feature(newId, lemma, references); annotationContainer.add(newCategory, Layer.CATEGORIES, AnnotationType.CATEGORY); return newCategory; }
[ "public", "Feature", "newCategory", "(", "String", "lemma", ",", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "CATEGORY", ")", ";", "Feature", "newCat...
Creates a new category. It assigns an appropriate ID to it. The category is added to the document. @param lemma the lemma of the category. @param references different mentions (list of targets) to the same category. @return a new coreference.
[ "Creates", "a", "new", "category", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "category", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L939-L944
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newOpinion
public Opinion newOpinion() { String newId = idManager.getNextId(AnnotationType.OPINION); Opinion newOpinion = new Opinion(newId); annotationContainer.add(newOpinion, Layer.OPINIONS, AnnotationType.OPINION); return newOpinion; }
java
public Opinion newOpinion() { String newId = idManager.getNextId(AnnotationType.OPINION); Opinion newOpinion = new Opinion(newId); annotationContainer.add(newOpinion, Layer.OPINIONS, AnnotationType.OPINION); return newOpinion; }
[ "public", "Opinion", "newOpinion", "(", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "OPINION", ")", ";", "Opinion", "newOpinion", "=", "new", "Opinion", "(", "newId", ")", ";", "annotationContainer", ".", "add...
Creates a new opinion object. It assigns an appropriate ID to it. The opinion is added to the document. @return a new opinion.
[ "Creates", "a", "new", "opinion", "object", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "opinion", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L949-L954
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newOpinion
public Opinion newOpinion(String id) { idManager.updateCounter(AnnotationType.OPINION, id); Opinion newOpinion = new Opinion(id); annotationContainer.add(newOpinion, Layer.OPINIONS, AnnotationType.OPINION); return newOpinion; }
java
public Opinion newOpinion(String id) { idManager.updateCounter(AnnotationType.OPINION, id); Opinion newOpinion = new Opinion(id); annotationContainer.add(newOpinion, Layer.OPINIONS, AnnotationType.OPINION); return newOpinion; }
[ "public", "Opinion", "newOpinion", "(", "String", "id", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "OPINION", ",", "id", ")", ";", "Opinion", "newOpinion", "=", "new", "Opinion", "(", "id", ")", ";", "annotationContainer", ".", ...
Creates a new opinion object. It receives its ID as an argument. The opinion is added to the document. @return a new opinion.
[ "Creates", "a", "new", "opinion", "object", ".", "It", "receives", "its", "ID", "as", "an", "argument", ".", "The", "opinion", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L959-L964
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newPredicate
public Predicate newPredicate(String id, Span<Term> span) { idManager.updateCounter(AnnotationType.PREDICATE, id); Predicate newPredicate = new Predicate(id, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
java
public Predicate newPredicate(String id, Span<Term> span) { idManager.updateCounter(AnnotationType.PREDICATE, id); Predicate newPredicate = new Predicate(id, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
[ "public", "Predicate", "newPredicate", "(", "String", "id", ",", "Span", "<", "Term", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "PREDICATE", ",", "id", ")", ";", "Predicate", "newPredicate", "=", "new", "Predicate"...
Creates a new srl predicate. It receives its ID as an argument. The predicate is added to the document. @param id the ID of the predicate @param span span containing the targets of the predicate @return a new predicate
[ "Creates", "a", "new", "srl", "predicate", ".", "It", "receives", "its", "ID", "as", "an", "argument", ".", "The", "predicate", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L996-L1001
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newPredicate
public Predicate newPredicate(Span<Term> span) { String newId = idManager.getNextId(AnnotationType.PREDICATE); Predicate newPredicate = new Predicate(newId, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
java
public Predicate newPredicate(Span<Term> span) { String newId = idManager.getNextId(AnnotationType.PREDICATE); Predicate newPredicate = new Predicate(newId, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
[ "public", "Predicate", "newPredicate", "(", "Span", "<", "Term", ">", "span", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "PREDICATE", ")", ";", "Predicate", "newPredicate", "=", "new", "Predicate", "(", "newI...
Creates a new srl predicate. It assigns an appropriate ID to it. The predicate is added to the document. @param span span containing all the targets of the predicate @return a new predicate
[ "Creates", "a", "new", "srl", "predicate", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "predicate", "is", "added", "to", "the", "document", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1007-L1012
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newRole
public Predicate.Role newRole(String id, Predicate predicate, String semRole, Span<Term> span) { idManager.updateCounter(AnnotationType.ROLE, id); Predicate.Role newRole = new Predicate.Role(id, semRole, span); return newRole; }
java
public Predicate.Role newRole(String id, Predicate predicate, String semRole, Span<Term> span) { idManager.updateCounter(AnnotationType.ROLE, id); Predicate.Role newRole = new Predicate.Role(id, semRole, span); return newRole; }
[ "public", "Predicate", ".", "Role", "newRole", "(", "String", "id", ",", "Predicate", "predicate", ",", "String", "semRole", ",", "Span", "<", "Term", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "ROLE", ",", "id", ...
Creates a Role object to load an existing role. It receives the ID as an argument. It doesn't add the role to the predicate. @param id role's ID. @param predicate the predicate which this role is part of @param semRole semantic role @param span span containing all the targets of the role @return a new role.
[ "Creates", "a", "Role", "object", "to", "load", "an", "existing", "role", ".", "It", "receives", "the", "ID", "as", "an", "argument", ".", "It", "doesn", "t", "add", "the", "role", "to", "the", "predicate", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1021-L1025
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newRole
public Predicate.Role newRole(Predicate predicate, String semRole, Span<Term> span) { String newId = idManager.getNextId(AnnotationType.ROLE); Predicate.Role newRole = new Predicate.Role(newId, semRole, span); return newRole; }
java
public Predicate.Role newRole(Predicate predicate, String semRole, Span<Term> span) { String newId = idManager.getNextId(AnnotationType.ROLE); Predicate.Role newRole = new Predicate.Role(newId, semRole, span); return newRole; }
[ "public", "Predicate", ".", "Role", "newRole", "(", "Predicate", "predicate", ",", "String", "semRole", ",", "Span", "<", "Term", ">", "span", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "ROLE", ")", ";", ...
Creates a new Role object. It assigns an appropriate ID to it. It uses the ID of the predicate to create a new ID for the role. It doesn't add the role to the predicate. @param predicate the predicate which this role is part of @param semRole semantic role @param span span containing all the targets of the role @return...
[ "Creates", "a", "new", "Role", "object", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "It", "uses", "the", "ID", "of", "the", "predicate", "to", "create", "a", "new", "ID", "for", "the", "role", ".", "It", "doesn", "t", "add", ...
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1033-L1037
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.getSentences
public List<List<WF>> getSentences() { return (List<List<WF>>)(List<?>) annotationContainer.getSentences(AnnotationType.WF); }
java
public List<List<WF>> getSentences() { return (List<List<WF>>)(List<?>) annotationContainer.getSentences(AnnotationType.WF); }
[ "public", "List", "<", "List", "<", "WF", ">", ">", "getSentences", "(", ")", "{", "return", "(", "List", "<", "List", "<", "WF", ">", ">", ")", "(", "List", "<", "?", ">", ")", "annotationContainer", ".", "getSentences", "(", "AnnotationType", ".", ...
Returns a list with all sentences. Each sentence is a list of WFs.
[ "Returns", "a", "list", "with", "all", "sentences", ".", "Each", "sentence", "is", "a", "list", "of", "WFs", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1270-L1272
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.getTermsFromWFs
public List<Term> getTermsFromWFs(List<String> wfIds) { List<Term> terms = new ArrayList<Term>(); for (String wfId : wfIds) { terms.addAll(this.wfId2Terms.get(wfId)); } return terms; }
java
public List<Term> getTermsFromWFs(List<String> wfIds) { List<Term> terms = new ArrayList<Term>(); for (String wfId : wfIds) { terms.addAll(this.wfId2Terms.get(wfId)); } return terms; }
[ "public", "List", "<", "Term", ">", "getTermsFromWFs", "(", "List", "<", "String", ">", "wfIds", ")", "{", "List", "<", "Term", ">", "terms", "=", "new", "ArrayList", "<", "Term", ">", "(", ")", ";", "for", "(", "String", "wfId", ":", "wfIds", ")",...
Hau kendu behar da
[ "Hau", "kendu", "behar", "da" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1505-L1511
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.createTimestamp
public String createTimestamp() { Date date = new Date(); //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String formattedDate = sdf.format(date); return formattedDate; }
java
public String createTimestamp() { Date date = new Date(); //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd H:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String formattedDate = sdf.format(date); return formattedDate; }
[ "public", "String", "createTimestamp", "(", ")", "{", "Date", "date", "=", "new", "Date", "(", ")", ";", "//SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd H:mm:ss\");", "SimpleDateFormat", "sdf", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd'T'HH:mm:ssZ\"", ...
Returns current timestamp.
[ "Returns", "current", "timestamp", "." ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1652-L1658
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.list2Span
static <T extends IdentifiableAnnotation> Span<T> list2Span(List<T> list) { Span<T> span = new Span<T>(); for (T elem : list) { span.addTarget(elem); } return span; }
java
static <T extends IdentifiableAnnotation> Span<T> list2Span(List<T> list) { Span<T> span = new Span<T>(); for (T elem : list) { span.addTarget(elem); } return span; }
[ "static", "<", "T", "extends", "IdentifiableAnnotation", ">", "Span", "<", "T", ">", "list2Span", "(", "List", "<", "T", ">", "list", ")", "{", "Span", "<", "T", ">", "span", "=", "new", "Span", "<", "T", ">", "(", ")", ";", "for", "(", "T", "e...
Converts a List into a Span
[ "Converts", "a", "List", "into", "a", "Span" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1868-L1874
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.targetList2Span
static Span<Term> targetList2Span(List<Target> list) { Span<Term> span = new Span<Term>(); for (Target target : list) { if (target.isHead()) { span.addTarget(target.getTerm(), true); } else { span.addTarget(target.getTerm()); } } return span; }
java
static Span<Term> targetList2Span(List<Target> list) { Span<Term> span = new Span<Term>(); for (Target target : list) { if (target.isHead()) { span.addTarget(target.getTerm(), true); } else { span.addTarget(target.getTerm()); } } return span; }
[ "static", "Span", "<", "Term", ">", "targetList2Span", "(", "List", "<", "Target", ">", "list", ")", "{", "Span", "<", "Term", ">", "span", "=", "new", "Span", "<", "Term", ">", "(", ")", ";", "for", "(", "Target", "target", ":", "list", ")", "{"...
Converts a Target list into a Span of terms
[ "Converts", "a", "Target", "list", "into", "a", "Span", "of", "terms" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1890-L1900
train
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.span2TargetList
static List<Target> span2TargetList(Span<Term> span) { List<Target> list = new ArrayList<Target>(); for (Term t : span.getTargets()) { list.add(KAFDocument.createTarget(t, (t==span.getHead()))); } return list; }
java
static List<Target> span2TargetList(Span<Term> span) { List<Target> list = new ArrayList<Target>(); for (Term t : span.getTargets()) { list.add(KAFDocument.createTarget(t, (t==span.getHead()))); } return list; }
[ "static", "List", "<", "Target", ">", "span2TargetList", "(", "Span", "<", "Term", ">", "span", ")", "{", "List", "<", "Target", ">", "list", "=", "new", "ArrayList", "<", "Target", ">", "(", ")", ";", "for", "(", "Term", "t", ":", "span", ".", "...
Converts a Span into a Target list
[ "Converts", "a", "Span", "into", "a", "Target", "list" ]
3921f55d9ae4621736a329418f6334fb721834b8
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1903-L1909
train
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findContentText
@Nullable public static String findContentText(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } return node.getTextContent(); }
java
@Nullable public static String findContentText(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } return node.getTextContent(); }
[ "@", "Nullable", "public", "static", "String", "findContentText", "(", "final", "Node", "rootNode", ",", "final", "XPath", "xPath", ",", "final", "String", "expression", ")", "{", "final", "Node", "node", "=", "findNode", "(", "rootNode", ",", "xPath", ",", ...
Returns an string from a node's content. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "an", "string", "from", "a", "node", "s", "content", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L61-L68
train
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findContentInteger
@Nullable public static Integer findContentInteger(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } final String str = node.getTextContent(); ...
java
@Nullable public static Integer findContentInteger(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } final String str = node.getTextContent(); ...
[ "@", "Nullable", "public", "static", "Integer", "findContentInteger", "(", "final", "Node", "rootNode", ",", "final", "XPath", "xPath", ",", "final", "String", "expression", ")", "{", "final", "Node", "node", "=", "findNode", "(", "rootNode", ",", "xPath", "...
Returns an integer value from a node's content. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "an", "integer", "value", "from", "a", "node", "s", "content", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L82-L91
train
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findNode
@Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("rootNode", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
java
@Nullable public static Node findNode(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("rootNode", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
[ "@", "Nullable", "public", "static", "Node", "findNode", "(", "@", "NotNull", "final", "Node", "rootNode", ",", "@", "NotNull", "final", "XPath", "xPath", ",", "@", "NotNull", "final", "String", "expression", ")", "{", "Contract", ".", "requireArgNotNull", "...
Returns a single node from a given document using xpath. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "a", "single", "node", "from", "a", "given", "document", "using", "xpath", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L105-L116
train
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findNodes
@Nullable public static NodeList findNodes(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("doc", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
java
@Nullable public static NodeList findNodes(@NotNull final Node rootNode, @NotNull final XPath xPath, @NotNull final String expression) { Contract.requireArgNotNull("doc", rootNode); Contract.requireArgNotNull("xPath", xPath); Contract.requireArgNotNull("expression", expression); ...
[ "@", "Nullable", "public", "static", "NodeList", "findNodes", "(", "@", "NotNull", "final", "Node", "rootNode", ",", "@", "NotNull", "final", "XPath", "xPath", ",", "@", "NotNull", "final", "String", "expression", ")", "{", "Contract", ".", "requireArgNotNull"...
Returns a list of nodes from a given document using xpath. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Nodes or <code>null</code> if no match was found.
[ "Returns", "a", "list", "of", "nodes", "from", "a", "given", "document", "using", "xpath", "." ]
ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L130-L141
train