}
/**
- * Read item list.
+ * Read item list, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
- * @param vcsid the vcsid
+ * @param inAuthority the parent authority
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<LocationsCommonList> readItemList(String vcsid) {
- return locationAuthorityProxy.readItemList(vcsid);
+ public ClientResponse<LocationsCommonList>
+ readItemList(String inAuthority, String partialTerm, String keywords) {
+ return locationAuthorityProxy.readItemList(inAuthority, partialTerm, keywords);
}
/**
}
/**
- * Read item list for named authority.
+ * Read item list for named vocabulary, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
* @param specifier the specifier
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<LocationsCommonList> readItemListForNamedAuthority(String specifier) {
- return locationAuthorityProxy.readItemListForNamedAuthority(specifier);
+ public ClientResponse<LocationsCommonList>
+ readItemListForNamedAuthority(String specifier, String partialTerm, String keywords) {
+ return locationAuthorityProxy.readItemListForNamedAuthority(specifier, partialTerm, keywords);
}
/**
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
+import org.collectionspace.services.common.query.IQueryManager;
import org.collectionspace.services.common.authorityref.AuthorityRefDocList;
import org.collectionspace.services.contact.ContactsCommonList;
import org.collectionspace.services.location.LocationauthoritiesCommonList;
@Path("/{csid}")
ClientResponse<Response> delete(@PathParam("csid") String csid);
- // List Items
+ // List Items matching a partial term or keywords.
@GET
@Produces({"application/xml"})
@Path("/{vcsid}/items/")
- ClientResponse<LocationsCommonList> readItemList(@PathParam("vcsid") String vcsid);
+ ClientResponse<LocationsCommonList> readItemList(
+ @PathParam("vcsid") String vcsid,
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
/**
* @param csid
@PathParam("csid") String parentcsid,
@PathParam("itemcsid") String itemcsid);
- // List Items for a named authority
+ // List Items for a named authority matching a partial term or keywords.
@GET
@Produces({"application/xml"})
@Path("/urn:cspace:name({specifier})/items/")
- ClientResponse<LocationsCommonList> readItemListForNamedAuthority(@PathParam("specifier") String specifier);
+ ClientResponse<LocationsCommonList> readItemListForNamedAuthority(
+ @PathParam("specifier") String specifier,
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
//(C)reate Item
@POST
LocationAuthorityClient client = new LocationAuthorityClient();
ClientResponse<LocationsCommonList> res = null;
if(vcsid!= null) {
- res = client.readItemList(vcsid);
+ res = client.readItemList(vcsid, null, null);
} else if(shortId!= null) {
- res = client.readItemListForNamedAuthority(shortId);
+ res = client.readItemListForNamedAuthority(shortId, null, null);
} else {
Assert.fail("readItemList passed null csid and name!");
}
}
/**
- * Read item list.
+ * Read item list, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
- * @param vcsid the vcsid
+ * @param inAuthority the parent authority
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<OrganizationsCommonList> readItemList(String vcsid) {
- return orgAuthorityProxy.readItemList(vcsid);
+ public ClientResponse<OrganizationsCommonList>
+ readItemList(String inAuthority, String partialTerm, String keywords) {
+ return orgAuthorityProxy.readItemList(inAuthority, partialTerm, keywords);
}
/**
/**
- * Read item list for named authority.
+ * Read item list for named vocabulary, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
* @param specifier the specifier
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<OrganizationsCommonList> readItemListForNamedAuthority(String specifier) {
- return orgAuthorityProxy.readItemListForNamedAuthority(specifier);
+ public ClientResponse<OrganizationsCommonList>
+ readItemListForNamedAuthority(String specifier, String partialTerm, String keywords) {
+ return orgAuthorityProxy.readItemListForNamedAuthority(specifier, partialTerm, keywords);
}
/**
import org.collectionspace.services.contact.ContactsCommonList;
import org.collectionspace.services.organization.OrgauthoritiesCommonList;
import org.collectionspace.services.organization.OrganizationsCommonList;
+import org.collectionspace.services.person.PersonsCommonList;
import org.jboss.resteasy.client.ClientResponse;
import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
@Path("/{csid}")
ClientResponse<Response> delete(@PathParam("csid") String csid);
- // List Items
+ // List Items with options for matching a partial term or keywords.
@GET
- @Produces({"application/xml"})
- @Path("/{vcsid}/items/")
- ClientResponse<OrganizationsCommonList> readItemList(@PathParam("vcsid") String vcsid);
-
+ @Produces("application/xml")
+ @Path("/{csid}/items/")
+ ClientResponse<OrganizationsCommonList>readItemList(
+ @PathParam("csid") String parentcsid,
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
+
/**
* @param parentcsid
* @param itemcsid
@PathParam("csid") String parentcsid,
@PathParam("itemcsid") String itemcsid);
- // List Items for a named authority
- @GET
- @Produces({"application/xml"})
- @Path("/urn:cspace:name({specifier})/items/")
- ClientResponse<OrganizationsCommonList> readItemListForNamedAuthority(
- @PathParam("specifier") String specifier);
-
- // List Items for a named authority matching a partial term.
+ // List Items for a named authority matching a partial term or keywords.
@GET
@Produces({"application/xml"})
@Path("/urn:cspace:name({specifier})/items/")
ClientResponse<OrganizationsCommonList> readItemListForNamedAuthority(
@PathParam("specifier") String specifier,
- @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm);
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
// List Item Authority References
@GET
OrgAuthorityClient client = new OrgAuthorityClient();
ClientResponse<OrganizationsCommonList> res = null;
if(vcsid!= null) {
- res = client.readItemList(vcsid);
+ res = client.readItemList(vcsid, null, null);
} else if(name!= null) {
- res = client.readItemListForNamedAuthority(name);
+ res = client.readItemListForNamedAuthority(name, null, null);
} else {
Assert.fail("readItemList passed null csid and name!");
}
return personAuthorityProxy.getReferencingObjects(parentcsid, csid);
}
- /**
- * Read item list.
- *
- * @param vcsid the vcsid
- * @return the client response
- */
- public ClientResponse<PersonsCommonList> readItemList(String vcsid) {
- return personAuthorityProxy.readItemList(vcsid);
- }
-
/**
* Read item list, filtering by partial term match, or keywords. Only one of
* partialTerm or keywords should be specified. If both are specified, keywords
* will be ignored.
*
- * @param vcsid the vcsid
+ * @param inAuthority the parent authority
* @param partialTerm A partial term on which to match,
* which will filter list results to return only matched resources.
* @param keywords A set of keywords on which to match,
* which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<PersonsCommonList> readItemList(String vcsid, String partialTerm, String keywords) {
- return personAuthorityProxy.readItemList(vcsid, partialTerm, keywords);
+ public ClientResponse<PersonsCommonList>
+ readItemList(String inAuthority, String partialTerm, String keywords) {
+ return personAuthorityProxy.readItemList(inAuthority, partialTerm, keywords);
}
/**
- * Read item list for named authority.
+ * Read item list for named vocabulary, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
* @param specifier the specifier
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<PersonsCommonList> readItemListForNamedAuthority(String specifier) {
- return personAuthorityProxy.readItemListForNamedAuthority(specifier);
+ public ClientResponse<PersonsCommonList>
+ readItemListForNamedAuthority(String specifier, String partialTerm, String keywords) {
+ return personAuthorityProxy.readItemListForNamedAuthority(specifier, partialTerm, keywords);
}
/**
@Path("/{csid}")
ClientResponse<Response> delete(@PathParam("csid") String csid);
- // List Items
- @GET
- @Produces({"application/xml"})
- @Path("/{vcsid}/items/")
- ClientResponse<PersonsCommonList> readItemList(@PathParam("vcsid") String vcsid);
-
- // List Items matching a partial term.
+ // List Items with options for matching a partial term or keywords.
@GET
@Produces("application/xml")
@Path("/{csid}/items/")
@PathParam("csid") String parentcsid,
@PathParam("itemcsid") String itemcsid);
- // List Items for a named authority
- @GET
- @Produces({"application/xml"})
- @Path("/urn:cspace:name({specifier})/items/")
- ClientResponse<PersonsCommonList> readItemListForNamedAuthority(
- @PathParam("specifier") String specifier);
-
- // List Items for a named authority matching a partial term.
+ // List Items for a named authority matching a partial term or keywords.
@GET
@Produces({"application/xml"})
@Path("/urn:cspace:name({specifier})/items/")
ClientResponse<PersonsCommonList> readItemListForNamedAuthority(
@PathParam("specifier") String specifier,
- @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm);
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
//(C)reate Item
@POST
PersonAuthorityClient client = new PersonAuthorityClient();
ClientResponse<PersonsCommonList> res = null;
if (vcsid!= null) {
- res = client.readItemList(vcsid);
+ res = client.readItemList(vcsid, null, null);
} else if (name!= null) {
- res = client.readItemListForNamedAuthority(name);
+ res = client.readItemListForNamedAuthority(name, null, null);
} else {
Assert.fail("readItemList passed null csid and name!");
}
}
/**
- * Read item list.
+ * Read item list, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
- * @param vcsid the vcsid
+ * @param inAuthority the parent authority
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<VocabularyitemsCommonList> readItemList(String vcsid) {
- return vocabularyProxy.readItemList(vcsid);
+ public ClientResponse<VocabularyitemsCommonList>
+ readItemList(String inAuthority, String partialTerm, String keywords) {
+ return vocabularyProxy.readItemList(inAuthority, partialTerm, keywords);
}
/**
- * Read item list for named vocabulary.
+ * Read item list for named vocabulary, filtering by partial term match, or keywords. Only one of
+ * partialTerm or keywords should be specified. If both are specified, keywords
+ * will be ignored.
*
* @param specifier the specifier
+ * @param partialTerm A partial term on which to match,
+ * which will filter list results to return only matched resources.
+ * @param keywords A set of keywords on which to match,
+ * which will filter list results to return only matched resources.
* @return the client response
*/
- public ClientResponse<VocabularyitemsCommonList> readItemListForNamedVocabulary(String specifier) {
- return vocabularyProxy.readItemListForNamedVocabulary(specifier);
+ public ClientResponse<VocabularyitemsCommonList>
+ readItemListForNamedVocabulary(String specifier, String partialTerm, String keywords) {
+ return vocabularyProxy.readItemListForNamedVocabulary(specifier, partialTerm, keywords);
}
/**
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
+import org.collectionspace.services.common.query.IQueryManager;
import org.collectionspace.services.vocabulary.VocabulariesCommonList;
import org.collectionspace.services.vocabulary.VocabularyitemsCommonList;
import org.jboss.resteasy.client.ClientResponse;
@Path("/{csid}")
ClientResponse<Response> delete(@PathParam("csid") String csid);
- // List Items
+ // List Items matching a partial term or keywords.
@GET
@Produces({"application/xml"})
@Path("/{vcsid}/items/")
- ClientResponse<VocabularyitemsCommonList> readItemList(@PathParam("vcsid") String vcsid);
+ ClientResponse<VocabularyitemsCommonList> readItemList(
+ @PathParam("vcsid") String vcsid,
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
- // List Items using the name of the Vocab
+ // List Items for a named authority matching a partial term or keywords.
@GET
@Produces({"application/xml"})
@Path("/urn:cspace:name({specifier})/items")
- ClientResponse<VocabularyitemsCommonList> readItemListForNamedVocabulary(@PathParam("specifier") String specifier);
+ ClientResponse<VocabularyitemsCommonList> readItemListForNamedVocabulary(
+ @PathParam("specifier") String specifier,
+ @QueryParam (IQueryManager.SEARCH_TYPE_PARTIALTERM) String partialTerm,
+ @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords);
//(C)reate Item
@POST
VocabularyClient client = new VocabularyClient();
ClientResponse<VocabularyitemsCommonList> res = null;
if(vcsid!=null) {
- res = client.readItemList(vcsid);
+ res = client.readItemList(vcsid, null, null);
} else if(shortId!=null) {
- res = client.readItemListForNamedVocabulary(shortId);
+ res = client.readItemListForNamedVocabulary(shortId, null, null);
} else {
Assert.fail("Internal Error: readItemList both vcsid and shortId are null!");
}