Examples of SEPMediaType


Examples of org.openxri.xml.SEPMediaType

      Service service = (Service) xrd.getServiceAt(i);

      if (service == null) continue;

      SEPMediaType mediaType = (service.getNumMediaTypes() > 0) ? service.getMediaTypeAt(0) : null;

      for (int ii=0; ii<service.getNumTypes(); ii++) {

        SEPType type = service.getTypeAt(ii);

        if (type == null || type.getValue() == null || type.getValue().trim().equals("")) continue;

        for (int iii=0; iii<service.getNumURIs(); iii++) {

          SEPUri uri = service.getURIAt(iii);

          if (uri == null || uri.getUriString() == null || uri.getUriString().trim().equals("")) continue;

          String xrdHref = uri.getUriString();
          if (SEPUri.APPEND_AUTHORITY.equals(uri.getAppend()) ||
              SEPUri.APPEND_LOCAL.equals(uri.getAppend()) ||
              SEPUri.APPEND_QXRI.equals(uri.getAppend())) {

            if (! xrdHref.endsWith("/")) xrdHref += "/";
            xrdHref += canonical;
          }

          String xrdRel = type.getType();
          String xrdType = (mediaType != null && mediaType.getValue() != null && (! mediaType.getValue().trim().equals(""))) ? mediaType.getMediaType() : null;

          appendLink(buffer, xrdRel, xrdHref, xrdType);
        }
      }
    }
View Full Code Here

Examples of org.openxri.xml.SEPMediaType

      }
    }

    for (String type : this.types) types.add(new SEPType(type, null, Boolean.TRUE));
    for (String path : this.paths) paths.add(new SEPPath(path, null, Boolean.TRUE));
    for (String mediaType : this.mediaTypes) mediaTypes.add(new SEPMediaType(mediaType, null, Boolean.TRUE));

    // create service endpoint and add it to the XRD

    Service service = new Service();
    service.setProviderId(canonicalIDString);
View Full Code Here

Examples of org.openxri.xml.SEPMediaType

    this.addPath(new SEPPath(null, SEPPath.MATCH_ATTR_DEFAULT, null));

    this.addType(new SEPType(SERVICE_TYPE, null, Boolean.TRUE));

    this.addMediaType(new SEPMediaType(null, SEPMediaType.MATCH_ATTR_DEFAULT, null));
   
    StringBuffer keyInfoBuffer = new StringBuffer();

    keyInfoBuffer.append("<ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">");
    keyInfoBuffer.append("<ds:X509Data>");
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.