Package org.apache.clerezza.rdf.utils

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


   */
  @GET
  public GraphNode getConfig() {
    AccessController.checkPermission(new ConfigGuiAccessPermission());
    GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
    node.addProperty(RDF.type, CONFIG_PAGE);
    node.addProperty(RDF.type, PLATFORM.HeadedPage);
    node.addProperty(PLATFORM.defaultBaseUri, platformConfig.getDefaultBaseUri());
    return node;

  }
View Full Code Here


  @GET
  public GraphNode getConfig() {
    AccessController.checkPermission(new ConfigGuiAccessPermission());
    GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
    node.addProperty(RDF.type, CONFIG_PAGE);
    node.addProperty(RDF.type, PLATFORM.HeadedPage);
    node.addProperty(PLATFORM.defaultBaseUri, platformConfig.getDefaultBaseUri());
    return node;

  }
View Full Code Here

  public GraphNode getConfig() {
    AccessController.checkPermission(new ConfigGuiAccessPermission());
    GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
    node.addProperty(RDF.type, CONFIG_PAGE);
    node.addProperty(RDF.type, PLATFORM.HeadedPage);
    node.addProperty(PLATFORM.defaultBaseUri, platformConfig.getDefaultBaseUri());
    return node;

  }

  @POST
View Full Code Here

    LockableMGraph sysGraph = (LockableMGraph) node.getGraph();
    Lock writeLock = sysGraph.getLock().writeLock();
    writeLock.lock();
    try {
      node.deleteProperties(PLATFORM.defaultBaseUri);
      node.addProperty(PLATFORM.defaultBaseUri, uri);
    } finally {
      writeLock.unlock();
    }
    return Response.status(Response.Status.ACCEPTED).build();
  }
View Full Code Here

public class IndexDefinitionManagerTest {


  private void createDefinition(UriRef rdfType, List<UriRef> properties, MGraph manuallyCreatedGraph) {
      GraphNode node = new GraphNode(new BNode(), manuallyCreatedGraph);
      node.addProperty(RDF.type, CRIS.IndexDefinition);
      node.addProperty(CRIS.indexedType, rdfType);
      for (UriRef p : properties) {
        node.addProperty(CRIS.indexedProperty, p);
      }
    }
View Full Code Here


  private void createDefinition(UriRef rdfType, List<UriRef> properties, MGraph manuallyCreatedGraph) {
      GraphNode node = new GraphNode(new BNode(), manuallyCreatedGraph);
      node.addProperty(RDF.type, CRIS.IndexDefinition);
      node.addProperty(CRIS.indexedType, rdfType);
      for (UriRef p : properties) {
        node.addProperty(CRIS.indexedProperty, p);
      }
    }
View Full Code Here

  private void createDefinition(UriRef rdfType, List<UriRef> properties, MGraph manuallyCreatedGraph) {
      GraphNode node = new GraphNode(new BNode(), manuallyCreatedGraph);
      node.addProperty(RDF.type, CRIS.IndexDefinition);
      node.addProperty(CRIS.indexedType, rdfType);
      for (UriRef p : properties) {
        node.addProperty(CRIS.indexedProperty, p);
      }
    }

  @Test
  public void createDefinitionGraph() {
View Full Code Here

   * @param properties A list of properties to index.
   */
  public void addDefinitionVirtual(UriRef rdfType, List<VirtualProperty> properties) {
    deleteDefinition(rdfType);
    GraphNode node = new GraphNode(new BNode(), definitionGraph);
    node.addProperty(RDF.type, CRIS.IndexDefinition);
    node.addProperty(CRIS.indexedType, rdfType);

    for (VirtualProperty p : properties) {
      node.addProperty(CRIS.indexedProperty, asResource(p));
    }
View Full Code Here

   */
  public void addDefinitionVirtual(UriRef rdfType, List<VirtualProperty> properties) {
    deleteDefinition(rdfType);
    GraphNode node = new GraphNode(new BNode(), definitionGraph);
    node.addProperty(RDF.type, CRIS.IndexDefinition);
    node.addProperty(CRIS.indexedType, rdfType);

    for (VirtualProperty p : properties) {
      node.addProperty(CRIS.indexedProperty, asResource(p));
    }
  }
View Full Code Here

    GraphNode node = new GraphNode(new BNode(), definitionGraph);
    node.addProperty(RDF.type, CRIS.IndexDefinition);
    node.addProperty(CRIS.indexedType, rdfType);

    for (VirtualProperty p : properties) {
      node.addProperty(CRIS.indexedProperty, asResource(p));
    }
  }

  /**
   * Remove index definitions for the specified RDF type.
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.