Examples of Slot


Examples of edu.stanford.smi.protege.model.Slot

    private void migrateProjectInstance(KnowledgeBase kb, ProjectInstance pi) {
        LOGGER.info("Processing " + pi.getName());
        final Instance protegeInstance = pi.getProtegeInstance();
        final String existingName = pi.getName();

        final Slot displayNameSlot = kb.getSlot(DISPLAY_NAME_SLOT_NAME);
        protegeInstance.setOwnSlotValue(displayNameSlot, existingName);

        final ProjectId newProjectId = ProjectIdFactory.getFreshProjectId();
        pi.setName(newProjectId.getId());
        moveProjectDirectoryOnDisk(existingName, newProjectId);
View Full Code Here

Examples of jade.content.onto.annotations.Slot

    Method getter, setter;
    String setterName;
    Class<?> slotClazz;
    SlotAccessData sad;
    String propertyName;
    Slot slotAnnotation;
    Class aggregateType;
    AggregateSlot aggregateSlotAnnotation;
    boolean mandatory;
    boolean manageAsSerializable;
    int cardMin;
    int cardMax;
    String defaultValue;
    String regex;
    String[] permittedValues;
    int position;
    String documentation;
    boolean orderByPosition = false;

    while (gettersIter.hasNext()) {
      getter = gettersIter.next();
      slotClazz = getter.getReturnType();
      mandatory = false;
      manageAsSerializable = false;
      cardMin = 0;
      cardMax = ObjectSchema.UNLIMITED;
      defaultValue = null;
      regex = null;
      permittedValues = null;
      documentation = null;
      aggregateType = null;
      position = -1;
      slotAnnotation = getter.getAnnotation(Slot.class);
      aggregateSlotAnnotation = getter.getAnnotation(AggregateSlot.class);

      // build the name of the bean property starting from the getter
      propertyName = buildPropertyNameFromGetter(getter);
      // build the name of the setter name coherent with bean rules
      setterName = buildSetterNameFromBeanPropertyName(propertyName);
      setter = setters.get(setterName);
      if (setter != null) {
        // ok, we have getter and setter, we need to check parameters consistency and we are done
        if (accessorsAreConsistent(getter, setter)) {
          /*
           * if getter @Slot annotation provides a name, use it; otherwise
           * use the bean property name
           */
          String slotName = propertyName;
          if (slotAnnotation != null) {
            /*
             * if there's a @Slot annotation which specifies the name of the slot, use it
             */
            if (!Slot.USE_METHOD_NAME.equals(slotAnnotation.name())) {
              slotName = slotAnnotation.name();
            }
            if (slotAnnotation.position() != -1) {
              position = slotAnnotation.position();
              orderByPosition = true;
            }
            if (!Slot.NULL.equals(slotAnnotation.defaultValue())) {
              defaultValue = slotAnnotation.defaultValue();
            }
            if (!Slot.NULL.equals(slotAnnotation.regex())) {
              regex = slotAnnotation.regex();
            }
            if (slotAnnotation.permittedValues().length > 0) {
              permittedValues = slotAnnotation.permittedValues();
            }
            if (!Slot.NULL.equals(slotAnnotation.documentation())) {
              documentation = slotAnnotation.documentation();
            }
            manageAsSerializable = slotAnnotation.manageAsSerializable();
            mandatory = slotAnnotation.mandatory();
          }
          // if present, use getter @AggregateSlot annotation data
          if (SlotAccessData.isAggregate(slotClazz)) {
            if (slotClazz.isArray()) {
              // extract the type of array elements
View Full Code Here

Examples of javax.xml.registry.infomodel.Slot

            /*
             * There's no reason to believe these are here either
             */

            Slot s = classificationScheme.getSlot("authorizedName");

      if (s != null && s.getName() != null) {
                tm.setAuthorizedName(s.getName());
            }

            s = classificationScheme.getSlot("operator");

      if (s != null && s.getName() != null) {
                tm.setOperator(s.getName());
            }

      InternationalString iname = classificationScheme.getName();
      
            tm.setName(getFirstName(iname));
View Full Code Here

Examples of macromedia.asc.semantics.Slot

                        List values = idn.interfaces.values;
                        baseClasses = new String[values.size()];
                        for (int i = 0; i < values.size(); i++)
                        {
                            ReferenceValue rv = (ReferenceValue)values.get(i);
                            Slot s = rv.getSlot(cx, Tokens.GET_TOKEN);
                            baseClasses[i] = (s == null || s.getDebugName().length() == 0) ? rv.name : s.getDebugName();
                        }
                    }
                    else
                    {
                        baseClasses = new String[] {"Object"};
                    }
                }
                else
                {
                    if (cd.baseref != null)
                    {
                        Slot s = cd.baseref.getSlot(cx, Tokens.GET_TOKEN);
                        baseClass = (s == null || s.getDebugName().length() == 0) ? "Object" : s.getDebugName();
                    }
                    else
                    {
                        baseClass = "Object";
                    }

                    if (cd.interfaces != null)
                    {
                        List values = cd.interfaces.values;
                        interfaces = new String[values.size()];
                        for (int i = 0; i < values.size(); i++)
                        {
                            ReferenceValue rv = (ReferenceValue)values.get(i);
                            Slot s = rv.getSlot(cx, Tokens.GET_TOKEN);
                            interfaces[i] = (s == null || s.getDebugName().length() == 0) ? rv.name : s.getDebugName();
                        }
                    }
                }

                AttributeListNode attrs = cd.attrs;
View Full Code Here

Examples of models.planning.Slot

        Talk talk = Talk.findById(sessionId);
        notFoundIfNull(talk);
        checkReadAccess(talk);

        PlanedSlot planedSlot = PlanedSlot.forTalkOn(talk, ConferenceEvent.CURRENT);
        Slot slot = planedSlot != null ? planedSlot.slot : null;

        List<Member> voters = Vote.findVotersBySession(talk);
        Collections.shuffle(voters);
       
        // Don't count look when coming from internal redirect
View Full Code Here

Examples of net.cis.common.model.structure.Slot

  /**
   * @generated
   */
  protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    Slot newElement = StructureFactory.eINSTANCE.createSlot();

    Ship owner = (Ship) getElementToEdit();
    owner.getSlots().add(newElement);

    doConfigure(newElement, monitor, info);
View Full Code Here

Examples of net.minecraft.inventory.Slot

* Created by pixlepix on 9/28/14.
*/
public class FakeContainerCrafting extends Container {
    public FakeContainerCrafting(ItemStack item) {
        for (int i = 0; i < 9; i++) {
            addSlotToContainer(new Slot(new FakeInventory(item), i, 0, 0));
            inventoryItemStacks.set(i, item.copy());
        }
    }
View Full Code Here

Examples of net.minecraft.inventory.Slot

  }

  @Override
  public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
    ItemStack var3 = null;
    Slot var4 = (Slot) inventorySlots.get(par2);

    if (var4 != null && var4.getHasStack()) {
      ItemStack var5 = var4.getStack();

      if (par2 < 10 || var5 != null) {
        var3 = var5.copy();

        if (par2 < 10) {
          if (!mergeItemStack(var5, 10, 36, false))
            return null;
        } else if (var3.getItem() == ThaumicTinkerer.registry.getFirstItemFromClass(ItemSkyPearl.class) && !mergeItemStack(var5, 0, 10, false))
          return null;

        if (var5.stackSize == 0)
          var4.putStack(null);
        else
          var4.onSlotChanged();

        if (var5.stackSize == var3.stackSize)
          return null;

        var4.onPickupFromSlot(par1EntityPlayer, var5);
      }
    }

    return var3;
  }
View Full Code Here

Examples of net.minecraft.inventory.Slot

  public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slot) {
    if (slot == blockSlot)
      return null;

    ItemStack stack = null;
    Slot slotObject = (Slot) inventorySlots.get(slot);
    if (slotObject != null && slotObject.getHasStack()) {
      ItemStack stackInSlot = slotObject.getStack();
      stack = stackInSlot.copy();
      if (slot < 13 * 9) {
        if (!inv.isItemValidForSlot(slot, stackInSlot) || !mergeItemStack(stackInSlot, 13 * 9, inventorySlots.size(), true))
          return null;
      } else if (!inv.isItemValidForSlot(slot, stackInSlot) || !mergeItemStack(stackInSlot, 0, 13 * 9, false)) {
        return null;
      }
      if (stackInSlot.stackSize == 0)
        slotObject.putStack(null);
      else slotObject.onSlotChanged();
    }

    return stack;
  }
View Full Code Here

Examples of net.minecraft.inventory.Slot

  @Override
  public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {

    ItemStack stack = null;
    Slot slot = (Slot) inventorySlots.get(slotIndex);

    int invPlayer = 27;
    int invFull = invPlayer + 9;
    int invTile = invFull + (containerWrapper.getSizeInventory());

    if (slot != null && slot.getHasStack()) {
      ItemStack stackInSlot = slot.getStack();
      stack = stackInSlot.copy();

      if (slotIndex < invFull) {
        if (!this.mergeItemStack(stackInSlot, invFull, invTile, false)) {
          return null;
        }
      } else if (!this.mergeItemStack(stackInSlot, 0, invFull, true)) {
        return null;
      }
      if (stackInSlot.stackSize <= 0) {
        slot.putStack((ItemStack) null);
      } else {
        slot.onSlotChanged();
      }
      if (stackInSlot.stackSize == stack.stackSize) {
        return null;
      }
    }
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.