Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.NamespaceImpl


      @Override
      protected Namespace convert(Entry<String, String> e)
        throws StoreException
      {
        return new NamespaceImpl(e.getKey(), e.getValue());
      }
    });
  }
View Full Code Here


      protected Namespace convert(BindingSet bindings)
        throws StoreException
      {
        String prefix = bindings.getValue(Protocol.PREFIX).stringValue();
        String name = bindings.getValue(Protocol.NAMESPACE).stringValue();
        return new NamespaceImpl(prefix, name);
      }
    });
  }
View Full Code Here

  public NamespaceImpl findByPrefix(String prefix) {
    String namespace = map.get(prefix);
    if (namespace == null) {
      return null;
    }
    return new NamespaceImpl(prefix, namespace);
  }
View Full Code Here

   * Methods *
   *---------*/

  public String getNamespace(String prefix) {
    String result = null;
    NamespaceImpl namespace = namespacesMap.get(prefix);
    if (namespace != null) {
      result = namespace.getName();
    }
    return result;
  }
View Full Code Here

    }
    return result;
  }

  public void setNamespace(String prefix, String name) {
    NamespaceImpl newNS = new NamespaceImpl(prefix, name);
    NamespaceImpl old = namespacesMap.put(prefix, newNS);

    if (!newNS.equals(old)) {
      contentsChanged = true;
    }
  }
View Full Code Here

      contentsChanged = true;
    }
  }

  public void removeNamespace(String prefix) {
    NamespaceImpl ns = namespacesMap.remove(prefix);

    if (ns != null) {
      contentsChanged = true;
    }
  }
View Full Code Here

        while (true) {
          try {
            String name = in.readUTF();
            String prefix = in.readUTF();

            NamespaceImpl ns = new NamespaceImpl(prefix, name);
            namespacesMap.put(prefix, ns);
          }
          catch (EOFException e) {
            break;
          }
View Full Code Here

   * Methods *
   *---------*/

  public String getNamespace(String prefix) {
    String result = null;
    NamespaceImpl namespace = namespacesMap.get(prefix);
    if (namespace != null) {
      result = namespace.getName();
    }
    return result;
  }
View Full Code Here

    }
    return result;
  }

  public void setNamespace(String prefix, String name) {
    namespacesMap.put(prefix, new NamespaceImpl(prefix, name));
  }
View Full Code Here

  @Override
  protected Namespace convert(Entry<String, String> next)
    throws StoreException
  {
    return new NamespaceImpl(next.getKey(), next.getValue());
  }
View Full Code Here

TOP

Related Classes of org.openrdf.model.impl.NamespaceImpl

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.