Package org.openxri.xml

Examples of org.openxri.xml.XRD.addService()


        }

        // fill it with information we got from the store

        for (int ii=0; ii<refs.length; ii++) xrd.addRef(refs[ii]);
        for (int ii=0; ii<services.length; ii++) xrd.addService(services[ii]);
        for (int ii=0; ii<localIds.length; ii++) xrd.addLocalID(localIds[ii]);

        // do we want a local authority resolution service for this authority?
        // this piece of information comes from the store, but we actually create
        // the service, since this requires knowledge of the server configuration
View Full Code Here


          } catch(URISyntaxException ex) {

            throw new ServerInternalException("Invalid URI for authority resolution service.", ex);
          }

          xrd.addService(new AuthorityResolutionService(uris, authority.getAuthorityId()));
        }

        // let our subclasses finish the XRD before we append it to the XRDS

        this.finishXRD(
View Full Code Here

        Service eqAuthService = new Service();
        eqAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none", SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
        eqAuthService.addType(Tags.SERVICE_AUTH_RES);
        //eqAuthService.addURI("http://equal.beta.xri.net");
        eqAuthService.addURI("http://equal.xri.net");
        eqRoot.addService(eqAuthService);
        // System.out.println(eqRoot.toString());
       
        XRD atRoot = new XRD();
        Service atAuthService = new Service();
        atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none", SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
View Full Code Here

        atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none", SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
        atAuthService.addType(Tags.SERVICE_AUTH_RES);
        //atAuthService.addURI("http://at.beta.xri.net/cgi-bin/xri");
        atAuthService.addURI("http://at.xri.net");
        //atAuthService.addURI("http://xria.2idi.com/@");
        atRoot.addService(atAuthService);
        // System.out.println(atRoot.toString());

        XRD bangRoot = new XRD();
        Service bangAuthService = new Service();
        bangAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none", SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
View Full Code Here

        XRD bangRoot = new XRD();
        Service bangAuthService = new Service();
        bangAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none", SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
        bangAuthService.addType(Tags.SERVICE_AUTH_RES);
        bangAuthService.addURI("http://bang.beta.xri.net/cgi-bin/xri");
        bangRoot.addService(bangAuthService);
        // System.out.println(bangRoot.toString());

        resolver.setAuthority("=", eqRoot);
        resolver.setAuthority("@", atRoot);
        resolver.setAuthority("!", bangRoot);
View Full Code Here

    XRD xrd = new XRD();
    Service atAuthService = new Service();
    atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
    atAuthService.addType(Tags.SERVICE_AUTH_RES);
    atAuthService.addURI("http://gcs.epok.net/xri/resolve?ns=at");
    xrd.addService(atAuthService);

    XRD xrd1 = new XRD();
    Service dummyService = new Service();
    dummyService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
    dummyService.addType(Tags.SERVICE_AUTH_RES);
View Full Code Here

    XRD xrd1 = new XRD();
    Service dummyService = new Service();
    dummyService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
    dummyService.addType(Tags.SERVICE_AUTH_RES);
    dummyService.addURI("http://www.example.com/xri/resolve?id=1");
    xrd1.addService(dummyService);

    try {
      GCSAuthority auth = new GCSAuthority("@");
      cache.put(auth.toString(), false, false, xrd.toString().getBytes("UTF-8"), 1000);
      assertTrue("Initial cache incorrect", cache.getSize() == 1);
View Full Code Here

    XRD xrd = new XRD();
    Service atAuthService = new Service();
    atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
    atAuthService.addType(Tags.SERVICE_AUTH_RES);
    atAuthService.addURI("http://gcs.epok.net/xri/resolve?ns=at");
    xrd.addService(atAuthService);

    try {
      GCSAuthority auth = new GCSAuthority("@");
      cache.put(auth.toString(), false, false, xrd.toString().getBytes("UTF-8"), 1000);
      assertTrue("Initial cache incorrect", cache.getSize() == 1);
View Full Code Here

      XRD xrd = new XRD();
      Service dummyService = new Service();
      dummyService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
      dummyService.addType(Tags.SERVICE_AUTH_RES);
      dummyService.addURI("http://www.example.com/xri/resolve?id=1");
      xrd.addService(dummyService);

      String[] oCases =
      { "@!a1!b2!c3!d4", "@!x1!y2!z3", "@!a1!b2!c3", "@!a1!b2", "@!a1!b2!m3", "@!a1!o2!p3", "@!a1!o2!q3", "@!a1!b2!c3!d4!e5", "@!x1!y2" };

      try {
View Full Code Here

            XRD eqRoot = new XRD();
            Service eqAuthService = new Service();
            eqAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
            eqAuthService.addType(Tags.SERVICE_AUTH_RES);
            eqAuthService.addURI(msRootEqualsURI);
            eqRoot.addService(eqAuthService);
           
            XRD atRoot = new XRD();
            Service atAuthService = new Service();
            atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
            atAuthService.addType(Tags.SERVICE_AUTH_RES);
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.