List of usage examples for org.dom4j ElementPath getPath
String getPath();
From source file:de.interactive_instruments.etf.bsxm.SecondaryGeometryElementValidationHandler.java
License:Apache License
/** * {@inheritDoc}//from ww w .j ava 2s . c om * <p> * When this is called on a new feature member, the geometry counters are * reset. * </p> */ public void onStart(ElementPath elementPath) { String currentPath = elementPath.getPath(); if (NODE_NAME_FEATURE_MEMBER.equals(Dom4JHelper.getNodeFromPath(Dom4JHelper.getParentPath(currentPath)))) { currentFeatureMember = Dom4JHelper.getNodeFromPath(currentPath); resetGmlGeometryCounters(); } }
From source file:de.interactive_instruments.etf.bsxm.SecondaryGeometryElementValidationHandler.java
License:Apache License
/** {@inheritDoc} */ public void onEnd(ElementPath elementPath) { String nodeName = Dom4JHelper.getNodeFromPath(elementPath.getPath()); if (gmlGeometries.contains(nodeName)) { // Check if this element is a main geometry if (isMainGeometry(elementPath)) { raiseGmlGeometryCounter(nodeName); try { validate(validatorContext, elementPath.getCurrent()); } catch (XMLParsingException e) { LOGGER.error("Unexpected error detected while validating geometry", e); } catch (UnknownCRSException e) { LOGGER.error("Unexpected error detected while validating geometry", e); }/* w w w .j ava 2 s. c o m*/ } else { LOGGER.trace("Element {} is part of another geometry", nodeName); } } }