Package org.apache.clerezza.rdf.utils

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


  }

  private GraphNode addConceptCacheNode(MGraph conceptCacheMGraph) {
    GraphNode conceptCacheGraphNode = new GraphNode(new BNode(),
        conceptCacheMGraph);
    conceptCacheGraphNode.addProperty(RDF.type, CONCEPTS.ConceptCache);
    conceptCacheGraphNode.addProperty(CONCEPTS.sparqlEndPoint,
        sparqlEndPoint);
    if (defaultGraph != null) {
      conceptCacheGraphNode.addProperty(CONCEPTS.defaultGraph,
          defaultGraph);
View Full Code Here


  private GraphNode addConceptCacheNode(MGraph conceptCacheMGraph) {
    GraphNode conceptCacheGraphNode = new GraphNode(new BNode(),
        conceptCacheMGraph);
    conceptCacheGraphNode.addProperty(RDF.type, CONCEPTS.ConceptCache);
    conceptCacheGraphNode.addProperty(CONCEPTS.sparqlEndPoint,
        sparqlEndPoint);
    if (defaultGraph != null) {
      conceptCacheGraphNode.addProperty(CONCEPTS.defaultGraph,
          defaultGraph);
    }
View Full Code Here

        conceptCacheMGraph);
    conceptCacheGraphNode.addProperty(RDF.type, CONCEPTS.ConceptCache);
    conceptCacheGraphNode.addProperty(CONCEPTS.sparqlEndPoint,
        sparqlEndPoint);
    if (defaultGraph != null) {
      conceptCacheGraphNode.addProperty(CONCEPTS.defaultGraph,
          defaultGraph);
    }
    return   conceptCacheGraphNode;
  }
View Full Code Here

      @Context UriInfo uriInfo) {

    GraphNode node = new GraphNode(new BNode(), new UnionMGraph(new SimpleMGraph(),
        cgProvider.getContentGraph(),
        remoteConceptsDescriptionManager.getRemoteConceptsDescriptionMGraph()));
    node.addProperty(RDF.type, PLATFORM.HeadedPage);
    node.addProperty(RDF.type, CONCEPTS.GenericResourcePage);
    if (uri != null) {
      node.addProperty(CONCEPTS.resource, uri);
    } else {
      throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
View Full Code Here

    GraphNode node = new GraphNode(new BNode(), new UnionMGraph(new SimpleMGraph(),
        cgProvider.getContentGraph(),
        remoteConceptsDescriptionManager.getRemoteConceptsDescriptionMGraph()));
    node.addProperty(RDF.type, PLATFORM.HeadedPage);
    node.addProperty(RDF.type, CONCEPTS.GenericResourcePage);
    if (uri != null) {
      node.addProperty(CONCEPTS.resource, uri);
    } else {
      throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
          .entity("No resource uri defined.").build());
View Full Code Here

        cgProvider.getContentGraph(),
        remoteConceptsDescriptionManager.getRemoteConceptsDescriptionMGraph()));
    node.addProperty(RDF.type, PLATFORM.HeadedPage);
    node.addProperty(RDF.type, CONCEPTS.GenericResourcePage);
    if (uri != null) {
      node.addProperty(CONCEPTS.resource, uri);
    } else {
      throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
          .entity("No resource uri defined.").build());
    }
    return node;
View Full Code Here

    if (uri != null) {
      GraphNode node = new GraphNode(uri, cgProvider.getContentGraph());
      node.deleteProperties(DCTERMS.subject);
      if(concepts != null) {
        for (String subject : concepts) {
          node.addProperty(DCTERMS.subject, new UriRef(subject));
        }
      }
    } else {
      throw new WebApplicationException(Response.status(
          Status.BAD_REQUEST).entity("No resource uri defined.").build());
View Full Code Here

    AccessController.checkPermission(new SparqlEndpointAccessPermission());
    TrailingSlash.enforceNotPresent(uriInfo);
    GraphNode graphNode = new GraphNode(new BNode(), new SimpleMGraph());
    Set<UriRef> tripleCollections = tcManager.listTripleCollections();
    for (UriRef uriRef : tripleCollections) {
      graphNode.addProperty(SPARQLENDPOINT.tripleCollection, uriRef);
    }
    graphNode.addProperty(RDF.type, SPARQLENDPOINT.SparqlEndpoint);
    return graphNode;
  }
View Full Code Here

    GraphNode graphNode = new GraphNode(new BNode(), new SimpleMGraph());
    Set<UriRef> tripleCollections = tcManager.listTripleCollections();
    for (UriRef uriRef : tripleCollections) {
      graphNode.addProperty(SPARQLENDPOINT.tripleCollection, uriRef);
    }
    graphNode.addProperty(RDF.type, SPARQLENDPOINT.SparqlEndpoint);
    return graphNode;
  }

  /**
   * Returns either a {@link Graph} or a {@link DOMSource}. A {@link Graph} is
View Full Code Here

        if (conceptsFS != null && !conceptsFS.isEmpty()) {
          for (FeatureStructure conceptFS : conceptsFS) {
            Type conceptType = conceptFS.getType();
            Double relevance = Double.valueOf(conceptFS.getStringValue(conceptType.getFeatureByBaseName("relevance")));
            if (relevance > 0.6) {
              node.addProperty(DCTERMS.subject, new UriRef(conceptFS.getStringValue(conceptType.getFeatureByBaseName("text"))));
            }
          }
        }
      } catch (UIMAException e) {
        throw new WebApplicationException(Response.status(
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.