@Override public boolean shouldPass(final XmlValidationError xve) { if (xve.getObjectLocation() != null && xve.getObjectLocation().getDomNode() != null && xve.getObjectLocation().getDomNode().getFirstChild() != null) { String nodeName = xve.getObjectLocation().getDomNode().getFirstChild().getNodeName(); return !Strings.isNullOrEmpty(nodeName) && nodeName.contains(GET_DATA_AVAILABILITY); } return false; } };
@Override public boolean shouldPass(final XmlValidationError xve) { if (xve.getObjectLocation() != null && xve.getObjectLocation().getDomNode() != null && xve.getObjectLocation().getDomNode().getFirstChild() != null) { String nodeName = xve.getObjectLocation().getDomNode().getFirstChild().getNodeName(); return !Strings.isNullOrEmpty(nodeName) && nodeName.contains(GET_DATA_AVAILABILITY); } return false; } };
private boolean validateSubstitutionGroup(final XmlValidationError xve) { try { final SFSpatialSamplingFeatureType featureDocument = SFSpatialSamplingFeatureType.Factory.parse(xve.getObjectLocation().xmlText()); final Collection<XmlError> revalidation = XMLBeansParser.validate(featureDocument); return revalidation.size()==0?true:false; } catch (final XmlException e) {} return false; }
private boolean validateSubstitutionGroup(final XmlValidationError xve) { try { final SosInsertionMetadataType sosInsertionMetadataType = SosInsertionMetadataType.Factory.parse(xve.getObjectLocation().xmlText()); final Collection<XmlError> revalidation = XMLBeansParser.validate(sosInsertionMetadataType); return revalidation.size()==0?true:false; } catch (final XmlException e) {} return false; }