Package org.openxri.xml

Examples of org.openxri.xml.Service.addType()


            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);
            atAuthService.addURI(msRootAtURI);
            atRoot.addService(atAuthService);

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


    Resolver resolver = new Resolver();
   
        XRD eqRoot = new XRD();
        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());
       
View Full Code Here

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

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

    assertTrue("Initial cache not empty", cache.getSize() == 0);

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

    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);
    dummyService.addURI("http://www.example.com/xri/resolve?id=1");
    xrd1.addService(dummyService);

    try {
      GCSAuthority auth = new GCSAuthority("@");
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("@");
View Full Code Here

    public void run()
    {
      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" };
View Full Code Here

                    }
                }
    String authMediaType = Tags.CONTENT_TYPE_XRDS + ";"
        + tt.getParameterPair();
    srv.addMediaType(authMediaType, null, Boolean.FALSE);
    srv.addType(Tags.SERVICE_AUTH_RES);
    srv.addURI(uri);


    // add it to the XRD
    xrd.addService(srv);
View Full Code Here

    Service srv = new Service();
    TrustType tt = new TrustType(); // default trust type
    String authMediaType = Tags.CONTENT_TYPE_XRDS + ";"
        + tt.getParameterPair();
    srv.addMediaType(authMediaType, null, Boolean.FALSE);
    srv.addType(Tags.SERVICE_AUTH_RES);
    srv.addURI(uri);

    // add it to the XRD
    xrd.addService(srv);
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.