use of com.dexels.navajo.document.nanoimpl.CaseSensitiveXMLElement in project navajo by Dexels.
the class GeoPoint method createPlaceMark.
@Override
public XMLElement createPlaceMark() {
XMLElement c = new CaseSensitiveXMLElement("Placemark");
c.setAttribute("id", id);
c.addTagKeyValue("name", id);
XMLElement point = createElement();
c.addChild(point);
return c;
}
use of com.dexels.navajo.document.nanoimpl.CaseSensitiveXMLElement in project navajo by Dexels.
the class GeoPolygon method createElement.
@Override
public XMLElement createElement() {
XMLElement c = new CaseSensitiveXMLElement("Polygon");
XMLElement d = new CaseSensitiveXMLElement("outerBoundaryIs");
XMLElement e = new CaseSensitiveXMLElement("LinearRing");
c.addChild(d);
d.addChild(e);
StringBuffer sb = new StringBuffer();
// for (GeoEdge g : createEdgeList()) {
// sb.append(g.a);
// sb.append(" ");
// }
c.addTagKeyValue("name", id);
c.setAttribute("id", id);
for (GeoPoint a : myStartPoints) {
sb.append(a.getCoordinates());
sb.append(" ");
}
e.addTagKeyValue("coordinates", sb.toString());
return c;
}
use of com.dexels.navajo.document.nanoimpl.CaseSensitiveXMLElement in project navajo by Dexels.
the class GeoPolygon method createPlaceMark.
public XMLElement createPlaceMark(String label) {
XMLElement c = new CaseSensitiveXMLElement("Placemark");
if (label == null) {
c.setAttribute("id", id);
c.addTagKeyValue("name", id);
} else {
c.setAttribute("id", label);
c.addTagKeyValue("name", label);
}
XMLElement poly = createElement();
c.addChild(poly);
return c;
}
use of com.dexels.navajo.document.nanoimpl.CaseSensitiveXMLElement in project navajo by Dexels.
the class NavajoFactory method readTypes.
private void readTypes() throws ClassNotFoundException, IOException {
ClassLoader cl = getClass().getClassLoader();
if (cl == null) {
logger.info("Bootstrap classloader detected!");
cl = ClassLoader.getSystemClassLoader();
}
InputStream is = cl.getResourceAsStream("navajotypes.xml");
CaseSensitiveXMLElement types = new CaseSensitiveXMLElement();
types.parseFromStream(is);
is.close();
Vector<XMLElement> children = types.getChildren();
for (int i = 0; i < children.size(); i++) {
XMLElement child = children.get(i);
String navajotype = (String) child.getAttribute("name");
String javaclass = (String) child.getAttribute("type");
String generic = (String) child.getAttribute("generic");
Class<?> c = Class.forName(javaclass);
toJavaType.put(navajotype, c);
toJavaGenericType.put(navajotype, generic);
toNavajoType.put(c, navajotype);
}
}
use of com.dexels.navajo.document.nanoimpl.CaseSensitiveXMLElement in project navajo by Dexels.
the class ScriptCompiler method addProperty.
private void addProperty(final String key, final String type, final String value, final XMLElement xe) {
XMLElement property = new CaseSensitiveXMLElement("property");
xe.addChild(property);
property.setAttribute("name", key);
property.setAttribute("type", type);
property.setAttribute("value", value);
}
Aggregations