// Path: reasoning-server/src/main/java/ch/ethz/inf/vs/semantics/server/SemanticsServer.java
// public class SemanticsServer extends CoapServer {
// 
// 	private static final Logger logger = LogManager.getLogger();
// 
// 	// exit codes for runtime errors
// 	private static final int ERR_INIT_FAILED = 1;
// 
// 	public static void main(String[] args) {
// 		try {
// 			SemanticsServer server = new SemanticsServer();
// 			server.addEndpoint(new CoapEndpoint(new InetSocketAddress("2001:0470:cafe::38b2:cf50", 5681)));
// 			server.start();
// 
// 			logger.info("Semantics-Server listening on port {}.\n", server.getEndpoints().get(0).getAddress().getPort());
// 		} catch (Throwable t) {
// 			logger.catching(t);
// 			System.exit(ERR_INIT_FAILED);
// 		}
// 	}
// 
// 	SemanticsServer(int... ports) {
// 		super(ports);
// 		try {
// 			SemanticDataContainer semanticContainer = new SemanticDataContainer();
// 			new ResourceDirectorySynchronizationService(this, semanticContainer);
// 			// add resources to the server
// 			add(new SRResource(semanticContainer));
// 			add(new Answer(semanticContainer));
// 			add(new Debug(semanticContainer));
// 		} catch (IOException e) {
// 			logger.catching(e);
// 		}
// 	}
// 
// }


import ch.ethz.inf.vs.semantics.server.SemanticsServer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.californium.core.*;
import org.eclipse.californium.core.coap.LinkFormat;
import org.eclipse.californium.core.coap.MediaTypeRegistry;
import org.eclipse.californium.core.network.Endpoint;
import org.eclipse.californium.core.server.resources.Resource;
import java.util.*;
package ch.ethz.inf.vs.semantics.server.semantics;




public class ResourceDirectorySynchronizationService {

	public static final String DEMO_IP = "[2001:470:cafe::38b2:cf50]";
	private static final Logger logger = LogManager.getLogger();
	private final CoapServer server;
	private final String id = UUID.randomUUID().toString();
	private boolean registered = false;
	private String rdLookupURI;
	SemanticDataContainer semanticDataContainer;

// Path: reasoning-server/src/main/java/ch/ethz/inf/vs/semantics/server/SemanticsServer.java
// public class SemanticsServer extends CoapServer {
// 
// 	private static final Logger logger = LogManager.getLogger();
// 
// 	// exit codes for runtime errors
// 	private static final int ERR_INIT_FAILED = 1;
// 
// 	public static void main(String[] args) {
// 		try {
// 			SemanticsServer server = new SemanticsServer();
// 			server.addEndpoint(new CoapEndpoint(new InetSocketAddress("2001:0470:cafe::38b2:cf50", 5681)));
// 			server.start();
// 
// 			logger.info("Semantics-Server listening on port {}.\n", server.getEndpoints().get(0).getAddress().getPort());
// 		} catch (Throwable t) {
// 			logger.catching(t);
// 			System.exit(ERR_INIT_FAILED);
// 		}
// 	}
// 
// 	SemanticsServer(int... ports) {
// 		super(ports);
// 		try {
// 			SemanticDataContainer semanticContainer = new SemanticDataContainer();
// 			new ResourceDirectorySynchronizationService(this, semanticContainer);
// 			// add resources to the server
// 			add(new SRResource(semanticContainer));
// 			add(new Answer(semanticContainer));
// 			add(new Debug(semanticContainer));
// 		} catch (IOException e) {
// 			logger.catching(e);
// 		}
// 	}
// 
// }


// Path: reasoning-server/src/main/java/ch/ethz/inf/vs/semantics/server/semantics/ResourceDirectorySynchronizationService.java
import ch.ethz.inf.vs.semantics.server.SemanticsServer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.californium.core.*;
import org.eclipse.californium.core.coap.LinkFormat;
import org.eclipse.californium.core.coap.MediaTypeRegistry;
import org.eclipse.californium.core.network.Endpoint;
import org.eclipse.californium.core.server.resources.Resource;
import java.util.*;

package ch.ethz.inf.vs.semantics.server.semantics;




public class ResourceDirectorySynchronizationService {

	public static final String DEMO_IP = "[2001:470:cafe::38b2:cf50]";
	private static final Logger logger = LogManager.getLogger();
	private final CoapServer server;
	private final String id = UUID.randomUUID().toString();
	private boolean registered = false;
	private String rdLookupURI;
	SemanticDataContainer semanticDataContainer;

	public ResourceDirectorySynchronizationService(SemanticsServer server, SemanticDataContainer semanticDataContainer) {