/** Initializes basic resource info. */ private void initResourceInfo(ResourceInfo resInfo) throws Exception { // set the name if (resInfo.getNativeName() == null && resInfo.getName() != null) { resInfo.setNativeName(resInfo.getName()); } if (resInfo.getNativeName() != null && resInfo.getName() == null) { resInfo.setName(resInfo.getNativeName()); } }
public void add(ResourceInfo resource) { if (resource.getNamespace() == null) { // default to default namespace resource.setNamespace(getDefaultNamespace()); } if (resource.getNativeName() == null) { resource.setNativeName(resource.getName()); } ResourceInfo resolved = resolve(resource); validate(resolved, true); ResourceInfo added = facade.add(resolved); added(added); }
if (isNull(resource.getNativeName()) && !(resource instanceof CoverageInfo && ((CoverageInfo) resource).getNativeCoverageName() != null)) {
} else if (!CRS.equalsIgnoreMetadata(nativeCRS, other.getNativeCRS())) return false; if (nativeName == null) { if (other.getNativeName() != null) return false; } else if (!nativeName.equals(other.getNativeName())) return false; if (projectionPolicy == null) { if (other.getProjectionPolicy() != null) return false;
WMSLayerInfo rebuilt = buildWMSLayer(rinfo.getStore(), rinfo.getNativeName()); bounds = rebuilt.getNativeBoundingBox(); WMTSLayerInfo rebuilt = buildWMTSLayer(rinfo.getStore(), rinfo.getNativeName()); bounds = rebuilt.getNativeBoundingBox();
expect(r.getName()).andReturn(name).anyTimes(); expect(r.getQualifiedName()).andReturn(new NameImpl(ns.getURI(), name)).anyTimes(); expect(r.getNativeName()).andReturn(name).anyTimes(); expect(r.getQualifiedNativeName()).andReturn(new NameImpl(ns.getURI(), name)).anyTimes(); expect(r.getTitle()).andReturn(name).anyTimes();
public String getOriginalLayerName() { return originalLayerName == null ? layer.getResource().getNativeName() : originalLayerName; }
public String getOriginalLayerName() { return originalLayerName == null ? layer.getResource().getNativeName() : originalLayerName; }
private void createIndex(ImportTask item, JDBCDataStore store) throws Exception { Connection conn = null; Statement stmt = null; Exception error = null; String sql = null; try { conn = store.getConnection(Transaction.AUTO_COMMIT); stmt = conn.createStatement(); String tableName = item.getLayer().getResource().getNativeName(); String indexName = "\"" + tableName + "_" + field + "\""; sql = "CREATE INDEX " + indexName + " ON \"" + tableName + "\" (\"" + field + "\")"; stmt.execute(sql); } catch (SQLException sqle) { error = sqle; } finally { store.closeSafe(stmt); store.closeSafe(conn); } if (error != null) { throw new Exception("Error creating index, SQL was : " + sql,error); } }
private void createIndex(ImportTask item, JDBCDataStore store) throws Exception { Connection conn = null; Statement stmt = null; Exception error = null; String sql = null; try { conn = store.getConnection(Transaction.AUTO_COMMIT); stmt = conn.createStatement(); String tableName = item.getLayer().getResource().getNativeName(); String indexName = "\"" + tableName + "_" + field + "\""; sql = "CREATE INDEX " + indexName + " ON \"" + tableName + "\" (\"" + field + "\")"; stmt.execute(sql); } catch (SQLException sqle) { error = sqle; } finally { store.closeSafe(stmt); store.closeSafe(conn); } if (error != null) { throw new Exception("Error creating index, SQL was : " + sql, error); } } }
@Override public Optional<ObjectId> call() throws Exception { RepositoryManager manager = RepositoryManager.get(); Repository findRepository = manager.findRepository(geogigLayer); String featureTreePath = geogigLayer.getResource().getNativeName(); Optional<ObjectId> index = GeoGigDataStore.createOrUpdateIndex( findRepository, head, featureTreePath, extraAttributes); return index; } });
final String layerTreeName = tileLayer.getLayerInfo().getResource().getNativeName();
LayerResource resource = resources.get(type.getNativeName()); if(resource != null) resource.setStatus(LayerStatus.PUBLISHED);
LayerResource resource = resources.get(type.getNativeName()); if (resource != null) resource.setStatus(LayerStatus.PUBLISHED);
LayerResource resource = resources.get(type.getNativeName()); if (resource != null) resource.setStatus(LayerStatus.PUBLISHED);
Resource resource = resources.get(type.getNativeName()); if (resource != null)
Resource resource = resources.get(type.getNativeName()); if(resource != null) resource.setPublished(true);
((ResourceInfo) prototype).setNativeName(((ResourceInfo) original).getNativeName()); ((ResourceInfo) prototype).setName(newName); if (parent != null) {
ConfigChangeEvent newChangeEvent(Info subj, Type type) { String name = (String) (OwsUtils.has(subj, "name") ? OwsUtils.get(subj, "name") : null); WorkspaceInfo ws = (WorkspaceInfo) (OwsUtils.has(subj, "workspace") ? OwsUtils.get(subj, "workspace") : null); StoreInfo store = (StoreInfo) (OwsUtils.has(subj, "store") ? OwsUtils.get(subj, "store") : null); ConfigChangeEvent ev = new ConfigChangeEvent(subj.getId(), name, subj.getClass(), type); if (ws != null) { ev.setWorkspaceId(ws.getId()); } if (store != null) { ev.setStoreId(store.getId()); } if (subj instanceof ResourceInfo) { ev.setNativeName(((ResourceInfo) subj).getNativeName()); } return ev; }
resource = resources.get(ci.getNativeCoverageName()); } else { resource = resources.get(type.getNativeName()); resource = resources.get(type.getNativeName());