Examples of AnyURIAttribute


Examples of com.sun.xacml.attr.AnyURIAttribute

            throw new RuntimeException(e);
        }

        Set<Attribute> subjectAttributes = new HashSet<Attribute>(1 + role.getAttributes().size());

        AttributeValue roleAttributeValue = new AnyURIAttribute(roleURI);
        Attribute roleAttribute = new Attribute(XACMLConstants.RoleAttributeURI, null, null,
                roleAttributeValue);
        subjectAttributes.add(roleAttribute);

        for (Attribute attr : role.getAttributes()) {
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

        AttributeValue retVal = null;

        if (object instanceof String)
            retVal = new StringAttribute((String) object);
        if (object instanceof URI)
            retVal = new AnyURIAttribute((URI) object);
        if (object instanceof Boolean)
            retVal = ((Boolean) object) ? BooleanAttribute.getTrueInstance() : BooleanAttribute
                    .getFalseInstance();
        if (object instanceof Double)
            retVal = new DoubleAttribute((Double) object);
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

      subjectSet.add(new Subject(subjectAttrSet));
     
      //Create the resource set
      URI resourceUri = new URI(XACMLConstants.RESOURCE_IDENTIFIER);
      Attribute resourceAttr = new Attribute(resourceUri,null,null,
            new AnyURIAttribute(new URI(request.getRequestURI())));
      Set resourceSet = new HashSet();
      resourceSet.add(resourceAttr);
     
      //Create the action set
      Set actionSet = new HashSet();
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

    if(attrID == null)
      {throw new NullPointerException("Attribute ID cannot be null");}
    if(uriString == null)
      {throw new NullPointerException("Attribute value cannot be null");}
    final URI uri = new URI(uriString);
    final AttributeValue value = new AnyURIAttribute(uri);
    final Attribute attr = new Attribute(attrID, null, null, value);
    attributes.add(attr);
  }
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

                    if (!dsid.equals("")) {
                        pid += "/" + dsid;
                    }
                }

                res.put(XACML_RESOURCE_ID, new AnyURIAttribute(new URI(pid)));
            }
        } catch (Exception e) {
            logger.error("Error finding parents.", e);
            throw new MelcoeXacmlException("Error finding parents.", e);
        }
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

                resAttr
                        .put(new URI("urn:fedora:names:fedora:2.1:resource:object:pid"),
                             new StringAttribute(pid));
                resAttr
                        .put(new URI("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
                             new AnyURIAttribute(new URI(pid)));
            }

            if (action != null && !action.equals("")) {
                actionAttr
                        .put(new URI("urn:fedora:names:fedora:2.1:action:id"),
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

        resAttr = new HashMap<URI, AttributeValue>();
        resAttr.put(Constants.OBJECT.PID.getURI(),
                    new StringAttribute("melcoe:test:01"));
        resAttr
                .put(new URI("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
                     new AnyURIAttribute(new URI("melcoe:test:01")));
        resAttr.put(Constants.DATASTREAM.ID.getURI(),
                    new AnyURIAttribute(new URI("melcoe:test:02")));
        resAttr.put(Constants.DATASTREAM.MIME_TYPE.getURI(),
                    new StringAttribute("text/xml"));
        resAttr.put(Constants.DATASTREAM.FORMAT_URI.getURI(),
                    new AnyURIAttribute(new URI("some:format:or:the:other")));
        resAttr.put(Constants.DATASTREAM.LOCATION.getURI(),
                    new StringAttribute("http://www.whipitgood.com"));
        resAttr.put(Constants.DATASTREAM.CONTROL_GROUP.getURI(),
                    new StringAttribute("E"));
        resAttr.put(Constants.DATASTREAM.STATE.getURI(),
                    new StringAttribute("ACTIVE"));
        resList.add(resAttr);

        resAttr = new HashMap<URI, AttributeValue>();
        resAttr.put(Constants.OBJECT.PID.getURI(),
                    new StringAttribute("melcoe:test:03"));
        resAttr
                .put(new URI("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
                     new AnyURIAttribute(new URI("melcoe:test:03")));
        resAttr.put(Constants.DATASTREAM.ID.getURI(),
                    new AnyURIAttribute(new URI("melcoe:test:04")));
        resAttr.put(Constants.DATASTREAM.MIME_TYPE.getURI(),
                    new StringAttribute("text/xml"));
        resAttr.put(Constants.DATASTREAM.FORMAT_URI.getURI(),
                    new AnyURIAttribute(new URI("some:format:or:the:other")));
        resAttr.put(Constants.DATASTREAM.LOCATION.getURI(),
                    new StringAttribute("http://www.whipitgood.com"));
        resAttr.put(Constants.DATASTREAM.CONTROL_GROUP.getURI(),
                    new StringAttribute("E"));
        resAttr.put(Constants.DATASTREAM.STATE.getURI(),
                    new StringAttribute("ACTIVE"));
        resList.add(resAttr);

        resAttr = new HashMap<URI, AttributeValue>();
        resAttr.put(Constants.OBJECT.PID.getURI(),
                    new StringAttribute("melcoe:test:05"));
        resAttr
                .put(new URI("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
                     new AnyURIAttribute(new URI("melcoe:test:05")));
        resAttr.put(Constants.DATASTREAM.ID.getURI(),
                    new AnyURIAttribute(new URI("melcoe:test:06")));
        resAttr.put(Constants.DATASTREAM.MIME_TYPE.getURI(),
                    new StringAttribute("text/xml"));
        resAttr.put(Constants.DATASTREAM.FORMAT_URI.getURI(),
                    new AnyURIAttribute(new URI("some:format:or:the:other")));
        resAttr.put(Constants.DATASTREAM.LOCATION.getURI(),
                    new StringAttribute("http://www.whipitgood.com"));
        resAttr.put(Constants.DATASTREAM.CONTROL_GROUP.getURI(),
                    new StringAttribute("E"));
        resAttr.put(Constants.DATASTREAM.STATE.getURI(),
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

            this.localName = localName;
            this.datatype = datatype;
            uri = (parent != null) ? parent.uri + ":" + localName : localName;
            m_uri = new URI(uri);
            m_att = new StringAttribute(m_uri.toASCIIString());
            m_uri_att = new AnyURIAttribute(m_uri);
        } catch (URISyntaxException e) {
            throw new RuntimeException("Bad URI Syntax", e);
        }
    }
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

                resAttr.put(Constants.DATASTREAM.NEW_MIME_TYPE.getURI(),
                            new StringAttribute(mimeType));
            }
            if (formatURI != null && !"".equals(formatURI)) {
                resAttr.put(Constants.DATASTREAM.NEW_FORMAT_URI.getURI(),
                            new AnyURIAttribute(new URI(formatURI)));
            }
            if (dsLocation != null && !"".equals(dsLocation)) {
                resAttr.put(Constants.DATASTREAM.NEW_LOCATION.getURI(),
                            new AnyURIAttribute(new URI(dsLocation)));
            }
            if (controlGroup != null && !"".equals(controlGroup)) {
                resAttr.put(Constants.DATASTREAM.NEW_CONTROL_GROUP.getURI(),
                            new StringAttribute(controlGroup));
            }
View Full Code Here

Examples of com.sun.xacml.attr.AnyURIAttribute

        if (pid != null && !"".equals(pid)) {
            resAttr.put(Constants.OBJECT.PID.getURI(),
                        new StringAttribute(pid));
            try{
                resAttr.put(Constants.XACML1_RESOURCE.ID.getURI(),
                            new AnyURIAttribute(new URI(pid)));
            } catch (URISyntaxException e) {
                logger.warn("pid {} is not a valid uri; write policies against the StringAttribute {} instead.",
                            pid,
                            Constants.OBJECT.PID.uri);
                resAttr.put(Constants.XACML1_RESOURCE.ID.getURI(),
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.