Examples of ItemType


Examples of client.net.sf.saxon.ce.type.ItemType

    public ItemType getItemType(TypeHierarchy th) {
        if (calculator == null) {
            return BuiltInAtomicType.ANY_ATOMIC;  // type is not known statically
        } else {
            ItemType t1 = operand0.getItemType(th);
            if (!(t1 instanceof AtomicType)) {
                t1 = t1.getAtomizedItemType();
            }
            ItemType t2 = operand1.getItemType(th);
            if (!(t2 instanceof AtomicType)) {
                t2 = t2.getAtomizedItemType();
            }
            ItemType resultType = calculator.getResultType((AtomicType) t1.getPrimitiveItemType(),
                    (AtomicType) t2.getPrimitiveItemType());

            if (resultType.equals(BuiltInAtomicType.ANY_ATOMIC)) {
                // there are a few special cases where we can do better. For example, given X+1, where the type of X
                // is unknown, we can still infer that the result is numeric. (Not so for X*2, however, where it could
                // be a duration)
                if ((operator == Token.PLUS || operator == Token.MINUS) &&
                        (th.isSubType(t2, BuiltInAtomicType.NUMERIC) || th.isSubType(t1, BuiltInAtomicType.NUMERIC))) {

Examples of client.net.sf.saxon.ce.type.ItemType

     * @param declaration Associates this template with a stylesheet module (in principle an xsl:template
     * element can be in a document that is imported more than once; these are separate declarations)
     */

    public void optimize(Declaration declaration) throws XPathException {
        ItemType contextItemType = Type.ITEM_TYPE;
        if (getObjectName() == null) {
            // the template can't be called by name, so the context item must match the match pattern
            contextItemType = match.getNodeTest();
        }

Examples of client.net.sf.saxon.ce.type.ItemType

        Expression select2 = visitor.typeCheck(select, contextItemType);
        if (select2 != select) {
            adoptChildExpression(select2);
            select = select2;
        }
        ItemType sortedItemType = select.getItemType(visitor.getConfiguration().getTypeHierarchy());

        boolean allKeysFixed = true;
        for (int i = 0; i < sortKeyDefinitions.length; i++) {
            if (!(sortKeyDefinitions[i].isFixed())) {
                allKeysFixed = false;

Examples of client.net.sf.saxon.ce.type.ItemType

        if (select2 != select) {
            adoptChildExpression(select2);
            select = select2;
        }
        // optimize the sort keys
        ItemType sortedItemType = select.getItemType(visitor.getConfiguration().getTypeHierarchy());
        for (int i = 0; i < sortKeyDefinitions.length; i++) {
            Expression sortKey = sortKeyDefinitions[i].getSortKey();
            sortKey = visitor.optimize(sortKey, sortedItemType);
            sortKeyDefinitions[i].setSortKey(sortKey);
        }

Examples of client.net.sf.saxon.ce.type.ItemType

        RoleLocator role = new RoleLocator(RoleLocator.VARIABLE, getVariableQName(), 0);
        //role.setSourceLocator(this);
        sequence = TypeChecker.strictTypeCheck(
                sequence, requiredType, role, visitor.getStaticContext());
        final TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy();
        final ItemType actualItemType = sequence.getItemType(th);

        refineTypeInformation(actualItemType,
                sequence.getCardinality(),
                (sequence instanceof Literal ? ((Literal) sequence).getValue() : null),
                sequence.getSpecialProperties(), visitor, this);

Examples of client.net.sf.saxon.ce.type.ItemType

     * Determine the item type of the value returned by the function
     * @param th the type hierarchy cache
     */

    public ItemType getItemType(TypeHierarchy th) {
        ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th);
        if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) {
            return BuiltInAtomicType.DOUBLE;
        } else if (base.getPrimitiveType() == StandardNames.XS_INTEGER) {
            return BuiltInAtomicType.DECIMAL;
        } else {
            return base;
        }
    }

Examples of cloudsync.model.ItemType

    try {

      Path path = file.toPath();

      ItemType type = ItemType.UNKNOWN;

      if (Files.isSymbolicLink(path)) {

        String target;
        target = Files.readSymbolicLink(path).toString();
        final String firstChar = target.substring(0, 1);
        if (!firstChar.equals(Item.SEPARATOR)) {
          if (!firstChar.equals(".")) {
            target = "." + Item.SEPARATOR + target;
          }
          target = path.toString() + Item.SEPARATOR + target;
        }
        target = Paths.get(target).toFile().getCanonicalPath();

        if (!followlinks.equals(LinkType.NONE) && followlinks.equals(LinkType.EXTERNAL) && !target.startsWith(localPath)) {

          final Path targetPath = Paths.get(target);
          if (Files.exists(targetPath, LinkOption.NOFOLLOW_LINKS)) {
            path = targetPath;
          }
        }
      }

      BasicFileAttributes basic_attr = Files.readAttributes(path, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS);
      final Long filesize = basic_attr.size();
      final FileTime creationTime = basic_attr.creationTime();
      final FileTime modifyTime = basic_attr.lastModifiedTime();
      final FileTime accessTime = basic_attr.lastAccessTime();

      if (basic_attr.isDirectory()) {
        type = ItemType.FOLDER;
      } else if (basic_attr.isRegularFile()) {
        type = ItemType.FILE;
      } else if (basic_attr.isSymbolicLink()) {
        type = ItemType.LINK;
      } else {
        type = ItemType.UNKNOWN;
      }

      Map<String, String[]> attributes = new HashMap<String, String[]>();

      PosixFileAttributeView posixView = Files.getFileAttributeView(path, PosixFileAttributeView.class, LinkOption.NOFOLLOW_LINKS);
      if (posixView != null) {
        final PosixFileAttributes attr = posixView.readAttributes();
        if (type.equals(ItemType.LINK)) {
          attributes.put(Item.ATTRIBUTE_POSIX, new String[] { attr.group().getName(), attr.owner().getName() });
        } else {
          attributes.put(Item.ATTRIBUTE_POSIX, new String[] { attr.group().getName(), attr.owner().getName(), fromPermissions(attr.permissions()).toString() });
        }
      } else {

        DosFileAttributeView dosView = Files.getFileAttributeView(path, DosFileAttributeView.class, LinkOption.NOFOLLOW_LINKS);
        if (dosView != null) {
          final DosFileAttributes attr = dosView.readAttributes();
          attributes.put(Item.ATTRIBUTE_DOS, new String[] { attr.isArchive() ? "1" : "0", attr.isHidden() ? "1" : "0", attr.isReadOnly() ? "1" : "0", attr.isSystem() ? "1" : "0" });
        }
      }

      if (!type.equals(ItemType.LINK)) {

        AclFileAttributeView aclView = Files.getFileAttributeView(path, AclFileAttributeView.class, LinkOption.NOFOLLOW_LINKS);
        if (aclView != null) {
          if (!attributes.containsKey(Item.ATTRIBUTE_POSIX))
            attributes.put(Item.ATTRIBUTE_OWNER, new String[] { aclView.getOwner().getName() });

Examples of com.ebay.soap.eBLBaseComponents.ItemType

                    };
            GetItemCall getItemCall = new GetItemCall(apiContext);
            getItemCall.setDetailLevel(detailLevel);
            getItemCall.setItemID(itemId);
            getItemCall.getItem();
            ItemType item = getItemCall.getReturnedItem();
            String itemName = item.getTitle();
            GetBestOffersCall getBestOffersCall = new GetBestOffersCall(apiContext);
            getBestOffersCall.setDetailLevel(detailLevel);
            getBestOffersCall.setItemID(itemId);
            getBestOffersCall.setBestOfferID(bestOfferId);
            getBestOffersCall.getBestOffers();

Examples of com.ebay.soap.eBLBaseComponents.ItemType

            // Display active items in table.
            AbstractTableModel dataModel = new AbstractTableModel() {
                public int getColumnCount() { return 0; }
                public int getRowCount() { return activeItems == null ? 0 : activeItems.length;}
                public Map<String, Object> getValueAt(int row, int col) {
                    ItemType item = activeItems[row];
                    return itemToColumns(item);
                }
            };
            //add To List
            List<Map<Object, Object>> activeList = getDataModelToList(dataModel);
            int activeSize = dataModel.getRowCount();
            ItemType[] tempItems = null;
            if (api.getReturnedScheduledList() != null) tempItems = (api.getReturnedScheduledList().getItemArray()).getItem();
            final ItemType[] scheItems = tempItems;
            // Display Scheduled items in table.
            dataModel = new AbstractTableModel() {
                public int getColumnCount() { return 0; }
                public int getRowCount() { return scheItems == null ? 0 : scheItems.length;}
                public Map<String, Object> getValueAt(int row, int col) {
                    ItemType item = scheItems[row];
                    return schItemToColumns(item);
                }
            };
            // set data
            List<Map<Object, Object>> scheduledList = getDataModelToList(dataModel);
            int scheduledSize = dataModel.getRowCount();
            OrderTransactionType[] tempSoldItems = null;
            if (UtilValidate.isNotEmpty(api.getReturnedSoldList())) tempSoldItems = (api.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction();
            // add to list
            List<Map<String, Object>> soldList = FastList.newInstance();
            if (UtilValidate.isNotEmpty(tempSoldItems)) {
                soldList =  EbayStore.getOrderTransactions(tempSoldItems);
            }
            int soldSize = tempSoldItems == null ? 0 : tempSoldItems.length;
            ItemType[] tempUnSoldItems = null;
            if (UtilValidate.isNotEmpty(api.getReturnedUnsoldList())) tempUnSoldItems = (api.getReturnedUnsoldList().getItemArray()).getItem();
            final ItemType[] unSoldItems = tempUnSoldItems;
            // Display unsold items in table.
            dataModel = new AbstractTableModel() {
                public int getColumnCount() { return 0; }
                public int getRowCount() { return unSoldItems == null ? 0 : unSoldItems.length;}
                public Map<String, Object> getValueAt(int row, int col) {
                    ItemType item = unSoldItems[row];
                    return unsoldItemToColumns(item);
                }
            };
            // add to list
            List<Map<Object, Object>> unsoldList = getDataModelToList(dataModel);

Examples of com.example.jinq.sample.jpa.entities.ItemType

         out.println(c.getName() + " " + c.getCountry());
      out.println();
     
      // Simple filtering with a parameter
      // (the parameter must be a basic type and a local variable)
      ItemType param = ItemType.SMALL;
      out.println("ITEMS OF TYPE SMALL");
      items()
         .where(i -> i.getType() == param)
         .forEach( i -> out.println(i.getName() + " " + i.getType().name()));
      out.println();
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.