Package org.geoserver.catalog

Examples of org.geoserver.catalog.DimensionInfo


        LayerInfo l = context.getTasks().get(0).getLayer();
        ResourceInfo r = l.getResource();
        assertTrue(r.getMetadata().containsKey("time"));

        DimensionInfo d = (DimensionInfo) r.getMetadata().get("time");
        assertNotNull(d);

        runChecks(l.getName());

        Document dom = getAsDOM(String.format("/%s/%s/wms?request=getcapabilities",
View Full Code Here


        for (Map.Entry<String, Serializable> entry : layer.getResource().getMetadata().entrySet()) {
            String key = entry.getKey();
            Serializable md = entry.getValue();
            if (md instanceof DimensionInfo) {
                // skip disabled dimensions
                DimensionInfo di = (DimensionInfo) md;
                if (!di.isEnabled()) {
                    continue;
                }

                // get the dimension name
                String dimensionName;
View Full Code Here

                    String name = paramName.substring(4);

                    // Getting the dimension
                    name = caseInsensitiveLookup(customDomains, name);
                    if (name != null) {
                        final DimensionInfo customInfo = metadata.get(
                                ResourceInfo.CUSTOM_DIMENSION_PREFIX + name, DimensionInfo.class);
                        if (dimensions.hasDomain(name) && customInfo != null && customInfo.isEnabled()) {
                            final ArrayList<String> val = new ArrayList<String>(1);
                            String value = (String) map.get(paramName);
                            if (value.indexOf(",") > 0) {
                                String[] elements = value.split(",");
                                val.addAll(Arrays.asList(elements));
View Full Code Here

     */
    private GeneralParameterValue[] parseElevationParameter(final MetadataMap metadata,
            GeneralParameterValue[] readParameters,
            final List<GeneralParameterDescriptor> parameterDescriptors,
            final Map<String, Object> map) {
        final DimensionInfo elevationInfo = metadata.get(ResourceInfo.ELEVATION,
                DimensionInfo.class);
        if (elevationInfo != null && elevationInfo.isEnabled()) {
            // handle "current"
            Set<String> params = map.keySet();
            for (String param : params) {
                if (param.equalsIgnoreCase("elevation")) {
                    readParameters = CoverageUtils.mergeParameter(parameterDescriptors,
View Full Code Here

     */
    private GeneralParameterValue[] parseTimeParameter(final MetadataMap metadata,
            GeneralParameterValue[] readParameters,
            final List<GeneralParameterDescriptor> parameterDescriptors,
            final Map<String, Object> map) throws ParseException {
        final DimensionInfo timeInfo = metadata.get(ResourceInfo.TIME, DimensionInfo.class);
        if (timeInfo != null && timeInfo.isEnabled()) {
            final Set<String> params = map.keySet();
            for (String param : params) {
                if (param.equalsIgnoreCase("time")) {
                    // pass down the parameters
                    readParameters = CoverageUtils.mergeParameter(parameterDescriptors,
View Full Code Here

        for (Map.Entry<String, Serializable> entry : resource.getMetadata().entrySet()) {
            String key = entry.getKey();
            Serializable metadata = entry.getValue();
            if (metadata instanceof DimensionInfo) {
                // skip disabled dimensions
                DimensionInfo di = (DimensionInfo) metadata;
                if (!di.isEnabled()) {
                    continue;
                }

                // get the dimension name
                String dimensionName;
View Full Code Here

        List<DefaultValueConfiguration> result = new ArrayList<DefaultValueConfiguration>(
                configs.size());
        MetadataMap metadata = resource.getMetadata();
        for (DefaultValueConfiguration config : configs) {
            String key = getDimensionMetadataKey(config.getDimension());
            DimensionInfo di = metadata.get(key, DimensionInfo.class);
            if (di == null) {
                LOGGER.warning("Skipping dynamic default configuration for dimension "
                        + config.getDimension() + " as the base dimension configuration is missing");
            } else if (!di.isEnabled()) {
                LOGGER.warning("Skipping dynamic default configuration for dimension "
                        + config.getDimension() + " as the dimension is not enabled");
            } else {
                result.add(config);
            }
View Full Code Here

    }

    private Object getDynamicDefault(ResourceInfo resource, Map<String, Object> result,
            DefaultValueConfiguration config, String dimensionName) throws IOException {
        // get the dimension info
        DimensionInfo di = resource.getMetadata().get(
                getDimensionMetadataKey(config.getDimension()), DimensionInfo.class);

        // ok, let's see what policy we have here
        Class<?> dimensionClass = getDimensionClass(config.getDimension());
        if (config.policy == DefaultValuePolicy.STANDARD) {
View Full Code Here

    private Object getRasterDefaultValue(CoverageInfo resource, DefaultValueConfiguration config,
            Map<String, Object> restrictions,
            DimensionDefaultValueSelectionStrategy delegateStrategy) throws IOException {
        String dimensionName = config.getDimension();
        DimensionInfo di = resource.getMetadata().get(
                getDimensionMetadataKey(config.getDimension()), DimensionInfo.class);

        // check if it's a fixed strategy, simple case, no domain restriction needed
        if (delegateStrategy instanceof FixedValueStrategyImpl) {
            Class<?> dimensionClass = getDimensionClass(config.getDimension());
View Full Code Here

     * @return
     * @throws IOException
     */
    private Object getVectorDefaultValue(FeatureTypeInfo resource,
            DefaultValueConfiguration config, Map<String, Object> restrictions) throws IOException {
        DimensionInfo di = resource.getMetadata().get(
                getDimensionMetadataKey(config.getDimension()), DimensionInfo.class);
        DimensionDefaultValueSelectionStrategy strategy = delegate.getStrategy(resource,
                config.getDimension(), di);

        // vector data only support time and elevation now
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.DimensionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.