Package org.apache.clerezza.rdf.core

Examples of org.apache.clerezza.rdf.core.PlainLiteral


        Iterator<PlainLiteral> labels = entity.getText(linkerConfig.getNameField());
        Suggestion match = new Suggestion(entity);
        Collection<PlainLiteral> defaultLabels = new ArrayList<PlainLiteral>();
        boolean matchedLangLabel = false;
        while(labels.hasNext()){
            PlainLiteral label = labels.next();
            String lang = label.getLanguage() != null ? label.getLanguage().toString() : null;
            if((lang == null && curLang == null) ||
                    (lang != null && curLang != null && lang.equalsIgnoreCase(curLang))){
                matchLabel(match, label);
                matchedLangLabel = true;
            } else if((lang == null && mainLang == null) ||
View Full Code Here


   
    public void addEntity(Entity rep){
        entities.put(rep.getUri(), rep);
        Iterator<PlainLiteral> labels = rep.getText(nameField);
        while(labels.hasNext()){
            PlainLiteral label = labels.next();
            for(String token : tokenizer.tokenize(label.getLexicalForm(),null)){
                Collection<Entity> values = data.get(token);
                if(values == null){
                    values = new ArrayList<Entity>();
                    data.put(label.getLexicalForm(), values);
                }
                values.add(rep);
            }
        }
       
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.PlainLiteral

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.