Package org.apache.commons.collections.bidimap

Examples of org.apache.commons.collections.bidimap.TreeBidiMap


   *
   * @param stateNames <String,Integer> Map that assigns each state name an integer ID
   */
  public void registerOutputStateNames(Map<String, Integer> stateNames) {
    if (stateNames != null) {
      outputStateNames = new TreeBidiMap(stateNames);
    }
  }
View Full Code Here


    protected void activate(ComponentContext componentContext) {
        this.componentContext = componentContext;

        Dictionary<?, ?> properties = componentContext.getProperties();

        BidiMap virtuals = new TreeBidiMap();
        String[] virtualList = (String[]) properties.get(PROP_VIRTUAL);
        for (int i = 0; virtualList != null && i < virtualList.length; i++) {
            String[] parts = Mapping.split(virtualList[i]);
            virtuals.put(parts[0], parts[2]);
        }
        virtualURLMap = virtuals;

        List<Mapping> maps = new ArrayList<Mapping>();
        String[] mappingList = (String[]) properties.get(PROP_MAPPING);
View Full Code Here

                List items = parseRequest(servletRequestContext);
                Map fileResourceMap =
                        (Map) configurationContext
                                .getProperty(ServerConstants.FILE_RESOURCE_MAP);
                if (fileResourceMap == null) {
                    fileResourceMap = new TreeBidiMap();
                    configurationContext.setProperty(ServerConstants.FILE_RESOURCE_MAP,
                                                     fileResourceMap);
                }
                List resourceUUID = new ArrayList();
                String main = null;
View Full Code Here

        try {
          Map fileResourceMap =
                (Map) configurationContext
                        .getProperty(ServerConstants.FILE_RESOURCE_MAP);
          if (fileResourceMap == null) {
            fileResourceMap = new TreeBidiMap();
            configurationContext.setProperty(ServerConstants.FILE_RESOURCE_MAP,
                                             fileResourceMap);
          }
            List<FileItemData> fileItems = getAllFileItems();
            //String filePaths = "";
View Full Code Here

                                                     getFileName(item.getName()));
                        item.write(uploadedFile);
                        Map fileResourceMap =
                                (Map) configurationContext.getProperty(ServerConstants.FILE_RESOURCE_MAP);
                        if (fileResourceMap == null) {
                            fileResourceMap = new TreeBidiMap();
                            configurationContext.setProperty(ServerConstants.FILE_RESOURCE_MAP,
                                                             fileResourceMap);
                        }
                        fileResourceMap.put(uuid, uploadedFile.getAbsolutePath());
                        item.write(uploadedFile);
View Full Code Here

        }

        try
        {
            File[] files = listValuesFiles();
            realKeyToUUIDIndex = new TreeBidiMap();
            for (int i = 0; i < files.length; i++)
            {
                File file = files[i];
                StoreValue<T> storeValue = deserialize(file);
                realKeyToUUIDIndex.put(storeValue.getKey(), file.getName());
View Full Code Here

  @Override
  public HmmModel clone() throws CloneNotSupportedException {
    super.clone();
    HmmModel model = new HmmModel(transitionMatrix.clone(), emissionMatrix.clone(), initialProbabilities.clone());
    if (hiddenStateNames != null) {
      model.hiddenStateNames = new TreeBidiMap(hiddenStateNames);
    }
    if (outputStateNames != null) {
      model.outputStateNames = new TreeBidiMap(outputStateNames);
    }
    return model;
  }
View Full Code Here

   *
   * @param stateNames names of hidden states.
   */
  public void registerHiddenStateNames(String[] stateNames) {
    if (stateNames != null) {
      hiddenStateNames = new TreeBidiMap();
      for (int i = 0; i < stateNames.length; ++i) {
        hiddenStateNames.put(stateNames[i], i);
      }
    }
  }
View Full Code Here

   *
   * @param stateNames <String,Integer> Map that assigns each state name an integer ID
   */
  public void registerHiddenStateNames(Map<String, Integer> stateNames) {
    if (stateNames != null) {
      hiddenStateNames = new TreeBidiMap(stateNames);
    }
  }
View Full Code Here

   *
   * @param stateNames state names to register.
   */
  public void registerOutputStateNames(String[] stateNames) {
    if (stateNames != null) {
      outputStateNames = new TreeBidiMap();
      for (int i = 0; i < stateNames.length; ++i) {
        outputStateNames.put(stateNames[i], i);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.bidimap.TreeBidiMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.