Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
contents.setMinXSync(java.newDouble(llCorner.west));
contents.setMinYSync(java.newDouble(llCorner.south));
contents.setMaxXSync(java.newDouble(urCorner.east));
contents.setMaxYSync(java.newDouble(urCorner.north));
contents.setSrsSync(srsWgs84);
// Create the contents
self.geoPackage.getContentsDaoSync().createSync(contents);
// Create new Tile Matrix Set
var tileMatrixSetDao = self.geoPackage.getTileMatrixSetDaoSync();
var srsDao = self.geoPackage.getSpatialReferenceSystemDaoSync();
var srsEpsg3857 = srsDao.getOrCreateSync(3857);
var TileMatrixSet = java.import('mil.nga.geopackage.tiles.matrixset.TileMatrixSet');
var tileMatrixSet = new TileMatrixSet();
tileMatrixSet.setContentsSync(contents);
tileMatrixSet.setSrsSync(srsEpsg3857);
tileMatrixSet.setMinXSync(java.newDouble(epsg3857ll[0]));
tileMatrixSet.setMinYSync(java.newDouble(epsg3857ll[1]));
tileMatrixSet.setMaxXSync(java.newDouble(epsg3857ur[0]));
tileMatrixSet.setMaxYSync(java.newDouble(epsg3857ur[1]));
tileMatrixSetDao.createSync(tileMatrixSet);
// Create new Tile Matrix and tile table rows by going through each zoom
// level
var tileMatrixDao = self.geoPackage.getTileMatrixDaoSync();
self.tileDaos[tableName] = self.geoPackage.getTileDaoSync(tileMatrixSet);
for (var zoom = minZoom; zoom <= maxZoom; zoom++) {
this.initPromise.then(function(self) {
var TileTable = java.import('mil.nga.geopackage.tiles.user.TileTable');
var columns = java.callStaticMethodSync('mil.nga.geopackage.tiles.user.TileTable', 'createRequiredColumns');
var tileTable = new TileTable(tableName, columns);
self.geoPackage.createTileTableSync(tileTable);
var xRangeMinZoom = xCalculator(extent, minZoom);
var yRangeMinZoom = yCalculator(extent, minZoom);
var llCorner = tileBboxCalculator(xRangeMinZoom.min, yRangeMinZoom.max, minZoom);
var urCorner = tileBboxCalculator(xRangeMinZoom.max, yRangeMinZoom.min, minZoom);
var totalTileExtent = [llCorner.west, llCorner.south, urCorner.east, urCorner.north];
console.log('ur ', urCorner);
console.log('yrange', yRangeMinZoom);
console.log('xrange', xRangeMinZoom);
var epsg3857ll = proj4('EPSG:3857', [llCorner.west, llCorner.south]);
var GremlinGroovyScriptEngine = java.import('com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine');
var GremlinPipeline = java.import('com.tinkerpop.gremlin.groovy.GremlinGroovyPipeline');
var JSONResultConverter = java.import('com.tinkerpop.rexster.gremlin.converter.JSONResultConverter');
var JSONObject = java.import('org.json.JSONObject');
var JSONArray = java.import('org.json.JSONArray');
var Class = java.import('java.lang.Class');
var ArrayList = java.import('java.util.ArrayList');
var HashMap = java.import('java.util.HashMap');
var Table = java.import('com.tinkerpop.pipes.util.structures.Table');
var Tree = java.import('com.tinkerpop.pipes.util.structures.Tree');
var Direction = java.import('com.tinkerpop.blueprints.Direction');
var Tokens = java.import('com.tinkerpop.gremlin.Tokens$T');
var Compare = java.import('com.tinkerpop.blueprints.Compare');
var Contains = java.import('com.tinkerpop.blueprints.Contains');
var ClassTypes = {
'String': { 'class': Class.forNameSync('java.lang.String') },
'Vertex': { 'class': java.getClassLoader().loadClassSync('com.tinkerpop.blueprints.Vertex') },
'Edge': { 'class': java.getClassLoader().loadClassSync('com.tinkerpop.blueprints.Edge') },
'Byte': { 'class': Class.forNameSync('java.lang.Byte') },
'Character': { 'class': Class.forNameSync('java.lang.Character') },
'Double': { 'class': Class.forNameSync('java.lang.Double') },
'Float': { 'class': Class.forNameSync('java.lang.Float') },
'Integer': { 'class': Class.forNameSync('java.lang.Integer') },
'Long': { 'class': Class.forNameSync('java.lang.Long') },
'Short': { 'class': Class.forNameSync('java.lang.Short') },
'Number': { 'class': Class.forNameSync('java.lang.Number') },
'BigDecimal': { 'class': Class.forNameSync('java.math.BigDecimal') },
get Map() {
return java.import('me.joespencer.webdriversynchelpers.Map');
}
},
this.initPromise.then(function(self) {
var ArrayList = java.import('java.util.ArrayList');
var FeatureTable = java.import('mil.nga.geopackage.features.user.FeatureTable');
var Date = java.import('java.util.Date');
var GeometryColumns = java.import('mil.nga.geopackage.features.columns.GeometryColumns');
var BoundingBox = java.import('mil.nga.geopackage.BoundingBox');
var Contents = java.import('mil.nga.geopackage.core.contents.Contents');
var DataColumns = java.import('mil.nga.geopackage.schema.columns.DataColumns');
var srsDao = self.geoPackage.getSpatialReferenceSystemDaoSync();
var srsEpsg3857 = srsDao.getOrCreateSync(3857);
self.geoPackage.createGeometryColumnsTableSync();
var columns = new ArrayList();
columns.addSync(java.callStaticMethodSync('mil.nga.geopackage.features.user.FeatureColumn', 'createPrimaryKeyColumn', 0, 'id'));
columns.addSync(java.callStaticMethodSync('mil.nga.geopackage.features.user.FeatureColumn', 'createGeometryColumn', 1, 'geom', java.callStaticMethodSync('mil.nga.wkb.geom.GeometryType', 'fromName', 'GEOMETRY'), false, null));
self.tableProperties[tableName] = {};
get Date() {
return java.import(classPaths.Date);
},
get DesiredCapabilities() {
}
//add jar files
for (var i = 0; i < opts.classpath.length; i++) {
var pattern = opts.classpath[i];
var filenames = glob.sync(pattern);
for (var j = 0; j < filenames.length; j++) {
java.classpath.push(filenames[j]);
}
}
var GremlinGroovyScriptEngine = java.import('com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine');
var GremlinPipeline = java.import('com.tinkerpop.gremlin.groovy.GremlinGroovyPipeline');
var JSONResultConverter = java.import('com.tinkerpop.rexster.gremlin.converter.JSONResultConverter');
var JSONObject = java.import('org.json.JSONObject');
var JSONArray = java.import('org.json.JSONArray');
var Class = java.import('java.lang.Class');
var ArrayList = java.import('java.util.ArrayList');
var HashMap = java.import('java.util.HashMap');
var Table = java.import('com.tinkerpop.pipes.util.structures.Table');
var Tree = java.import('com.tinkerpop.pipes.util.structures.Tree');
var Direction = java.import('com.tinkerpop.blueprints.Direction');
var Tokens = java.import('com.tinkerpop.gremlin.Tokens$T');
var Compare = java.import('com.tinkerpop.blueprints.Compare');
var Contains = java.import('com.tinkerpop.blueprints.Contains');
var ClassTypes = {
'String': { 'class': Class.forNameSync('java.lang.String') },
'Vertex': { 'class': java.getClassLoader().loadClassSync('com.tinkerpop.blueprints.Vertex') },
get ChromeDriver() {
return java.import(classPaths.ChromeDriver);
},
get ChromeDriverService() {
module.exports = function(services, logger) {
var me = this;
java.classpath.push('./java_lib/Triplet_Extraction.jar');
var url = 'http://localhost:8081/';
var ExtractionService = java.import('com.nextcentury.TripletExtraction.ExtractionService');
var Parser = java.import('com.nextcentury.TripletExtraction.CoreNlpParser');
var parser = new Parser();
var extractor = new ExtractionService();
var assertion_service = services.assertionService;
me.parseAndSave = function(alpha_report_object, callback){
logger.info('Attempting to parse alpha_report_object with id ' + alpha_report_object._id);
var assertion_object = {};
if(alpha_report_object.message_body){
var tree = parser.parseSync(alpha_report_object.message_body);
for (var i = 0; i < tree.sizeSync(); i++){
//get first sentence fragment from parsed message
var leaf = tree.getSync(i);
var numKids = leaf.lastChildSync().numChildrenSync();
get Keys() {
return java.import(classPaths.Keys);
},
get Level() {