Package MarcSync
Class Client
- java.lang.Object
-
- MarcSync.Client
-
public class Client extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectioncreateCollection(String collectionName)CollectionfetchCollection(String collectionName)CollectiongetCollection(String collectionName)
-
-
-
Constructor Detail
-
Client
public Client(String accessToken)
Creates a new MarcSync client.- Parameters:
accessToken- The access token to use for communication with MarcSync
-
-
Method Detail
-
getCollection
public Collection getCollection(String collectionName)
- Parameters:
collectionName- The name of the collection to use- Returns:
- A new instance of the MarcSync collection
- See Also:
Collection
-
fetchCollection
public Collection fetchCollection(String collectionName) throws IOException, URISyntaxException
- Parameters:
collectionName- The name of the collection to use- Returns:
- A new instance of the MarcSync collection
- Throws:
IOExceptionURISyntaxException- See Also:
Note: This method is useful if you want to fetch the collection from the server to check if it exists before using it.
-
createCollection
public Collection createCollection(String collectionName) throws IOException, URISyntaxException
- Parameters:
collectionName- The name of the collection to create- Returns:
- A new instance of the MarcSync collection
- Throws:
IOExceptionURISyntaxException
-
-