Package org.osgi.service.indexer.impl.util

Examples of org.osgi.service.indexer.impl.util.Tag.addAttribute()


      parentTag.addContent(typedAttrib.toXML());
    }
   
    for (Entry<String, String> directiveEntry : directives.entrySet()) {
      Tag directiveTag = new Tag(Schema.ELEM_DIRECTIVE);
      directiveTag.addAttribute(Schema.ATTR_NAME, directiveEntry.getKey());
      directiveTag.addAttribute(Schema.ATTR_VALUE, directiveEntry.getValue());
      parentTag.addContent(directiveTag);
    }
  }
 
View Full Code Here


    }
   
    for (Entry<String, String> directiveEntry : directives.entrySet()) {
      Tag directiveTag = new Tag(Schema.ELEM_DIRECTIVE);
      directiveTag.addAttribute(Schema.ATTR_NAME, directiveEntry.getKey());
      directiveTag.addAttribute(Schema.ATTR_VALUE, directiveEntry.getValue());
      parentTag.addContent(directiveTag);
    }
  }
 
}
View Full Code Here

      Tag repoTag = new Tag(Schema.ELEM_REPOSITORY);

      String repoName = config.get(REPOSITORY_NAME);
      if (repoName == null)
        repoName = REPOSITORYNAME_DEFAULT;
      repoTag.addAttribute(Schema.ATTR_NAME, repoName);

      String increment = config.get(REPOSITORY_INCREMENT_OVERRIDE);
      if (increment == null)
        increment = Long.toString(System.currentTimeMillis());
      repoTag.addAttribute(Schema.ATTR_INCREMENT, increment);
View Full Code Here

      repoTag.addAttribute(Schema.ATTR_NAME, repoName);

      String increment = config.get(REPOSITORY_INCREMENT_OVERRIDE);
      if (increment == null)
        increment = Long.toString(System.currentTimeMillis());
      repoTag.addAttribute(Schema.ATTR_INCREMENT, increment);

      repoTag.addAttribute(Schema.ATTR_XML_NAMESPACE, Schema.NAMESPACE);

      repoTag.printOpen(indent, pw, false);
      for (File file : filesToIndex) {
View Full Code Here

      String increment = config.get(REPOSITORY_INCREMENT_OVERRIDE);
      if (increment == null)
        increment = Long.toString(System.currentTimeMillis());
      repoTag.addAttribute(Schema.ATTR_INCREMENT, increment);

      repoTag.addAttribute(Schema.ATTR_XML_NAMESPACE, Schema.NAMESPACE);

      repoTag.printOpen(indent, pw, false);
      for (File file : filesToIndex) {
        try {
          Tag resourceTag = generateResource(file, config);
View Full Code Here

    }

    Tag resourceTag = new Tag(Schema.ELEM_RESOURCE);
    for (Capability cap : caps) {
      Tag capTag = new Tag(Schema.ELEM_CAPABILITY);
      capTag.addAttribute(Schema.ATTR_NAMESPACE, cap.getNamespace());

      appendAttributeAndDirectiveTags(capTag, cap.getAttributes(), cap.getDirectives());

      resourceTag.addContent(capTag);
    }
View Full Code Here

      resourceTag.addContent(capTag);
    }

    for (Requirement req : reqs) {
      Tag reqTag = new Tag(Schema.ELEM_REQUIREMENT);
      reqTag.addAttribute(Schema.ATTR_NAMESPACE, req.getNamespace());

      appendAttributeAndDirectiveTags(reqTag, req.getAttributes(), req.getDirectives());

      resourceTag.addContent(reqTag);
    }
View Full Code Here

  }

  private static void appendAttributeAndDirectiveTags(Tag parentTag, Map<String, Object> attribs, Map<String, String> directives) {
    for (Entry<String, Object> attribEntry : attribs.entrySet()) {
      Tag attribTag = new Tag(Schema.ELEM_ATTRIBUTE);
      attribTag.addAttribute(Schema.ATTR_NAME, attribEntry.getKey());

      TypedAttribute typedAttrib = TypedAttribute.create(attribEntry.getKey(), attribEntry.getValue());
      parentTag.addContent(typedAttrib.toXML());
    }
View Full Code Here

      parentTag.addContent(typedAttrib.toXML());
    }

    for (Entry<String, String> directiveEntry : directives.entrySet()) {
      Tag directiveTag = new Tag(Schema.ELEM_DIRECTIVE);
      directiveTag.addAttribute(Schema.ATTR_NAME, directiveEntry.getKey());
      directiveTag.addAttribute(Schema.ATTR_VALUE, directiveEntry.getValue());
      parentTag.addContent(directiveTag);
    }
  }
View Full Code Here

    }

    for (Entry<String, String> directiveEntry : directives.entrySet()) {
      Tag directiveTag = new Tag(Schema.ELEM_DIRECTIVE);
      directiveTag.addAttribute(Schema.ATTR_NAME, directiveEntry.getKey());
      directiveTag.addAttribute(Schema.ATTR_VALUE, directiveEntry.getValue());
      parentTag.addContent(directiveTag);
    }
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.