Package org.apache.clerezza.rdf.utils

Examples of org.apache.clerezza.rdf.utils.GraphNode.writeLock()


      }
      while (oldParentTripleIter.hasNext()) {
        logger.error("more than one parent statement: "+oldParentTripleIter.next());
        oldParentTripleIter.remove();
      }
      Lock writeLock = node.writeLock();
      writeLock.lock();
      try {
        node.replaceWith(targetUri);
      } finally {
        writeLock.unlock();
View Full Code Here


    // This is creating the Graph for the annotation in Annotation Ontology format
    final TcManager tcManager = TcManager.getInstance();
    final UriRef mGraphName = new UriRef(graphName);

    GraphNode node = new GraphNode(new BNode(), tcManager.createMGraph(mGraphName));
    Lock lock = node.writeLock();
    try {
      lock.lock();

      SelectorRegistry selectorRegistry = new SelectorRegistry();
      // Iterate the annotations to create an index of them up front, this
View Full Code Here

    if (user == null) {
      throw new UserNotExistsException(name);
    }
    LockableMGraph systemGraph = getSystemGraph();
    GraphNode userGraphNode = new GraphNode(user, systemGraph);
    Lock writeLock = userGraphNode.writeLock();
    writeLock.lock();
    try {
      if (email != null) {
        updateProperty(userGraphNode, FOAF.mbox, new UriRef("mailto:" + email));
      }
View Full Code Here

  UserManager userManager;

  @Override
  public void userLoggedIn(String userName) {
    GraphNode userNode  = userManager.getUserInSystemGraph(userName);
    Lock l = userNode.writeLock();
    l.lock();
    try {
      userNode.deleteProperties(PLATFORM.lastLogin);
      userNode.addProperty(PLATFORM.lastLogin, LiteralFactory.getInstance().createTypedLiteral(new Date()));
    } finally {
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.