CUD UI simple searching

The interface for simple searching provides a list of queries which have been previously run and saved.


Access the simple searching interface

To access the Simple Searching interface:

  1. Navigate to the Core User Directory User Interface (CUD UI)
  2. Select Simple Searching
  3. Log in with your Oxford username and Single Sign-On (SSO) password

Create a new query

Click the New Query button to create a new query.

A new query is built in a query builder screen which offers tools to set criteria for a commonly used subset of data stored in CUD.

  • Criteria can be set on attributes selected from a drop-down list (see Appendix A) and an equals or not equals operator selected.
  • You will need to select an attribute from the Attribute drop down list (see Appendix A) and include a search Value here.
  • For values for filtering on students' SITS attributes, see CUD Attributes - SITS
  • For values for filtering on people's affiliations, see CUD affiliations - values.  You should filter on the short-name values rather than the full Unit description.
  • For other filters' values, see CUD attributes for examples.
  • Additional criteria can be added using the AND or OR operator (please note that you should also use parentheses when using the OR operator).

The Max results to display value refers to the number of results to be displayed in the page.

When all criteria are set, click the Search button to execute the search.


Query results

Results are displayed further down the page and are useful to view a subset, or even a small results set, to check that values are as expected.  It does not need to be the full results sets; and indeed, to download the full results set it is recommended to use the CSV, XML or JSON buttons provided with the results, then save from the provided hyperlink.

Providing a Query Name allows you to save the query so it can be run again.  A saved query is also assigned a reference which enables you and others to reference this query when using the web services interface.

The Simple Searching home page lists your saved query to be edited or run to explore the formats in which data is available, these being CSV, XML or JSON.

A tickbox to Include all metadata and history? is available for the XML or JSON buttons.  When you open the resultant hyperlinked document you will see that there is extra information contained: the dates that attributes were added and last updated, previous values, the sources of the attributes, etc. This is useful when you wish to see the dates that certain attributes were added or updated.  Previous values are also visible in this structured data format.

Appendix B provides more information on data structures and formats.

Expand All

More sophisticated queries can be built to provide result sets similar to those provided from the Registration database (until August 2012).

Date ranges

Date fields can be search using the NOW function, to which days can be added or subtracted. When setting the criteria for University Card Expiry Date and Registration Expiry Date ranges of dates can be searched using the [<from> TO <end>] syntax, which can include wildcards. Combining these with [NOW TO *] will match all date fields with a date greater than or equals to today. Dates can be added to and subtracted from NOW in a way similar to the following examples:

  • NOW-1DAY
  • NOW+1DAY
  • NOW-1MONTH
  • NOW-2MONTHS
  • NOW-1YEAR
  • NOW+1YEAR
  • NOW-1YEAR+1MONTH

Further examples are also available.

Specific dates can be used, but these must be formatted correctly as ISO8601 yyyy-MM-ddThh:mm:ssZ such as 2012-01-31T12:00:00Z

The NOW function can only be used in date fields, of which the only two queryable in this interface are:

  • University Card Expiry Date
  • Username Expiry Date
  • Ranges without the NOW function can be used on other fields.

Solr/Lucene query syntax is used. Please note that not all filters and processors are enabled on CUD, so not everything will work as expected. You are encouraged to use the CUD UI interface to build and test queries.

The following attributes are available for searching:

Name Description
Affiliated unit Unit with which the person has a current affiliation. See the list of CUD affiliations for a list of codes which may be used here
Affiliated unit (near match) As Affiliation Unit, but case insensitive
Scoped affiliation Scoped affiliation (status@unit) stored by CUD, see below for an explanation of how these are formatted and codes which may be found in them
Scoped affiliation (near match) A Scoped Affiliation, but case insensitive and allowing for partial matching through tokenisation
First Name The first name of the user
First Name (near match) As First Name, but case insensitive and allowing for partial matching through tokenisation
Last name Last name of the user
Last name (near match) As Last Name, but case insensitive and allowing for partial matching through tokenisation
Username Oxford Username (also known as SSO username). Please note that project account usernames are not stored in CUD
Email Oxford email address of user, please note that secondary email addresses are not stored in CUD
Email (near match) As Email, but case insensitive and allowing for partial matching through tokenisation
University card sysis The unique unchanging ID of the record in the Card database (not printed on card)
University card barcode Card code on University card (printed on card)
OSS Id Student ID of user
CUD Id CUD ID of user
University Card Expiry Date Expiry date of current University Card, may be queried using the NOW function (see above). This is also available as the expiry date on affiliations asserted by University Card
Username Expiry Date Expiry date of current SSO Username, may be queried using the NOW function (see above).

 

The CUD UI provides data in two structures and 3 formats:

  CSV XML JSON
Flat Y Y Y
Structured N Y Y

 

The Flat data structure is used to provide data in delimited (CSV) format. It has the following characteristics:

  • Multiple values are concatenated
  • Metadata is not includes except in the column headers
  • Encoding is not declared

It can also optionally be used for XML and JSON format.

Attribute formatted as XML using “Flat” structure

<cudSubjects>

<cudSubject>

<attributes>

<cudAttribute>

<name>solr:id</name>

<value class="string">cud:AFD01CAABED1-41BF-94DE-0EE7A42A9262</value>

</cudAttribute>

...

</attributes>

</cudSubject>

</cudSubjects>

Multi-valued attribute formatted as XML using “Flat” structure

<cudSubjects>

