Search in sources :

Example 96 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class JsonMapIterator method next.

/**
 * Return the next record from the iterator.
 *
 * @return The record
 */
@Override
public MapEx next() {
    if (!this.hasNext) {
        throw new NoSuchElementException("No more elements");
    } else {
        final MapEx object = this.currentObject;
        readNextRecord();
        return object;
    }
}
Also used : MapEx(com.revolsys.collection.map.MapEx) NoSuchElementException(java.util.NoSuchElementException)

Example 97 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class FeatureLayer method newRecordReader.

@Override
public <V extends Record> RecordReader newRecordReader(final RecordFactory<V> recordFactory, final Query query) {
    final MapEx queryParameters = new LinkedHashMapEx();
    final String resourceId = this.featureSource.getResourceId();
    queryParameters.put("RESOURCEID", resourceId);
    final String name = this.recordDefinition.getName();
    queryParameters.put("CLASSNAME", name);
    int offset = 0;
    int limit = Integer.MAX_VALUE;
    if (query != null) {
        offset = query.getOffset();
        limit = query.getLimit();
    }
    return new MapGuideServerFeatureIterator(this, queryParameters, offset, limit, recordFactory);
}
Also used : LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx) MapEx(com.revolsys.collection.map.MapEx) LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx)

Example 98 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class GeometryOperationTest method toMap.

@Override
public MapEx toMap() {
    final MapEx map = new LinkedHashMapEx();
    map.put("type", "test");
    addToMap(map, "description", this.testDescription);
    map.put("propertyName", this.geometryIndex.toLowerCase());
    map.put("methodName", this.operation);
    final List<Object> arguments = new ArrayList<>();
    for (int i = 0; i < this.arguments.size(); i++) {
        final Object argument = this.arguments.get(i);
        if (argument instanceof String) {
            final String string = (String) argument;
            if ("a".equalsIgnoreCase(string)) {
                arguments.add(Collections.singletonMap("reference", "a"));
            } else if ("b".equalsIgnoreCase(string)) {
                arguments.add(Collections.singletonMap("reference", "b"));
            } else {
                arguments.add(argument);
            }
        } else {
            arguments.add(argument);
        }
    }
    addToMap(map, "arguments", arguments, Collections.emptyList());
    return map;
}
Also used : LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx) MapEx(com.revolsys.collection.map.MapEx) ArrayList(java.util.ArrayList) LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx)

Example 99 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class AbstractSymbolElement method toMap.

@Override
public MapEx toMap() {
    final String typeName = getTypeName();
    final MapEx map = newTypeMap(typeName);
    map.put("name", getName());
    map.put("title", getTitle());
    return map;
}
Also used : MapEx(com.revolsys.collection.map.MapEx)

Example 100 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class AbstractWebService method toMap.

@Override
public MapEx toMap() {
    final MapEx map = newTypeMap(getWebServiceTypeName());
    final String name = getName();
    addToMap(map, "name", name);
    map.put("serviceUrl", this.serviceUrl);
    addToMap(map, "username", this.username);
    addToMap(map, "password", PasswordUtil.encrypt(this.password));
    return map;
}
Also used : LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx) MapEx(com.revolsys.collection.map.MapEx)

Aggregations

MapEx (com.revolsys.collection.map.MapEx)144 LinkedHashMapEx (com.revolsys.collection.map.LinkedHashMapEx)48 ArrayList (java.util.ArrayList)17 Resource (com.revolsys.spring.resource.Resource)9 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)7 Map (java.util.Map)7 HashMap (java.util.HashMap)6 PathName (com.revolsys.io.PathName)5 UrlResource (com.revolsys.spring.resource.UrlResource)5 DataType (com.revolsys.datatype.DataType)4 FieldDefinition (com.revolsys.record.schema.FieldDefinition)4 PathResource (com.revolsys.spring.resource.PathResource)4 Color (java.awt.Color)4 LinkedHashMap (java.util.LinkedHashMap)4 List (java.util.List)4 TreeMap (java.util.TreeMap)4 NamedLinkedHashMapEx (com.revolsys.collection.map.NamedLinkedHashMapEx)3 Geometry (com.revolsys.geometry.model.Geometry)3 LineString (com.revolsys.geometry.model.LineString)3 Record (com.revolsys.record.Record)3