Examples of UriRef


Examples of org.apache.clerezza.rdf.core.UriRef

                    userRoles.next().toString())));
      }
      for (NonLiteral customfield : customfields) {
        resultGraph.add(new TripleImpl(updateUserPage,
            CUSTOMPROPERTY.customfield, customfield));
        UriRef property = customPropertyManager.getCustomFieldProperty(customfield);
        NonLiteral contentUser = getCustomUser(contentGraph, userName);

        Lock readLock = contentGraph.getLock().readLock();
        readLock.lock();
        try {
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

  public Response addSingleCustomField(
      @FormParam(value = "title") String title,
      @FormParam(value = "label") String label,
      @FormParam(value = "property") String property,
      @FormParam(value = "length") int length, @Context UriInfo uriInfo) {
    UriRef propertyUri = new UriRef(property);
    AccessController.checkPermission(new UserManagerAccessPermission());
    customPropertyManager.addSingleCustomField(PERMISSION.Role, title,
        label, propertyUri, length, 1);
    return RedirectUtil.createSeeOtherResponse("manage-custom-properties?role=" + title, uriInfo);
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

      @FormParam(value = "multiselect") String multiselect,
      @FormParam(value = "selectablevalues") String selectablevalues,
      @Context UriInfo uriInfo) {

    AccessController.checkPermission(new UserManagerAccessPermission());
    UriRef propertyUri = new UriRef(property);
    customPropertyManager.addMultipleCustomField(PERMISSION.Role, title,
        label, propertyUri, multiselect, selectablevalues, 1);
    return RedirectUtil.createSeeOtherResponse("manage-custom-properties?role=" + title, uriInfo);
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

      @FormParam(value = "role") String role,
      @FormParam(value = "property") String property,
      @Context UriInfo uriInfo) {

    AccessController.checkPermission(new UserManagerAccessPermission());
    UriRef propertyUri = new UriRef(property);
    if (customPropertyManager.deleteCustomField(PERMISSION.Role, role,
        propertyUri)) {
      return RedirectUtil.createSeeOtherResponse(
          "manage-custom-properties?role=" + role, uriInfo);
    } else {
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

   * @return
   */
  @GET
  @Produces({"*/*"})
  public Object getResource(@Context UriInfo uriInfo) {
    final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
      final GraphNode graphNode = getResourceAsGraphNode(uriInfo);
    if (graphNode == null) {
      return resourceUnavailable(uri, uriInfo);
    }
    InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(graphNode);
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

      return graphNode;
    }
  }

  private GraphNode getResourceAsGraphNode(UriInfo uriInfo) {
    final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
    GraphNode result = graphNodeProvider.getLocal(uri);
    //could chck if nodeContext > 0, but this would be less efficient
    TripleCollection tc = result.getGraph();
    if (tc.filter(uri, null, null).hasNext()) {
      return result;
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

      } else {
        contentType = contentTypeHeaders.get(0);
      }
     
    } 
    final UriRef infoDiscoBitUri = new UriRef(uriInfo.getAbsolutePath().toString());
    put(infoDiscoBitUri, MediaType.valueOf(contentType), data);
    return Response.status(Status.CREATED).build();
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

  public Object mkcol(@Context UriInfo uriInfo) {
    String uriString = uriInfo.getAbsolutePath().toString();
    if (uriString.charAt(uriString.length()-1) != '/') {
      uriString += '/';
    }
    UriRef nodeUri = new UriRef(uriString);
    final MGraph mGraph = cgProvider.getContentGraph();
    Triple typeTriple = new TripleImpl(nodeUri, RDF.type, HIERARCHY.Collection);
    if (mGraph.contains(typeTriple)) {
      return Response.status(405) // Method Not Allowed
          .entity("Collection \"" + nodeUri.getUnicodeString()
          + "\" already exists.").build();
    }
    new CollectionCreator(mGraph).createContainingCollections(nodeUri);
    return Response.created(uriInfo.getAbsolutePath()).build();
  }
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

  @PROPFIND
  @Consumes({"application/xml", "text/xml", "*/*"})
  @Produces({"application/xml", "text/xml", "*/*"})
  public Response propfind(@Context UriInfo uriInfo,
      @Context HttpHeaders headers, DOMSource body) {
    final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
    if (!nodeAtUriExists(nodeUri)) {
      return resourceUnavailable(nodeUri, uriInfo);
    }
      Map<UriRef, PropertyMap> result;
    try {
View Full Code Here

Examples of org.apache.clerezza.rdf.core.UriRef

   */
  @PROPPATCH
  @Consumes({"application/xml", "text/xml", "*/*"})
  @Produces({"application/xml", "text/xml", "*/*"})
  public Response proppatch(@Context UriInfo uriInfo, DOMSource body) {
    UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
    if (!nodeAtUriExists(nodeUri)) {
      return resourceUnavailable(nodeUri, uriInfo);
    }
    try {
      Document requestDoc = WebDavUtils.sourceToDocument(body);
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.