Examples of ServerAddress


Examples of org.wymiwyg.commons.util.http.ServerAddress

          .listSubjectsWithProperty(RDF.type,
              HOSTCANONICALIZER.DefaultCanonicalizer);
      Resource defaultCanonicalizer;
      if (defaultCanonicalizerIter.hasNext()) {
        defaultCanonicalizer = defaultCanonicalizerIter.nextResource();
        defaultCanonicalBase = new ServerAddress(defaultCanonicalizer
            .getRequiredProperty(HOSTCANONICALIZER.canonicalBase)
            .getResource().getURI());
        canonicalBaseSet.add(defaultCanonicalBase);
      } else {
        defaultCanonicalBase = null;
      }
      defaultCanonicalizerIter.close();
      ResIterator canonicalizerIter = model.listSubjectsWithProperty(
          RDF.type, HOSTCANONICALIZER.Canonicalizer);
      Resource canonicalizer;
      while (canonicalizerIter.hasNext()) {
        try {
          canonicalizer = canonicalizerIter.nextResource();
          String canonicalBaseString = canonicalizer
              .getRequiredProperty(
                  HOSTCANONICALIZER.canonicalBase)
              .getResource().getURI();
          String accessBase = canonicalizer.getRequiredProperty(
              HOSTCANONICALIZER.accessURLBase).getResource()
              .getURI();
          ServerAddress canonicalBase = new ServerAddress(
              canonicalBaseString);
          hostReplacement.put(new ServerAddress(accessBase),
              canonicalBase);
          canonicalBaseSet.add(canonicalBase);
          if (log.isDebugEnabled()) {
            log.debug("added host replacement: " + accessBase
                + " to " + canonicalBase);
View Full Code Here

Examples of org.wymiwyg.commons.util.http.ServerAddress

        foafAgent.addProperty(FOAF.mbox, model.createResource(mbox));
        foafAgent.addProperty(FOAF.mbox_sha1sum, Util.sha1(mbox));
      }
      String serverName;
      String hostHeader = request.getHeaderValues(HeaderName.HOST)[0];
      ServerAddress requested = new ServerAddress(request.getScheme().getStringRepresentation()+"://"+hostHeader);
      Resource newCanonicalizer = model
          .createResource(HOSTCANONICALIZER.Canonicalizer);
      newCanonicalizer.addProperty(
          HOSTCANONICALIZER.accessURLBase, model
              .createResource(requested
                  .toString()));
      Resource canonicalBaseResource = model
      .createResource(canonicalBase);
      newCanonicalizer.addProperty(
          HOSTCANONICALIZER.canonicalBase, canonicalBaseResource);
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.