id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
107,400 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonImpl.java | BasePersonImpl.buildImmutableAttributeMap | protected Map<String, List<Object>> buildImmutableAttributeMap(final Map<String, List<Object>> attributes) {
final Map<String, List<Object>> immutableValuesBuilder = this.createImmutableAttributeMap(attributes.size());
final Pattern arrayPattern = Pattern.compile("\\{(.*)\\}");
for (final Map.En... | java | protected Map<String, List<Object>> buildImmutableAttributeMap(final Map<String, List<Object>> attributes) {
final Map<String, List<Object>> immutableValuesBuilder = this.createImmutableAttributeMap(attributes.size());
final Pattern arrayPattern = Pattern.compile("\\{(.*)\\}");
for (final Map.En... | [
"protected",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"buildImmutableAttributeMap",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributes",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"O... | Take the constructor argument and convert the Map and List values into read-only form.
@param attributes Map of attributes
@return Read-only map of attributes | [
"Take",
"the",
"constructor",
"argument",
"and",
"convert",
"the",
"Map",
"and",
"List",
"values",
"into",
"read",
"-",
"only",
"form",
"."
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonImpl.java#L66-L103 |
107,401 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java | AbstractQueryPersonAttributeDao.mapPersonAttributes | protected final IPersonAttributes mapPersonAttributes(final IPersonAttributes person) {
final Map<String, List<Object>> personAttributes = person.getAttributes();
final Map<String, List<Object>> mappedAttributes;
//If no mapping just use the attributes as-is
if (this.resultAttributeMapp... | java | protected final IPersonAttributes mapPersonAttributes(final IPersonAttributes person) {
final Map<String, List<Object>> personAttributes = person.getAttributes();
final Map<String, List<Object>> mappedAttributes;
//If no mapping just use the attributes as-is
if (this.resultAttributeMapp... | [
"protected",
"final",
"IPersonAttributes",
"mapPersonAttributes",
"(",
"final",
"IPersonAttributes",
"person",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"personAttributes",
"=",
"person",
".",
"getAttributes",
"(",
")",
";",
... | Uses resultAttributeMapping to return a copy of the IPersonAttributes with only the attributes specified in
resultAttributeMapping mapped to their result attribute names.
@param person The IPersonAttributes to map attributes for
@return A copy of the IPersonAttributes with mapped attributes, the original IPersonAttrib... | [
"Uses",
"resultAttributeMapping",
"to",
"return",
"a",
"copy",
"of",
"the",
"IPersonAttributes",
"with",
"only",
"the",
"attributes",
"specified",
"in",
"resultAttributeMapping",
"mapped",
"to",
"their",
"result",
"attribute",
"names",
"."
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java#L406-L468 |
107,402 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java | AbstractQueryPersonAttributeDao.canonicalizeAttribute | protected List<Object> canonicalizeAttribute(final String key, final List<Object> value, final Map<String, CaseCanonicalizationMode> config) {
if (value == null || value.isEmpty() || config == null || !(config.containsKey(key))) {
return value;
}
CaseCanonicalizationMode canonicaliza... | java | protected List<Object> canonicalizeAttribute(final String key, final List<Object> value, final Map<String, CaseCanonicalizationMode> config) {
if (value == null || value.isEmpty() || config == null || !(config.containsKey(key))) {
return value;
}
CaseCanonicalizationMode canonicaliza... | [
"protected",
"List",
"<",
"Object",
">",
"canonicalizeAttribute",
"(",
"final",
"String",
"key",
",",
"final",
"List",
"<",
"Object",
">",
"value",
",",
"final",
"Map",
"<",
"String",
",",
"CaseCanonicalizationMode",
">",
"config",
")",
"{",
"if",
"(",
"va... | Canonicalize the attribute values if they are present in the config map.
@param key attribute key
@param value list of attribute values
@param config map of attribute names to canonicalization key for the attribute
@return if configured to do so, returns a canonicalized list of values. | [
"Canonicalize",
"the",
"attribute",
"values",
"if",
"they",
"are",
"present",
"in",
"the",
"config",
"map",
"."
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java#L477-L498 |
107,403 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/CascadingPersonAttributeDao.java | CascadingPersonAttributeDao.getAttributesFromDao | @Override
protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) {
if (isFirstQuery || (!stopIfFirstDaoReturnsNu... | java | @Override
protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) {
if (isFirstQuery || (!stopIfFirstDaoReturnsNu... | [
"@",
"Override",
"protected",
"Set",
"<",
"IPersonAttributes",
">",
"getAttributesFromDao",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"seed",
",",
"final",
"boolean",
"isFirstQuery",
",",
"final",
"IPersonAttributeDao",
"currently... | If this is the first call, or there are no results in the resultPeople Set and stopIfFirstDaoReturnsNull=false,
the seed map is used. If not the attributes of the first user in the resultPeople Set are used for each child
dao. If stopIfFirstDaoReturnsNull=true and the first query returned no results in the resultPeopl... | [
"If",
"this",
"is",
"the",
"first",
"call",
"or",
"there",
"are",
"no",
"results",
"in",
"the",
"resultPeople",
"Set",
"and",
"stopIfFirstDaoReturnsNull",
"=",
"false",
"the",
"seed",
"map",
"is",
"used",
".",
"If",
"not",
"the",
"attributes",
"of",
"the",... | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/CascadingPersonAttributeDao.java#L96-L132 |
107,404 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/MergingPersonAttributeDaoImpl.java | MergingPersonAttributeDaoImpl.getAttributesFromDao | @Override
protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) {
return currentlyConsidering.getPeopleWithMult... | java | @Override
protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) {
return currentlyConsidering.getPeopleWithMult... | [
"@",
"Override",
"protected",
"Set",
"<",
"IPersonAttributes",
">",
"getAttributesFromDao",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"seed",
",",
"final",
"boolean",
"isFirstQuery",
",",
"final",
"IPersonAttributeDao",
"currently... | Calls the current IPersonAttributeDao from using the seed.
@see AbstractAggregatingDefaultQueryPersonAttributeDao#getAttributesFromDao(java.util.Map, boolean, IPersonAttributeDao, java.util.Set, IPersonAttributeDaoFilter) | [
"Calls",
"the",
"current",
"IPersonAttributeDao",
"from",
"using",
"the",
"seed",
"."
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MergingPersonAttributeDaoImpl.java#L51-L54 |
107,405 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java | MediatingAdditionalDescriptors.removeAttribute | @Override
public List<Object> removeAttribute(final String name) {
List<Object> removedValues = null;
for (final IAdditionalDescriptors additionalDescriptors : this.delegateDescriptors) {
final List<Object> values = additionalDescriptors.removeAttribute(name);
if (values != ... | java | @Override
public List<Object> removeAttribute(final String name) {
List<Object> removedValues = null;
for (final IAdditionalDescriptors additionalDescriptors : this.delegateDescriptors) {
final List<Object> values = additionalDescriptors.removeAttribute(name);
if (values != ... | [
"@",
"Override",
"public",
"List",
"<",
"Object",
">",
"removeAttribute",
"(",
"final",
"String",
"name",
")",
"{",
"List",
"<",
"Object",
">",
"removedValues",
"=",
"null",
";",
"for",
"(",
"final",
"IAdditionalDescriptors",
"additionalDescriptors",
":",
"thi... | Returns list of all removed values
@see IAdditionalDescriptors#removeAttribute(java.lang.String) | [
"Returns",
"list",
"of",
"all",
"removed",
"values"
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java#L62-L78 |
107,406 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java | MediatingAdditionalDescriptors.setAttributeValues | @Override
public List<Object> setAttributeValues(final String name, final List<Object> values) {
List<Object> replacedValues = null;
for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
final List<Object> oldValues = additionalDescriptors.setAttributeValues(n... | java | @Override
public List<Object> setAttributeValues(final String name, final List<Object> values) {
List<Object> replacedValues = null;
for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
final List<Object> oldValues = additionalDescriptors.setAttributeValues(n... | [
"@",
"Override",
"public",
"List",
"<",
"Object",
">",
"setAttributeValues",
"(",
"final",
"String",
"name",
",",
"final",
"List",
"<",
"Object",
">",
"values",
")",
"{",
"List",
"<",
"Object",
">",
"replacedValues",
"=",
"null",
";",
"for",
"(",
"final"... | Returns list of all replaced values
@see IAdditionalDescriptors#setAttributeValues(java.lang.String, java.util.List) | [
"Returns",
"list",
"of",
"all",
"replaced",
"values"
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java#L85-L101 |
107,407 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java | RequestAttributeSourceFilter.addRequestProperties | protected void addRequestProperties(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
if (this.remoteUserAttribute != null) {
final String remoteUser = httpServletRequest.getRemoteUser();
attributes.put(this.remoteUserAttribute, list(remoteUser));... | java | protected void addRequestProperties(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
if (this.remoteUserAttribute != null) {
final String remoteUser = httpServletRequest.getRemoteUser();
attributes.put(this.remoteUserAttribute, list(remoteUser));... | [
"protected",
"void",
"addRequestProperties",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
",",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributes",
")",
"{",
"if",
"(",
"this",
".",
"remoteUserAttribute",
"!=",
"null",
... | Add other properties from the request to the attributes map.
@param httpServletRequest Http Servlet Request
@param attributes Map of attributes to add additional attributes to from the Http Request | [
"Add",
"other",
"properties",
"from",
"the",
"request",
"to",
"the",
"attributes",
"map",
"."
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L407-L428 |
107,408 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java | RequestAttributeSourceFilter.addRequestCookies | protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
final Cookie[] cookies = httpServletRequest.getCookies();
if (cookies == null) {
return;
}
for (final Cookie cookie : cookies) {
final Stri... | java | protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
final Cookie[] cookies = httpServletRequest.getCookies();
if (cookies == null) {
return;
}
for (final Cookie cookie : cookies) {
final Stri... | [
"protected",
"void",
"addRequestCookies",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
",",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributes",
")",
"{",
"final",
"Cookie",
"[",
"]",
"cookies",
"=",
"httpServletRequest... | Add request cookies to the attributes map
@param httpServletRequest Http Servlet Request
@param attributes Map of attributes to add additional attributes to from the Http Request | [
"Add",
"request",
"cookies",
"to",
"the",
"attributes",
"map"
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L436-L450 |
107,409 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java | RequestAttributeSourceFilter.addRequestHeaders | protected void addRequestHeaders(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
for (final Map.Entry<String, Set<String>> headerAttributeEntry : this.headerAttributeMapping.entrySet()) {
final String headerName = headerAttributeEntry.getKey();
... | java | protected void addRequestHeaders(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
for (final Map.Entry<String, Set<String>> headerAttributeEntry : this.headerAttributeMapping.entrySet()) {
final String headerName = headerAttributeEntry.getKey();
... | [
"protected",
"void",
"addRequestHeaders",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
",",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributes",
")",
"{",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"String",
","... | Add request headers to the attributes map
@param httpServletRequest Http Servlet Request
@param attributes Map of attributes to add additional attributes to from the Http Request | [
"Add",
"request",
"headers",
"to",
"the",
"attributes",
"map"
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L458-L472 |
107,410 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LogicalFilterWrapper.java | LogicalFilterWrapper.append | public void append(final Filter query) {
switch (this.queryType) {
case OR: {
this.orFilter.or(query);
}
break;
default:
case AND: {
this.andFilter.and(query);
}
break;
}
} | java | public void append(final Filter query) {
switch (this.queryType) {
case OR: {
this.orFilter.or(query);
}
break;
default:
case AND: {
this.andFilter.and(query);
}
break;
}
} | [
"public",
"void",
"append",
"(",
"final",
"Filter",
"query",
")",
"{",
"switch",
"(",
"this",
".",
"queryType",
")",
"{",
"case",
"OR",
":",
"{",
"this",
".",
"orFilter",
".",
"or",
"(",
"query",
")",
";",
"}",
"break",
";",
"default",
":",
"case",... | Append the query Filter to the underlying logical Filter | [
"Append",
"the",
"query",
"Filter",
"to",
"the",
"underlying",
"logical",
"Filter"
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LogicalFilterWrapper.java#L64-L77 |
107,411 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/xml/CachingJaxbLoaderImpl.java | CachingJaxbLoaderImpl.isCacheValid | protected boolean isCacheValid(final Long lastModified) {
return (lastModified != null && lastModified <= this.lastModifiedTime) ||
(lastModified == null && (this.lastModifiedTime + this.noLastModifiedReloadPeriod) <= System.currentTimeMillis());
} | java | protected boolean isCacheValid(final Long lastModified) {
return (lastModified != null && lastModified <= this.lastModifiedTime) ||
(lastModified == null && (this.lastModifiedTime + this.noLastModifiedReloadPeriod) <= System.currentTimeMillis());
} | [
"protected",
"boolean",
"isCacheValid",
"(",
"final",
"Long",
"lastModified",
")",
"{",
"return",
"(",
"lastModified",
"!=",
"null",
"&&",
"lastModified",
"<=",
"this",
".",
"lastModifiedTime",
")",
"||",
"(",
"lastModified",
"==",
"null",
"&&",
"(",
"this",
... | Determines if the cached unmarshalled object is still valid
@param lastModified last modified timestamp of the resource, null if not known.
@return true if the cached object should be used | [
"Determines",
"if",
"the",
"cached",
"unmarshalled",
"object",
"is",
"still",
"valid"
] | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/xml/CachingJaxbLoaderImpl.java#L143-L146 |
107,412 | apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonAttributeDao.java | BasePersonAttributeDao.flattenResults | @Deprecated
protected Map<String, Object> flattenResults(final Map<String, List<Object>> multivaluedUserAttributes) {
if (!this.enabled) {
return null;
}
if (multivaluedUserAttributes == null) {
return null;
}
//Convert the <String, List<Object> resu... | java | @Deprecated
protected Map<String, Object> flattenResults(final Map<String, List<Object>> multivaluedUserAttributes) {
if (!this.enabled) {
return null;
}
if (multivaluedUserAttributes == null) {
return null;
}
//Convert the <String, List<Object> resu... | [
"@",
"Deprecated",
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"flattenResults",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"multivaluedUserAttributes",
")",
"{",
"if",
"(",
"!",
"this",
".",
"enabled",
")",
"{",... | Takes a <String, List<Object>> Map and coverts it to a <String, Object> Map. This implementation takes
the first value of each List to use as the value for the new Map.
@param multivaluedUserAttributes The attribute map to flatten.
@return A flattened version of the Map, null if the argument was null... | [
"Takes",
"a",
"<",
";",
"String",
"List<",
";",
"Object>",
";",
">",
";",
"Map",
"and",
"coverts",
"it",
"to",
"a",
"<",
";",
"String",
"Object>",
";",
"Map",
".",
"This",
"implementation",
"takes",
"the",
"first",
"value",
"of",
"each",
"L... | 331200c0878aec202b8aff12a732402d6ba7681f | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonAttributeDao.java#L132-L162 |
107,413 | scoverage/scoverage-maven-plugin | src/main/java/org/scoverage/plugin/SCoveragePackageMojo.java | SCoveragePackageMojo.execute | @Override
public void execute()
{
if ( "pom".equals( project.getPackaging() ) )
{
getLog().info( "Skipping SCoverage execution for project with packaging type 'pom'" );
return;
}
if ( skip )
{
getLog().info( "Skipping Scoverage executi... | java | @Override
public void execute()
{
if ( "pom".equals( project.getPackaging() ) )
{
getLog().info( "Skipping SCoverage execution for project with packaging type 'pom'" );
return;
}
if ( skip )
{
getLog().info( "Skipping Scoverage executi... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
")",
"{",
"if",
"(",
"\"pom\"",
".",
"equals",
"(",
"project",
".",
"getPackaging",
"(",
")",
")",
")",
"{",
"getLog",
"(",
")",
".",
"info",
"(",
"\"Skipping SCoverage execution for project with packaging typ... | Creates artifact file containing instrumented classes. | [
"Creates",
"artifact",
"file",
"containing",
"instrumented",
"classes",
"."
] | b1c874aba521a65c85bcccfa8bff2213b5639c78 | https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoveragePackageMojo.java#L69-L90 |
107,414 | scoverage/scoverage-maven-plugin | src/main/java/org/scoverage/plugin/SCoveragePostCompileMojo.java | SCoveragePostCompileMojo.execute | @Override
public void execute()
{
if ( "pom".equals( project.getPackaging() ) )
{
return;
}
if ( skip )
{
return;
}
long ts = System.currentTimeMillis();
Properties projectProperties = project.getProperties();
... | java | @Override
public void execute()
{
if ( "pom".equals( project.getPackaging() ) )
{
return;
}
if ( skip )
{
return;
}
long ts = System.currentTimeMillis();
Properties projectProperties = project.getProperties();
... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
")",
"{",
"if",
"(",
"\"pom\"",
".",
"equals",
"(",
"project",
".",
"getPackaging",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"skip",
")",
"{",
"return",
";",
"}",
"long",
"ts",
"="... | Restores project original configuration after compilation with SCoverage instrumentation. | [
"Restores",
"project",
"original",
"configuration",
"after",
"compilation",
"with",
"SCoverage",
"instrumentation",
"."
] | b1c874aba521a65c85bcccfa8bff2213b5639c78 | https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoveragePostCompileMojo.java#L66-L91 |
107,415 | scoverage/scoverage-maven-plugin | src/main/java/org/scoverage/plugin/SCoveragePreCompileMojo.java | SCoveragePreCompileMojo.addScoverageDependenciesToClasspath | private void addScoverageDependenciesToClasspath( Artifact scalaScoveragePluginArtifact )
throws MojoExecutionException
{
@SuppressWarnings( "unchecked" )
Set<Artifact> set = new LinkedHashSet<Artifact>( project.getDependencyArtifacts() );
set.add( scalaScoveragePluginArtifact );
... | java | private void addScoverageDependenciesToClasspath( Artifact scalaScoveragePluginArtifact )
throws MojoExecutionException
{
@SuppressWarnings( "unchecked" )
Set<Artifact> set = new LinkedHashSet<Artifact>( project.getDependencyArtifacts() );
set.add( scalaScoveragePluginArtifact );
... | [
"private",
"void",
"addScoverageDependenciesToClasspath",
"(",
"Artifact",
"scalaScoveragePluginArtifact",
")",
"throws",
"MojoExecutionException",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Set",
"<",
"Artifact",
">",
"set",
"=",
"new",
"LinkedHashSet",
... | We need to tweak our test classpath for Scoverage.
@throws MojoExecutionException | [
"We",
"need",
"to",
"tweak",
"our",
"test",
"classpath",
"for",
"Scoverage",
"."
] | b1c874aba521a65c85bcccfa8bff2213b5639c78 | https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoveragePreCompileMojo.java#L496-L503 |
107,416 | scoverage/scoverage-maven-plugin | src/main/java/org/scoverage/plugin/SCoverageReportMojo.java | SCoverageReportMojo.execute | @Override
public void execute()
throws MojoExecutionException
{
if ( !canGenerateReport() )
{
getLog().info( "Skipping SCoverage report generation" );
return;
}
try
{
RenderingContext context = new RenderingContext( outputDirec... | java | @Override
public void execute()
throws MojoExecutionException
{
if ( !canGenerateReport() )
{
getLog().info( "Skipping SCoverage report generation" );
return;
}
try
{
RenderingContext context = new RenderingContext( outputDirec... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"if",
"(",
"!",
"canGenerateReport",
"(",
")",
")",
"{",
"getLog",
"(",
")",
".",
"info",
"(",
"\"Skipping SCoverage report generation\"",
")",
";",
"return",
";",... | Generates SCoverage report.
@throws MojoExecutionException if unexpected problem occurs | [
"Generates",
"SCoverage",
"report",
"."
] | b1c874aba521a65c85bcccfa8bff2213b5639c78 | https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoverageReportMojo.java#L369-L391 |
107,417 | nebula-plugins/nebula-dependency-recommender-plugin | src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java | DependencyRecommendationsPlugin.getRecommendedVersionRecursive | protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) {
String version = project.getExtensions().getByType(RecommendationProviderContainer.class)
.getRecommendedVersion(mvSelector.getGroup(), mvSelector.getName());
if (version != null)
... | java | protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) {
String version = project.getExtensions().getByType(RecommendationProviderContainer.class)
.getRecommendedVersion(mvSelector.getGroup(), mvSelector.getName());
if (version != null)
... | [
"protected",
"String",
"getRecommendedVersionRecursive",
"(",
"Project",
"project",
",",
"ModuleVersionSelector",
"mvSelector",
")",
"{",
"String",
"version",
"=",
"project",
".",
"getExtensions",
"(",
")",
".",
"getByType",
"(",
"RecommendationProviderContainer",
".",
... | Look for recommended versions in a project and each of its ancestors in order until one is found or the root is reached
@param project the gradle <code>Project</code>
@param mvSelector the module to lookup
@return the recommended version or <code>null</code> | [
"Look",
"for",
"recommended",
"versions",
"in",
"a",
"project",
"and",
"each",
"of",
"its",
"ancestors",
"in",
"order",
"until",
"one",
"is",
"found",
"or",
"the",
"root",
"is",
"reached"
] | 7cd008bd202641cf4abb0a7a470dbe5c8c3a67dc | https://github.com/nebula-plugins/nebula-dependency-recommender-plugin/blob/7cd008bd202641cf4abb0a7a470dbe5c8c3a67dc/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java#L217-L225 |
107,418 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getAccountsCount | public Integer getAccountsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Accounts.ACCOUNTS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | java | public Integer getAccountsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Accounts.ACCOUNTS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | [
"public",
"Integer",
"getAccountsCount",
"(",
"final",
"QueryParams",
"params",
")",
"{",
"FluentCaseInsensitiveStringsMap",
"map",
"=",
"doHEAD",
"(",
"Accounts",
".",
"ACCOUNTS_RESOURCE",
",",
"params",
")",
";",
"return",
"Integer",
".",
"parseInt",
"(",
"map",... | Get number of Accounts matching the query params
@param params {@link QueryParams}
@return Integer on success, null otherwise | [
"Get",
"number",
"of",
"Accounts",
"matching",
"the",
"query",
"params"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L262-L265 |
107,419 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getCouponsCount | public Integer getCouponsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Coupons.COUPONS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | java | public Integer getCouponsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Coupons.COUPONS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | [
"public",
"Integer",
"getCouponsCount",
"(",
"final",
"QueryParams",
"params",
")",
"{",
"FluentCaseInsensitiveStringsMap",
"map",
"=",
"doHEAD",
"(",
"Coupons",
".",
"COUPONS_RESOURCE",
",",
"params",
")",
";",
"return",
"Integer",
".",
"parseInt",
"(",
"map",
... | Get number of Coupons matching the query params
@param params {@link QueryParams}
@return Integer on success, null otherwise | [
"Get",
"number",
"of",
"Coupons",
"matching",
"the",
"query",
"params"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L296-L299 |
107,420 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getSubscriptionsCount | public Integer getSubscriptionsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Subscription.SUBSCRIPTION_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | java | public Integer getSubscriptionsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Subscription.SUBSCRIPTION_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | [
"public",
"Integer",
"getSubscriptionsCount",
"(",
"final",
"QueryParams",
"params",
")",
"{",
"FluentCaseInsensitiveStringsMap",
"map",
"=",
"doHEAD",
"(",
"Subscription",
".",
"SUBSCRIPTION_RESOURCE",
",",
"params",
")",
";",
"return",
"Integer",
".",
"parseInt",
... | Get number of Subscriptions matching the query params
@param params {@link QueryParams}
@return Integer on success, null otherwise | [
"Get",
"number",
"of",
"Subscriptions",
"matching",
"the",
"query",
"params"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L675-L678 |
107,421 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getTransactionsCount | public Integer getTransactionsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Transactions.TRANSACTIONS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | java | public Integer getTransactionsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Transactions.TRANSACTIONS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | [
"public",
"Integer",
"getTransactionsCount",
"(",
"final",
"QueryParams",
"params",
")",
"{",
"FluentCaseInsensitiveStringsMap",
"map",
"=",
"doHEAD",
"(",
"Transactions",
".",
"TRANSACTIONS_RESOURCE",
",",
"params",
")",
";",
"return",
"Integer",
".",
"parseInt",
"... | Get number of Transactions matching the query params
@param params {@link QueryParams}
@return Integer on success, null otherwise | [
"Get",
"number",
"of",
"Transactions",
"matching",
"the",
"query",
"params"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L921-L924 |
107,422 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getTransaction | public Transaction getTransaction(final String transactionId) {
if (transactionId == null || transactionId.isEmpty())
throw new RuntimeException("transactionId cannot be empty!");
return doGET(Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId,
Transaction.class);... | java | public Transaction getTransaction(final String transactionId) {
if (transactionId == null || transactionId.isEmpty())
throw new RuntimeException("transactionId cannot be empty!");
return doGET(Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId,
Transaction.class);... | [
"public",
"Transaction",
"getTransaction",
"(",
"final",
"String",
"transactionId",
")",
"{",
"if",
"(",
"transactionId",
"==",
"null",
"||",
"transactionId",
".",
"isEmpty",
"(",
")",
")",
"throw",
"new",
"RuntimeException",
"(",
"\"transactionId cannot be empty!\"... | Lookup a transaction
@param transactionId recurly transaction id
@return the transaction if found, null otherwise | [
"Lookup",
"a",
"transaction"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L932-L938 |
107,423 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.refundTransaction | public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) {
String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId;
if (amount != null) {
url = url + "?amount_in_cents=" + (amount.intValue() * 100);
}
doDELETE(url);
} | java | public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) {
String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId;
if (amount != null) {
url = url + "?amount_in_cents=" + (amount.intValue() * 100);
}
doDELETE(url);
} | [
"public",
"void",
"refundTransaction",
"(",
"final",
"String",
"transactionId",
",",
"@",
"Nullable",
"final",
"BigDecimal",
"amount",
")",
"{",
"String",
"url",
"=",
"Transactions",
".",
"TRANSACTIONS_RESOURCE",
"+",
"\"/\"",
"+",
"transactionId",
";",
"if",
"(... | Refund a transaction
@param transactionId recurly transaction id
@param amount amount to refund, null for full refund | [
"Refund",
"a",
"transaction"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L956-L962 |
107,424 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getInvoice | public Invoice getInvoice(final String invoiceId) {
if (invoiceId == null || invoiceId.isEmpty())
throw new RuntimeException("invoiceId cannot be empty!");
return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId, Invoice.class);
} | java | public Invoice getInvoice(final String invoiceId) {
if (invoiceId == null || invoiceId.isEmpty())
throw new RuntimeException("invoiceId cannot be empty!");
return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId, Invoice.class);
} | [
"public",
"Invoice",
"getInvoice",
"(",
"final",
"String",
"invoiceId",
")",
"{",
"if",
"(",
"invoiceId",
"==",
"null",
"||",
"invoiceId",
".",
"isEmpty",
"(",
")",
")",
"throw",
"new",
"RuntimeException",
"(",
"\"invoiceId cannot be empty!\"",
")",
";",
"retu... | Lookup an invoice given an invoice id
<p>
Returns the invoice given a string id.
The invoice may or may not have acountry code prefix (ex: IE1023).
For more information on invoicing and prefixes, see:
https://docs.recurly.com/docs/site-settings#section-invoice-prefixing
@param invoiceId String Recurly Invoice ID
@ret... | [
"Lookup",
"an",
"invoice",
"given",
"an",
"invoice",
"id"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L994-L999 |
107,425 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.markInvoiceSuccessful | public Invoice markInvoiceSuccessful(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_successful", null, Invoice.class);
} | java | public Invoice markInvoiceSuccessful(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_successful", null, Invoice.class);
} | [
"public",
"Invoice",
"markInvoiceSuccessful",
"(",
"final",
"String",
"invoiceId",
")",
"{",
"return",
"doPUT",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"\"/mark_successful\"",
",",
"null",
",",
"Invoice",
".",
"class",
")"... | Mark an invoice as paid successfully - Recurly Enterprise Feature
@param invoiceId String Recurly Invoice ID | [
"Mark",
"an",
"invoice",
"as",
"paid",
"successfully",
"-",
"Recurly",
"Enterprise",
"Feature"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1280-L1282 |
107,426 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.markInvoiceFailed | public InvoiceCollection markInvoiceFailed(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_failed", null, InvoiceCollection.class);
} | java | public InvoiceCollection markInvoiceFailed(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_failed", null, InvoiceCollection.class);
} | [
"public",
"InvoiceCollection",
"markInvoiceFailed",
"(",
"final",
"String",
"invoiceId",
")",
"{",
"return",
"doPUT",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"\"/mark_failed\"",
",",
"null",
",",
"InvoiceCollection",
".",
"c... | Mark an invoice as failed collection
@param invoiceId String Recurly Invoice ID | [
"Mark",
"an",
"invoice",
"as",
"failed",
"collection"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1301-L1303 |
107,427 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.forceCollectInvoice | public Invoice forceCollectInvoice(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/collect", null, Invoice.class);
} | java | public Invoice forceCollectInvoice(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/collect", null, Invoice.class);
} | [
"public",
"Invoice",
"forceCollectInvoice",
"(",
"final",
"String",
"invoiceId",
")",
"{",
"return",
"doPUT",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"\"/collect\"",
",",
"null",
",",
"Invoice",
".",
"class",
")",
";",
... | Force collect an invoice
@param invoiceId String Recurly Invoice ID | [
"Force",
"collect",
"an",
"invoice"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1310-L1312 |
107,428 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getPlansCount | public Integer getPlansCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Plans.PLANS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | java | public Integer getPlansCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(Plans.PLANS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | [
"public",
"Integer",
"getPlansCount",
"(",
"final",
"QueryParams",
"params",
")",
"{",
"FluentCaseInsensitiveStringsMap",
"map",
"=",
"doHEAD",
"(",
"Plans",
".",
"PLANS_RESOURCE",
",",
"params",
")",
";",
"return",
"Integer",
".",
"parseInt",
"(",
"map",
".",
... | Get number of Plans matching the query params
@param params {@link QueryParams}
@return Integer on success, null otherwise | [
"Get",
"number",
"of",
"Plans",
"matching",
"the",
"query",
"params"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1411-L1414 |
107,429 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getCouponRedemptionByAccount | public Redemption getCouponRedemptionByAccount(final String accountCode) {
return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTION_RESOURCE,
Redemption.class);
} | java | public Redemption getCouponRedemptionByAccount(final String accountCode) {
return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTION_RESOURCE,
Redemption.class);
} | [
"public",
"Redemption",
"getCouponRedemptionByAccount",
"(",
"final",
"String",
"accountCode",
")",
"{",
"return",
"doGET",
"(",
"Accounts",
".",
"ACCOUNTS_RESOURCE",
"+",
"\"/\"",
"+",
"accountCode",
"+",
"Redemption",
".",
"REDEMPTION_RESOURCE",
",",
"Redemption",
... | Lookup the first coupon redemption on an account.
@param accountCode recurly account id
@return the coupon redemption for this account on success, null otherwise | [
"Lookup",
"the",
"first",
"coupon",
"redemption",
"on",
"an",
"account",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1592-L1595 |
107,430 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getCouponRedemptionsByAccount | public Redemptions getCouponRedemptionsByAccount(final String accountCode) {
return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE,
Redemptions.class, new QueryParams());
} | java | public Redemptions getCouponRedemptionsByAccount(final String accountCode) {
return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE,
Redemptions.class, new QueryParams());
} | [
"public",
"Redemptions",
"getCouponRedemptionsByAccount",
"(",
"final",
"String",
"accountCode",
")",
"{",
"return",
"doGET",
"(",
"Accounts",
".",
"ACCOUNTS_RESOURCE",
"+",
"\"/\"",
"+",
"accountCode",
"+",
"Redemption",
".",
"REDEMPTIONS_RESOURCE",
",",
"Redemptions... | Lookup all coupon redemptions on an account.
@param accountCode recurly account id
@return the coupon redemptions for this account on success, null otherwise | [
"Lookup",
"all",
"coupon",
"redemptions",
"on",
"an",
"account",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1603-L1606 |
107,431 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getCouponRedemptionByInvoice | public Redemption getCouponRedemptionByInvoice(final String invoiceId) {
return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Redemption.REDEMPTION_RESOURCE,
Redemption.class);
} | java | public Redemption getCouponRedemptionByInvoice(final String invoiceId) {
return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Redemption.REDEMPTION_RESOURCE,
Redemption.class);
} | [
"public",
"Redemption",
"getCouponRedemptionByInvoice",
"(",
"final",
"String",
"invoiceId",
")",
"{",
"return",
"doGET",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"Redemption",
".",
"REDEMPTION_RESOURCE",
",",
"Redemption",
"."... | Lookup the first coupon redemption on an invoice.
@param invoiceId String invoice id
@return the coupon redemption for this invoice on success, null otherwise | [
"Lookup",
"the",
"first",
"coupon",
"redemption",
"on",
"an",
"invoice",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1639-L1642 |
107,432 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getCouponRedemptionsBySubscription | public Redemptions getCouponRedemptionsBySubscription(final String subscriptionUuid, final QueryParams params) {
return doGET(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionUuid + Redemptions.REDEMPTIONS_RESOURCE,
Redemptions.class, params);
} | java | public Redemptions getCouponRedemptionsBySubscription(final String subscriptionUuid, final QueryParams params) {
return doGET(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionUuid + Redemptions.REDEMPTIONS_RESOURCE,
Redemptions.class, params);
} | [
"public",
"Redemptions",
"getCouponRedemptionsBySubscription",
"(",
"final",
"String",
"subscriptionUuid",
",",
"final",
"QueryParams",
"params",
")",
"{",
"return",
"doGET",
"(",
"Subscription",
".",
"SUBSCRIPTION_RESOURCE",
"+",
"\"/\"",
"+",
"subscriptionUuid",
"+",
... | Lookup all coupon redemptions on a subscription given query params.
@param subscriptionUuid String subscription uuid
@param params {@link QueryParams}
@return the coupon redemptions for this subscription on success, null otherwise | [
"Lookup",
"all",
"coupon",
"redemptions",
"on",
"a",
"subscription",
"given",
"query",
"params",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1701-L1704 |
107,433 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.deleteCouponRedemption | public void deleteCouponRedemption(final String accountCode, final String redemptionUuid) {
doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE + "/" + redemptionUuid);
} | java | public void deleteCouponRedemption(final String accountCode, final String redemptionUuid) {
doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE + "/" + redemptionUuid);
} | [
"public",
"void",
"deleteCouponRedemption",
"(",
"final",
"String",
"accountCode",
",",
"final",
"String",
"redemptionUuid",
")",
"{",
"doDELETE",
"(",
"Accounts",
".",
"ACCOUNTS_RESOURCE",
"+",
"\"/\"",
"+",
"accountCode",
"+",
"Redemption",
".",
"REDEMPTIONS_RESOU... | Deletes a specific redemption.
@param accountCode recurly account id
@param redemptionUuid recurly coupon redemption uuid | [
"Deletes",
"a",
"specific",
"redemption",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1721-L1723 |
107,434 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.generateUniqueCodes | public void generateUniqueCodes(final String couponCode, final Coupon coupon) {
doPOST(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.GENERATE_RESOURCE,
coupon, null);
} | java | public void generateUniqueCodes(final String couponCode, final Coupon coupon) {
doPOST(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.GENERATE_RESOURCE,
coupon, null);
} | [
"public",
"void",
"generateUniqueCodes",
"(",
"final",
"String",
"couponCode",
",",
"final",
"Coupon",
"coupon",
")",
"{",
"doPOST",
"(",
"Coupon",
".",
"COUPON_RESOURCE",
"+",
"\"/\"",
"+",
"couponCode",
"+",
"Coupon",
".",
"GENERATE_RESOURCE",
",",
"coupon",
... | Generates unique codes for a bulk coupon.
@param couponCode recurly coupon code (must have been created as type: bulk)
@param coupon A coupon with number of unique codes set | [
"Generates",
"unique",
"codes",
"for",
"a",
"bulk",
"coupon",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1731-L1734 |
107,435 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getUniqueCouponCodes | public Coupons getUniqueCouponCodes(final String couponCode, final QueryParams params) {
return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.UNIQUE_CODES_RESOURCE,
Coupons.class, params);
} | java | public Coupons getUniqueCouponCodes(final String couponCode, final QueryParams params) {
return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.UNIQUE_CODES_RESOURCE,
Coupons.class, params);
} | [
"public",
"Coupons",
"getUniqueCouponCodes",
"(",
"final",
"String",
"couponCode",
",",
"final",
"QueryParams",
"params",
")",
"{",
"return",
"doGET",
"(",
"Coupon",
".",
"COUPON_RESOURCE",
"+",
"\"/\"",
"+",
"couponCode",
"+",
"Coupon",
".",
"UNIQUE_CODES_RESOURC... | Lookup all unique codes for a bulk coupon given query params.
@param couponCode String coupon code
@param params {@link QueryParams}
@return the unique coupon codes for the coupon code on success, null otherwise | [
"Lookup",
"all",
"unique",
"codes",
"for",
"a",
"bulk",
"coupon",
"given",
"query",
"params",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1743-L1746 |
107,436 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.getGiftCardsCount | public Integer getGiftCardsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(GiftCards.GIFT_CARDS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | java | public Integer getGiftCardsCount(final QueryParams params) {
FluentCaseInsensitiveStringsMap map = doHEAD(GiftCards.GIFT_CARDS_RESOURCE, params);
return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
} | [
"public",
"Integer",
"getGiftCardsCount",
"(",
"final",
"QueryParams",
"params",
")",
"{",
"FluentCaseInsensitiveStringsMap",
"map",
"=",
"doHEAD",
"(",
"GiftCards",
".",
"GIFT_CARDS_RESOURCE",
",",
"params",
")",
";",
"return",
"Integer",
".",
"parseInt",
"(",
"m... | Get number of GiftCards matching the query params
@param params {@link QueryParams}
@return Integer on success, null otherwise | [
"Get",
"number",
"of",
"GiftCards",
"matching",
"the",
"query",
"params"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1819-L1822 |
107,437 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/model/push/Notification.java | Notification.detect | public static Type detect(final String payload) {
final Matcher m = ROOT_NAME.matcher(payload);
if (m.find() && m.groupCount() >= 1) {
final String root = m.group(1);
try {
return Type.valueOf(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, root));
... | java | public static Type detect(final String payload) {
final Matcher m = ROOT_NAME.matcher(payload);
if (m.find() && m.groupCount() >= 1) {
final String root = m.group(1);
try {
return Type.valueOf(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, root));
... | [
"public",
"static",
"Type",
"detect",
"(",
"final",
"String",
"payload",
")",
"{",
"final",
"Matcher",
"m",
"=",
"ROOT_NAME",
".",
"matcher",
"(",
"payload",
")",
";",
"if",
"(",
"m",
".",
"find",
"(",
")",
"&&",
"m",
".",
"groupCount",
"(",
")",
"... | Detect notification type based on the xml root name.
@param payload
@return notification type or null if root name is not found or if there
is no type corresponding to the root name | [
"Detect",
"notification",
"type",
"based",
"on",
"the",
"xml",
"root",
"name",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/model/push/Notification.java#L127-L140 |
107,438 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/model/GiftCard.java | GiftCard.createRedemption | public static GiftCard.Redemption createRedemption(String accountCode) {
Redemption redemption = new Redemption();
redemption.setAccountCode(accountCode);
return redemption;
} | java | public static GiftCard.Redemption createRedemption(String accountCode) {
Redemption redemption = new Redemption();
redemption.setAccountCode(accountCode);
return redemption;
} | [
"public",
"static",
"GiftCard",
".",
"Redemption",
"createRedemption",
"(",
"String",
"accountCode",
")",
"{",
"Redemption",
"redemption",
"=",
"new",
"Redemption",
"(",
")",
";",
"redemption",
".",
"setAccountCode",
"(",
"accountCode",
")",
";",
"return",
"rede... | Builds a redemption request
@param accountCode Account code to redeem
@return gift card redemption data for an account | [
"Builds",
"a",
"redemption",
"request"
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/model/GiftCard.java#L171-L175 |
107,439 | killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/model/Invoice.java | Invoice.getOriginalInvoice | public Invoice getOriginalInvoice() {
if (originalInvoice != null && originalInvoice.getHref() != null && !originalInvoice.getHref().isEmpty()) {
originalInvoice = fetch(originalInvoice, Invoice.class);
}
return originalInvoice;
} | java | public Invoice getOriginalInvoice() {
if (originalInvoice != null && originalInvoice.getHref() != null && !originalInvoice.getHref().isEmpty()) {
originalInvoice = fetch(originalInvoice, Invoice.class);
}
return originalInvoice;
} | [
"public",
"Invoice",
"getOriginalInvoice",
"(",
")",
"{",
"if",
"(",
"originalInvoice",
"!=",
"null",
"&&",
"originalInvoice",
".",
"getHref",
"(",
")",
"!=",
"null",
"&&",
"!",
"originalInvoice",
".",
"getHref",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
... | Fetches the original invoice if the href is populated, otherwise return the current original invoice.
@return fully loaded original invoice | [
"Fetches",
"the",
"original",
"invoice",
"if",
"the",
"href",
"is",
"populated",
"otherwise",
"return",
"the",
"current",
"original",
"invoice",
"."
] | 5e05eedd91885a51e1aa8293bd41139d082cf7f4 | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/model/Invoice.java#L169-L174 |
107,440 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsWKT.java | ST_AsWKT.asWKT | public static String asWKT(Geometry geometry) {
if(geometry==null) {
return null;
}
WKTWriter wktWriter = new WKTWriter();
return wktWriter.write(geometry);
} | java | public static String asWKT(Geometry geometry) {
if(geometry==null) {
return null;
}
WKTWriter wktWriter = new WKTWriter();
return wktWriter.write(geometry);
} | [
"public",
"static",
"String",
"asWKT",
"(",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"geometry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"WKTWriter",
"wktWriter",
"=",
"new",
"WKTWriter",
"(",
")",
";",
"return",
"wktWriter",
".",
"write"... | Convert a Geometry value into a Well Known Text value.
@param geometry Geometry instance
@return The String representation | [
"Convert",
"a",
"Geometry",
"value",
"into",
"a",
"Well",
"Known",
"Text",
"value",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsWKT.java#L49-L55 |
107,441 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_MultiplyZ.java | ST_MultiplyZ.multiplyZ | public static Geometry multiplyZ(Geometry geometry, double z) throws SQLException {
if(geometry == null){
return null;
}
geometry.apply(new MultiplyZCoordinateSequenceFilter(z));
return geometry;
} | java | public static Geometry multiplyZ(Geometry geometry, double z) throws SQLException {
if(geometry == null){
return null;
}
geometry.apply(new MultiplyZCoordinateSequenceFilter(z));
return geometry;
} | [
"public",
"static",
"Geometry",
"multiplyZ",
"(",
"Geometry",
"geometry",
",",
"double",
"z",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"geometry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"geometry",
".",
"apply",
"(",
"new",
"MultiplyZCoo... | Multiply the z values of the geometry by another double value. NaN values
are not updated.
@param geometry
@param z
@return
@throws java.sql.SQLException | [
"Multiply",
"the",
"z",
"values",
"of",
"the",
"geometry",
"by",
"another",
"double",
"value",
".",
"NaN",
"values",
"are",
"not",
"updated",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_MultiplyZ.java#L56-L62 |
107,442 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java | SHPDriver.insertRow | @Override
public void insertRow(Object[] values) throws IOException {
if(!(values[geometryFieldIndex] instanceof Geometry)) {
if(values[geometryFieldIndex]==null) {
throw new IOException("Shape files do not support NULL Geometry values.");
} else {
thr... | java | @Override
public void insertRow(Object[] values) throws IOException {
if(!(values[geometryFieldIndex] instanceof Geometry)) {
if(values[geometryFieldIndex]==null) {
throw new IOException("Shape files do not support NULL Geometry values.");
} else {
thr... | [
"@",
"Override",
"public",
"void",
"insertRow",
"(",
"Object",
"[",
"]",
"values",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"(",
"values",
"[",
"geometryFieldIndex",
"]",
"instanceof",
"Geometry",
")",
")",
"{",
"if",
"(",
"values",
"[",
"geome... | Insert values in the row
@param values
@throws IOException | [
"Insert",
"values",
"in",
"the",
"row"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java#L71-L93 |
107,443 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java | SHPDriver.initDriver | public void initDriver(File shpFile, ShapeType shapeType, DbaseFileHeader dbaseHeader) throws IOException {
String path = shpFile.getAbsolutePath();
String nameWithoutExt = path.substring(0,path.lastIndexOf('.'));
this.shpFile = new File(nameWithoutExt+".shp");
this.shxFile = new File(na... | java | public void initDriver(File shpFile, ShapeType shapeType, DbaseFileHeader dbaseHeader) throws IOException {
String path = shpFile.getAbsolutePath();
String nameWithoutExt = path.substring(0,path.lastIndexOf('.'));
this.shpFile = new File(nameWithoutExt+".shp");
this.shxFile = new File(na... | [
"public",
"void",
"initDriver",
"(",
"File",
"shpFile",
",",
"ShapeType",
"shapeType",
",",
"DbaseFileHeader",
"dbaseHeader",
")",
"throws",
"IOException",
"{",
"String",
"path",
"=",
"shpFile",
".",
"getAbsolutePath",
"(",
")",
";",
"String",
"nameWithoutExt",
... | Init Driver for Write mode
@param shpFile
@param shapeType
@param dbaseHeader
@throws IOException | [
"Init",
"Driver",
"for",
"Write",
"mode"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java#L109-L121 |
107,444 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java | ST_CollectionExtract.getPunctualGeometry | private static void getPunctualGeometry(ArrayList<Point> points, Geometry geometry) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if(subGeom instanceof Point){
points.add((Point) subGeom);
}
... | java | private static void getPunctualGeometry(ArrayList<Point> points, Geometry geometry) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if(subGeom instanceof Point){
points.add((Point) subGeom);
}
... | [
"private",
"static",
"void",
"getPunctualGeometry",
"(",
"ArrayList",
"<",
"Point",
">",
"points",
",",
"Geometry",
"geometry",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"geometry",
".",
"getNumGeometries",
"(",
")",
";",
"i",
"++",
")... | Filter point from a geometry
@param points
@param geometry | [
"Filter",
"point",
"from",
"a",
"geometry"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L106-L116 |
107,445 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java | ST_CollectionExtract.getLinealGeometry | private static void getLinealGeometry(ArrayList<LineString> lines, Geometry geometry) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if(subGeom instanceof LineString){
lines.add((LineString) subGeom);
}
... | java | private static void getLinealGeometry(ArrayList<LineString> lines, Geometry geometry) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if(subGeom instanceof LineString){
lines.add((LineString) subGeom);
}
... | [
"private",
"static",
"void",
"getLinealGeometry",
"(",
"ArrayList",
"<",
"LineString",
">",
"lines",
",",
"Geometry",
"geometry",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"geometry",
".",
"getNumGeometries",
"(",
")",
";",
"i",
"++",
... | Filter line from a geometry
@param lines
@param geometry | [
"Filter",
"line",
"from",
"a",
"geometry"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L123-L133 |
107,446 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java | ST_CollectionExtract.getArealGeometry | private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if(subGeom instanceof Polygon){
polygones.add((Polygon) subGeom);
}
... | java | private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if(subGeom instanceof Polygon){
polygones.add((Polygon) subGeom);
}
... | [
"private",
"static",
"void",
"getArealGeometry",
"(",
"ArrayList",
"<",
"Polygon",
">",
"polygones",
",",
"Geometry",
"geometry",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"geometry",
".",
"getNumGeometries",
"(",
")",
";",
"i",
"++",
... | Filter polygon from a geometry
@param polygones
@param geometry | [
"Filter",
"polygon",
"from",
"a",
"geometry"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L140-L150 |
107,447 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsGML.java | ST_AsGML.toGML | public static String toGML(Geometry geom) {
if (geom == null) {
return null;
}
int srid = geom.getSRID();
GMLWriter gmlw = new GMLWriter();
if (srid != -1 || srid != 0) {
gmlw.setSrsName("EPSG:" + geom.getSRID());
}
return gmlw.write(geom);... | java | public static String toGML(Geometry geom) {
if (geom == null) {
return null;
}
int srid = geom.getSRID();
GMLWriter gmlw = new GMLWriter();
if (srid != -1 || srid != 0) {
gmlw.setSrsName("EPSG:" + geom.getSRID());
}
return gmlw.write(geom);... | [
"public",
"static",
"String",
"toGML",
"(",
"Geometry",
"geom",
")",
"{",
"if",
"(",
"geom",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"srid",
"=",
"geom",
".",
"getSRID",
"(",
")",
";",
"GMLWriter",
"gmlw",
"=",
"new",
"GMLWriter",
... | Write the GML
@param geom
@return | [
"Write",
"the",
"GML"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsGML.java#L48-L58 |
107,448 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ProjectPoint.java | ST_ProjectPoint.projectPoint | public static Point projectPoint(Geometry point, Geometry geometry) {
if (point == null || geometry==null) {
return null;
}
if (point.getDimension()==0 && geometry.getDimension() == 1) {
LengthIndexedLine ll = new LengthIndexedLine(geometry);
double index = ll... | java | public static Point projectPoint(Geometry point, Geometry geometry) {
if (point == null || geometry==null) {
return null;
}
if (point.getDimension()==0 && geometry.getDimension() == 1) {
LengthIndexedLine ll = new LengthIndexedLine(geometry);
double index = ll... | [
"public",
"static",
"Point",
"projectPoint",
"(",
"Geometry",
"point",
",",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"point",
"==",
"null",
"||",
"geometry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"point",
".",
"getDimension",... | Project a point on a linestring or multilinestring
@param point
@param geometry
@return | [
"Project",
"a",
"point",
"on",
"a",
"linestring",
"or",
"multilinestring"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ProjectPoint.java#L52-L63 |
107,449 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleContouring.java | ST_TriangleContouring.triangleContouring | public static ResultSet triangleContouring(Connection connection, String tableName, Value... varArgs) throws SQLException {
if (connection.getMetaData().getURL().equals(HACK_URL)) {
return new ExplodeResultSet(connection,tableName, Collections.singletonList(0.0)).getResultSet();
}
Ex... | java | public static ResultSet triangleContouring(Connection connection, String tableName, Value... varArgs) throws SQLException {
if (connection.getMetaData().getURL().equals(HACK_URL)) {
return new ExplodeResultSet(connection,tableName, Collections.singletonList(0.0)).getResultSet();
}
Ex... | [
"public",
"static",
"ResultSet",
"triangleContouring",
"(",
"Connection",
"connection",
",",
"String",
"tableName",
",",
"Value",
"...",
"varArgs",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"connection",
".",
"getMetaData",
"(",
")",
".",
"getURL",
"(",
"... | Iso contouring using Z,M attributes of geometries
@param connection Active connection
@param tableName Table name
@param varArgs Iso levels
@return Result Set
@throws SQLException | [
"Iso",
"contouring",
"using",
"Z",
"M",
"attributes",
"of",
"geometries"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleContouring.java#L83-L117 |
107,450 | orbisgis/h2gis | h2gis-network/src/main/java/org/h2gis/network/functions/ST_ConnectedComponents.java | ST_ConnectedComponents.getConnectedComponents | public static boolean getConnectedComponents(Connection connection,
String inputTable,
String orientation) throws SQLException {
KeyedGraph graph = prepareGraph(connection, inputTable, orientation, null,
... | java | public static boolean getConnectedComponents(Connection connection,
String inputTable,
String orientation) throws SQLException {
KeyedGraph graph = prepareGraph(connection, inputTable, orientation, null,
... | [
"public",
"static",
"boolean",
"getConnectedComponents",
"(",
"Connection",
"connection",
",",
"String",
"inputTable",
",",
"String",
"orientation",
")",
"throws",
"SQLException",
"{",
"KeyedGraph",
"graph",
"=",
"prepareGraph",
"(",
"connection",
",",
"inputTable",
... | Calculate the node and edge connected component tables.
@param connection Connection
@param inputTable Edges table produced by ST_Graph
@param orientation Orientation string
@return True if the calculation was successful
@throws SQLException | [
"Calculate",
"the",
"node",
"and",
"edge",
"connected",
"component",
"tables",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/ST_ConnectedComponents.java#L91-L111 |
107,451 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeLine.java | ST_MakeLine.createLine | public static LineString createLine(Geometry pointA, Geometry... optionalPoints) throws SQLException {
if( pointA == null || optionalPoints.length > 0 && optionalPoints[0] == null) {
return null;
}
if (pointA.getNumGeometries() == 1 && !atLeastTwoPoints(optionalPoints, countPoints(po... | java | public static LineString createLine(Geometry pointA, Geometry... optionalPoints) throws SQLException {
if( pointA == null || optionalPoints.length > 0 && optionalPoints[0] == null) {
return null;
}
if (pointA.getNumGeometries() == 1 && !atLeastTwoPoints(optionalPoints, countPoints(po... | [
"public",
"static",
"LineString",
"createLine",
"(",
"Geometry",
"pointA",
",",
"Geometry",
"...",
"optionalPoints",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"pointA",
"==",
"null",
"||",
"optionalPoints",
".",
"length",
">",
"0",
"&&",
"optionalPoints",
... | Constructs a LINESTRING from the given POINTs or MULTIPOINTs
@param pointA The first POINT or MULTIPOINT
@param optionalPoints Optional POINTs or MULTIPOINTs
@return The LINESTRING constructed from the given POINTs or MULTIPOINTs
@throws SQLException | [
"Constructs",
"a",
"LINESTRING",
"from",
"the",
"given",
"POINTs",
"or",
"MULTIPOINTs"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeLine.java#L57-L71 |
107,452 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserRte.java | AbstractGpxParserRte.initialise | public void initialise(XMLReader reader, AbstractGpxParserDefault parent) {
setReader(reader);
setParent(parent);
setContentBuffer(parent.getContentBuffer());
setRtePreparedStmt(parent.getRtePreparedStmt());
setRteptPreparedStmt(parent.getRteptPreparedStmt());
setElementN... | java | public void initialise(XMLReader reader, AbstractGpxParserDefault parent) {
setReader(reader);
setParent(parent);
setContentBuffer(parent.getContentBuffer());
setRtePreparedStmt(parent.getRtePreparedStmt());
setRteptPreparedStmt(parent.getRteptPreparedStmt());
setElementN... | [
"public",
"void",
"initialise",
"(",
"XMLReader",
"reader",
",",
"AbstractGpxParserDefault",
"parent",
")",
"{",
"setReader",
"(",
"reader",
")",
";",
"setParent",
"(",
"parent",
")",
";",
"setContentBuffer",
"(",
"parent",
".",
"getContentBuffer",
"(",
")",
"... | Create a new specific parser. It has in memory the default parser, the
contentBuffer, the elementNames, the currentLine and the rteID.
@param reader The XMLReader used in the default class
@param parent The parser used in the default class | [
"Create",
"a",
"new",
"specific",
"parser",
".",
"It",
"has",
"in",
"memory",
"the",
"default",
"parser",
"the",
"contentBuffer",
"the",
"elementNames",
"the",
"currentLine",
"and",
"the",
"rteID",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserRte.java#L58-L67 |
107,453 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXCoordinate.java | GPXCoordinate.createCoordinate | public static Coordinate createCoordinate(Attributes attributes) throws NumberFormatException {
// Associate a latitude and a longitude to the point
double lat;
double lon;
try {
lat = Double.parseDouble(attributes.getValue(GPXTags.LAT));
} catch (NumberFormatExceptio... | java | public static Coordinate createCoordinate(Attributes attributes) throws NumberFormatException {
// Associate a latitude and a longitude to the point
double lat;
double lon;
try {
lat = Double.parseDouble(attributes.getValue(GPXTags.LAT));
} catch (NumberFormatExceptio... | [
"public",
"static",
"Coordinate",
"createCoordinate",
"(",
"Attributes",
"attributes",
")",
"throws",
"NumberFormatException",
"{",
"// Associate a latitude and a longitude to the point",
"double",
"lat",
";",
"double",
"lon",
";",
"try",
"{",
"lat",
"=",
"Double",
".",... | General method to create a coordinate from a gpx point.
@param attributes Attributes of the point. Here it is latitude and
longitude
@throws NumberFormatException
@return a coordinate | [
"General",
"method",
"to",
"create",
"a",
"coordinate",
"from",
"a",
"gpx",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXCoordinate.java#L40-L65 |
107,454 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_XMin.java | ST_XMin.getMinX | public static Double getMinX(Geometry geom) {
if (geom != null) {
return geom.getEnvelopeInternal().getMinX();
} else {
return null;
}
} | java | public static Double getMinX(Geometry geom) {
if (geom != null) {
return geom.getEnvelopeInternal().getMinX();
} else {
return null;
}
} | [
"public",
"static",
"Double",
"getMinX",
"(",
"Geometry",
"geom",
")",
"{",
"if",
"(",
"geom",
"!=",
"null",
")",
"{",
"return",
"geom",
".",
"getEnvelopeInternal",
"(",
")",
".",
"getMinX",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}"... | Returns the minimal x-value of the given geometry.
@param geom Geometry
@return The minimal x-value of the given geometry, or null if the geometry is null. | [
"Returns",
"the",
"minimal",
"x",
"-",
"value",
"of",
"the",
"given",
"geometry",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_XMin.java#L48-L54 |
107,455 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java | ST_MakePoint.createPoint | public static Point createPoint(double x, double y) throws SQLException {
return createPoint(x, y, Coordinate.NULL_ORDINATE);
} | java | public static Point createPoint(double x, double y) throws SQLException {
return createPoint(x, y, Coordinate.NULL_ORDINATE);
} | [
"public",
"static",
"Point",
"createPoint",
"(",
"double",
"x",
",",
"double",
"y",
")",
"throws",
"SQLException",
"{",
"return",
"createPoint",
"(",
"x",
",",
"y",
",",
"Coordinate",
".",
"NULL_ORDINATE",
")",
";",
"}"
] | Constructs POINT from two doubles.
@param x X-coordinate
@param y Y-coordinate
@return The POINT constructed from the given coordinatesk
@throws java.sql.SQLException | [
"Constructs",
"POINT",
"from",
"two",
"doubles",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java#L56-L58 |
107,456 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java | ST_MakePoint.createPoint | public static Point createPoint(double x, double y, double z) throws SQLException {
return GF.createPoint(new Coordinate(x, y, z));
} | java | public static Point createPoint(double x, double y, double z) throws SQLException {
return GF.createPoint(new Coordinate(x, y, z));
} | [
"public",
"static",
"Point",
"createPoint",
"(",
"double",
"x",
",",
"double",
"y",
",",
"double",
"z",
")",
"throws",
"SQLException",
"{",
"return",
"GF",
".",
"createPoint",
"(",
"new",
"Coordinate",
"(",
"x",
",",
"y",
",",
"z",
")",
")",
";",
"}"... | Constructs POINT from three doubles.
@param x X-coordinate
@param y Y-coordinate
@param z Z-coordinate
@return The POINT constructed from the given coordinates
@throws SQLException | [
"Constructs",
"POINT",
"from",
"three",
"doubles",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java#L69-L71 |
107,457 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setAttribute | public final void setAttribute(String currentElement, StringBuilder contentBuffer) {
if (currentElement.equalsIgnoreCase(GPXTags.TIME)) {
setTime(contentBuffer);
} else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) {
setMagvar(contentBuffer);
} else if (currentElem... | java | public final void setAttribute(String currentElement, StringBuilder contentBuffer) {
if (currentElement.equalsIgnoreCase(GPXTags.TIME)) {
setTime(contentBuffer);
} else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) {
setMagvar(contentBuffer);
} else if (currentElem... | [
"public",
"final",
"void",
"setAttribute",
"(",
"String",
"currentElement",
",",
"StringBuilder",
"contentBuffer",
")",
"{",
"if",
"(",
"currentElement",
".",
"equalsIgnoreCase",
"(",
"GPXTags",
".",
"TIME",
")",
")",
"{",
"setTime",
"(",
"contentBuffer",
")",
... | Set an attribute for a point. The String currentElement gives the
information of which attribute have to be setted. The attribute to set is
given by the StringBuilder contentBuffer.
@param currentElement a string presenting the text of the current markup.
@param contentBuffer it contains all informations about the cur... | [
"Set",
"an",
"attribute",
"for",
"a",
"point",
".",
"The",
"String",
"currentElement",
"gives",
"the",
"information",
"of",
"which",
"attribute",
"have",
"to",
"be",
"setted",
".",
"The",
"attribute",
"to",
"set",
"is",
"given",
"by",
"the",
"StringBuilder",... | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L61-L97 |
107,458 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setLink | public final void setLink(Attributes attributes) {
ptValues[GpxMetadata.PTLINK] = attributes.getValue(GPXTags.HREF);
} | java | public final void setLink(Attributes attributes) {
ptValues[GpxMetadata.PTLINK] = attributes.getValue(GPXTags.HREF);
} | [
"public",
"final",
"void",
"setLink",
"(",
"Attributes",
"attributes",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTLINK",
"]",
"=",
"attributes",
".",
"getValue",
"(",
"GPXTags",
".",
"HREF",
")",
";",
"}"
] | Set a link to additional information about the point.
@param attributes The current attributes being parsed | [
"Set",
"a",
"link",
"to",
"additional",
"information",
"about",
"the",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L180-L182 |
107,459 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setSat | public final void setSat(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTSAT] = Integer.parseInt(contentBuffer.toString());
} | java | public final void setSat(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTSAT] = Integer.parseInt(contentBuffer.toString());
} | [
"public",
"final",
"void",
"setSat",
"(",
"StringBuilder",
"contentBuffer",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTSAT",
"]",
"=",
"Integer",
".",
"parseInt",
"(",
"contentBuffer",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Set the number of satellites used to calculate the GPX fix for a point.
@param contentBuffer Contains the information to put in the table | [
"Set",
"the",
"number",
"of",
"satellites",
"used",
"to",
"calculate",
"the",
"GPX",
"fix",
"for",
"a",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L234-L236 |
107,460 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setHdop | public final void setHdop(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTHDOP] = Double.parseDouble(contentBuffer.toString());
} | java | public final void setHdop(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTHDOP] = Double.parseDouble(contentBuffer.toString());
} | [
"public",
"final",
"void",
"setHdop",
"(",
"StringBuilder",
"contentBuffer",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTHDOP",
"]",
"=",
"Double",
".",
"parseDouble",
"(",
"contentBuffer",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Set the horizontal dilution of precision of a point.
@param contentBuffer Contains the information to put in the table | [
"Set",
"the",
"horizontal",
"dilution",
"of",
"precision",
"of",
"a",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L243-L245 |
107,461 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setVdop | public final void setVdop(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTVDOP] = Double.parseDouble(contentBuffer.toString());
} | java | public final void setVdop(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTVDOP] = Double.parseDouble(contentBuffer.toString());
} | [
"public",
"final",
"void",
"setVdop",
"(",
"StringBuilder",
"contentBuffer",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTVDOP",
"]",
"=",
"Double",
".",
"parseDouble",
"(",
"contentBuffer",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Set the vertical dilution of precision of a point.
@param contentBuffer Contains the information to put in the table | [
"Set",
"the",
"vertical",
"dilution",
"of",
"precision",
"of",
"a",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L252-L254 |
107,462 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setPdop | public final void setPdop(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTPDOP] = Double.parseDouble(contentBuffer.toString());
} | java | public final void setPdop(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTPDOP] = Double.parseDouble(contentBuffer.toString());
} | [
"public",
"final",
"void",
"setPdop",
"(",
"StringBuilder",
"contentBuffer",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTPDOP",
"]",
"=",
"Double",
".",
"parseDouble",
"(",
"contentBuffer",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Set the position dilution of precision of a point.
@param contentBuffer Contains the information to put in the table | [
"Set",
"the",
"position",
"dilution",
"of",
"precision",
"of",
"a",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L261-L263 |
107,463 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setAgeofdgpsdata | public final void setAgeofdgpsdata(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTAGEOFDGPSDATA] = Double.parseDouble(contentBuffer.toString());
} | java | public final void setAgeofdgpsdata(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTAGEOFDGPSDATA] = Double.parseDouble(contentBuffer.toString());
} | [
"public",
"final",
"void",
"setAgeofdgpsdata",
"(",
"StringBuilder",
"contentBuffer",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTAGEOFDGPSDATA",
"]",
"=",
"Double",
".",
"parseDouble",
"(",
"contentBuffer",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Set number of seconds since last DGPS update for a point.
@param contentBuffer Contains the information to put in the table | [
"Set",
"number",
"of",
"seconds",
"since",
"last",
"DGPS",
"update",
"for",
"a",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L270-L272 |
107,464 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java | GPXPoint.setDgpsid | public final void setDgpsid(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTDGPSID] = Integer.parseInt(contentBuffer.toString());
} | java | public final void setDgpsid(StringBuilder contentBuffer) {
ptValues[GpxMetadata.PTDGPSID] = Integer.parseInt(contentBuffer.toString());
} | [
"public",
"final",
"void",
"setDgpsid",
"(",
"StringBuilder",
"contentBuffer",
")",
"{",
"ptValues",
"[",
"GpxMetadata",
".",
"PTDGPSID",
"]",
"=",
"Integer",
".",
"parseInt",
"(",
"contentBuffer",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Set ID of DGPS station used in differential correction for a point.
@param contentBuffer Contains the information to put in the table | [
"Set",
"ID",
"of",
"DGPS",
"station",
"used",
"in",
"differential",
"correction",
"for",
"a",
"point",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L279-L281 |
107,465 | orbisgis/h2gis | h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java | GraphFunctionParser.parseGlobalOrientation | protected static Orientation parseGlobalOrientation(String v) {
if (v == null) {
return null;
}
if (isDirectedString(v)) {
return Orientation.DIRECTED;
} else if (isReversedString(v)) {
return Orientation.REVERSED;
} else if (isUndirectedString... | java | protected static Orientation parseGlobalOrientation(String v) {
if (v == null) {
return null;
}
if (isDirectedString(v)) {
return Orientation.DIRECTED;
} else if (isReversedString(v)) {
return Orientation.REVERSED;
} else if (isUndirectedString... | [
"protected",
"static",
"Orientation",
"parseGlobalOrientation",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"v",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"isDirectedString",
"(",
"v",
")",
")",
"{",
"return",
"Orientation",
".",
"DIREC... | Recovers the global orientation from a string.
@param v String
@return The global orientation | [
"Recovers",
"the",
"global",
"orientation",
"from",
"a",
"string",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java#L71-L84 |
107,466 | orbisgis/h2gis | h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java | GraphFunctionParser.parseEdgeOrientation | protected String parseEdgeOrientation(String v) {
if (v == null) {
return null;
}
if (!v.contains(SEPARATOR)) {
throw new IllegalArgumentException(ORIENTATION_ERROR);
}
// Extract the global and edge orientations.
String[] s = v.split(SEPARATOR);
... | java | protected String parseEdgeOrientation(String v) {
if (v == null) {
return null;
}
if (!v.contains(SEPARATOR)) {
throw new IllegalArgumentException(ORIENTATION_ERROR);
}
// Extract the global and edge orientations.
String[] s = v.split(SEPARATOR);
... | [
"protected",
"String",
"parseEdgeOrientation",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"v",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"!",
"v",
".",
"contains",
"(",
"SEPARATOR",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentExce... | Recovers the edge orientation from a string.
@param v String
@return The edge orientation | [
"Recovers",
"the",
"edge",
"orientation",
"from",
"a",
"string",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java#L125-L141 |
107,467 | orbisgis/h2gis | h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java | GraphFunctionParser.parseDestinationsString | public static int[] parseDestinationsString(String s) {
if (!s.contains(",")) {
return new int[]{Integer.valueOf(s.trim())};
}
String[] array = s.split(",");
int[] destinations = new int[array.length];
for (int i = 0; i < destinations.length; i++) {
final ... | java | public static int[] parseDestinationsString(String s) {
if (!s.contains(",")) {
return new int[]{Integer.valueOf(s.trim())};
}
String[] array = s.split(",");
int[] destinations = new int[array.length];
for (int i = 0; i < destinations.length; i++) {
final ... | [
"public",
"static",
"int",
"[",
"]",
"parseDestinationsString",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"!",
"s",
".",
"contains",
"(",
"\",\"",
")",
")",
"{",
"return",
"new",
"int",
"[",
"]",
"{",
"Integer",
".",
"valueOf",
"(",
"s",
".",
"trim"... | Returns an array of destination ids from a comma-separated list of
destinations.
@param s Comma-separated list of destinations
@return An array of destination ids | [
"Returns",
"an",
"array",
"of",
"destination",
"ids",
"from",
"a",
"comma",
"-",
"separated",
"list",
"of",
"destinations",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java#L225-L239 |
107,468 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserTrk.java | AbstractGpxParserTrk.initialise | public void initialise(XMLReader reader, AbstractGpxParserDefault parent) {
setReader(reader);
setParent(parent);
setContentBuffer(parent.getContentBuffer());
setTrkPreparedStmt(parent.getTrkPreparedStmt());
setTrkSegmentsPreparedStmt(parent.getTrkSegmentsPreparedStmt());
... | java | public void initialise(XMLReader reader, AbstractGpxParserDefault parent) {
setReader(reader);
setParent(parent);
setContentBuffer(parent.getContentBuffer());
setTrkPreparedStmt(parent.getTrkPreparedStmt());
setTrkSegmentsPreparedStmt(parent.getTrkSegmentsPreparedStmt());
... | [
"public",
"void",
"initialise",
"(",
"XMLReader",
"reader",
",",
"AbstractGpxParserDefault",
"parent",
")",
"{",
"setReader",
"(",
"reader",
")",
";",
"setParent",
"(",
"parent",
")",
";",
"setContentBuffer",
"(",
"parent",
".",
"getContentBuffer",
"(",
")",
"... | Create a new specific parser. It has in memory the default parser, the
contentBuffer, the elementNames, the currentLine and the trkID.
@param reader The XMLReader used in the default class
@param parent The parser used in the default class | [
"Create",
"a",
"new",
"specific",
"parser",
".",
"It",
"has",
"in",
"memory",
"the",
"default",
"parser",
"the",
"contentBuffer",
"the",
"elementNames",
"the",
"currentLine",
"and",
"the",
"trkID",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserTrk.java#L66-L77 |
107,469 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_GeomFromGeoJSON.java | ST_GeomFromGeoJSON.geomFromGeoJSON | public static Geometry geomFromGeoJSON(String geojson) throws IOException, SQLException {
if (geojson == null) {
return null;
}
if (jsFactory == null) {
jsFactory = new JsonFactory();
jsFactory.configure(JsonParser.Feature.ALLOW_COMMENTS, true);
js... | java | public static Geometry geomFromGeoJSON(String geojson) throws IOException, SQLException {
if (geojson == null) {
return null;
}
if (jsFactory == null) {
jsFactory = new JsonFactory();
jsFactory.configure(JsonParser.Feature.ALLOW_COMMENTS, true);
js... | [
"public",
"static",
"Geometry",
"geomFromGeoJSON",
"(",
"String",
"geojson",
")",
"throws",
"IOException",
",",
"SQLException",
"{",
"if",
"(",
"geojson",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"jsFactory",
"==",
"null",
")",
"{",
... | Convert a geojson geometry to geometry.
@param geojson
@return
@throws java.io.IOException
@throws java.sql.SQLException | [
"Convert",
"a",
"geojson",
"geometry",
"to",
"geometry",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_GeomFromGeoJSON.java#L58-L71 |
107,470 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java | ST_Perimeter.perimeter | public static Double perimeter(Geometry geometry){
if(geometry==null){
return null;
}
if(geometry.getDimension()<2){
return 0d;
}
return computePerimeter(geometry);
} | java | public static Double perimeter(Geometry geometry){
if(geometry==null){
return null;
}
if(geometry.getDimension()<2){
return 0d;
}
return computePerimeter(geometry);
} | [
"public",
"static",
"Double",
"perimeter",
"(",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"geometry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"geometry",
".",
"getDimension",
"(",
")",
"<",
"2",
")",
"{",
"return",
"0d",
";"... | Compute the perimeter of a polygon or a multipolygon.
@param geometry
@return | [
"Compute",
"the",
"perimeter",
"of",
"a",
"polygon",
"or",
"a",
"multipolygon",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java#L50-L58 |
107,471 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java | ST_Perimeter.computePerimeter | private static double computePerimeter(Geometry geometry) {
double sum = 0;
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if (subGeom instanceof Polygon) {
sum += ((Polygon) subGeom).getExteriorRing().getLengt... | java | private static double computePerimeter(Geometry geometry) {
double sum = 0;
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry subGeom = geometry.getGeometryN(i);
if (subGeom instanceof Polygon) {
sum += ((Polygon) subGeom).getExteriorRing().getLengt... | [
"private",
"static",
"double",
"computePerimeter",
"(",
"Geometry",
"geometry",
")",
"{",
"double",
"sum",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"geometry",
".",
"getNumGeometries",
"(",
")",
";",
"i",
"++",
")",
"{",
"Geome... | Compute the perimeter
@param geometry
@return | [
"Compute",
"the",
"perimeter"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_Perimeter.java#L65-L74 |
107,472 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMin.java | ST_YMin.getMinY | public static Double getMinY(Geometry geom) {
if (geom != null) {
return geom.getEnvelopeInternal().getMinY();
} else {
return null;
}
} | java | public static Double getMinY(Geometry geom) {
if (geom != null) {
return geom.getEnvelopeInternal().getMinY();
} else {
return null;
}
} | [
"public",
"static",
"Double",
"getMinY",
"(",
"Geometry",
"geom",
")",
"{",
"if",
"(",
"geom",
"!=",
"null",
")",
"{",
"return",
"geom",
".",
"getEnvelopeInternal",
"(",
")",
".",
"getMinY",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}"... | Returns the minimal y-value of the given geometry.
@param geom Geometry
@return The minimal y-value of the given geometry, or null if the geometry is null. | [
"Returns",
"the",
"minimal",
"y",
"-",
"value",
"of",
"the",
"given",
"geometry",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMin.java#L48-L54 |
107,473 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_SimplifyPreserveTopology.java | ST_SimplifyPreserveTopology.simplyPreserve | public static Geometry simplyPreserve(Geometry geometry, double distance) {
if(geometry == null){
return null;
}
return TopologyPreservingSimplifier.simplify(geometry, distance);
} | java | public static Geometry simplyPreserve(Geometry geometry, double distance) {
if(geometry == null){
return null;
}
return TopologyPreservingSimplifier.simplify(geometry, distance);
} | [
"public",
"static",
"Geometry",
"simplyPreserve",
"(",
"Geometry",
"geometry",
",",
"double",
"distance",
")",
"{",
"if",
"(",
"geometry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"TopologyPreservingSimplifier",
".",
"simplify",
"(",
"geom... | Simplifies a geometry and ensures that the result is a valid geometry
having the same dimension and number of components as the input, and with
the components having the same topological relationship.
@param geometry
@param distance
@return | [
"Simplifies",
"a",
"geometry",
"and",
"ensures",
"that",
"the",
"result",
"is",
"a",
"valid",
"geometry",
"having",
"the",
"same",
"dimension",
"and",
"number",
"of",
"components",
"as",
"the",
"input",
"and",
"with",
"the",
"components",
"having",
"the",
"s... | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/generalize/ST_SimplifyPreserveTopology.java#L51-L56 |
107,474 | orbisgis/h2gis | h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunction.java | GraphFunction.prepareGraph | protected static KeyedGraph prepareGraph(Connection connection,
String inputTable,
String orientation,
String weight,
Class vertexClass,
... | java | protected static KeyedGraph prepareGraph(Connection connection,
String inputTable,
String orientation,
String weight,
Class vertexClass,
... | [
"protected",
"static",
"KeyedGraph",
"prepareGraph",
"(",
"Connection",
"connection",
",",
"String",
"inputTable",
",",
"String",
"orientation",
",",
"String",
"weight",
",",
"Class",
"vertexClass",
",",
"Class",
"edgeClass",
")",
"throws",
"SQLException",
"{",
"G... | Return a JGraphT graph from the input edges table.
@param connection Connection
@param inputTable Input table name
@param orientation Orientation string
@param weight Weight column name, null for unweighted graphs
@param vertexClass
@param edgeClass
@return Graph
@throws java.sql.SQLException | [
"Return",
"a",
"JGraphT",
"graph",
"from",
"the",
"input",
"edges",
"table",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunction.java#L50-L64 |
107,475 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java | GridRowSet.getCellPolygon | private Polygon getCellPolygon() {
final Coordinate[] summits = new Coordinate[5];
double x1 = minX + cellI * deltaX;
double y1 = minY + cellJ * deltaY;
double x2 = minX + (cellI + 1) * deltaX;
double y2 = minY + (cellJ + 1) * deltaY;
summits[0] = new Coordinate(x1, y1);
... | java | private Polygon getCellPolygon() {
final Coordinate[] summits = new Coordinate[5];
double x1 = minX + cellI * deltaX;
double y1 = minY + cellJ * deltaY;
double x2 = minX + (cellI + 1) * deltaX;
double y2 = minY + (cellJ + 1) * deltaY;
summits[0] = new Coordinate(x1, y1);
... | [
"private",
"Polygon",
"getCellPolygon",
"(",
")",
"{",
"final",
"Coordinate",
"[",
"]",
"summits",
"=",
"new",
"Coordinate",
"[",
"5",
"]",
";",
"double",
"x1",
"=",
"minX",
"+",
"cellI",
"*",
"deltaX",
";",
"double",
"y1",
"=",
"minY",
"+",
"cellJ",
... | Compute the polygon corresponding to the cell
@return Polygon of the cell | [
"Compute",
"the",
"polygon",
"corresponding",
"to",
"the",
"cell"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L143-L158 |
107,476 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java | GridRowSet.getCellPoint | private Point getCellPoint() {
double x1 = (minX + cellI * deltaX) + (deltaX / 2d);
double y1 = (minY + cellJ * deltaY) + (deltaY / 2d);
cellI++;
return GF.createPoint(new Coordinate(x1, y1));
} | java | private Point getCellPoint() {
double x1 = (minX + cellI * deltaX) + (deltaX / 2d);
double y1 = (minY + cellJ * deltaY) + (deltaY / 2d);
cellI++;
return GF.createPoint(new Coordinate(x1, y1));
} | [
"private",
"Point",
"getCellPoint",
"(",
")",
"{",
"double",
"x1",
"=",
"(",
"minX",
"+",
"cellI",
"*",
"deltaX",
")",
"+",
"(",
"deltaX",
"/",
"2d",
")",
";",
"double",
"y1",
"=",
"(",
"minY",
"+",
"cellJ",
"*",
"deltaY",
")",
"+",
"(",
"deltaY"... | Compute the point of the cell
@return Center point of the cell | [
"Compute",
"the",
"point",
"of",
"the",
"cell"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L165-L170 |
107,477 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java | GridRowSet.getFirstGeometryField | private static String getFirstGeometryField(String tableName, Connection connection) throws SQLException {
// Find first geometry column
List<String> geomFields = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData())));
if ... | java | private static String getFirstGeometryField(String tableName, Connection connection) throws SQLException {
// Find first geometry column
List<String> geomFields = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData())));
if ... | [
"private",
"static",
"String",
"getFirstGeometryField",
"(",
"String",
"tableName",
",",
"Connection",
"connection",
")",
"throws",
"SQLException",
"{",
"// Find first geometry column",
"List",
"<",
"String",
">",
"geomFields",
"=",
"SFSUtilities",
".",
"getGeometryFiel... | Return the first spatial geometry field name
@param tableName
@param connection
@return the name of the first geometry column
@throws SQLException | [
"Return",
"the",
"first",
"spatial",
"geometry",
"field",
"name"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L198-L206 |
107,478 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java | GridRowSet.initParameters | private void initParameters() {
this.minX = envelope.getMinX();
this.minY = envelope.getMinY();
double cellWidth = envelope.getWidth();
double cellHeight = envelope.getHeight();
this.maxI = (int) Math.ceil(cellWidth
/ deltaX);
this.maxJ = (int) Math.ceil(c... | java | private void initParameters() {
this.minX = envelope.getMinX();
this.minY = envelope.getMinY();
double cellWidth = envelope.getWidth();
double cellHeight = envelope.getHeight();
this.maxI = (int) Math.ceil(cellWidth
/ deltaX);
this.maxJ = (int) Math.ceil(c... | [
"private",
"void",
"initParameters",
"(",
")",
"{",
"this",
".",
"minX",
"=",
"envelope",
".",
"getMinX",
"(",
")",
";",
"this",
".",
"minY",
"=",
"envelope",
".",
"getMinY",
"(",
")",
";",
"double",
"cellWidth",
"=",
"envelope",
".",
"getWidth",
"(",
... | Compute the parameters need to create each cells | [
"Compute",
"the",
"parameters",
"need",
"to",
"create",
"each",
"cells"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L212-L221 |
107,479 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java | GridRowSet.getResultSet | public ResultSet getResultSet() throws SQLException {
SimpleResultSet srs = new SimpleResultSet(this);
srs.addColumn("THE_GEOM", Types.JAVA_OBJECT, "GEOMETRY", 0, 0);
srs.addColumn("ID", Types.INTEGER, 10, 0);
srs.addColumn("ID_COL", Types.INTEGER, 10, 0);
srs.addColumn("ID_ROW",... | java | public ResultSet getResultSet() throws SQLException {
SimpleResultSet srs = new SimpleResultSet(this);
srs.addColumn("THE_GEOM", Types.JAVA_OBJECT, "GEOMETRY", 0, 0);
srs.addColumn("ID", Types.INTEGER, 10, 0);
srs.addColumn("ID_COL", Types.INTEGER, 10, 0);
srs.addColumn("ID_ROW",... | [
"public",
"ResultSet",
"getResultSet",
"(",
")",
"throws",
"SQLException",
"{",
"SimpleResultSet",
"srs",
"=",
"new",
"SimpleResultSet",
"(",
"this",
")",
";",
"srs",
".",
"addColumn",
"(",
"\"THE_GEOM\"",
",",
"Types",
".",
"JAVA_OBJECT",
",",
"\"GEOMETRY\"",
... | Give the regular grid
@return ResultSet
@throws SQLException | [
"Give",
"the",
"regular",
"grid"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L229-L236 |
107,480 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/trigonometry/ST_Azimuth.java | ST_Azimuth.azimuth | public static Double azimuth(Geometry pointA, Geometry pointB){
if(pointA == null||pointB == null){
return null;
}
if ((pointA instanceof Point) && (pointB instanceof Point)) {
Double angle ;
double x0 = ((Point) pointA).getX();
double y0 = ((Point... | java | public static Double azimuth(Geometry pointA, Geometry pointB){
if(pointA == null||pointB == null){
return null;
}
if ((pointA instanceof Point) && (pointB instanceof Point)) {
Double angle ;
double x0 = ((Point) pointA).getX();
double y0 = ((Point... | [
"public",
"static",
"Double",
"azimuth",
"(",
"Geometry",
"pointA",
",",
"Geometry",
"pointB",
")",
"{",
"if",
"(",
"pointA",
"==",
"null",
"||",
"pointB",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"(",
"pointA",
"instanceof",
"Poi... | This code compute the angle in radian as postgis does.
@author : Jose Martinez-Llario from JASPA. JAva SPAtial for SQL
@param pointA
@param pointB
@return | [
"This",
"code",
"compute",
"the",
"angle",
"in",
"radian",
"as",
"postgis",
"does",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/trigonometry/ST_Azimuth.java#L53-L102 |
107,481 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMax.java | ST_YMax.getMaxY | public static Double getMaxY(Geometry geom) {
if (geom != null) {
return geom.getEnvelopeInternal().getMaxY();
} else {
return null;
}
} | java | public static Double getMaxY(Geometry geom) {
if (geom != null) {
return geom.getEnvelopeInternal().getMaxY();
} else {
return null;
}
} | [
"public",
"static",
"Double",
"getMaxY",
"(",
"Geometry",
"geom",
")",
"{",
"if",
"(",
"geom",
"!=",
"null",
")",
"{",
"return",
"geom",
".",
"getEnvelopeInternal",
"(",
")",
".",
"getMaxY",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}"... | Returns the maximal y-value of the given geometry.
@param geom Geometry
@return The maximal y-value of the given geometry, or null if the geometry is null. | [
"Returns",
"the",
"maximal",
"y",
"-",
"value",
"of",
"the",
"given",
"geometry",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_YMax.java#L48-L54 |
107,482 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java | GJGeometryReader.parsePoint | private Point parsePoint(JsonParser jp) throws IOException, SQLException {
jp.nextToken(); // FIELD_NAME coordinates
String coordinatesField = jp.getText();
if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) {
jp.nextToken(); // START_ARRAY [ to parse the coordi... | java | private Point parsePoint(JsonParser jp) throws IOException, SQLException {
jp.nextToken(); // FIELD_NAME coordinates
String coordinatesField = jp.getText();
if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) {
jp.nextToken(); // START_ARRAY [ to parse the coordi... | [
"private",
"Point",
"parsePoint",
"(",
"JsonParser",
"jp",
")",
"throws",
"IOException",
",",
"SQLException",
"{",
"jp",
".",
"nextToken",
"(",
")",
";",
"// FIELD_NAME coordinates ",
"String",
"coordinatesField",
"=",
"jp",
".",
"getText",
"(",
")",
";",... | Parses one position
Syntax:
{ "type": "Point", "coordinates": [100.0, 0.0] }
@param jsParser
@throws IOException
@return Point | [
"Parses",
"one",
"position"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L91-L102 |
107,483 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java | GJGeometryReader.parseMultiPoint | private MultiPoint parseMultiPoint(JsonParser jp) throws IOException, SQLException {
jp.nextToken(); // FIELD_NAME coordinates
String coordinatesField = jp.getText();
if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) {
jp.nextToken(); // START_ARRAY [ coordinat... | java | private MultiPoint parseMultiPoint(JsonParser jp) throws IOException, SQLException {
jp.nextToken(); // FIELD_NAME coordinates
String coordinatesField = jp.getText();
if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) {
jp.nextToken(); // START_ARRAY [ coordinat... | [
"private",
"MultiPoint",
"parseMultiPoint",
"(",
"JsonParser",
"jp",
")",
"throws",
"IOException",
",",
"SQLException",
"{",
"jp",
".",
"nextToken",
"(",
")",
";",
"// FIELD_NAME coordinates ",
"String",
"coordinatesField",
"=",
"jp",
".",
"getText",
"(",
"... | Parses an array of positions
Syntax:
{ "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }
@param jsParser
@throws IOException
@return MultiPoint | [
"Parses",
"an",
"array",
"of",
"positions"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L115-L126 |
107,484 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java | GJGeometryReader.parseCoordinate | private Coordinate parseCoordinate(JsonParser jp) throws IOException {
jp.nextToken();
double x = jp.getDoubleValue();// VALUE_NUMBER_FLOAT
jp.nextToken(); // second value
double y = jp.getDoubleValue();
Coordinate coord;
//We look for a z value
jp.nextToken();
... | java | private Coordinate parseCoordinate(JsonParser jp) throws IOException {
jp.nextToken();
double x = jp.getDoubleValue();// VALUE_NUMBER_FLOAT
jp.nextToken(); // second value
double y = jp.getDoubleValue();
Coordinate coord;
//We look for a z value
jp.nextToken();
... | [
"private",
"Coordinate",
"parseCoordinate",
"(",
"JsonParser",
"jp",
")",
"throws",
"IOException",
"{",
"jp",
".",
"nextToken",
"(",
")",
";",
"double",
"x",
"=",
"jp",
".",
"getDoubleValue",
"(",
")",
";",
"// VALUE_NUMBER_FLOAT",
"jp",
".",
"nextToken",
"(... | Parses a GeoJSON coordinate array and returns a JTS coordinate. The first
token corresponds to the first X value. The last token correponds to the
end of the coordinate array "]".
Parsed syntax:
100.0, 0.0]
@param jp
@throws IOException
@return Coordinate | [
"Parses",
"a",
"GeoJSON",
"coordinate",
"array",
"and",
"returns",
"a",
"JTS",
"coordinate",
".",
"The",
"first",
"token",
"corresponds",
"to",
"the",
"first",
"X",
"value",
".",
"The",
"last",
"token",
"correponds",
"to",
"the",
"end",
"of",
"the",
"coord... | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GJGeometryReader.java#L348-L365 |
107,485 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_ToMultiLine.java | ST_ToMultiLine.createMultiLineString | public static MultiLineString createMultiLineString(Geometry geom) throws SQLException {
if (geom != null) {
if (geom.getDimension() > 0) {
final List<LineString> lineStrings = new LinkedList<LineString>();
toMultiLineString(geom, lineStrings);
return ... | java | public static MultiLineString createMultiLineString(Geometry geom) throws SQLException {
if (geom != null) {
if (geom.getDimension() > 0) {
final List<LineString> lineStrings = new LinkedList<LineString>();
toMultiLineString(geom, lineStrings);
return ... | [
"public",
"static",
"MultiLineString",
"createMultiLineString",
"(",
"Geometry",
"geom",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"geom",
"!=",
"null",
")",
"{",
"if",
"(",
"geom",
".",
"getDimension",
"(",
")",
">",
"0",
")",
"{",
"final",
"List",
... | Constructs a MultiLineString from the given geometry's coordinates.
@param geom Geometry
@return A MultiLineString constructed from the given geometry's coordinates
@throws SQLException | [
"Constructs",
"a",
"MultiLineString",
"from",
"the",
"given",
"geometry",
"s",
"coordinates",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_ToMultiLine.java#L58-L71 |
107,486 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVRead.java | TSVRead.readTSV | public static void readTSV(Connection connection, String fileName, String tableReference) throws SQLException, FileNotFoundException, IOException {
File file = URIUtilities.fileFromString(fileName);
if (FileUtil.isFileImportable(file, "tsv")) {
TSVDriverFunction tsvDriver = new TSVDriverFunc... | java | public static void readTSV(Connection connection, String fileName, String tableReference) throws SQLException, FileNotFoundException, IOException {
File file = URIUtilities.fileFromString(fileName);
if (FileUtil.isFileImportable(file, "tsv")) {
TSVDriverFunction tsvDriver = new TSVDriverFunc... | [
"public",
"static",
"void",
"readTSV",
"(",
"Connection",
"connection",
",",
"String",
"fileName",
",",
"String",
"tableReference",
")",
"throws",
"SQLException",
",",
"FileNotFoundException",
",",
"IOException",
"{",
"File",
"file",
"=",
"URIUtilities",
".",
"fil... | Copy data from TSV File into a new table in specified connection.
@param connection
@param fileName
@param tableReference
@throws SQLException
@throws FileNotFoundException
@throws IOException | [
"Copy",
"data",
"from",
"TSV",
"File",
"into",
"a",
"new",
"table",
"in",
"specified",
"connection",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/tsv/TSVRead.java#L60-L66 |
107,487 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java | ST_Translate.translate | public static Geometry translate(Geometry geom, double x, double y) {
if (geom == null) {
return null;
}
final CoordinateSequenceDimensionFilter filter =
new CoordinateSequenceDimensionFilter();
geom.apply(filter);
checkMixed(filter);
return Af... | java | public static Geometry translate(Geometry geom, double x, double y) {
if (geom == null) {
return null;
}
final CoordinateSequenceDimensionFilter filter =
new CoordinateSequenceDimensionFilter();
geom.apply(filter);
checkMixed(filter);
return Af... | [
"public",
"static",
"Geometry",
"translate",
"(",
"Geometry",
"geom",
",",
"double",
"x",
",",
"double",
"y",
")",
"{",
"if",
"(",
"geom",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"CoordinateSequenceDimensionFilter",
"filter",
"=",
"new... | Translates a geometry using X and Y offsets.
@param geom Geometry
@param x X
@param y Y
@return Translated geometry | [
"Translates",
"a",
"geometry",
"using",
"X",
"and",
"Y",
"offsets",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java#L57-L66 |
107,488 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java | ST_Translate.translate | public static Geometry translate(Geometry geom, double x, double y, double z) {
if (geom == null) {
return null;
}
final CoordinateSequenceDimensionFilter filter =
new CoordinateSequenceDimensionFilter();
geom.apply(filter);
checkMixed(filter);
... | java | public static Geometry translate(Geometry geom, double x, double y, double z) {
if (geom == null) {
return null;
}
final CoordinateSequenceDimensionFilter filter =
new CoordinateSequenceDimensionFilter();
geom.apply(filter);
checkMixed(filter);
... | [
"public",
"static",
"Geometry",
"translate",
"(",
"Geometry",
"geom",
",",
"double",
"x",
",",
"double",
"y",
",",
"double",
"z",
")",
"{",
"if",
"(",
"geom",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"CoordinateSequenceDimensionFilter",... | Translates a geometry using X, Y and Z offsets.
@param geom Geometry
@param x X
@param y Y
@param z Z
@return Translated geometry | [
"Translates",
"a",
"geometry",
"using",
"X",
"Y",
"and",
"Z",
"offsets",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/affine_transformations/ST_Translate.java#L77-L93 |
107,489 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GeomFromWKB.java | ST_GeomFromWKB.toGeometry | public static Geometry toGeometry(byte[] bytes, int srid) throws SQLException{
if(bytes==null) {
return null;
}
WKBReader wkbReader = new WKBReader();
try {
Geometry geometry = wkbReader.read(bytes);
geometry.setSRID(srid);
return geometry;... | java | public static Geometry toGeometry(byte[] bytes, int srid) throws SQLException{
if(bytes==null) {
return null;
}
WKBReader wkbReader = new WKBReader();
try {
Geometry geometry = wkbReader.read(bytes);
geometry.setSRID(srid);
return geometry;... | [
"public",
"static",
"Geometry",
"toGeometry",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"srid",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"WKBReader",
"wkbReader",
"=",
"new",
"WKBReader... | Convert a WKB representation to a geometry
@param bytes the input WKB object
@param srid the input SRID
@return
@throws SQLException | [
"Convert",
"a",
"WKB",
"representation",
"to",
"a",
"geometry"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GeomFromWKB.java#L54-L66 |
107,490 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_MaxDistance.java | ST_MaxDistance.maxDistance | public static Double maxDistance(Geometry geomA, Geometry geomB) {
return new MaxDistanceOp(geomA, geomB).getDistance();
} | java | public static Double maxDistance(Geometry geomA, Geometry geomB) {
return new MaxDistanceOp(geomA, geomB).getDistance();
} | [
"public",
"static",
"Double",
"maxDistance",
"(",
"Geometry",
"geomA",
",",
"Geometry",
"geomB",
")",
"{",
"return",
"new",
"MaxDistanceOp",
"(",
"geomA",
",",
"geomB",
")",
".",
"getDistance",
"(",
")",
";",
"}"
] | Return the maximum distance
@param geomA
@param geomB
@return | [
"Return",
"the",
"maximum",
"distance"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_MaxDistance.java#L52-L54 |
107,491 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParser.java | AbstractGpxParser.characters | @Override
public void characters(char[] ch, int start, int length) throws SAXException {
contentBuffer.append(String.copyValueOf(ch, start, length));
} | java | @Override
public void characters(char[] ch, int start, int length) throws SAXException {
contentBuffer.append(String.copyValueOf(ch, start, length));
} | [
"@",
"Override",
"public",
"void",
"characters",
"(",
"char",
"[",
"]",
"ch",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"SAXException",
"{",
"contentBuffer",
".",
"append",
"(",
"String",
".",
"copyValueOf",
"(",
"ch",
",",
"start",
",",
... | Fires one or more times for each text node encountered. It saves text
informations in contentBuffer.
@param ch The characters from the XML document
@param start The start position in the array
@param length The number of characters to read from the array
@throws SAXException Any SAX exception, possibly wrapping anothe... | [
"Fires",
"one",
"or",
"more",
"times",
"for",
"each",
"text",
"node",
"encountered",
".",
"It",
"saves",
"text",
"informations",
"in",
"contentBuffer",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParser.java#L69-L72 |
107,492 | orbisgis/h2gis | h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java | TableLocation.quoteIdentifier | public static String quoteIdentifier(String identifier, boolean isH2DataBase) {
if((isH2DataBase && (Constants.H2_RESERVED_WORDS.contains(identifier.toUpperCase())
|| !H2_SPECIAL_NAME_PATTERN.matcher(identifier).find())) ||
(!isH2DataBase && (Constants.POSTGIS_RESERVED_WO... | java | public static String quoteIdentifier(String identifier, boolean isH2DataBase) {
if((isH2DataBase && (Constants.H2_RESERVED_WORDS.contains(identifier.toUpperCase())
|| !H2_SPECIAL_NAME_PATTERN.matcher(identifier).find())) ||
(!isH2DataBase && (Constants.POSTGIS_RESERVED_WO... | [
"public",
"static",
"String",
"quoteIdentifier",
"(",
"String",
"identifier",
",",
"boolean",
"isH2DataBase",
")",
"{",
"if",
"(",
"(",
"isH2DataBase",
"&&",
"(",
"Constants",
".",
"H2_RESERVED_WORDS",
".",
"contains",
"(",
"identifier",
".",
"toUpperCase",
"(",... | Quote identifier only if necessary. Require database knowledge.
@param identifier Catalog,Schema,Table or Field name
@param isH2DataBase True if the quote is for H2, false if for POSTGRE
@return Quoted Identifier | [
"Quote",
"identifier",
"only",
"if",
"necessary",
".",
"Require",
"database",
"knowledge",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java#L96-L105 |
107,493 | orbisgis/h2gis | h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java | TableLocation.parse | public static TableLocation parse(String concatenatedTableLocation, Boolean isH2Database) {
List<String> parts = new LinkedList<String>();
String catalog,schema,table;
catalog = table = schema = "";
StringTokenizer st = new StringTokenizer(concatenatedTableLocation, ".`\"", true);
... | java | public static TableLocation parse(String concatenatedTableLocation, Boolean isH2Database) {
List<String> parts = new LinkedList<String>();
String catalog,schema,table;
catalog = table = schema = "";
StringTokenizer st = new StringTokenizer(concatenatedTableLocation, ".`\"", true);
... | [
"public",
"static",
"TableLocation",
"parse",
"(",
"String",
"concatenatedTableLocation",
",",
"Boolean",
"isH2Database",
")",
"{",
"List",
"<",
"String",
">",
"parts",
"=",
"new",
"LinkedList",
"<",
"String",
">",
"(",
")",
";",
"String",
"catalog",
",",
"s... | Convert catalog.schema.table, schema.table or table into a TableLocation
instance. Non-specified schema or catalogs are converted to the empty
string.
@param concatenatedTableLocation Table location [[Catalog.]Schema.]Table
@param isH2Database True if H2, False if PostGreSQL, null if unknown
@return Java ... | [
"Convert",
"catalog",
".",
"schema",
".",
"table",
"schema",
".",
"table",
"or",
"table",
"into",
"a",
"TableLocation",
"instance",
".",
"Non",
"-",
"specified",
"schema",
"or",
"catalogs",
"are",
"converted",
"to",
"the",
"empty",
"string",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java#L179-L224 |
107,494 | orbisgis/h2gis | h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java | TableLocation.capsIdentifier | public static String capsIdentifier(String identifier, Boolean isH2Database) {
if(isH2Database != null) {
if(isH2Database) {
return identifier.toUpperCase();
} else {
return identifier.toLowerCase();
}
} else {
return identi... | java | public static String capsIdentifier(String identifier, Boolean isH2Database) {
if(isH2Database != null) {
if(isH2Database) {
return identifier.toUpperCase();
} else {
return identifier.toLowerCase();
}
} else {
return identi... | [
"public",
"static",
"String",
"capsIdentifier",
"(",
"String",
"identifier",
",",
"Boolean",
"isH2Database",
")",
"{",
"if",
"(",
"isH2Database",
"!=",
"null",
")",
"{",
"if",
"(",
"isH2Database",
")",
"{",
"return",
"identifier",
".",
"toUpperCase",
"(",
")... | Change case of parameters to make it more user-friendly.
@param identifier Table, Catalog, Schema, or column name
@param isH2Database True if H2, False if PostGreSQL, null if unknown
@return Upper or lower case version of identifier | [
"Change",
"case",
"of",
"parameters",
"to",
"make",
"it",
"more",
"user",
"-",
"friendly",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/TableLocation.java#L233-L243 |
107,495 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java | MakeValidOp.decompose | private static void decompose(Geometry geometry, Collection<Geometry> list) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry component = geometry.getGeometryN(i);
if (component instanceof GeometryCollection) {
decompose(component, list);
} el... | java | private static void decompose(Geometry geometry, Collection<Geometry> list) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry component = geometry.getGeometryN(i);
if (component instanceof GeometryCollection) {
decompose(component, list);
} el... | [
"private",
"static",
"void",
"decompose",
"(",
"Geometry",
"geometry",
",",
"Collection",
"<",
"Geometry",
">",
"list",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"geometry",
".",
"getNumGeometries",
"(",
")",
";",
"i",
"++",
")",
"{"... | Decompose a geometry recursively into simple components.
@param geometry input geometry
@param list a list of simple components (Point, LineString or Polygon) | [
"Decompose",
"a",
"geometry",
"recursively",
"into",
"simple",
"components",
"."
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L98-L107 |
107,496 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java | MakeValidOp.removeLowerDimension | private void removeLowerDimension(Geometry geometry, List<Geometry> result, int dimension) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry g = geometry.getGeometryN(i);
if (g instanceof GeometryCollection) {
removeLowerDimension(g, result, dimension);
... | java | private void removeLowerDimension(Geometry geometry, List<Geometry> result, int dimension) {
for (int i = 0; i < geometry.getNumGeometries(); i++) {
Geometry g = geometry.getGeometryN(i);
if (g instanceof GeometryCollection) {
removeLowerDimension(g, result, dimension);
... | [
"private",
"void",
"removeLowerDimension",
"(",
"Geometry",
"geometry",
",",
"List",
"<",
"Geometry",
">",
"result",
",",
"int",
"dimension",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"geometry",
".",
"getNumGeometries",
"(",
")",
";",
... | Reursively remove geometries with a dimension less than dimension parameter | [
"Reursively",
"remove",
"geometries",
"with",
"a",
"dimension",
"less",
"than",
"dimension",
"parameter"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L237-L246 |
107,497 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java | MakeValidOp.unionAdjacentPolygons | private Collection<Geometry> unionAdjacentPolygons(Collection<Geometry> list) {
UnaryUnionOp op = new UnaryUnionOp(list);
Geometry result = op.union();
if (result.getNumGeometries() < list.size()) {
list.clear();
for (int i = 0; i < result.getNumGeometries(); i++) {
... | java | private Collection<Geometry> unionAdjacentPolygons(Collection<Geometry> list) {
UnaryUnionOp op = new UnaryUnionOp(list);
Geometry result = op.union();
if (result.getNumGeometries() < list.size()) {
list.clear();
for (int i = 0; i < result.getNumGeometries(); i++) {
... | [
"private",
"Collection",
"<",
"Geometry",
">",
"unionAdjacentPolygons",
"(",
"Collection",
"<",
"Geometry",
">",
"list",
")",
"{",
"UnaryUnionOp",
"op",
"=",
"new",
"UnaryUnionOp",
"(",
"list",
")",
";",
"Geometry",
"result",
"=",
"op",
".",
"union",
"(",
... | Union adjacent polygons to make an invalid MultiPolygon valid | [
"Union",
"adjacent",
"polygons",
"to",
"make",
"an",
"invalid",
"MultiPolygon",
"valid"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L249-L259 |
107,498 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java | MakeValidOp.makePointValid | private Point makePointValid(Point point) {
CoordinateSequence sequence = point.getCoordinateSequence();
GeometryFactory factory = point.getFactory();
CoordinateSequenceFactory csFactory = factory.getCoordinateSequenceFactory();
if (sequence.size() == 0) {
return point;
... | java | private Point makePointValid(Point point) {
CoordinateSequence sequence = point.getCoordinateSequence();
GeometryFactory factory = point.getFactory();
CoordinateSequenceFactory csFactory = factory.getCoordinateSequenceFactory();
if (sequence.size() == 0) {
return point;
... | [
"private",
"Point",
"makePointValid",
"(",
"Point",
"point",
")",
"{",
"CoordinateSequence",
"sequence",
"=",
"point",
".",
"getCoordinateSequence",
"(",
")",
";",
"GeometryFactory",
"factory",
"=",
"point",
".",
"getFactory",
"(",
")",
";",
"CoordinateSequenceFac... | If X or Y is null, return an empty Point | [
"If",
"X",
"or",
"Y",
"is",
"null",
"return",
"an",
"empty",
"Point"
] | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L262-L275 |
107,499 | orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java | MakeValidOp.makeSequenceValid | private static CoordinateSequence makeSequenceValid(CoordinateSequence sequence,
boolean preserveDuplicateCoord, boolean close) {
int dim = sequence.getDimension();
// we add 1 to the sequence size for the case where we have to close the linear ring
double[] array = new double[(seque... | java | private static CoordinateSequence makeSequenceValid(CoordinateSequence sequence,
boolean preserveDuplicateCoord, boolean close) {
int dim = sequence.getDimension();
// we add 1 to the sequence size for the case where we have to close the linear ring
double[] array = new double[(seque... | [
"private",
"static",
"CoordinateSequence",
"makeSequenceValid",
"(",
"CoordinateSequence",
"sequence",
",",
"boolean",
"preserveDuplicateCoord",
",",
"boolean",
"close",
")",
"{",
"int",
"dim",
"=",
"sequence",
".",
"getDimension",
"(",
")",
";",
"// we add 1 to the s... | Returns a coordinateSequence free of Coordinates with X or Y NaN value,
and if desired, free of duplicated coordinates. makeSequenceValid keeps
the original dimension of input sequence.
@param sequence input sequence of coordinates
@param preserveDuplicateCoord if duplicate coordinates must be preserved
@param close i... | [
"Returns",
"a",
"coordinateSequence",
"free",
"of",
"Coordinates",
"with",
"X",
"or",
"Y",
"NaN",
"value",
"and",
"if",
"desired",
"free",
"of",
"duplicated",
"coordinates",
".",
"makeSequenceValid",
"keeps",
"the",
"original",
"dimension",
"of",
"input",
"seque... | 9cd70b447e6469cecbc2fc64b16774b59491df3b | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/clean/MakeValidOp.java#L287-L333 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.