Examples of ID

The underlying database column may be modeled as either text or as a number. If the underlying column is of a numeric type, however, then a Data Access Object will need to pass Id parameters to {@link hirondelle.web4j.database.Db} using {@link #asInteger} or {@link #asLong}.

Design Note :
This class is final, immutable, {@link Serializable}, and {@link Comparable}, in imitation of the other building block classes such as {@link String}, {@link Integer}, and so on.

  • info.archinnov.achilles.annotations.Id
  • io.crate.analyze.Id
  • javax.help.Map.ID
  • javax.persistence.Id
  • marauroa.common.game.RPObject.ID
  • net.fortuna.ical4j.vcard.Property.Id
  • net.jcores.jre.options.ID
    The type of ID requested. @author Ralf Biedert
  • net.sourceforge.jpaxjc.ns.persistence.orm.Id
  • open.dolphin.infomodel.ID
    ID @author Kazushi Minagawa, Digital Globe, Inc.
  • operators.ID
    @author smbourge
  • org.apache.axis.types.Id
    g/TR/xmlschema-2/#ID">XML Schema 3.3.8
  • org.apache.axis2.databinding.types.Id
    org/TR/xmlschema-2/#ID">XML Schema 3.3.8
  • org.apache.jackrabbit.mk.model.Id
    Represents an internal identifier, uniquely identifying a {@link Node} or a {@link Commit}.

    This implementation aims at minimizing the in-memory footprint of an identifier instance. therefore it doesn't cache e.g. the hashCode or the string representation.

    Important Note:

    An {@link Id} is considered immutable. The {@code byte[]}passed to {@link Id#Id(byte[])} must not be reused or modified, the sameapplies for the {@code byte[]} returned by {@link Id#getBytes()}.

  • org.apache.openejb.config.provider.ID
    IDs are not case-sensitive
  • org.apache.openejb.jee.jpa.Id
    3.org/2001/XMLSchema}anyType"> <sequence> <element name="column" type="{http://java.sun.com/xml/ns/persistence/orm}column" minOccurs="0"/> <element name="generated-value" type="{http://java.sun.com/xml/ns/persistence/orm}generated-value" minOccurs="0"/> <element name="temporal" type="{http://java.sun.com/xml/ns/persistence/orm}temporal" minOccurs="0"/> <element name="table-generator" type="{http://java.sun.com/xml/ns/persistence/orm}table-generator" minOccurs="0"/> <element name="sequence-generator" type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator" minOccurs="0"/> </sequence> <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" /> </restriction> </complexContent> </complexType>
  • org.apache.openjpa.util.Id
    Datastore identity type. Implementations may choose to use this type, or choose to use their own datastore identity values. @author Abe White
  • org.apache.tapestry.annotations.Id
  • org.apache.tapestry.ioc.annotations.Id
  • org.apache.tapestry5.annotations.Id
    A mixin for a text field that allows for autocompletion of text fields. This is based on Prototype's autocompleter control.

    The mixin renders an (initially invisible) progress indicator after the field (it will also be after the error icon most fields render). The progress indicator is made visible during the request to the server. The mixin then renders a <div> that will be filled in on the client side with dynamically obtained selections.

    Multiple selection on the client is enabled by binding the tokens parameter (however, the mixin doesn't help split multiple selections up on the server, that is still your code's responsibility).

    The container is responsible for providing an event handler for event "providecompletions". The context will be the partial input string sent from the client. The return value should be an array or list of completions, in presentation order. I.e.

     String[] onProvideCompletionsFromMyField(String input) { return . . .; } 
  • org.apache.zookeeper.data.Id
  • org.apache.zookeeper_voltpatches.data.Id
  • org.dmlite.model.id.Id
    Entity id. Id is a user oriented, semantical identifier that is a combination of properties and/or parent neighbors. @version 2006-11-03 @author Dzenan Ridjanovic
  • org.eclipse.ecf.core.identity.ID
    Contract for ECF identity

    ECF IDs are immutable once constructed, and unique within the containing {@link Namespace}.

    ID instances are created via the Namespace.createInstance(...) method. This method is called by the IDFactory.createID(...) methods for the given Namespace. So, for example, to create an ID instance with the name "slewis":

     ID id = IDFactory.getDefault().createID(namespace, "slewis"); 

    @see Namespace

  • org.hibernate.jpamodelgen.xml.jaxb.Id
    3.org/2001/XMLSchema}anyType"> <sequence> <element name="column" type="{http://java.sun.com/xml/ns/persistence/orm}column" minOccurs="0"/> <element name="generated-value" type="{http://java.sun.com/xml/ns/persistence/orm}generated-value" minOccurs="0"/> <element name="temporal" type="{http://java.sun.com/xml/ns/persistence/orm}temporal" minOccurs="0"/> <element name="table-generator" type="{http://java.sun.com/xml/ns/persistence/orm}table-generator" minOccurs="0"/> <element name="sequence-generator" type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator" minOccurs="0"/> </sequence> <attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" /> <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> </restriction> </complexContent> </complexType>
  • org.hibernate.test.cid.LineItem.Id
  • org.jongo.marshall.jackson.oid.Id
  • org.jruby.common.IRubyWarnings.ID
  • org.locationtech.udig.catalog.ID
    Identifier used to lookup entries in an local IRespository or remote ISearch.

    While an identifier is often defined by URL or URI this class has constructors to help remove any possibility ambiguity. These objects are considered immutable and are very careful to have a fast hashCode function etc...

    @author Jody Garnett @since 1.2
  • org.nutz.dao.entity.annotation.Id
  • org.objectstyle.woenvironment.pb.PBXProject.ObjectsTable.ID
  • org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts.Id
  • org.opengis.filter.Id
    FeatureId idCapabilities.hasEID() == true; // no idea ... @author Chris Dillard (SYS Technologies) @author Justin Deoliveira (The Open Planning Project) @source $URL$
  • org.rococoa.ID
    Represents an Objective-C ID. This extends NativeLong for efficiency, but you should really think of it as opaque. Technically, this should be {@link Native#POINTER_SIZE} not {@link Native#LONG_SIZE}, but as they are both 32 on 32-bit and 64 on 64-bit we'll gloss over that. Ideally it would be Pointer, but they have no protected constructors.
  • org.structr.rest.serialization.html.attr.Id
    @author Christian Morgner
  • org.zkoss.test.Id
    @author sam
  • rice.p2p.commonapi.Id
  • shillelagh.Id
  • siena.Id
  • wyfs.lang.Path.ID

  • Examples of marauroa.common.game.RPObject.ID

      public void contentRemoved(RPSlot removed) {
        // We are interested only in one slot
        if (slotName.equals(removed.getName())) {
          for (RPObject obj : removed) {
            ID id = obj.getID();
            for (ItemPanel panel : panels) {
              IEntity entity = panel.getEntity();
              if (entity != null && id.equals(entity.getRPObject().getID())) {
                if (obj.size() == 1) {
                  // The object was removed
                  panel.setEntity(null);
                  continue;
                }
    View Full Code Here

    Examples of marauroa.common.game.RPObject.ID

            getReply(npc));
        assertTrue(en.step(player, "bye"));
        assertEquals("Bye.", getReply(npc));
        final StackableItem wood = new StackableItem("wood", "", "", null);
        wood.setQuantity(10);
        wood.setID(new ID(2, ZONE_NAME));
        player.getSlot("bag").add(wood);
        assertEquals(10, player.getNumberOfEquipped("wood"));
        assertTrue(en.step(player, "hi"));
        assertEquals(
            "Hi again! You've got wood, I see; do you have those 10 pieces of wood I asked about earlier?",
    View Full Code Here

    Examples of marauroa.common.game.RPObject.ID

        EntityManager em = SingletonRepository.getEntityManager();
        Spell spell = em.getSpell(args.get(1));
        String name = args.get(0);
        Player player = SingletonRepository.getRuleProcessor().getPlayer(name);
        RPSlot slot = player.getSlot("spells");
        ID id = null;
        for(RPObject o : slot) {
          if(spell.getName().equalsIgnoreCase(o.get("name"))) {
            id = o.getID();
          }
        }
    View Full Code Here

    Examples of net.fortuna.ical4j.vcard.Property.Id

               * at index = 3 is the GroupId
               */
              final int n = 3;

              // set Property.Id
              final Id id = getItemId(str[n]);

              final ArrayList<Parameter> param = new ArrayList<Parameter>();

              boolean startSignFound = false;

    View Full Code Here

    Examples of net.jcores.jre.options.ID

         * default a new, unique ID is returned.
         * @return Returns an ID.
         */
        @SupportsOption(options = { ID.class })
        public String uniqueID(Option... options) {
            final ID id = Options.$(this.commonCore, options).ID();
           
           
            if(id == ID.SYSTEM || id == ID.USER) {
                try {
                    // System nodes apparently fail for Lion when syncing() (see Issue #15).
                    final Preferences node = id == ID.SYSTEM ? Preferences.systemNodeForPackage(getClass()) : Preferences.userNodeForPackage(getClass());

                    final String rval = node.get("system.id", "UNAVAILABLE");
                    if("UNAVAILABLE".equals(rval)) {
                        String newid = UUID.randomUUID().toString();
                        node.put("system.id", newid);
                        node.sync();
                        return newid;
                    }
                    return rval;
                } catch(Exception e) {
                    Options.$(this.commonCore, options).failure(null, e, "uniqueid:create", "Error getting the ID " + id.getClass() + " (on Lion this might be a bug).");
                    return "UNAVAILABLE";
                }
            }
           
            return UUID.randomUUID().toString();
    View Full Code Here

    Examples of net.sourceforge.jpaxjc.ns.persistence.orm.Id

                boolean mapped = false;

                if ( f.getPropertyInfo().getCustomizations().find( ORM_NS, "id" ) != null )
                {
                    final CPluginCustomization pc = f.getPropertyInfo().getCustomizations().find( ORM_NS, "id" );
                    final Id id = JAXB.unmarshal( new DOMSource( pc.element ), Id.class );

                    if ( id.getName() == null )
                    {
                        id.setName( f.getPropertyInfo().getName( false ) );
                    }

                    attributes.getId().add( id );
                    mapped = true;

                    final Column defaultColumn =
                        this.applySchemaDefaults( f.getPropertyInfo().getSchemaComponent(), id.getColumn() );

                    id.setColumn( defaultColumn );

                    if ( !pc.isAcknowledged() )
                    {
                        pc.markAsAcknowledged();
                    }
    View Full Code Here

    Examples of open.dolphin.infomodel.ID

       
        /**
         * 地域連携用の患者のMasterIdを返す。
         */
        public ID createMasterId(String pid, String facilityId) {
            return new ID(pid, "facility", facilityId);
        }
    View Full Code Here

    Examples of operators.ID

            String[] resources = ff.getResourceIds().toArray(new String[0]);
            for(int i=0; i<resources.length; i++){
                ArrayList<FaspFuzzyExpression> listii = new ArrayList<FaspFuzzyExpression>();
                listii.add(new LattVal(1.0));
                rules.add(new GroundRegularRule(new GroundLiteral(new GroundPredicate(
                        "SIMR("+resources[i]+","+resources[i]+")"),false, false,null),listii,new ID()));
                for(int j=i+1; j<resources.length; j++){
                    //JACCARD RULES
                    double sim_tag = ff.getJaccard(resources[i], resources[j], Item.RESOURCE, Item.TAG);
                    double sim_user = ff.getJaccard(resources[i], resources[j], Item.RESOURCE, Item.USER);

                    ArrayList<FaspFuzzyExpression> list = new ArrayList<FaspFuzzyExpression>(1);
                    ArrayList<FaspFuzzyExpression> list_reverse = new ArrayList<FaspFuzzyExpression>(1);
                    list.add(new LattVal((((double)1/2)*sim_tag)*(((double)1/2)*sim_user)));

                    GroundLiteral SIMR_litt =
                    new GroundLiteral(new GroundPredicate("SIMR("+resources[i]+","+resources[j]+")"),false, false,null);

                    GroundRegularRule rule = new GroundRegularRule(SIMR_litt, list, new ID());

                    list_reverse.add(SIMR_litt);

                    GroundRegularRule rule_reverse = new GroundRegularRule(
                            new GroundLiteral(new GroundPredicate("SIMR("+resources[j]+","+resources[i]+")"),
                            false, false,null), list_reverse, new ID());

                    rules.add(rule);
                    rules.add(rule_reverse);

                    //Recursieve regels onderdeel T              
                    ArrayList<FaspFuzzyExpression> list_op1_T1 = new ArrayList<FaspFuzzyExpression>();
                    ArrayList<FaspFuzzyExpression> list_op1_T2 = new ArrayList<FaspFuzzyExpression>();
                    //MAX van T1 met alle tags van T2
                    for(String tag_i : ff.getResource(resources[i]).getItemList(Item.TAG)){
                        ArrayList<FaspFuzzyExpression> list_max_T1 = new ArrayList<FaspFuzzyExpression>();
                        for(String tag_j : ff.getResource(resources[j]).getItemList(Item.TAG)){
                            list_max_T1.add(new GroundLiteral(new GroundPredicate("SIMT("+tag_i+","+tag_j+")"),false, false,null));
                        }
                        GroundLiteral litt_max_T1 = new GroundLiteral(new GroundPredicate(
                                "MAXR_"+resources[i]+"_"+resources[j]+"_T1_"+tag_i),false, false,null);
                        GroundRegularRule rule_max_T1 = new GroundRegularRule(litt_max_T1, list_max_T1, new MULTIMAX());
                        rules.add(rule_max_T1);
                        list_op1_T1.add(litt_max_T1);
                    }
                    //MAX van T2 met alle tags van T1
                    for(String tag_j : ff.getResource(resources[j]).getItemList(Item.TAG)){
                        ArrayList<FaspFuzzyExpression> list_max_T2 = new ArrayList<FaspFuzzyExpression>();
                        for(String tag_i : ff.getResource(resources[i]).getItemList(Item.TAG)){
                            list_max_T2.add(new GroundLiteral(new GroundPredicate("SIMT("+tag_j+","+tag_i+")"),false, false,null));
                        }
                        GroundLiteral litt_max_T2 = new GroundLiteral(new GroundPredicate(
                                "MAXR_"+resources[j]+"_"+resources[i]+"_T2_"+tag_j),false, false,null);
                        GroundRegularRule rule_max_T2 = new GroundRegularRule(litt_max_T2, list_max_T2, new MULTIMAX());
                        rules.add(rule_max_T2);
                        list_op1_T2.add(litt_max_T2);
                    }
                    //op1 van maxT1 en maxT2
                    GroundLiteral litt_op1_T1 = new GroundLiteral(new GroundPredicate(
                            "OP1R_"+resources[i]+"_"+resources[j]+"_T1"),false,false,null);
                    GroundLiteral litt_op1_T2 = new GroundLiteral(new GroundPredicate(
                            "OP1R_"+resources[i]+"_"+resources[j]+"_T2"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op1_T1,list_op1_T1, op1));
                    rules.add(new GroundRegularRule(litt_op1_T2,list_op1_T2, op1));
                    //op2 van op1T1 en op1T2
                    ArrayList<FaspFuzzyExpression> list_op2_T = new ArrayList<FaspFuzzyExpression>();
                    list_op2_T.add(litt_op1_T1);
                    list_op2_T.add(litt_op1_T2);
                    GroundLiteral litt_op2_T = new GroundLiteral(new GroundPredicate(
                            "OP2R_"+resources[i]+"_"+resources[j]+"_T"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op2_T, list_op2_T, op2));

                    //Recursieve regels onderdeel U
                    ArrayList<FaspFuzzyExpression> list_op1_U1 = new ArrayList<FaspFuzzyExpression>();
                    ArrayList<FaspFuzzyExpression> list_op1_U2 = new ArrayList<FaspFuzzyExpression>();
                    //MAX van U1 met alle tags van U2
                    for(String user_i : ff.getResource(resources[i]).getItemList(Item.USER)){
                        ArrayList<FaspFuzzyExpression> list_max_U1 = new ArrayList<FaspFuzzyExpression>();
                        for(String user_j : ff.getResource(resources[j]).getItemList(Item.USER)){
                            list_max_U1.add(new GroundLiteral(new GroundPredicate("SIMU("+user_i+","+user_j+")"),false, false,null));
                        }
                        GroundLiteral litt_max_U1 = new GroundLiteral(new GroundPredicate(
                                "MAXR_"+resources[i]+"_"+resources[j]+"_U1_"+user_i),false, false,null);
                        GroundRegularRule rule_max_U1 = new GroundRegularRule(litt_max_U1, list_max_U1, new MULTIMAX());
                        rules.add(rule_max_U1);
                        list_op1_U1.add(litt_max_U1);
                    }
                    //MAX van U2 met alle tags van U1
                    for(String user_j : ff.getResource(resources[j]).getItemList(Item.USER)){
                        ArrayList<FaspFuzzyExpression> list_max_U2 = new ArrayList<FaspFuzzyExpression>();
                        for(String user_i : ff.getResource(resources[i]).getItemList(Item.USER)){
                            list_max_U2.add(new GroundLiteral(new GroundPredicate("SIMU("+user_j+","+user_i+")"),false, false,null));
                        }
                        GroundLiteral litt_max_U2 = new GroundLiteral(new GroundPredicate(
                                "MAXR_"+resources[j]+"_"+resources[i]+"_U2_"+user_j),false, false,null);
                        GroundRegularRule rule_max_U2 = new GroundRegularRule(litt_max_U2, list_max_U2, new MULTIMAX());
                        rules.add(rule_max_U2);
                        list_op1_U2.add(litt_max_U2);
                    }
                    //op1 van maxU1 en maxU2
                    GroundLiteral litt_op1_U1 = new GroundLiteral(new GroundPredicate(
                            "OP1R_"+resources[i]+"_"+resources[j]+"_U1"),false,false,null);
                    GroundLiteral litt_op1_U2 = new GroundLiteral(new GroundPredicate(
                            "OP1R_"+resources[i]+"_"+resources[j]+"_U2"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op1_U1, list_op1_U1, op1));
                    rules.add(new GroundRegularRule(litt_op1_U2, list_op1_U2, op1));
                    //op2 van op1U1 en op1U2
                    ArrayList<FaspFuzzyExpression> list_op2_U = new ArrayList<FaspFuzzyExpression>();
                    list_op2_U.add(litt_op1_U1);
                    list_op2_U.add(litt_op1_U2);
                    GroundLiteral litt_op2_U = new GroundLiteral(new GroundPredicate(
                            "OP2R_"+resources[i]+"_"+resources[j]+"_U"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op2_U, list_op2_U, op2));

                    //op3 van op2T en op2U
                    ArrayList<FaspFuzzyExpression> list_op3 = new ArrayList<FaspFuzzyExpression>();
                    list_op3.add(litt_op2_U);
                    list_op3.add(litt_op2_T);
                    rules.add(new GroundRegularRule(SIMR_litt,list_op3, op3));
                }
            }

            //RULES USERS
            String[] users = ff.getUserIds().toArray(new String[0]);
            for(int i=0; i<users.length; i++){
                ArrayList<FaspFuzzyExpression> listii = new ArrayList<FaspFuzzyExpression>();
                listii.add(new LattVal(1.0));
                rules.add(new GroundRegularRule(new GroundLiteral(new GroundPredicate(
                        "SIMU("+users[i]+","+users[i]+")"),false, false,null),listii,new ID()));
                for(int j=i+1; j<users.length; j++){
                    //JACCARD RULES
                    double sim_tag = ff.getJaccard(users[i], users[j], Item.USER, Item.TAG);
                    double sim_res = ff.getJaccard(users[i], users[j], Item.USER, Item.RESOURCE);

                    ArrayList<FaspFuzzyExpression> list = new ArrayList<FaspFuzzyExpression>(1);
                    ArrayList<FaspFuzzyExpression> list_reverse = new ArrayList<FaspFuzzyExpression>(1);
                    list.add(new LattVal((((double)1/2)*sim_tag)*(((double)1/2)*sim_res)));

                    GroundLiteral SIMU_litt =
                    new GroundLiteral(new GroundPredicate("SIMU("+users[i]+","+users[j]+")"),false, false,null);

                    GroundRegularRule rule = new GroundRegularRule(SIMU_litt, list, new ID());

                    list_reverse.add(SIMU_litt);

                    GroundRegularRule rule_reverse = new GroundRegularRule(
                            new GroundLiteral(new GroundPredicate("SIMU("+users[j]+","+users[i]+")"),
                            false, false,null), list_reverse, new ID());

                    rules.add(rule);
                    rules.add(rule_reverse);

                    //Recursieve regels onderdeel T
                    ArrayList<FaspFuzzyExpression> list_op1_T1 = new ArrayList<FaspFuzzyExpression>();
                    ArrayList<FaspFuzzyExpression> list_op1_T2 = new ArrayList<FaspFuzzyExpression>();
                    //MAX van T1 met alle tags van T2
                    for(String tag_i : ff.getUser(users[i]).getItemList(Item.TAG)){
                        ArrayList<FaspFuzzyExpression> list_max_T1 = new ArrayList<FaspFuzzyExpression>();
                        for(String tag_j : ff.getUser(users[j]).getItemList(Item.TAG)){
                            list_max_T1.add(new GroundLiteral(new GroundPredicate("SIMT("+tag_i+","+tag_j+")"),false, false,null));
                        }
                        GroundLiteral litt_max_T1 = new GroundLiteral(new GroundPredicate(
                                "MAXU_"+users[i]+"_"+users[j]+"_T1_"+tag_i),false, false,null);
                        GroundRegularRule rule_max_T1 = new GroundRegularRule(litt_max_T1, list_max_T1, new MULTIMAX());
                        rules.add(rule_max_T1);
                        list_op1_T1.add(litt_max_T1);
                    }
                    //MAX van T2 met alle tags van T1
                    for(String tag_j : ff.getUser(users[j]).getItemList(Item.TAG)){
                        ArrayList<FaspFuzzyExpression> list_max_T2 = new ArrayList<FaspFuzzyExpression>();
                        for(String tag_i : ff.getUser(users[i]).getItemList(Item.TAG)){
                            list_max_T2.add(new GroundLiteral(new GroundPredicate("SIMT("+tag_j+","+tag_i+")"),false, false,null));
                        }
                        GroundLiteral litt_max_T2 = new GroundLiteral(new GroundPredicate(
                                "MAXU_"+users[j]+"_"+users[i]+"_T2_"+tag_j),false, false,null);
                        GroundRegularRule rule_max_T2 = new GroundRegularRule(litt_max_T2, list_max_T2, new MULTIMAX());
                        rules.add(rule_max_T2);
                        list_op1_T2.add(litt_max_T2);
                    }
                    //op1 van maxT1 en maxT2
                    GroundLiteral litt_op1_T1 = new GroundLiteral(new GroundPredicate(
                            "OP1U_"+users[i]+"_"+users[j]+"_T1"),false,false,null);
                    GroundLiteral litt_op1_T2 = new GroundLiteral(new GroundPredicate(
                            "OP1U_"+users[i]+"_"+users[j]+"_T2"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op1_T1,list_op1_T1, op1));
                    rules.add(new GroundRegularRule(litt_op1_T2,list_op1_T2, op1));
                    //op2 van op1T1 en op1T2
                    ArrayList<FaspFuzzyExpression> list_op2_T = new ArrayList<FaspFuzzyExpression>();
                    list_op2_T.add(litt_op1_T1);
                    list_op2_T.add(litt_op1_T2);
                    GroundLiteral litt_op2_T = new GroundLiteral(new GroundPredicate(
                            "OP2U_"+users[i]+"_"+users[j]+"_T"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op2_T, list_op2_T, op2));

                    //Recursieve regels onderdeel R
                    ArrayList<FaspFuzzyExpression> list_op1_R1 = new ArrayList<FaspFuzzyExpression>();
                    ArrayList<FaspFuzzyExpression> list_op1_R2 = new ArrayList<FaspFuzzyExpression>();
                    //MAX van R1 met alle tags van R2
                    for(String res_i : ff.getUser(users[i]).getItemList(Item.RESOURCE)){
                        ArrayList<FaspFuzzyExpression> list_max_R1 = new ArrayList<FaspFuzzyExpression>();
                        for(String res_j : ff.getUser(users[j]).getItemList(Item.RESOURCE)){
                            list_max_R1.add(new GroundLiteral(new GroundPredicate("SIMR("+res_i+","+res_j+")"),false, false,null));
                        }
                        GroundLiteral litt_max_R1 = new GroundLiteral(new GroundPredicate(
                                "MAXU_"+users[i]+"_"+users[j]+"_R1_"+res_i),false, false,null);
                        GroundRegularRule rule_max_R1 = new GroundRegularRule(litt_max_R1, list_max_R1, new MULTIMAX());
                        rules.add(rule_max_R1);
                        list_op1_R1.add(litt_max_R1);
                    }
                    //MAX van R2 met alle tags van R1
                    for(String res_j : ff.getUser(users[j]).getItemList(Item.RESOURCE)){
                        ArrayList<FaspFuzzyExpression> list_max_R2 = new ArrayList<FaspFuzzyExpression>();
                        for(String res_i : ff.getUser(users[i]).getItemList(Item.RESOURCE)){
                            list_max_R2.add(new GroundLiteral(new GroundPredicate("SIMR("+res_j+","+res_i+")"),false, false,null));
                        }
                        GroundLiteral litt_max_R2 = new GroundLiteral(new GroundPredicate(
                                "MAXU_"+users[j]+"_"+users[i]+"_R2_"+res_j),false, false,null);
                        GroundRegularRule rule_max_R2 = new GroundRegularRule(litt_max_R2, list_max_R2, new MULTIMAX());
                        rules.add(rule_max_R2);
                        list_op1_R2.add(litt_max_R2);
                    }
                    //op1 van maxR1 en maxR2
                    GroundLiteral litt_op1_R1 = new GroundLiteral(new GroundPredicate(
                            "OP1U_"+users[i]+"_"+users[j]+"_R1"),false,false,null);
                    GroundLiteral litt_op1_R2 = new GroundLiteral(new GroundPredicate(
                            "OP1U_"+users[i]+"_"+users[j]+"_R2"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op1_R1, list_op1_R1, op1));
                    rules.add(new GroundRegularRule(litt_op1_R2, list_op1_R2, op1));
                    //op2 van op1R1 en op1R2
                    ArrayList<FaspFuzzyExpression> list_op2_R = new ArrayList<FaspFuzzyExpression>();
                    list_op2_R.add(litt_op1_R1);
                    list_op2_R.add(litt_op1_R2);
                    GroundLiteral litt_op2_R = new GroundLiteral(new GroundPredicate(
                            "OP2U_"+users[i]+"_"+users[j]+"_R"),false,false,null);
                    rules.add(new GroundRegularRule(litt_op2_R, list_op2_R, op2));

                    //op3 van op2R en op2R
                    ArrayList<FaspFuzzyExpression> list_op3 = new ArrayList<FaspFuzzyExpression>();
                    list_op3.add(litt_op2_T);
                    list_op3.add(litt_op2_R);
                    rules.add(new GroundRegularRule(SIMU_litt,list_op3, op3));
                }
            }

            //RULES TAGS
            String[] tags = ff.getTagIds().toArray(new String[0]);
            for(int i=0; i<tags.length; i++){
                ArrayList<FaspFuzzyExpression> listii = new ArrayList<FaspFuzzyExpression>();
                listii.add(new LattVal(1.0));
                rules.add(new GroundRegularRule(new GroundLiteral(new GroundPredicate(
                        "SIMT("+tags[i]+","+tags[i]+")"),false, false,null),listii,new ID()));
                for(int j=i+1; j<tags.length; j++){
                    //JACCARD RULES
                    double sim_user = ff.getJaccard(tags[i], tags[j], Item.TAG, Item.USER);
                    double sim_res = ff.getJaccard(tags[i], tags[j], Item.TAG, Item.RESOURCE);

                    ArrayList<FaspFuzzyExpression> list = new ArrayList<FaspFuzzyExpression>(1);
                    ArrayList<FaspFuzzyExpression> list_reverse = new ArrayList<FaspFuzzyExpression>(1);
                    list.add(new LattVal((((double)1/2)*sim_user)*(((double)1/2)*sim_res)));

                    GroundLiteral SIMT_litt =
                    new GroundLiteral(new GroundPredicate("SIMT("+tags[i]+","+tags[j]+")"),false, false,null);

                    GroundRegularRule rule = new GroundRegularRule(SIMT_litt, list, new ID());

                    list_reverse.add(SIMT_litt);

                    GroundRegularRule rule_reverse = new GroundRegularRule(
                            new GroundLiteral(new GroundPredicate("SIMT("+tags[j]+","+tags[i]+")"),
                            false, false,null), list_reverse, new ID());

                    rules.add(rule);
                    rules.add(rule_reverse);

                    //Recursieve regels onderdeel U  
    View Full Code Here

    Examples of org.apache.axis.types.Id

        /**
         * Run a failure test.  value should be invalid.
         */
        private void runFailTest(String value) throws Exception {
            Id oToken = null;
            try {
                oToken = new Id(value);
            }
            catch (Exception e) { // catch the validation exception
            }
            assertNull(
                    "Id validation restriction failed. did not restrict bad value [" +
    View Full Code Here

    Examples of org.apache.axis2.databinding.types.Id

        public static Id convertToID(String s) {
            if ((s == null) || s.equals("")){
                return null;
            }
            return new Id(s);
        }
    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.