Package org.openxri.xml

Examples of org.openxri.xml.SEPType


      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


        throw new StageException("Invalid URI: " + uri.toString());
      }
    }

    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
View Full Code Here

    if (providerID != null) this.setProviderId(providerID);

    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();
View Full Code Here

    List<?> serviceTypes = service.getTypes();

    for (int i=0; i<serviceTypes.size(); i++) {

      SEPType serviceType = (SEPType) serviceTypes.get(i);

      if (SERVICE_TYPE.equals(serviceType.getValue())) return(true);
    }

    return(false);
  }
View Full Code Here

TOP

Related Classes of org.openxri.xml.SEPType

Copyright © 2018 www.massapicom. 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.