Package org.apache.clerezza.rdf.core

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


  @Override
  public Triple next() {
    Triple triple = wrapped.next();

    NonLiteral subject = triple.getSubject();
    if (subject instanceof UriRef) {
      subject = replacePlaceHolder((UriRef) subject);
    }
    UriRef predicate = replacePlaceHolder(triple.getPredicate());
View Full Code Here


  public boolean addSingleCustomField(UriRef dependency,
    String dependencyValue, String label, String description, String config,
      UriRef property, int length, int cardinality) {
    LockableMGraph contentGraph = cgProvider.getContentGraph();

    NonLiteral customfield = addBasicCustomField(contentGraph,
      property, cardinality, label, description, config, getCustomPropertyCollection(
        dependency, dependencyValue));
    Lock lock = contentGraph.getLock().writeLock();
    lock.lock();
    try {
View Full Code Here

  public boolean addMultipleCustomField(UriRef dependency,
      String dependencyValue, String label, String description, String config, UriRef property,
      String multiselect, String selectableValues, int cardinality) {
    LockableMGraph contentGraph = cgProvider.getContentGraph();

    NonLiteral customfield = addBasicCustomField(contentGraph, property,
      cardinality, label, description, config, getCustomPropertyCollection(dependency,
        dependencyValue));
    Lock lock = contentGraph.getLock().writeLock();
    lock.lock();
    try {
View Full Code Here

  public GraphNode getHomePage(@Context UriInfo uriInfo) {

    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

    try {
      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,
View Full Code Here

    }
    lock = contentGraph.getLock().writeLock();
    lock.lock();
    try {
      Collection<Triple> tripleArray = new ArrayList<Triple>();
      NonLiteral cfc = new BNode();
      tripleArray.add(new TripleImpl(cfc, RDF.type,
          CUSTOMPROPERTY.CustomFieldCollection));
      tripleArray.add(new TripleImpl(cfc, CUSTOMPROPERTY.dependency,
          dependency));
      tripleArray.add(new TripleImpl(cfc, CUSTOMPROPERTY.dependencyvalue,
View Full Code Here

      while (customfields.hasNext()) {
        Iterator<Triple> customfields2 = contentGraph.filter(
            (NonLiteral) customfields.next().getObject(),
            CUSTOMPROPERTY.property, property);
        if (customfields2.hasNext()) {
          NonLiteral customField = customfields2.next().getSubject();
          Iterator<Triple> someCustomfieldTriples = contentGraph.filter(
              customField, null, null);
          while (someCustomfieldTriples.hasNext()) {
            allCustomFieldTriples.add(someCustomfieldTriples.next());
          }
View Full Code Here

              Collections.EMPTY_LIST, null);
        } else {
          return createResponse("Username and e-mail address don't match.");
        }
        try {
          NonLiteral agent;
          Lock readLock = systemGraph.getLock().readLock();
          readLock.lock();
          try {
            Iterator<Triple> agents = systemGraph.filter(null, PLATFORM.userName,
                new PlainLiteralImpl(userName));
View Full Code Here

     */
    public Set<Resource> getAcceptable(TripleCollection tc) {
      Set<Resource> result = new HashSet<Resource>();
      for (Triple triple : tc) {
        {
          NonLiteral subject = triple.getSubject();
          if (accept(subject, tc)) {
            result.add(subject);
          }
        }
        {
View Full Code Here

    final LockableMGraph permissionMGraph = getOrCreatePermisionGraph();
    Lock l = permissionMGraph.getLock().writeLock();
    l.lock();
    try {
      removeExistingRequiredReadPermissions(tripleCollectionUri, permissionMGraph);
      final NonLiteral permissionList = createList(permissionDescriptions.iterator(), permissionMGraph);
      permissionMGraph.add(new TripleImpl(tripleCollectionUri,
          readPermissionListProperty, permissionList));
    } finally {
      l.unlock();
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.NonLiteral

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.