org.openxri.xml.DefaultService Maven / Gradle / Ivy
The newest version!
package org.openxri.xml;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Vector;
/**
* This is a service that matches a resolution request without service type, media type and path.
* @author =peacekeeper
*/
public class DefaultService extends Service {
/**
* Constructs a new default service endpoint for use in an authority. Nothing will be appended to them.
* @param pages - The default URI(s).
*/
public DefaultService(URI[] pages, String providerID) {
super();
/*
* According to the Contact Service specification, the ProviderID of the Contact Service
* SHOULD be set to the global i-number of the I-Broker.
*/
if (providerID != null) this.setProviderId(providerID);
/*
* Set up default matching.
*/
this.addMediaType(new SEPMediaType(null, SEPMediaType.MATCH_ATTR_DEFAULT, Boolean.FALSE));
this.addType(new SEPType(null, SEPType.MATCH_ATTR_DEFAULT, Boolean.FALSE));
this.addPath(new SEPPath(null, SEPPath.MATCH_ATTR_DEFAULT, Boolean.FALSE));
/*
* These are the default URIs.
*/
for (int i=0; i