本文整理汇总了Java中org.geoserver.catalog.Catalog类的典型用法代码示例。如果您正苦于以下问题:Java Catalog类的具体用法?Java Catalog怎么用?Java Catalog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Catalog类属于org.geoserver.catalog包,在下文中一共展示了Catalog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initRequestParser
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public static void initRequestParser(Parser parser, WFSInfo wfs, GeoServer geoServer, Map kvp) {
//check the strict flag to determine if we should validate or not
Boolean strict = (Boolean) kvp.get("strict");
if ( strict == null ) {
strict = Boolean.FALSE;
}
//check for cite compliance, we always validate for cite
if ( wfs.isCiteCompliant() ) {
strict = Boolean.TRUE;
}
parser.setValidating(strict.booleanValue());
WFSURIHandler.addToParser(geoServer, parser);
Catalog catalog = geoServer.getCatalog();
//"inject" namespace mappings
parser.getNamespaces().add(new CatalogNamespaceSupport(catalog));
}
示例2: setUp
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
catalog = EasyMock.createMock("catalog", Catalog.class);
featureType1 = EasyMock.createMock("featureType1", FeatureTypeInfo.class);
featureType2 = EasyMock.createMock("featureType2", FeatureTypeInfo.class);
listener = new BoundsUpdateTransactionListener(catalog);
}
示例3: read
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public Object read(Object request, Reader reader, Map kvp) throws Exception {
//TODO: refactor this method to use WFSXmlUtils
Catalog catalog = geoServer.getCatalog();
//check the strict flag to determine if we should validate or not
Boolean strict = (Boolean) kvp.get("strict");
if ( strict == null ) {
strict = Boolean.FALSE;
}
//create the parser instance
Parser parser = new Parser(configuration);
parser.setEntityResolver(entityResolverProvider.getEntityResolver());
//"inject" namespace mappings
parser.getNamespaces().add(new CatalogNamespaceSupport(catalog));
//set validation based on strict or not
parser.setValidating(strict.booleanValue());
WFSURIHandler.addToParser(geoServer, parser);
//parse
Object parsed = parser.parse(reader);
//if strict was set, check for validation errors and throw an exception
if (strict.booleanValue() && !parser.getValidationErrors().isEmpty()) {
WFSException exception = new WFSException("Invalid request", "InvalidParameterValue");
for (Iterator e = parser.getValidationErrors().iterator(); e.hasNext();) {
Exception error = (Exception) e.next();
exception.getExceptionText().add(error.getLocalizedMessage());
}
throw exception;
}
return parsed;
}
示例4: Holder
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public Holder(Catalog cat) {
this.catalog = cat;
try {
this.config = new MonitorConfig(catalog.getResourceLoader());
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Impossible to Initialize the Holder",
e);
}
}
示例5: onSave
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
/**
* Validates Elasticsearch attributes configuration and stores the
* Elasticsearch layer configuration into feature type metadata as
* {@link ElasticLayerConfiguration#KEY} <br>
* Validation include the follow rules <li>One attribute must be a GEOMETRY.
*
* @see {@link ElasticLayerConfiguration}
* @see {@link FeatureTypeInfo#getMetadata}
*/
protected void onSave(AjaxRequestTarget target) {
try {
ResourceInfo ri = (ResourceInfo) getDefaultModel().getObject();
ElasticLayerConfiguration layerConfig = fillElasticAttributes(ri);
Boolean geomSet = false;
// Validate configuration
for (ElasticAttribute att : layerConfig.getAttributes()) {
if (Geometry.class.isAssignableFrom(att.getType()) && att.isUse()) {
geomSet = true;
}
}
if (!geomSet) {
error(new ParamResourceModel("geomEmptyFailure", ElasticConfigurationPage.this)
.getString());
}
Catalog catalog = ((GeoServerApplication) this.getPage().getApplication()).getCatalog();
FeatureTypeInfo typeInfo;
DataStoreInfo dsInfo = catalog.getStore(ri.getStore().getId(), DataStoreInfo.class);
ElasticDataStore ds = (ElasticDataStore) dsInfo.getDataStore(null);
CatalogBuilder builder = new CatalogBuilder(catalog);
builder.setStore(dsInfo);
typeInfo = builder.buildFeatureType(ds.getFeatureSource(ri.getQualifiedName()));
typeInfo.setName(ri.getName());
typeInfo.getMetadata().put(ElasticLayerConfiguration.KEY, layerConfig);
LayerInfo layerInfo = builder.buildLayer(typeInfo);
layerInfo.setName(ri.getName());
done(target, layerInfo, layerConfig);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
error(new ParamResourceModel("creationFailure", this, e).getString());
}
}
示例6: SoilSealingMiddlewareProcess
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
/**
* Default Constructor
*
* @param catalog
* @param geoserver
*/
public SoilSealingMiddlewareProcess(Catalog catalog, GeoServer geoserver) {
super();
this.catalog = catalog;
this.geoserver = geoserver;
}
示例7: WorkspaceContentsResource
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public WorkspaceContentsResource(Context context, Request request,
Response response, Catalog catalog) {
super(context, request, response, WorkspaceFullDoc.class, catalog);
// TODO Auto-generated constructor stub
}
示例8: CompleteDocumentationResource
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public CompleteDocumentationResource(final Context context, final Request request,
final Response response, final Catalog catalog) {
super(context, request, response, DocumentationDoc.class, catalog);
}
示例9: WorkspaceContentsFinder
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
protected WorkspaceContentsFinder(Catalog catalog) {
this.catalog = catalog;
}
示例10: CompleteDocumentationFinder
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
protected CompleteDocumentationFinder(Catalog catalog) {
this.catalog = catalog;
}
示例11: BoundsUpdateTransactionListener
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public BoundsUpdateTransactionListener(Catalog catalog) {
super();
this.catalog = catalog;
}
示例12: getCatalog
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public Catalog getCatalog() {
return geoServer.getCatalog();
}
示例13: GetFeature3D
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
/**
* Creates the WFS 1.0/1.1 GetFeature operation.
*/
public GetFeature3D(WFSInfo wfs, Catalog catalog) {
this.wfs = wfs;
this.catalog = catalog;
}
示例14: getCatalog
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
/**
* @return The reference to the GeoServer catalog.
*/
public Catalog getCatalog() {
return catalog;
}
示例15: getCatalog
import org.geoserver.catalog.Catalog; //导入依赖的package包/类
public Catalog getCatalog() {
return catalog;
}