Examples of URIImpl


Examples of com.ericsson.ssa.sip.URIImpl

                SipURIImpl routebackUri = (SipURIImpl) DialogManager.getInstance().getVipSipUri();
                routebackUri.setLrParam(true);
                Address routeBackAddress = SipFactoryImpl.getInstance().createAddress(routebackUri);
                routeBackAddress.setParameter(AR_STATE, new ArInfo(info.getStateInfo(), region).toString());
                String hashKey = request.getBeKeyFromSession();
                URIImpl uriImpl = (URIImpl) routeBackAddress.getURI();
                if(uriImpl != null){
                    uriImpl.encodeBeKey(hashKey);
                }
                request.pushRoute(routeBackAddress);
                pushRoutesReversed(request, routes);
                if (m_logger.isLoggable(Level.FINEST)) {
                    m_logger.log(Level.FINEST, "AR indicated routeback with external routes {0}. Routing externally", new Object[] {routes});
View Full Code Here

Examples of org.cipango.sip.URIImpl

  }

  @Test
  public void testURI() throws Exception
  {
    URI orig = new URIImpl("http://www.nexcom.fr;user=me");
    URI readOnly = new ReadOnlyURI((URI) orig.clone());
   
    assertEquals(orig, readOnly);
    try { readOnly.setParameter("foo", "bar"); fail();} catch (IllegalStateException e) {}
    try { readOnly.removeParameter("user");   fail();} catch (IllegalStateException e) {}
    assertEquals(orig, readOnly);
    assertEquals(readOnly, orig);
    assertEquals(orig.toString(), readOnly.toString());
    URI clone = (URI) readOnly.clone();
    clone.setParameter("a", "b");
    testSerializable(readOnly);
  }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

      FileInputStream fis = new FileInputStream(file);
      byte[] bytes = new byte[mimeTypeIdentifier.getMinArrayLength()];
      fis.read(bytes);
      mimeType = mimeTypeIdentifier.identify(bytes, file.getPath(),
              new URIImpl(rawDocument.getUrl(),false)) ;
      if (mimeType == null || mimeType.length() == 0) {
        mimeType = "application/x-unknown-mime-type";
      }

      mLog.debug("Detected mimetype cylcle 1: " + mimeType + ". " + rawDocument.getUrl());
      if (mimeType.equalsIgnoreCase("application/zip")) {
        // some new files like MS Office documents are zip files
        // so rewrite the URL for the correct mimetype detection
        mimeType = mimeTypeIdentifier.identify(bytes, null,
                new URIImpl("zip:mime:file:" + rawDocument.getUrl()));
        mLog.debug("Detected mimetype cylcle 2: " + mimeType + ". " + "zip:mime:file:" + rawDocument.getUrl());
      }
    } catch (Exception exc) {
      errorLogger.logError("Determine mime-type of " + rawDocument.getUrl() +
                              " failed", exc, false);
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

  public void testRemoveAll() throws Exception {
    Repository repo = new SailRepository(new MemoryStore());
    repo.initialize();
    RepositoryModelSet modelSet = new RepositoryModelSet(repo);
    modelSet.open();
    URI context1 = new URIImpl("uri:context1");
    URI context2 = new URIImpl("uri:context2");
    modelSet.addStatement(context1, new URIImpl("uri:r1"), new URIImpl(
        "uri:p1"), new URIImpl("uri:r2"));
    modelSet.addStatement(context1, new URIImpl("uri:r1"), new URIImpl(
        "uri:p1"), new URIImpl("uri:r3"));
    modelSet.addStatement(context2, new URIImpl("uri:r4"), new URIImpl(
        "uri:p2"), new URIImpl("uri:r5"));
    modelSet.addStatement(context2, new URIImpl("uri:r4"), new URIImpl(
        "uri:p2"), new URIImpl("uri:r6"));
    Model model1 = modelSet.getModel(context1);
    model1.open();
    Model model2 = modelSet.getModel(context2);
    model2.open();
    assertEquals(4, modelSet.size());
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

   * @throws ModelRuntimeException if URI syntax is wrong
   *
   *             [Generated from RDFReactor template rule #c7]
   */
  public Property(Model model, String uriString, boolean write) throws ModelRuntimeException {
    super(model, RDFS_CLASS, new URIImpl(uriString, false), write);
  }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

 
  @Test
  public void testDataTypeEqualness() throws Exception {
   
    // die erste DatenTyp URI
    URI testA = new URIImpl("test://somedata-A", false);
    // die zweite DatenTyp URI
    URI testB = new URIImpl("test://somedata-B", false);
   
    // der erste BaseDatatype wird von der ersten DatenTyp URI erzeugt
    BaseDatatype BDtestA1 = new BaseDatatype(testA + "");
    // der zweite BaseDatatype ebenso
    BaseDatatype BDtestA2 = new BaseDatatype(testA + "");
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

      return this.underlying.hasNext();
    }

    @Override
    public URI next() {
      return new URIImpl(this.underlying.next());
    }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

    // wieder nicht.
   
    // L�sung siehe Funktion testDataTypesWithUnknownType()
   
    // die erste DatenTyp URI
    URI testA = new URIImpl("test://somedata-A", false);
    // die zweite DatenTyp URI
    URI testB = new URIImpl("test://somedata-B", false);
   
    // der erste BaseDatatype wird von der ersten DatenTyp URI erzeugt
    GeneralDataType BDtestA1 = new GeneralDataType(testA + "");
    // der zweite BaseDatatype ebenso
    GeneralDataType BDtestA2 = new GeneralDataType(testA + "");
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

 
  @Test
  public void testNewToJenaNode() throws ModelRuntimeException {
    com.hp.hpl.jena.rdf.model.Model model = ModelFactory.createDefaultModel();
   
    DatatypeLiteralImpl l1 = new DatatypeLiteralImpl("test", new URIImpl("test:funky", false));
    DatatypeLiteralImpl l2 = new DatatypeLiteralImpl("test", new URIImpl("test:funky", false));
   
    Node n1 = TypeConversion.toJenaNode(l1, model);
    Node n2 = TypeConversion.toJenaNode(l2, model);
   
    assertTrue(n1.equals(n2));
   
    Object o1 = TypeConversion.toRDF2Go(n1);
    Object o2 = TypeConversion.toRDF2Go(n2);
   
    assertTrue(o1 instanceof DatatypeLiteral);
    assertTrue(o2 instanceof DatatypeLiteral);
   
    DatatypeLiteralImpl new1 = (DatatypeLiteralImpl)o1;
    DatatypeLiteralImpl new2 = (DatatypeLiteralImpl)o2;
   
    assertTrue(new1.getValue().equals("test"));
    assertTrue(new2.getValue().equals("test"));
    assertTrue(new1.getDatatype().equals(new URIImpl("test:funky", false)));
    assertTrue(new2.getDatatype().equals(new URIImpl("test:funky", false)));
  }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

    RepositoryModelFactory repositoryModelFactory = new RepositoryModelFactory();
    Model model = repositoryModelFactory.createModel();
    model.open();

    URI a = new URIImpl("urn:test:a");
    URI b = new URIImpl("urn:test:b");
    List list = new List(model, "urn:test:list", true);
   
    //assertTrue( list instanceof URI );  --> fails

    model.addStatement(a, b, list.asURI() );
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.