Package org.apache.clerezza.rdf.core.impl

Examples of org.apache.clerezza.rdf.core.impl.TripleImpl


    NonLiteral rolePermissionPage = new BNode();
    Iterator<PermissionDescripton> permDescs = permGatherer.getAllPermissionDescriptors();
    while(permDescs.hasNext()) {
      PermissionDescripton desc = permDescs.next();
      BNode providedPermission = new BNode();
      resultGraph.add(new TripleImpl(rolePermissionPage,
          USERMANAGER.permission, providedPermission));
      resultGraph.add(new TripleImpl(providedPermission,
          PERMISSION.javaPermissionEntry, new PlainLiteralImpl(desc.getJavaPermissionString())));
      resultGraph.add(new TripleImpl(providedPermission,
          DCTERMS.title, new PlainLiteralImpl(desc.getSimpleName())));
      resultGraph.add(new TripleImpl(providedPermission,
          DCTERMS.description, new PlainLiteralImpl(desc.getDescription())));
    }

    resultGraph.add(new TripleImpl(rolePermissionPage, RDF.type,
        PLATFORM.HeadedPage));
    resultGraph.add(new TripleImpl(rolePermissionPage, RDF.type,
        USERMANAGER.RolePermissionPage));

    NonLiteral role = userManager.getRoleByTitle(title);
    if (role != null) {
      resultGraph.add(new TripleImpl(rolePermissionPage,
          USERMANAGER.role, role));
      return new GraphNode(rolePermissionPage, new UnionMGraph(
          resultGraph, systemGraph));

    }
View Full Code Here


      @QueryParam(value = "roleTitle") String role) {

    AccessController.checkPermission(new UserManagerAccessPermission());
    MGraph resultGraph = new SimpleMGraph();
    NonLiteral node = new BNode();
    resultGraph.add(new TripleImpl(node, RDF.type,
        USERMANAGER.AddCustomPropertyPage));
    resultGraph.add(new TripleImpl(node, RDF.type,
        PLATFORM.HeadedPage));

    resultGraph.add(new TripleImpl(node, USERMANAGER.role,
        new PlainLiteralImpl(role)));
    return new GraphNode(node, resultGraph);
  }
View Full Code Here

    AccessController.checkPermission(new UserManagerAccessPermission());
    MGraph contentGraph = cgProvider.getContentGraph();
    MGraph resultGraph = new SimpleMGraph();
    NonLiteral propertyManagementPage = new BNode();
    resultGraph.add(new TripleImpl(propertyManagementPage,
        USERMANAGER.role, new PlainLiteralImpl(role)));
    resultGraph.add(new TripleImpl(propertyManagementPage, RDF.type,
        USERMANAGER.CustomFieldPage));
    resultGraph.add(new TripleImpl(propertyManagementPage, RDF.type,
        PLATFORM.HeadedPage));
    ArrayList<NonLiteral> customfields = customPropertyManager
        .getCustomfieldsOfCollection(customPropertyManager
            .getCustomPropertyCollection(PERMISSION.Role, role));
    for (NonLiteral customfield : customfields) {
      resultGraph.add(new TripleImpl(customfield, USERMANAGER.role,
          new PlainLiteralImpl(role)));
      resultGraph.add(new TripleImpl(propertyManagementPage,
          CUSTOMPROPERTY.customfield, customfield));
    }
    return new GraphNode(propertyManagementPage, new UnionMGraph(
        resultGraph, contentGraph));
  }
View Full Code Here

    String title = "";
    if(titles.hasNext()) {
      title = titles.next().getLexicalForm();
    }
    NonLiteral customFieldCollection = customPropertyManager.getCustomPropertyCollection(PERMISSION.Role, title);
    result.getGraph().add(new TripleImpl((NonLiteral) role.getNode(), USERMANAGER.custominformation,
          customFieldCollection));
 
   
  }
View Full Code Here

          }
        }
        final String unicodeString = uriRef.getUnicodeString();
        int lastIndexOf = unicodeString.lastIndexOf(section);
        UriRef parentUriRef = new UriRef(unicodeString.substring(0, lastIndexOf));
        mGraph.add(new TripleImpl(uriRef, HIERARCHY.parent, parentUriRef));
        mGraph.add(new TripleImpl(parentUriRef, RDF.type, HIERARCHY.Collection));
        uriRef = parentUriRef;

      }
    } catch (URISyntaxException ex) {
      throw new IllegalArgumentException(ex);
View Full Code Here

      TypedLiteral literal = (TypedLiteral) object;
      if (literal.getDataType().equals(XML_LITERAL)) {
        object = replacePlaceHolderInUrl(literal);
      }
    }
    return new TripleImpl(subject, predicate, object);
  }
View Full Code Here

    TrailingSlash.enforceNotPresent(uriInfo);

    MGraph mGraph = new SimpleMGraph();
    NonLiteral overview = new BNode();
    mGraph.add(new TripleImpl(overview, RDF.type, DASHBOARD.DashBoard));
    mGraph.add(new TripleImpl(overview, RDF.type, PLATFORM.HeadedPage));
    return new GraphNode(overview, mGraph);
  }
View Full Code Here

        dependency, dependencyValue));
    Lock lock = contentGraph.getLock().writeLock();
    lock.lock();
    try {
      if(customfield != null){
        contentGraph.add(new TripleImpl( customfield , CUSTOMPROPERTY.length,
          LiteralFactory.getInstance().createTypedLiteral(length)));
        return true;
      } else {
        return false;
      }
View Full Code Here

      if(customfield != null){
        Collection<Triple> tripleArray = new ArrayList<Triple>();
        String[] values = selectableValues.split(",");
        for (int i = 0; i < values.length; i++) {
          tripleArray
              .add(new TripleImpl(customfield, CUSTOMPROPERTY.value,
                  LiteralFactory.getInstance().createTypedLiteral(
                      values[i])));
        }
        tripleArray.add(new TripleImpl(customfield,
            CUSTOMPROPERTY.multiselectable, LiteralFactory.getInstance()
                .createTypedLiteral(multiselect)));
        contentGraph.addAll(tripleArray);
        return true;
      } else {
View Full Code Here

      if(contentGraph.filter(null, CUSTOMPROPERTY.property, property).hasNext()) {
        return null;
      }
      Collection<Triple> tripleArray = new ArrayList<Triple>();
      NonLiteral customField = new BNode();
      contentGraph.add(new TripleImpl(customField,
          CUSTOMPROPERTY.property, property));
      tripleArray.add(new TripleImpl(propertyCollection,
          CUSTOMPROPERTY.customfield, customField));
      tripleArray.add(new TripleImpl(customField, RDF.type,
          CUSTOMPROPERTY.CustomField));
      tripleArray.add(new TripleImpl(customField, CUSTOMPROPERTY.cardinality,
          LiteralFactory.getInstance().createTypedLiteral(cardinality)));
      tripleArray.add(new TripleImpl(customField,
          CUSTOMPROPERTY.presentationlabel, new PlainLiteralImpl(label)));
      if(description != null && !description.isEmpty()) {
        tripleArray.add(new TripleImpl(customField,
          DCTERMS.description, new PlainLiteralImpl(description)));
      }
      if(config != null && !config.isEmpty()) {
        tripleArray.add(new TripleImpl(customField,
          CUSTOMPROPERTY.configuration, new PlainLiteralImpl(config)));
      }
      if(contentGraph.addAll(tripleArray)){
        return customField;
      } else {
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.impl.TripleImpl

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.