Adds a new namespace
@return the current instance of <code>PortletDescriptor</code>
174381
public PortletDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
687271
public ConnectorDescriptor removeAllNamespaces()
   {
      List<String> nameSpaceKeys = new ArrayList<String>();
      java.util.Map<String, String> attributes = model.getAttributes();
      for (Entry<String, String> e : attributes.entrySet())
      {
         final String name = e.getKey();
         final String value = e.getValue();
         if (value != null && value.startsWith("http://")) 
         {
            nameSpaceKeys.add(name);
         }
      }
      for (String name: nameSpaceKeys)
      {
         model.removeAttribute(name);
      }
      return this;
   }
151911
public WebFacesPartialResponseDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
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();
    }
369452
def add_namespace(self, module):
        
        uri = module.search_one("namespace").arg
        prefix = module.search_one("prefix").arg
        if uri in self.namespaces: return self.namespaces[uri]
        end = 1
        new = prefix
        while new in list(self.namespaces.values()):
            new = "%s%x" % (prefix,end)
            end += 1
        self.namespaces[uri] = new
        self.module_prefixes[module.arg] = new
        for inc in module.search("include"):
            self.module_prefixes[inc.arg] = new
        return new
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);
                }
            }
        }
    }
1003096
@Nonnull
  public final XMLWriterSettings setNamespaceContext (@Nullable final INamespaceContext aNamespaceContext)
  {
    // A namespace context must always be present, to resolve default namespaces
    m_aNamespaceContext = aNamespaceContext != null ? aNamespaceContext : new MapBasedNamespaceContext ();
    return this;
  }
1012725
public boolean addDescriptor() {

        saveLocalization();
        IndexedContainer oldContainer = m_container;
        try {
            createAndLockDescriptorFile();
            unmarshalDescriptor();
            updateBundleDescriptorContent();
            m_hasMasterMode = true;
            m_container = createContainer();
            m_editorState.put(EditMode.DEFAULT, getDefaultState());
            m_editorState.put(EditMode.MASTER, getMasterState());
        } catch (CmsException | IOException e) {
            LOG.error(e.getLocalizedMessage(), e);
            if (m_descContent != null) {
                m_descContent = null;
            }
            if (m_descFile != null) {
                m_descFile = null;
            }
            if (m_desc != null) {
                try {
                    m_cms.deleteResource(m_desc, CmsResourceDeleteMode.valueOf(1));
                } catch (CmsException ex) {
                    LOG.error(ex.getLocalizedMessage(), ex);
                }
                m_desc = null;
            }
            m_hasMasterMode = false;
            m_container = oldContainer;
            return false;
        }
        m_removeDescriptorOnCancel = true;
        return true;
    }
1329108
private PortletApplicationDefinition createDefinition(
            ServletContext servletContext, String name, String contextPath)
            throws PortletContainerException {
        PortletApplicationDefinition portletApp = null;
        try {
            InputStream paIn = servletContext.getResourceAsStream(PORTLET_XML);
            InputStream webIn = servletContext.getResourceAsStream(WEB_XML);
            if (paIn == null) {
                throw new PortletContainerException(
                        "Cannot find '"
                                + PORTLET_XML
                                + "'. Are you sure it is in the deployed package?");
            }
            if (webIn == null) {
                throw new PortletContainerException(
                        "Cannot find '"
                                + WEB_XML
                                + "'. Are you sure it is in the deployed package?");
            }
            portletApp = this.portletAppDescriptorService.read(name, contextPath, paIn);
            this.portletAppDescriptorService.mergeWebDescriptor(portletApp, webIn);
        } catch (Exception ex) {
            throw new PortletContainerException(
                    "Exception loading portlet descriptor for: "
                            + servletContext.getServletContextName(),
                    ex);
        }
        return portletApp;
    }
1139339
static public ContentHandleFactory newFactory() {
    return new ContentHandleFactory() {
      @Override
      public Class<?>[] getHandledClasses() {
        return new Class<?>[]{ XMLEventReader.class };
      }
      @Override
      public boolean isHandled(Class<?> type) {
        return XMLEventReader.class.isAssignableFrom(type);
      }
      @Override
      public <C> ContentHandle<C> newHandle(Class<C> type) {
        @SuppressWarnings("unchecked")
        ContentHandle<C> handle = isHandled(type) ?
                                  (ContentHandle<C>) new XMLEventReaderHandle() : null;
        return handle;
      }
    };
  }
195684
public static base_responses add(nitro_service client, nsxmlnamespace resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			nsxmlnamespace addresources[] = new nsxmlnamespace[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new nsxmlnamespace();
				addresources[i].prefix = resources[i].prefix;
				addresources[i].Namespace = resources[i].Namespace;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
583093
public WebFacesUIComponentDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
922513
public WebAppDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
1017563
public WebFragmentDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
319316
public static org.openbel.framework.common.model.Namespace convert(
            final Namespace ws) {
        return new org.openbel.framework.common.model.Namespace(
                ws.getPrefix(), ws.getResourceLocation());
    }
629608
public void addService(TDefinitions descriptionType)
    {
        String interfacens;
        String interfacename;
        QName qname;
        String name;
        
        if (soapFactory == null)
            soapFactory = new org.xmlsoap.schemas.wsdl.soap.ObjectFactory();
        
        TService service = wsdlFactory.createTService();
        descriptionType.getAnyTopLevelOptionalElement().add(service);
        
        name = this.getControlProperty(MessageControl.SERVICE_NAME);
        service.setName(name);
        
        interfacens = this.getNamespace();
        interfacename = this.getControlProperty(MessageControl.BINDING_NAME);
        qname = new QName(interfacens, interfacename);
        
        TPort port = wsdlFactory.createTPort();
        service.getPort().add(port);
        port.setName(name + "Port");
        port.setBinding(qname);
        
        org.xmlsoap.schemas.wsdl.soap.TAddress tAddress = soapFactory.createTAddress();
        port.getAny().add(soapFactory.createAddress(tAddress));
        
        String address = this.getURIValue(this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.WEB_SERVICES_SERVER).toString());  // Important - This is the web services URL
        tAddress.setLocation(address);
    }
447292
public ISarlConstructorBuilder addSarlConstructor() {
		ISarlConstructorBuilder builder = this.iSarlConstructorBuilderProvider.get();
		builder.eInit(getSarlAgent(), getTypeResolutionContext());
		return builder;
	}