Package org.apache.stanbol.entityhub.servicesapi.util

Examples of org.apache.stanbol.entityhub.servicesapi.util.TextIterator


        return getValuesAsCollection(field).iterator();
    }
    @Override
    public Iterator<Text> getText(String field) {
        Collection<Object> values = getValuesAsCollection(field);
        return values != null?new TextIterator(valueFactory,values.iterator()):null;
    }
View Full Code Here


    }

    @Override
    public Iterator<Text> get(String field, String... languages) {
        final Collection<Object> values = getValuesAsCollection(field);
        return new TextIterator(valueFactory,values.iterator(), languages);
    }
View Full Code Here

        if(values == null) {
            return;
        }
        if(values instanceof Collection<?>){
            int removed = 0;
            for(Iterator<Text> it = new TextIterator(valueFactory,
                    ((Collection<Object>)values).iterator(),
                    languages);it.hasNext();){
                it.next();//go to the next Element
                it.remove(); //and remove ist
                removed++;
            }
            if(removed>0){ //if some elements where removed
                //check if there is only a singe or no elements left for the field
                int size = ((Collection<Object>)values).size();
View Full Code Here

        if(values == null) {
            return;
        }
        if(values instanceof Collection<?>){
            int removed = 0;
            for(Iterator<Text> it = new TextIterator(valueFactory,
                    ((Collection<Object>)values).iterator(),
                    languages);it.hasNext();){
                Text label = it.next();//go to the next element
                if(text.equals(label.getText())){
                    it.remove();//and remove it
                    removed++;
                }
            }
            if(removed>0){ //if some elements where removed
                //check if there is only a singe or no elements left for the field
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.servicesapi.util.TextIterator

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.