Adds a new namespace
@return the current instance of <code>WebJsptaglibraryDescriptor</code>
353371
public WebJsptaglibraryDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
1046802
function(namespace, handler) {
            if (Logger.namespaces[namespace] == null) {
                Logger.namespaces[namespace] = new Logger({
                    namespace: namespace,
                    handler: handler
                });
            }
            return Logger.namespaces[namespace];
        }
83170
public ISarlSpaceBuilder addSarlSpace(String name) {
		ISarlSpaceBuilder builder = this.sarlSpaceProvider.get();
		builder.eInit(getScript(), name, getTypeResolutionContext());
		return builder;
	}
1117297
def _add_namespaces(self):
        
        self.doc.add_namespace(NIDM)
        self.doc.add_namespace(NIIRI)
        self.doc.add_namespace(CRYPTO)
        self.doc.add_namespace(DCT)
        self.doc.add_namespace(DC)
        self.doc.add_namespace(NFO)
        self.doc.add_namespace(OBO)
        self.doc.add_namespace(SCR)
        self.doc.add_namespace(NIF)
1360401
@Override
    public void createNamespace() {
        // Use a temporary, no-keyspace session
        try (DBConn dbConn = createAndConnectConn(null)) {
            synchronized (m_schemaLock) {
                if (!m_schemaMgr.keyspaceExists(dbConn, m_keyspace)) {
                    m_schemaMgr.createKeyspace(dbConn, m_keyspace);
                }
            }
        }
    }
153880
private void addNameSpaceStorage(int nsID, NameSpaceSliceStorage nsStorage)
      throws IOException {
    if (!this.nsStorageMap.containsKey(nsID)) {
      this.nsStorageMap.put(nsID, nsStorage);
    }   
  }
346902
KeyFactory newNativeKeyFactory() {
    KeyFactory keyFactory = datastore.newKeyFactory();
    String namespace = Tenant.getNamespace();
    if (namespace != null) {
      keyFactory.setNamespace(namespace);
    }
    return keyFactory;
  }
903163
public BeansDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
530280
public ValidationMappingDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
310026
def build_namespace(namespace)
      raise(TriplestoreAdapter::TriplestoreException, "build_namespace received blank namespace") if namespace.empty?
      request = Net::HTTP::Post.new("#{build_url}/blazegraph/namespace")
      request['Content-Type'] = 'text/plain'
      request.body = "com.bigdata.rdf.sail.namespace=#{namespace}"
      @http.request(@uri, request)
      "#{build_url}/blazegraph/namespace/#{namespace}/sparql"
    end
217066
@Override
    public Iterator<Namespace> getNamespaces()
    {
        if (mNsList == null) {
            int firstLocal = mFirstLocalNs;
            int len = mNsLength - firstLocal;
            if (len == 0) { // can this happen?
                return DataUtil.emptyIterator();
            }
            if (len == 2) { // only one NS
                return DataUtil.<Namespace>singletonIterator(NamespaceEventImpl.constructNamespace
                        (mLocation,
                                mNamespaces[firstLocal],
                                mNamespaces[firstLocal+1]));
            }
            ArrayList<Namespace> l = new ArrayList<Namespace>(len >> 1);
            String[] ns = mNamespaces;
            for (len = mNsLength; firstLocal < len;
                 firstLocal += 2) {
                l.add(NamespaceEventImpl.constructNamespace(mLocation, ns[firstLocal],
                                              ns[firstLocal+1]));
            }
            mNsList = l;
        }
        return mNsList.iterator();
    }
17786
protected Serializer serializer() {
    Serializer serializer = this.serializer;
    if (serializer == null) {
      synchronized (this) {
        serializer = this.serializer;
        if (serializer == null) {
          NamespaceConfig config = this.config.getNamespaceConfig();
          if (config == null) {
            serializer = Serializer.using(Namespaces.BASIC);
          } else {
            serializer = Serializer.using(Namespace.builder()
                .register(Namespaces.BASIC)
                .nextId(Namespaces.BEGIN_USER_CUSTOM_ID)
                .register(new Namespace(config))
                .build());
          }
          this.serializer = serializer;
        }
      }
    }
    return serializer;
  }
