Package com.esri.gpt.framework.collection

Examples of com.esri.gpt.framework.collection.StringSet


        NodeList nlChildren = ndProp.getChildNodes();
        for (int j=0;j<nlChildren.getLength();j++) {
          Node ndChild = nlChildren.item(j);
          if (ndChild.getNodeType() == Node.ELEMENT_NODE) {
            String qName = Val.chkStr(xpath.evaluate("@name",ndChild));
            StringSet qAliases = new StringSet();
            if (qName.length() > 0) {
             
              // Dublin Core elements
              if (ndChild.getNodeName().equalsIgnoreCase("dc")) {
                DcElement dc = new DcElement(qName);
                dc.getAliases().add(dc.getElementName());
                dc.getAliases().addDelimited(xpath.evaluate("@aliases",ndChild));
                dc.setScheme(xpath.evaluate("@scheme",ndChild));
                meaning.setDcElement(dc);
                qAliases = dc.getAliases();
               
              // other elements
              } else {
                qAliases.add(qName);
                qAliases.addDelimited(xpath.evaluate("@aliases",ndChild));
              }
             
              // append to the all aliased discoverables collection
              IStoreable storeable = storeables.connect(meaning);
              if (storeable != null) {
                Discoverable discoverable = new Discoverable(qName);
                discoverable.setMeaning(meaning);
                discoverable.setStoreable(storeable);
                for (String alias: qAliases) {
                  this.getAllAliased().put(alias,discoverable);
                }
                this.getAllAliased().put(meaning.getName(),discoverable);
              }
             
            }
          }
        }       
        
      }
    }
   
    // load explicit aliases
    if (root != null) {
      NodeList nl = (NodeList)xpath.evaluate("property-alias",root,XPathConstants.NODESET);     
      for (int i=0;i<nl.getLength();i++) {
        Node nd = nl.item(i);
        String name = Val.chkStr(xpath.evaluate("@meaning-name",nd));       
        String value = Val.chkStr(xpath.evaluate("@value",nd));
        PropertyMeaning meaning = this.get(name);
        if (meaning == null) {
          LOGGER.warning("property-meanings.xml/property-alias@meaning-name="+name+" is invalid.");
        } else {
          Discoverable discoverable = this.getAllAliased().get(name);
          if (discoverable != null) {
            StringSet aliases = new StringSet();
            aliases.addDelimited(value);
            for (String alias: aliases) {
              this.getAllAliased().put(alias,discoverable);
            }
          }
        }
      }
    }
   
    // make the Dublin Core aliased map
    AliasedDiscoverables dcAliased = dcPropertySets.getAllAliased();
    for (PropertyMeaning meaning: values()) {
      DcElement dcElement = meaning.getDcElement();
      if ((dcElement != null) && (dcElement.getElementName().length() > 0)) {
        IStoreable storeable = storeables.connect(meaning);
        if (storeable != null) {
          Discoverable discoverable = new Discoverable(dcElement.getElementName());
          discoverable.setMeaning(meaning);
          discoverable.setStoreable(storeable);
         
          StringSet aliases = dcElement.getAliases();
          for (String alias: aliases) {
            dcAliased.put(alias,discoverable);
          }
          dcAliased.put(meaning.getName(),discoverable);
        }
View Full Code Here


  private void loadDcPropertySet(Node parent, 
                                 XPath xpath,
                                 AliasedDiscoverables aliased,
                                 Discoverables discoverables)
   throws XPathExpressionException {
   StringSet names = new StringSet();
   if (parent != null) {
     Node ndDc = (Node)xpath.evaluate("dc",parent,XPathConstants.NODE);
     if (ndDc != null) {
       NodeList nlNames = (NodeList)xpath.evaluate("meaning-names",ndDc,XPathConstants.NODESET);
       for (int i=0;i<nlNames.getLength();i++) {
         names.addDelimited(nlNames.item(i).getTextContent());
       }
     }
     for (String name: names) {
       Discoverable discoverable = aliased.get(name);
       if ((discoverable != null) && (discoverable.getMeaning().getDcElement() != null)) {
View Full Code Here

  Users users = new Users();
  try {
    client = newServiceConnection();
    DirContext dirContext = client.getConnectedContext();
    LdapQueryFunctions queryF = client.getQueryFunctions();
    StringSet ssDNs = queryF.readGroupMembers(dirContext,groupDN);
    for (String sDN: ssDNs) {
      String sName = queryF.readUsername(dirContext,sDN);
      User user = new User();
      user.setDistinguishedName(sDN);
      user.setKey(user.getDistinguishedName());
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.collection.StringSet

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.