Package org.apache.stanbol.entityhub.servicesapi.model

Examples of org.apache.stanbol.entityhub.servicesapi.model.Text


                                               String language) {
        MGraph graph = ci.getMetadata();
        UriRef contentItemId = ci.getUri();
        // 1. check if the returned Entity does has a label -> if not return null
        // add labels (set only a single label. Use "en" if available!
        Text label = null;
        Iterator<Text> labels = representation.getText(nameField);
        while (labels.hasNext()) {
            Text actLabel = labels.next();
            if (label == null) {
                label = actLabel;
            } else if(language != null){
                String actLang = actLabel.getLanguage();
                if(actLang != null && actLang.startsWith(language)) {
                    label = actLabel;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.servicesapi.model.Text

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.