480458
public EjbJarDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
174381
public PortletDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
19375
public final BELScriptWalker.define_namespace_return define_namespace() throws RecognitionException {
        BELScriptWalker.define_namespace_return retval = new BELScriptWalker.define_namespace_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        CommonTree _first_0 = null;
        CommonTree _last = null;

        CommonTree isdefault=null;
        CommonTree name=null;
        CommonTree rloc=null;
        CommonTree string_literal23=null;
        CommonTree string_literal24=null;
        CommonTree string_literal25=null;
        CommonTree string_literal26=null;

        CommonTree isdefault_tree=null;
        CommonTree name_tree=null;
        CommonTree rloc_tree=null;
        CommonTree string_literal23_tree=null;
        CommonTree string_literal24_tree=null;
        CommonTree string_literal25_tree=null;
        CommonTree string_literal26_tree=null;

        try {
            // BELScriptWalker.g:308:17: ( ( 'DEFINE' ( (isdefault= 'DEFAULT' )? 'NAMESPACE' ) ) name= OBJECT_IDENT 'AS' 'URL' rloc= QUOTED_VALUE )
            // BELScriptWalker.g:309:5: ( 'DEFINE' ( (isdefault= 'DEFAULT' )? 'NAMESPACE' ) ) name= OBJECT_IDENT 'AS' 'URL' rloc= QUOTED_VALUE
            {
            root_0 = (CommonTree)adaptor.nil();

            // BELScriptWalker.g:309:5: ( 'DEFINE' ( (isdefault= 'DEFAULT' )? 'NAMESPACE' ) )
            // BELScriptWalker.g:309:6: 'DEFINE' ( (isdefault= 'DEFAULT' )? 'NAMESPACE' )
            {
            _last = (CommonTree)input.LT(1);
            string_literal23=(CommonTree)match(input,27,FOLLOW_27_in_define_namespace312); 
            string_literal23_tree = (CommonTree)adaptor.dupNode(string_literal23);

            adaptor.addChild(root_0, string_literal23_tree);

            // BELScriptWalker.g:309:15: ( (isdefault= 'DEFAULT' )? 'NAMESPACE' )
            // BELScriptWalker.g:309:16: (isdefault= 'DEFAULT' )? 'NAMESPACE'
            {
            // BELScriptWalker.g:309:16: (isdefault= 'DEFAULT' )?
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( (LA7_0==28) ) {
                alt7=1;
            }
            switch (alt7) {
                case 1 :
                    // BELScriptWalker.g:309:17: isdefault= 'DEFAULT'
                    {
                    _last = (CommonTree)input.LT(1);
                    isdefault=(CommonTree)match(input,28,FOLLOW_28_in_define_namespace318); 
                    isdefault_tree = (CommonTree)adaptor.dupNode(isdefault);

                    adaptor.addChild(root_0, isdefault_tree);


                    }
                    break;

            }

            _last = (CommonTree)input.LT(1);
            string_literal24=(CommonTree)match(input,29,FOLLOW_29_in_define_namespace322); 
            string_literal24_tree = (CommonTree)adaptor.dupNode(string_literal24);

            adaptor.addChild(root_0, string_literal24_tree);


            }


            }

            _last = (CommonTree)input.LT(1);
            name=(CommonTree)match(input,OBJECT_IDENT,FOLLOW_OBJECT_IDENT_in_define_namespace328); 
            name_tree = (CommonTree)adaptor.dupNode(name);

            adaptor.addChild(root_0, name_tree);

            _last = (CommonTree)input.LT(1);
            string_literal25=(CommonTree)match(input,30,FOLLOW_30_in_define_namespace330); 
            string_literal25_tree = (CommonTree)adaptor.dupNode(string_literal25);

            adaptor.addChild(root_0, string_literal25_tree);

            _last = (CommonTree)input.LT(1);
            string_literal26=(CommonTree)match(input,31,FOLLOW_31_in_define_namespace332); 
            string_literal26_tree = (CommonTree)adaptor.dupNode(string_literal26);

            adaptor.addChild(root_0, string_literal26_tree);

            _last = (CommonTree)input.LT(1);
            rloc=(CommonTree)match(input,QUOTED_VALUE,FOLLOW_QUOTED_VALUE_in_define_namespace336); 
            rloc_tree = (CommonTree)adaptor.dupNode(rloc);

            adaptor.addChild(root_0, rloc_tree);


                    final String nametext = name.getText();
                    final String rloctext = rloc.getText();

                    BELNamespaceDefinition belnsd;
                    if (isdefault != null) {
                        belnsd = new BELNamespaceDefinition(nametext, rloctext, true);
                    } else {
                        belnsd = new BELNamespaceDefinition(nametext, rloctext, false);
                    }

                    nslist.add(belnsd);
                    definedNamespaces.put(nametext, belnsd);
                

            }

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
1047257
protected Map<Namespace, List<String>> createNamespaceMap(List<NamespaceDefinition> namespaceDefs) throws XmlException {
        ArrayList<Namespace> namespaces = new ArrayList<Namespace>();

        // add all root namespaces
        for(NamespaceDefinition namespaceDef: namespaceDefs) {
            Namespace node = new Namespace(namespaceDef);
            if(namespaces.contains(node)) {
                throw new XmlException("duplicate NamespaceDefinitions found: " + node.getId());
            }
            namespaces.add(node);
        }

        // go through each namespace's dependencies to see if any are missing
        for(Namespace namespace: namespaces) {
            List<String> dependencyIds = namespace.getDirectDependencyIds();
            for(String id: dependencyIds) {
                if(find(namespaces, id) == null) {
                    throw new XmlException("Found missing dependency: " + id);
                }
            }
        }

        HashMap<Namespace, List<String>> namespaceFullDependencyMap = new HashMap<Namespace, List<String>>();
        for(Namespace namespace: namespaces) {
            ArrayList<String> fullDependencies = new ArrayList<String>();

            for(String directDependencyId: namespace.getDirectDependencyIds()) {
                addDependenciesRecursively(namespace, namespaces, directDependencyId, fullDependencies);
            }

            namespaceFullDependencyMap.put(namespace, fullDependencies);
        }

        return(namespaceFullDependencyMap);
    }
809613
protected void namespaceImpl(String prefix, String namespaceURI) {
        if (! (this.xmlNode instanceof Element)) {
            throw new RuntimeException(
                "Cannot add an attribute to non-Element underlying node: "
                + this.xmlNode);
        }
        if (prefix != null && prefix.length() > 0) {
            ((Element) xmlNode).setAttributeNS("http://www.w3.org/2000/xmlns/",
                "xmlns:" + prefix, namespaceURI);
        } else {
            ((Element) xmlNode).setAttributeNS("http://www.w3.org/2000/xmlns/",
                "xmlns", namespaceURI);
        }
    }