public NamespaceManager withNamespace ( String namespace , String href ) { if ( namespaces . containsKey ( namespace ) ) { throw new RepresentationException ( format ( "Duplicate namespace '%s' found for representation factory" , namespace ) ) ; } if ( ! href . contains ( "{rel}" ) ) { throw new RepresentationException ( format ( "Namespace '%s' does not include {rel} URI template argument." , namespace ) ) ; } return new NamespaceManager ( namespaces . put ( namespace , href ) ) ; }
Update the list of declared namespaces with a new namespace .