Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Resource.removeAll()


        new org.wymiwyg.rwcf.util.EnhancedResponse(response)
            .sendRedirect("/admin/user_manager");
        return;
      }
      user.removeAll(AUTHORIZATION.password);
      user.removeAll(AUTHORIZATION.pass_sha1sum);
      user.addProperty(AUTHORIZATION.pass_sha1sum, Util.sha1(password));
      String[] permissionStrings = body.getParameterValues("permission");
      user.removeAll(AUTHORIZATION.permission);
      if (permissionStrings != null) {
        for (int i = 0; i < permissionStrings.length; i++) {
View Full Code Here


      }
      user.removeAll(AUTHORIZATION.password);
      user.removeAll(AUTHORIZATION.pass_sha1sum);
      user.addProperty(AUTHORIZATION.pass_sha1sum, Util.sha1(password));
      String[] permissionStrings = body.getParameterValues("permission");
      user.removeAll(AUTHORIZATION.permission);
      if (permissionStrings != null) {
        for (int i = 0; i < permissionStrings.length; i++) {
          user.addProperty(AUTHORIZATION.permission, model
              .createResource(permissionStrings[i]));
        }
View Full Code Here

      ConcreteRelation relation = new ConcreteRelation(currentRelationRes);
      float strength = relation.getCurrentStrength();
      if (strength > 0.000001) {
        float newStrength = 1f - ((1f - strength)*0.5f);
       
        currentRelationRes.removeAll(KNOBOT.effectiveDate);
        currentRelationRes.removeAll(KNOBOT.strength);
        Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                    .format(new Date()), XSDDatatype.XSDdateTime);
        currentRelationRes.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
        currentRelationRes.addProperty(KNOBOT.strength, model.createTypedLiteral(newStrength));
View Full Code Here

      float strength = relation.getCurrentStrength();
      if (strength > 0.000001) {
        float newStrength = 1f - ((1f - strength)*0.5f);
       
        currentRelationRes.removeAll(KNOBOT.effectiveDate);
        currentRelationRes.removeAll(KNOBOT.strength);
        Literal effectiveDateLiteral = model.createTypedLiteral(new W3CDateFormat()
                    .format(new Date()), XSDDatatype.XSDdateTime);
        currentRelationRes.addProperty(KNOBOT.effectiveDate, effectiveDateLiteral);
        currentRelationRes.addProperty(KNOBOT.strength, model.createTypedLiteral(newStrength));
      }
View Full Code Here

      float childStrength = relation.getProperty(KNOBOT.strength).getFloat();
      try {
        float comparativeStrength = relation.getProperty(KNOBOT.comparativeStrength).getFloat();
        if (Math.max(strength, childStrength) > comparativeStrength) {
          out.println(new ConcreteRelation(relation)+ "had to low compariteStrength, removing");
          relation.removeAll(KNOBOT.comparativeStrength);
        }
      } catch (Exception ex) {
        //ex.printStackTrace(out);
      }
    }
View Full Code Here

        /*
         * Resource relationInResourceModel = (Resource) relation
         */
        Resource relationInResourceModel = JenaUtil
            .getRoots(relationModel)[0];
        relationInResourceModel.removeAll(KNOBOT.nextRelation);
        // we may still have nextRelation stmts in relationModel
        resultModel.add(JenaUtil.getExpandedResource(
            relationInResourceModel, 3, true));

        resultModel.add(itemModel);
View Full Code Here

    float defaultStrengthReduction = Float.parseFloat(defaultStrengthReductionString);
    if ((defaultStrengthReduction > 1) || (defaultStrengthReduction < 0)) {
      throw new HandlerException("Invalid value");
    }
    Resource defaults = model.createResource(DefaultValuesHandler.defaults);
    defaults.removeAll(DefaultValuesHandler.defaultChildStrength);
    defaults.removeAll(DefaultValuesHandler.notificationEmail);
    defaults.removeAll(DefaultValuesHandler.defaultTimeZone);
    defaults.removeAll(DefaultValuesHandler.defaultMinimalRelevance);
   
    Resource itemPrototype;
View Full Code Here

    if ((defaultStrengthReduction > 1) || (defaultStrengthReduction < 0)) {
      throw new HandlerException("Invalid value");
    }
    Resource defaults = model.createResource(DefaultValuesHandler.defaults);
    defaults.removeAll(DefaultValuesHandler.defaultChildStrength);
    defaults.removeAll(DefaultValuesHandler.notificationEmail);
    defaults.removeAll(DefaultValuesHandler.defaultTimeZone);
    defaults.removeAll(DefaultValuesHandler.defaultMinimalRelevance);
   
    Resource itemPrototype;
    try {
View Full Code Here

      throw new HandlerException("Invalid value");
    }
    Resource defaults = model.createResource(DefaultValuesHandler.defaults);
    defaults.removeAll(DefaultValuesHandler.defaultChildStrength);
    defaults.removeAll(DefaultValuesHandler.notificationEmail);
    defaults.removeAll(DefaultValuesHandler.defaultTimeZone);
    defaults.removeAll(DefaultValuesHandler.defaultMinimalRelevance);
   
    Resource itemPrototype;
    try {
      itemPrototype = defaults.getProperty(DefaultValuesHandler.itemPrototype).getResource();
View Full Code Here

    }
    Resource defaults = model.createResource(DefaultValuesHandler.defaults);
    defaults.removeAll(DefaultValuesHandler.defaultChildStrength);
    defaults.removeAll(DefaultValuesHandler.notificationEmail);
    defaults.removeAll(DefaultValuesHandler.defaultTimeZone);
    defaults.removeAll(DefaultValuesHandler.defaultMinimalRelevance);
   
    Resource itemPrototype;
    try {
      itemPrototype = defaults.getProperty(DefaultValuesHandler.itemPrototype).getResource();
    } catch (NullPointerException ex) {
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.