use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class InvokeConstructorMapObjectFactory method toMap.
@Override
public MapEx toMap() {
final MapEx map = new LinkedHashMapEx();
map.put("typeName", getTypeName());
map.put("description", getDescription());
map.put("typeClass", this.typeClass);
return map;
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class MapObjectFactory method toObject.
static <V> V toObject(final Object source) {
final Resource resource = Resource.getResource(source);
final Resource oldResource = Resource.setBaseResource(resource.getParent());
try {
final MapEx properties = Json.toMap(resource);
return toObject(properties);
} catch (final Throwable t) {
Logs.error(MapObjectFactoryRegistry.class, "Cannot load object from " + resource, t);
return null;
} finally {
Resource.setBaseResource(oldResource);
}
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class InvokeMethodMapObjectFactory method toMap.
@Override
public MapEx toMap() {
final MapEx map = new LinkedHashMapEx();
map.put("typeName", getTypeName());
map.put("description", getDescription());
map.put("typeClass", this.typeClass);
map.put("methodName", this.methodName);
return map;
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class MavenPom method getDependencyVersions.
public Map<String, String> getDependencyVersions() {
final Map<String, String> versions = new HashMap<>();
final MavenPom parent = getParentPom();
if (parent != null) {
versions.putAll(parent.getDependencyVersions());
}
final MapEx dependencyManagement = getProperty("dependencyManagement");
if (dependencyManagement != null) {
final MapEx dependencyMap = dependencyManagement.getValue("dependencies");
if (dependencyMap != null) {
final List<MapEx> dependencyList = getList(dependencyMap, "dependency");
if (dependencyList != null) {
for (final MapEx dependency : dependencyList) {
final String groupId = getMapValue(dependency, "groupId", null);
final String artifactId = getMapValue(dependency, "artifactId", null);
final String version = getMapValue(dependency, "version", null);
versions.put(groupId + ":" + artifactId, version);
}
}
}
}
return versions;
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class MavenPom method getPomProperties.
@Override
public MapEx getPomProperties() {
if (this.pomProperties == null) {
return MapEx.EMPTY;
} else {
if (this.mergedPomProperties == null) {
final MapEx properties = new LinkedHashMapEx();
final MavenPom parentPom = getParentPom();
if (parentPom != null) {
final MapEx parentProperties = parentPom.getPomProperties();
properties.putAll(parentProperties);
}
properties.putAll(this.pomProperties);
properties.put("project.artifactId", getArtifactId());
properties.put("project.version", getVersion());
properties.put("project.groupId", getGroupId());
this.mergedPomProperties = properties;
}
return this.mergedPomProperties;
}
}
Aggregations