Package com.ibm.sbt.util

Examples of com.ibm.sbt.util.DataNavigator.stringValue()


    public static String getURL(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
        entry = entry.get("photos");
        entry = entry.selectEq("type", "Photo");
        return entry.stringValue("value");
    }

    public static String getEMail(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
View Full Code Here


    }

    public static String getEMail(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
        return entry.stringValue("emailAddress");
    }

    public static String getPrimaryAddress(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
View Full Code Here

    public static String getPrimaryAddress(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
        entry = entry.get("addresses");
        entry = entry.selectEq("title", "Primary Address");
        return entry.stringValue("address");
    }

    public static String getPrimaryPhone(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
View Full Code Here

    public static String getPrimaryPhone(Object json){
        JsonNavigator nav = new JsonNavigator(json);
        DataNavigator entry = nav.get("entry");
        entry = entry.get("phoneNumbers");
        entry = entry.selectEq("title", "Primary Telephone");
        return entry.stringValue("phone");
    }
}
View Full Code Here

        List<LLContact> contacts = new ArrayList<LLContact>();
        if(navigator != null){
            for(int i = 0; i < navigator.getCount(); i++){
                DataNavigator nav = navigator.get(i);
                DataNavigator photo = nav.get("photos").selectEq("type", "Photo");
                String val = photo.stringValue("value");
                LLContact contact = new LLContact();
                contact.setPhoto(val);
                val = nav.stringValue("displayName");
                contact.setName(val);
                val = nav.stringValue("emailAddress");
View Full Code Here

        DataNavigator contentsNav = navigator.get("contents");
        for (int i = 0; i < contentsNav.getCount(); ++i) {
            FileEntry entry = new FileEntry();
            DataNavigator nav = contentsNav.get(i);
            try {
                String title = nav.stringValue("path");
                String[] result = title.split("/");
                entry.setTitle(result[result.length - 1]);
                entry.setUpdated(nav.dateValue("modified"));
                entry.setBytes(nav.intValue("bytes"));
                entry.setSize(nav.stringValue("size"));
View Full Code Here

                String title = nav.stringValue("path");
                String[] result = title.split("/");
                entry.setTitle(result[result.length - 1]);
                entry.setUpdated(nav.dateValue("modified"));
                entry.setBytes(nav.intValue("bytes"));
                entry.setSize(nav.stringValue("size"));
                entry.setAuthorName(params.get("subscriberId"));
                entry.setVersion(String.valueOf( nav.doubleValue("revision")));
                boolean isDir = nav.booleanValue("is_dir");
                entry.setIsDirectory(isDir);
                if(!isDir){
View Full Code Here

                entry.setAuthorName(params.get("subscriberId"));
                entry.setVersion(String.valueOf( nav.doubleValue("revision")));
                boolean isDir = nav.booleanValue("is_dir");
                entry.setIsDirectory(isDir);
                if(!isDir){
                    entry.setMimeType(nav.stringValue("mime_type"));
                }
                else{
                    entry.setMimeType("undefined");
                }
                entry.setIcon(MimeIconRegistry.getInstance().get(entry.getMimeType()));
View Full Code Here

                }
                else{
                    entry.setMimeType("undefined");
                }
                entry.setIcon(MimeIconRegistry.getInstance().get(entry.getMimeType()));
                entry.setPath(nav.stringValue("path"));
                String proxyUrl = "xsp/.proxy/files/" + title + "?" + PARAM_TYPE + "=" + TYPE + "&path=" + entry.getPath() + "&mimeType=" + entry.getMimeType() + "&" + PARAM_ENDPOINT_NAME + "=";
                if(StringUtil.isNotEmpty(epName)){
                    proxyUrl = proxyUrl + epName;
                }
                else{
View Full Code Here

                            String epName = accessor.findEndpointName();
                            for (int i = 0; i < entries.getCount(); i++) {
                                DataNavigator navigator = entries.get(i);
                                FileEntry fe = new FileEntry();
                                fe.setRepository(repId);
                                fe.setTitle(navigator.stringValue(TAG_LABEL));
                                fe.setUpdated(navigator.dateValue(TAG_MODIFIED));
                                fe.setAuthorName(navigator.stringValue(TAG_AUTHOR + "/" + TAG_NAME));
                                fe.setDescription(navigator.stringValue(TAG_SUMMARY));
                                fe.setFileId(navigator.stringValue(TAG_UUID));
                                fe.setUniqueId(fe.getFileId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.