<cudSubject>

<attributes>

<cudAttribute>

<name>cud:cas:scoped_affiliation</name>

<value class="list">

<string>MC@EN</string>

<string>MC@EN;20090106;20120630;UAS_UniversityCard</string>

<string>MC@oucs</string>

<string>MC@oucs;20090106;20120630;cud:derived:UAS_UniversityCard:OUCS</string>

<string>MC@Computing Services</string>

<string>MC@Computing Services;20090106;20120630;cud:derived:UAS_UniversityCard:OUCS</string>

<string>Unknown@oucs</string>

<string>Unknown@oucs;;;OUCS_Registration_Affiliations</string>

<string>Unknown@Computing Services</string>

<string>Unknown@Computing Services;;;OUCS_Registration_Affiliations</string>

<string>Staff@EN</string>

<string>Staff@EN;20110110;20120630;UAS_OpenDoor</string>

<string>Staff@oucs</string>

<string>Staff@oucs;20110110;20120630;cud:derived:UAS_OpenDoor:OUCS</string>

<string>Staff@Computing Services</string>

<string>Staff@Computing Services;20110110;20120630;cud:derived:UAS_OpenDoor:OUCS</string>

</value>

</cudAttribute>

...

</attributes>

</cudSubject>

</cudSubjects>

The “Structured” data structure provides more detail as well as metadata. If you are able to consume data in this format then you are strongly encouraged to do so.

Attribute formatted as XML using “Structured” structure

<cudSubjects>

<cudSubject>

<cudId>AFD01CAA-BED1-41BF-94DE-0EE7A42A9262</cudId>

<attributes>

<cudAttribute>

<name>cud:cas:barcode7</name>

<source>cud:derived:uas_universitycard</source>

<lastUpdated>2012-04-05 08:29:00.0 UTC</lastUpdated>

<description>Barcode7 derived from barcode</description>

<value class="string">2761086</value>

<primaryKey>false</primaryKey>

</cudAttribute>

</attributes>

...

</cudSubject>

</cudSubjects>

Affiliation formatted as XML using “Structured” structure

<cudSubjects>

<cudSubject>

<cudId>AFD01CAA-BED1-41BF-94DE-0EE7A42A9262</cudId>

<affiliations>

<cudAffiliation>

<source>UAS_UniversityCard</source>

<affiliation>EN</affiliation>

<status>MC</status>

<startDate>2009-01-06 00:00:00.0 UTC</startDate>

<endDate>2012-06-29 23:00:00.0 UTC</endDate>

<lastUpdated>2012-04-05 08:27:49.0 UTC</lastUpdated>

<dateAdded>2011-12-07 09:11:25.0 UTC</dateAdded>

</cudAffiliation>

...

</affiliations>

</cudSubject>

</cudSubjects>

B.1. Class structure for “Structured” data structure

The Structured data structure can be loaded into a class structure. A description of the fields in a set of java classes appears below:

CudSubject

**

* @author rob

* @version $Revision: 155598 $

*

* The core of Cud: each person should have exactly one person document

*/

public class CudSubject implements Serializable {

private String cudId;

/**

* Field refersToCudId. A pointer to a subject, use when subjects are merged

*/

private String refersToCudId;

private List<CudAttribute> attributes;

/**

* Field affiliations. List of CudAffiliations

*/

private List<CudAffiliation> affiliations;

}

CudAttribute

/**

* @author rob

* @version $Revision: 155598 $

*

* Representation of an attribute stored in a CUD subject document

*/

public class CudAttribute implements Serializable {

/**

* Field name. The name of the attribute

*/

private String name;

/**

* Field sourceName. The name of the data source.

*/

private String sourceName;

/**

* Field source.

*/

private String source;

/**

* Field lastUpdated. The date the value was last updated, without the value

* necessarily being changed

*/

private Date lastUpdated;

/**

* Field dateAdded. The data that the value was added.

*/

private Date dateAdded;

/**

* Field dateDeleted. The date that the attribute was removed.

*/

private Date dateDeleted;

/**

* Field description. The description of the attribute (metadata)

*/

private String description;

/**

* Field dataType. The datatype of the attribute (not yet enforced)

*/

private String dataType;

/**

* Field value. The value of the attribute

*/

private Object value;

/**

* Field primaryKey. Whether the attribute is a primary key.

*/

private boolean primaryKey;

/**

* Field previousValues. Previous values of an attribute, added to when the value of the

* attribute changes in order to retain audit history

*/

private List<CudAttribute> previousValues;

}

CudAffiliation

/**

* @author rob

* @version $Revision: 155598 $

*/

public class CudAffiliation {

/**

* Field ATTRIBUTE_NAME. (value is ""cudAffiliation"")

*/

public static final String ATTRIBUTE_NAME = "cudAffiliation";

/**

* Field source. Data source name of the affiliation

*/

private String source;

/**

* Field affiliation. Affiliated unit code or name

*/

private String affiliation;

/**

* Field status. Staff/Student etc.

*/

private String status;

/**

* Field startDate.

*/

private Date startDate;

/**

* Field endDate.

*/

private Date endDate;

/**

* Field lastUpdated.

*/

private Date lastUpdated;

/**

* Field dateAdded.

*/

private Date dateAdded;

/**

* Field dateDeleted.

*/

private Date dateDeleted;

}

CUD UI login link


Core User Directory

Get support


If you cannot find the solution you need here then we have other ways to get IT support

Get IT support