/** * Constructor to copy from another {@link IIterableNamespaceContext} * * @param aOther * Object to copy the data from. May be <code>null</code>. */ public MapBasedNamespaceContext (@Nullable final IIterableNamespaceContext aOther) { addMappings (aOther); }
/** * Constructor with prefix to namespace URL map * * @param aOther * Map with prefix to namespace URL. May be <code>null</code>. * @since 8.5.3 */ public MapBasedNamespaceContext (@Nullable final Map <String, String> aOther) { addMappings (aOther); }
@Nonnull public final MapBasedNamespaceContext addMappings (@Nullable final IIterableNamespaceContext aOther) { if (aOther != null) addMappings (aOther.getPrefixToNamespaceURIMap ()); return this; }
public UBLPEWriterBuilder (@Nonnull final EUBLPEDocumentType eDocType) { super (eDocType); // Create a special namespace context for the passed document type final MapBasedNamespaceContext aNSContext = new MapBasedNamespaceContext (); aNSContext.addMappings (new UBLPENamespaceContext ()); aNSContext.addDefaultNamespaceURI (m_aDocType.getNamespaceURI ()); setNamespaceContext (aNSContext); }
public UBLTRWriterBuilder (@Nonnull final EUBLTRDocumentType eDocType) { super (eDocType); // Create a special namespace context for the passed document type final MapBasedNamespaceContext aNSContext = new MapBasedNamespaceContext (); aNSContext.addMappings (new UBLTRNamespaceContext ()); aNSContext.addDefaultNamespaceURI (m_aDocType.getNamespaceURI ()); setNamespaceContext (aNSContext); }