|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2014 the original author or authors. |
|
|
|
* Copyright 2002-2017 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -474,9 +474,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing |
|
|
|
context.addPackages(targetPackages); |
|
|
|
context.addPackages(targetPackages); |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.castorProperties != null) { |
|
|
|
if (this.castorProperties != null) { |
|
|
|
for (Map.Entry<String, String> property : this.castorProperties.entrySet()) { |
|
|
|
this.castorProperties.forEach(context::setProperty); |
|
|
|
context.setProperty(property.getKey(), property.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return context; |
|
|
|
return context; |
|
|
|
} |
|
|
|
} |
|
|
@ -563,19 +561,13 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing |
|
|
|
marshaller.setSchemaLocation(this.schemaLocation); |
|
|
|
marshaller.setSchemaLocation(this.schemaLocation); |
|
|
|
marshaller.setUseXSITypeAtRoot(this.useXSITypeAtRoot); |
|
|
|
marshaller.setUseXSITypeAtRoot(this.useXSITypeAtRoot); |
|
|
|
if (this.doctypes != null) { |
|
|
|
if (this.doctypes != null) { |
|
|
|
for (Map.Entry<String, String> doctype : this.doctypes.entrySet()) { |
|
|
|
this.doctypes.forEach(marshaller::setDoctype); |
|
|
|
marshaller.setDoctype(doctype.getKey(), doctype.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (this.processingInstructions != null) { |
|
|
|
if (this.processingInstructions != null) { |
|
|
|
for (Map.Entry<String, String> processingInstruction : this.processingInstructions.entrySet()) { |
|
|
|
this.processingInstructions.forEach(marshaller::addProcessingInstruction); |
|
|
|
marshaller.addProcessingInstruction(processingInstruction.getKey(), processingInstruction.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (this.namespaceMappings != null) { |
|
|
|
if (this.namespaceMappings != null) { |
|
|
|
for (Map.Entry<String, String> entry : this.namespaceMappings.entrySet()) { |
|
|
|
this.namespaceMappings.forEach(marshaller::setNamespaceMapping); |
|
|
|
marshaller.setNamespaceMapping(entry.getKey(), entry.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -666,9 +658,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing |
|
|
|
unmarshaller.setReuseObjects(this.reuseObjects); |
|
|
|
unmarshaller.setReuseObjects(this.reuseObjects); |
|
|
|
unmarshaller.setClearCollections(this.clearCollections); |
|
|
|
unmarshaller.setClearCollections(this.clearCollections); |
|
|
|
if (this.namespaceToPackageMapping != null) { |
|
|
|
if (this.namespaceToPackageMapping != null) { |
|
|
|
for (Map.Entry<String, String> mapping : this.namespaceToPackageMapping.entrySet()) { |
|
|
|
this.namespaceToPackageMapping.forEach(unmarshaller::addNamespaceToPackageMapping); |
|
|
|
unmarshaller.addNamespaceToPackageMapping(mapping.getKey(), mapping.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (this.entityResolver != null) { |
|
|
|
if (this.entityResolver != null) { |
|
|
|
unmarshaller.setEntityResolver(this.entityResolver); |
|
|
|
unmarshaller.setEntityResolver(this.entityResolver); |
|
|
|