Property[] repositoriesProperties = repo.getProperties(); for (Property prop : repositoriesProperties) { LOGGER.log(Level.INFO, " " + prop.getValue()); Property[] subsystemProperties = subsystem.getProperties(); for (Property prop : subsystemProperties) { LOGGER.log(Level.INFO, " " + prop.getValue());
Property[] repositoryList = repositoryCapability.getProperties(); for (Property repository : repositoryList) { String repoURL = repository.getValue(); getRepositoryAdmin().addRepository(repoURL); LOGGER.log(Level.INFO, " " + repoURL + " added"); Property[] subsystemList = subsystemCapability.getProperties(); for (Property subsystem : subsystemList) { String subsystemURL = subsystem.getValue(); getSubsystem(0).install(subsystemURL); LOGGER.log(Level.INFO, " " + subsystemURL + " installed");
/** * Write out the capability * * @param c capability * @param writer buffer writer * @throws IOException */ private static void writeCapability(Capability c, Document doc, Element resource) throws IOException { logger.debug(LOG_ENTRY, "writeCapability", new Object[]{c, doc, resource}); Element capability = doc.createElement("capability"); capability.setAttribute("name", c.getName()); resource.appendChild(capability); Property[] props = c.getProperties(); for (Property entry : props) { String name = (String) entry.getName(); String objectAttrs = entry.getValue(); String type = (entry.getType() == null) ? getType(name) : entry.getType(); // remove the beginning " and tailing " if (objectAttrs.startsWith("\"") && objectAttrs.endsWith("\"")) objectAttrs = objectAttrs.substring(1, objectAttrs.length() - 1); addProperty(doc, capability, name, objectAttrs, type); } logger.debug(LOG_EXIT, "writeCapability"); }
/** * Write out the capability * * @param c capability * @param writer buffer writer * @throws IOException */ private static void writeCapability(Capability c, Document doc, Element resource) throws IOException { logger.debug(LOG_ENTRY, "writeCapability", new Object[]{c, doc, resource}); Element capability = doc.createElement("capability"); capability.setAttribute("name", c.getName()); resource.appendChild(capability); Property[] props = c.getProperties(); for (Property entry : props) { String name = (String) entry.getName(); String objectAttrs = entry.getValue(); String type = (entry.getType() == null) ? getType(name) : entry.getType(); // remove the beginning " and tailing " if (objectAttrs.startsWith("\"") && objectAttrs.endsWith("\"")) objectAttrs = objectAttrs.substring(1, objectAttrs.length() - 1); addProperty(doc, capability, name, objectAttrs, type); } logger.debug(LOG_EXIT, "writeCapability"); }
private void toJSON( final JSONWriter writer, final Property[] props ) throws IOException { writer.object(); for ( int i = 0; props != null && i < props.length; i++ ) { writer.key(props[i].getName()); writer.value(props[i].getValue()); } writer.endObject(); } }