Examples of IntegerAttribute


Examples of com.sun.xacml.attr.IntegerAttribute

        if (object instanceof Double)
            retVal = new DoubleAttribute((Double) object);
        if (object instanceof Float)
            retVal = new DoubleAttribute((Float) object);
        if (object instanceof Integer)
            retVal = new IntegerAttribute((Integer) object);
        if (object instanceof Date)
            retVal = new DateTimeAttribute((Date) object);
        if (object instanceof Geometry) {
            Geometry g = (Geometry) object;
            String gmlType = XACMLUtil.getGMLTypeFor(g);
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

            ParseException, URISyntaxException {
        if (StringAttribute.identifier.equals(type)) {
            return new StringAttribute(value);
        }
        if (IntegerAttribute.identifier.equals(type)) {
            return new IntegerAttribute(Long.parseLong(value));
        }
        if (BooleanAttribute.identifier.equals(type)) {
            return BooleanAttribute.getInstance(value);
        }
        if (DoubleAttribute.identifier.equals(type)) {
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

                    set.add(tempTimeAttribute);
                } catch (Throwable t) {
                }
            } else if (attributeType.toString()
                    .equals(IntegerAttribute.identifier)) {
                IntegerAttribute tempIntegerAttribute;
                try {
                    tempIntegerAttribute =
                            IntegerAttribute.getInstance((String) temp);
                    set.add(tempIntegerAttribute);
                } catch (Throwable t) {
                }
            } //xacml fixup
            //was set.add(new StringAttribute((String)temp));
        } else if (temp instanceof String[]) {
            logger.debug("AttributeFinder:findAttribute will return a String[] ", iAm());
            for (int i = 0; i < ((String[]) temp).length; i++) {
                if (((String[]) temp)[i] == null) {
                    continue;
                }
                if (attributeType.toString().equals(StringAttribute.identifier)) {
                    set.add(new StringAttribute(((String[]) temp)[i]));
                } else if (attributeType.toString()
                        .equals(DateTimeAttribute.identifier)) {
                    logger.debug("USING AS DATETIME:{}", ((String[]) temp)[i]);
                    DateTimeAttribute tempDateTimeAttribute;
                    try {
                        tempDateTimeAttribute =
                                DateTimeAttribute
                                        .getInstance(((String[]) temp)[i]);
                        set.add(tempDateTimeAttribute);
                    } catch (Throwable t) {
                    }
                } else if (attributeType.toString()
                        .equals(DateAttribute.identifier)) {
                    logger.debug("USING AS DATE:{}", ((String[]) temp)[i]);
                    DateAttribute tempDateAttribute;
                    try {
                        tempDateAttribute =
                                DateAttribute.getInstance(((String[]) temp)[i]);
                        set.add(tempDateAttribute);
                    } catch (Throwable t) {
                    }
                } else if (attributeType.toString()
                        .equals(TimeAttribute.identifier)) {
                    logger.debug("USING AS TIME:{}", ((String[]) temp)[i]);
                    TimeAttribute tempTimeAttribute;
                    try {
                        tempTimeAttribute =
                                TimeAttribute.getInstance(((String[]) temp)[i]);
                        set.add(tempTimeAttribute);
                    } catch (Throwable t) {
                    }
                } else if (attributeType.toString()
                        .equals(IntegerAttribute.identifier)) {
                    logger.debug("USING AS INTEGER: {}", ((String[]) temp)[i]);
                    IntegerAttribute tempIntegerAttribute;
                    try {
                        tempIntegerAttribute =
                                IntegerAttribute
                                        .getInstance(((String[]) temp)[i]);
                        set.add(tempIntegerAttribute);
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

        try {
            resAttr = ResourceAttributes.getRepositoryResources();
            if (numPids != null && !"".equals(numPids)) {
                resAttr.put(Constants.OBJECT.N_PIDS.getURI(),
                            new IntegerAttribute(numPids.intValue()));
            }
            if (pidNamespace != null && !"".equals(pidNamespace)) {
                resAttr.put(Constants.OBJECT.NAMESPACE.getURI(),
                            new StringAttribute(pidNamespace));
            }
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

        Map<URI, AttributeValue> resAttr;
        try {
            resAttr = ResourceAttributes.getRepositoryResources();
            if (numPids > 0) {
                resAttr.put(Constants.OBJECT.N_PIDS.getURI(),
                            new IntegerAttribute(numPids));
            }
            if (pidNamespace != null && !"".equals(pidNamespace)) {
                resAttr.put(Constants.OBJECT.NAMESPACE.getURI(),
                            new StringAttribute(pidNamespace));
            }
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

            // *-size takes a single bag and returns an integer
        case ID_BASE_BAG_SIZE: {
            BagAttribute bag = (BagAttribute) (argValues[0]);

            attrResult = new IntegerAttribute(bag.size());
            break;
        }

            // *-bag takes any number of elements of baseType and
            // returns a bag containing those elements
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

        // Now that we have real values, perform the mod operation
        long arg0 = ((IntegerAttribute) argValues[0]).getValue();
        long arg1 = ((IntegerAttribute) argValues[1]).getValue();

        return new EvaluationResult(new IntegerAttribute(arg0 % arg1));
    }
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

        case ID_INTEGER_MULTIPLY: {
            long arg0 = ((IntegerAttribute) argValues[0]).getValue();
            long arg1 = ((IntegerAttribute) argValues[1]).getValue();
            long product = arg0 * arg1;

            result = new EvaluationResult(new IntegerAttribute(product));
            break;
        }
        case ID_DOUBLE_MULTIPLY: {
            double arg0 = ((DoubleAttribute) argValues[0]).getValue();
            double arg1 = ((DoubleAttribute) argValues[1]).getValue();
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

        switch (getFunctionId()) {
        case ID_INTEGER_ABS: {
            long arg = ((IntegerAttribute) argValues[0]).getValue();
            long absValue = Math.abs(arg);

            result = new EvaluationResult(new IntegerAttribute(absValue));
            break;
        }
        case ID_DOUBLE_ABS: {
            double arg = ((DoubleAttribute) argValues[0]).getValue();
            double absValue = Math.abs(arg);
View Full Code Here

Examples of com.sun.xacml.attr.IntegerAttribute

        switch (getFunctionId()) {
        case ID_DOUBLE_TO_INTEGER: {
            double arg0 = ((DoubleAttribute) argValues[0]).getValue();
            long longValue = (long) arg0;

            result = new EvaluationResult(new IntegerAttribute(longValue));
            break;
        }
        case ID_INTEGER_TO_DOUBLE: {
            long arg0 = ((IntegerAttribute) argValues[0]).getValue();
            double doubleValue = (double) arg0;
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.