Package org.apache.chemistry.opencmis.commons.impl.dataobjects

Examples of org.apache.chemistry.opencmis.commons.impl.dataobjects.ExtensionFeatureImpl


            List<ExtensionFeature> features = new ArrayList<ExtensionFeature>();

            for (Object extendedFeature : extendedFeatures) {
                Map<String, Object> jsonFeature = getMap(extendedFeature);

                ExtensionFeatureImpl feature = new ExtensionFeatureImpl();
                feature.setId(getString(jsonFeature, JSON_FEATURE_ID));
                feature.setUrl(getString(jsonFeature, JSON_FEATURE_URL));
                feature.setCommonName(getString(jsonFeature, JSON_FEATURE_COMMON_NAME));
                feature.setVersionLabel(getString(jsonFeature, JSON_FEATURE_VERSION_LABEL));
                feature.setDescription(getString(jsonFeature, JSON_FEATURE_DESCRIPTION));

                Map<String, Object> data = getMap(jsonFeature.get(JSON_FEATURE_DATA));
                if (data != null) {
                    LinkedHashMap<String, String> dataMap = new LinkedHashMap<String, String>();
                    for (Map.Entry<String, Object> e : data.entrySet()) {
                        dataMap.put(e.getKey(), (e.getValue() == null ? null : e.getValue().toString()));
                    }

                    if (!dataMap.isEmpty()) {
                        feature.setFeatureData(dataMap);
                    }
                }

                convertExtension(jsonFeature, feature, FEATURE_KEYS);
View Full Code Here


            List<ExtensionFeature> features = new ArrayList<ExtensionFeature>();

            for (Object extendedFeature : extendedFeatures) {
                Map<String, Object> jsonFeature = getMap(extendedFeature);

                ExtensionFeatureImpl feature = new ExtensionFeatureImpl();
                feature.setId(getString(jsonFeature, JSON_FEATURE_ID));
                feature.setUrl(getString(jsonFeature, JSON_FEATURE_URL));
                feature.setCommonName(getString(jsonFeature, JSON_FEATURE_COMMON_NAME));
                feature.setVersionLabel(getString(jsonFeature, JSON_FEATURE_VERSION_LABEL));
                feature.setDescription(getString(jsonFeature, JSON_FEATURE_DESCRIPTION));

                Map<String, Object> data = getMap(jsonFeature.get(JSON_FEATURE_DATA));
                if (data != null) {
                    LinkedHashMap<String, String> dataMap = new LinkedHashMap<String, String>();
                    for (Map.Entry<String, Object> e : data.entrySet()) {
                        dataMap.put(e.getKey(), (e.getValue() == null ? null : e.getValue().toString()));
                    }

                    if (!dataMap.isEmpty()) {
                        feature.setFeatureData(dataMap);
                    }
                }

                convertExtension(jsonFeature, feature, FEATURE_KEYS);
View Full Code Here

            List<ExtensionFeature> features = new ArrayList<ExtensionFeature>();

            for (Object extendedFeature : extendedFeatures) {
                Map<String, Object> jsonFeature = getMap(extendedFeature);

                ExtensionFeatureImpl feature = new ExtensionFeatureImpl();
                feature.setId(getString(jsonFeature, JSON_FEATURE_ID));
                feature.setUrl(getString(jsonFeature, JSON_FEATURE_URL));
                feature.setCommonName(getString(jsonFeature, JSON_FEATURE_COMMON_NAME));
                feature.setVersionLabel(getString(jsonFeature, JSON_FEATURE_VERSION_LABEL));
                feature.setDescription(getString(jsonFeature, JSON_FEATURE_DESCRIPTION));

                Map<String, Object> data = getMap(jsonFeature.get(JSON_FEATURE_DATA));
                if (data != null) {
                    LinkedHashMap<String, String> dataMap = new LinkedHashMap<String, String>();
                    for (Map.Entry<String, Object> e : data.entrySet()) {
                        dataMap.put(e.getKey(), (e.getValue() == null ? null : e.getValue().toString()));
                    }

                    if (!dataMap.isEmpty()) {
                        feature.setFeatureData(dataMap);
                    }
                }

                convertExtension(jsonFeature, feature, FEATURE_KEYS);
View Full Code Here

        if (isNotEmpty(repositoryInfo.getExtendedFeatures())) {
            List<ExtensionFeature> extensionFeatures = new ArrayList<ExtensionFeature>();
            result.setExtensionFeature(extensionFeatures);

            for (CmisExtensionFeatureType feature : repositoryInfo.getExtendedFeatures()) {
                ExtensionFeatureImpl target = new ExtensionFeatureImpl();

                target.setId(feature.getId());
                target.setUrl(feature.getUrl());
                target.setCommonName(feature.getCommonName());
                target.setVersionLabel(feature.getVersionLabel());
                target.setDescription(feature.getDescription());

                if (isNotEmpty(feature.getFeatureData())) {
                    Map<String, String> featureData = new HashMap<String, String>();

                    for (CmisExtensionFeatureKeyValuePair keyValue : feature.getFeatureData()) {
                        featureData.put(keyValue.getKey(), keyValue.getValue());
                    }

                    target.setFeatureData(featureData);
                }

                convertExtension(feature, target);

                extensionFeatures.add(target);
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.impl.dataobjects.ExtensionFeatureImpl

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.