use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.ObjectFactory in project RouteConverter by cpesch.
the class Kml22Format method createLineStyle.
private StyleType createLineStyle(String styleName, double width, byte[] color) {
ObjectFactory objectFactory = new ObjectFactory();
StyleType styleType = objectFactory.createStyleType();
styleType.setId(styleName);
LineStyleType lineStyleType = objectFactory.createLineStyleType();
styleType.setLineStyle(lineStyleType);
lineStyleType.setColor(color);
lineStyleType.setWidth(width);
return styleType;
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.ObjectFactory in project RouteConverter by cpesch.
the class Kml22Format method createSpeedSegment.
private PlacemarkType createSpeedSegment(int currentSegment, int speedClass, List<String> coordinates) {
ObjectFactory objectFactory = new ObjectFactory();
PlacemarkType placemarkType = objectFactory.createPlacemarkType();
placemarkType.setName("Segment " + currentSegment);
placemarkType.setDescription(getSpeedDescription(speedClass));
placemarkType.setStyleUrl('#' + getSpeedColor(speedClass));
placemarkType.setVisibility(FALSE);
LineStringType lineStringType = objectFactory.createLineStringType();
lineStringType.getCoordinates().addAll(coordinates);
placemarkType.setAbstractGeometryGroup(objectFactory.createLineString(lineStringType));
return placemarkType;
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.ObjectFactory in project RouteConverter by cpesch.
the class Kml22Format method createVec2Type.
private Vec2Type createVec2Type(double x, double y, UnitsEnumType unitX, UnitsEnumType unitY) {
ObjectFactory objectFactory = new ObjectFactory();
Vec2Type vec2Type = objectFactory.createVec2Type();
vec2Type.setX(x);
vec2Type.setY(y);
vec2Type.setXunits(unitX);
vec2Type.setYunits(unitY);
return vec2Type;
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.ObjectFactory in project RouteConverter by cpesch.
the class Kml22Format method createScreenOverlayImage.
private ScreenOverlayType createScreenOverlayImage(String name, String url, Vec2Type overlayXY, Vec2Type screenXY, Vec2Type size) {
ObjectFactory objectFactory = new ObjectFactory();
ScreenOverlayType screenOverlayType = objectFactory.createScreenOverlayType();
screenOverlayType.setName(name);
screenOverlayType.setOverlayXY(overlayXY);
screenOverlayType.setScreenXY(screenXY);
screenOverlayType.setSize(size);
LinkType icon = objectFactory.createLinkType();
icon.setHref(url);
screenOverlayType.setIcon(icon);
return screenOverlayType;
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.ObjectFactory in project RouteConverter by cpesch.
the class Kml22Format method createRoute.
private PlacemarkType createRoute(KmlRoute route) {
ObjectFactory objectFactory = new ObjectFactory();
PlacemarkType placemarkType = objectFactory.createPlacemarkType();
// deactivated to preserve route name in folder name
// placemarkType.setName(ROUTE);
// placemarkType.setDescription(asDescription(route.getDescription()));
placemarkType.setStyleUrl("#" + ROUTE_LINE_STYLE);
MultiGeometryType multiGeometryType = objectFactory.createMultiGeometryType();
placemarkType.setAbstractGeometryGroup(objectFactory.createMultiGeometry(multiGeometryType));
LineStringType lineStringType = objectFactory.createLineStringType();
multiGeometryType.getAbstractGeometryGroup().add(objectFactory.createLineString(lineStringType));
List<String> coordinates = lineStringType.getCoordinates();
for (KmlPosition position : route.getPositions()) {
coordinates.add(createCoordinates(position, false));
}
return placemarkType;
}
Aggregations