Search in sources :

Example 56 with Group

use of org.gluu.oxtrust.model.scim2.Group in project ORCID-Source by ORCID.

the class PublicAPISecurityManagerV2Test method setVisibility.

private void setVisibility(GroupsContainer container, Visibility... vs) {
    assertEquals(container.retrieveGroups().size(), vs.length);
    int idx = 0;
    for (Group g : container.retrieveGroups()) {
        // Every group have just one element
        assertEquals(1, g.getActivities().size());
        for (Filterable f : g.getActivities()) {
            f.setVisibility(vs[idx++]);
        }
    }
}
Also used : WorkGroup(org.orcid.jaxb.model.record.summary_v2.WorkGroup) PeerReviewGroup(org.orcid.jaxb.model.record.summary_v2.PeerReviewGroup) FundingGroup(org.orcid.jaxb.model.record.summary_v2.FundingGroup) Group(org.orcid.jaxb.model.record_v2.Group) Filterable(org.orcid.jaxb.model.common_v2.Filterable)

Example 57 with Group

use of org.gluu.oxtrust.model.scim2.Group in project sirix by sirixdb.

the class AbstractSunburstGUI method style.

/**
 * Style menu.
 */
protected void style() {
    final Group ctrl = mControlP5.addGroup("menu", 15, 25, 35);
    ctrl.setColorLabel(mParent.color(255));
    ctrl.setColorBackground(mParent.color(100));
    ctrl.close();
    mParent.colorMode(PConstants.RGB, 255, 255, 255);
    final int backgroundColor = 0x99ffffff;
    int i = 0;
    for (final Slider slider : mSliders) {
        slider.setGroup(ctrl);
        slider.setId(i);
        final Label label = slider.getCaptionLabel();
        label.toUpperCase(true);
        label.setColor(mParent.color(0));
        label.setColorBackground(backgroundColor);
        final ControllerStyle style = label.getStyle();
        style.padding(4, 0, 1, 3);
        style.marginTop = -4;
        style.marginLeft = 0;
        style.marginRight = -14;
        slider.plugTo(mControl);
        i++;
    }
    i = 0;
    for (final Range range : mRanges) {
        range.setGroup(ctrl);
        range.setId(i);
        final Label label = range.getCaptionLabel();
        label.toUpperCase(true);
        label.setColor(mParent.color(0));
        label.setColorBackground(backgroundColor);
        final ControllerStyle style = label.getStyle();
        style.padding(4, 0, 1, 3);
        style.marginTop = -4;
        range.plugTo(mControl);
        i++;
    }
    i = 0;
    for (final Toggle toggle : mToggles) {
        toggle.setGroup(ctrl);
        toggle.setId(i);
        final Label label = toggle.getCaptionLabel();
        label.setColor(mParent.color(0));
        label.setColorBackground(backgroundColor);
        final ControllerStyle style = label.getStyle();
        style.padding(4, 3, 1, 3);
        style.marginTop = -19;
        style.marginLeft = 18;
        style.marginRight = 5;
        toggle.plugTo(mControl);
        i++;
    }
    mParent.colorMode(PConstants.HSB, 360, 100, 100);
    mParent.textLeading(14);
    mParent.textAlign(PConstants.LEFT, PConstants.TOP);
    mParent.cursor(PConstants.CROSS);
}
Also used : Group(controlP5.Group) ControllerStyle(controlP5.ControllerStyle) Slider(controlP5.Slider) Toggle(controlP5.Toggle) Label(controlP5.Label) Range(controlP5.Range)

Example 58 with Group

use of org.gluu.oxtrust.model.scim2.Group in project sis by apache.

the class DecoderWrapper method setSearchPath.

/**
 * Defines the groups where to search for named attributes, in preference order.
 * The {@code null} group name stands for the global attributes.
 */
