Skip to content

Commit

Permalink
Merge branch 'maintenance/4.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
CarstenHollmann committed Jan 29, 2016
2 parents db107aa + 75f2fe9 commit 3afd5cd
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ public XmlObject encode(Object element, Map<HelperValues, String> additionalValu
} else {
throw new UnsupportedEncoderInputException(this, element);
}
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ else if (response instanceof SosProcedureDescriptionUnknowType) {
}
// check if all gml:id are unique
XmlHelper.makeGmlIdsUnique(encodedObject.getDomNode());
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ public XmlObject encode(final Object element, final Map<HelperValues, String> ad
} else {
throw new UnsupportedEncoderInputException(this, element);
}
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ public XmlObject encode(Object element, Map<HelperValues, String> additionalValu
} else {
throw new UnsupportedEncoderInputException(this, element);
}
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ public XmlObject encode(Object objectToEncode, Map<HelperValues, String> additio
}
// check if all gml:id are unique
XmlHelper.makeGmlIdsUnique(encodedObject.getDomNode());
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,10 @@ public XmlObject encode(Object element, Map<HelperValues, String> additionalValu
} else {
throw new UnsupportedEncoderInputException(this, element);
}
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ public Set<SchemaLocation> getSchemaLocations() {
public XmlObject encode(AbstractFeature abstractFeature, Map<HelperValues, String> additionalValues)
throws OwsExceptionReport {
XmlObject encodedObject = createFeature(abstractFeature);
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ public XmlObject encode(final AbstractServiceRequest<?> communicationObject) thr
public XmlObject encode(final AbstractServiceRequest<?> request, final Map<HelperValues, String> additionalValues)
throws OwsExceptionReport {
XmlObject encodedObject = encodeRequests(request);
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ public XmlObject encode(final Object sosSweType, final Map<HelperValues, String>
} else {
throw new UnsupportedEncoderInputException(this, sosSweType);
}
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
*/
public class GetDataAvailabilityXmlEncoder extends AbstractResponseEncoder<GetDataAvailabilityResponse> {

@SuppressWarnings("unused")
private static final Logger LOG = LoggerFactory.getLogger(GetDataAvailabilityXmlEncoder.class);

public GetDataAvailabilityXmlEncoder() {
Expand All @@ -80,8 +79,10 @@ protected XmlObject create(GetDataAvailabilityResponse response) throws OwsExcep
} else {
new GetDataAvailabilityStreamWriter(response.getVersion(), response.getDataAvailabilities()).write(out);
XmlObject encodedObject = XmlObject.Factory.parse(out.toString("UTF8"));
LOG.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
if (LOG.isDebugEnabled()) {
LOG.debug("Encoded object {} is valid: {}", encodedObject.schemaType().toString(),
XmlHelper.validateDocument(encodedObject));
}
return encodedObject;
}
return XmlObject.Factory.parse(out.toString("UTF8"));
Expand Down

0 comments on commit 3afd5cd

Please sign in to comment.