@Override
public void setSearchPath(final String... groupNames) {
    final Group[] groups = new Group[groupNames.length];
    int count = 0;
    for (final String name : groupNames) {
        if (name != null) {
            final Group group = file.findGroup(name);
            if (group == null) {
                // Group not found - do not increment the counter.
                continue;
            }
            groups[count] = group;
        }
        count++;
    }
    this.groups = ArraysExt.resize(groups, count);
}
Also used : Group(ucar.nc2.Group) FeatureDatasetPoint(ucar.nc2.ft.FeatureDatasetPoint)

Example 59 with Group

use of org.gluu.oxtrust.model.scim2.Group in project bioformats by openmicroscopy.

the class NetCDFServiceImpl method parseAttributesAndVariables.

// -- Helper methods --
/**
 * Recursively parses attribute and variable paths, filling
 * <code>attributeList</code> and <code>variableList</code>.
 * @param groups List of groups to recursively parse.
 */
private void parseAttributesAndVariables(List<Group> groups) {
    for (Group group : groups) {
        String groupName = group.getName();
        List<Attribute> attributes = group.getAttributes();
        for (Attribute attribute : attributes) {
            String attributeName = attribute.getName();
            if (!groupName.endsWith("/"))
                attributeName = "/" + attributeName;
            attributeList.add(groupName + attributeName);
        }
        List<Variable> variables = group.getVariables();
        for (Variable variable : variables) {
            String variableName = variable.getName();
            if (!groupName.endsWith("/"))
                variableName = "/" + variableName;
            variableList.add(variableName);
        }
        groups = group.getGroups();
        parseAttributesAndVariables(groups);
    }
}
Also used : Group(ucar.nc2.Group) Variable(ucar.nc2.Variable) Attribute(ucar.nc2.Attribute)

Example 60 with Group

use of org.gluu.oxtrust.model.scim2.Group in project bioformats by openmicroscopy.

the class NetCDFServiceImpl method getVariableAttributes.

/* (non-Javadoc)
   * @see loci.formats.NetCDFService#getVariableAttributes(java.lang.String)
   */
@Override
public Hashtable<String, Object> getVariableAttributes(String name) {
    String groupName = getDirectory(name);
    String variableName = getName(name);
    Group group = getGroup(groupName);
    Variable variable = group.findVariable(variableName);
    Hashtable<String, Object> toReturn = new Hashtable<String, Object>();
    if (variable != null) {
        List<Attribute> attributes = variable.getAttributes();
        for (Attribute attribute : attributes) {
            toReturn.put(attribute.getName(), arrayToString(attribute.getValues()));
        }
    }
    return toReturn;
}
Also used : Group(ucar.nc2.Group) Variable(ucar.nc2.Variable) Attribute(ucar.nc2.Attribute) Hashtable(java.util.Hashtable)

Aggregations

ArrayList (java.util.ArrayList)18 GluuGroup (org.gluu.oxtrust.model.GluuGroup)14 DefaultValue (javax.ws.rs.DefaultValue)13 HeaderParam (javax.ws.rs.HeaderParam)13 Produces (javax.ws.rs.Produces)13 Response (javax.ws.rs.core.Response)13 URI (java.net.URI)12 ListResponse (org.gluu.oxtrust.model.scim2.ListResponse)12 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)11 DuplicateEntryException (org.gluu.site.ldap.exception.DuplicateEntryException)10 Path (javax.ws.rs.Path)8 Group (org.gluu.oxtrust.model.scim2.Group)8 EntryPersistenceException (org.gluu.site.ldap.persistence.exception.EntryPersistenceException)8 Group (org.openstack4j.model.identity.v3.Group)8 Group (ucar.nc2.Group)8 InvalidAttributeValueException (javax.management.InvalidAttributeValueException)7 Consumes (javax.ws.rs.Consumes)7 ListViewResponse (org.gluu.persist.model.ListViewResponse)7 GluuCustomPerson (org.gluu.oxtrust.model.GluuCustomPerson)6 SCIMException (org.gluu.oxtrust.model.exception.SCIMException)6