Class GeoNetwork
java.lang.Object
org.gcube.spatial.data.geonetwork.GeoNetwork
- All Implemented Interfaces:
GeoNetworkAdministration,GeoNetworkPublisher,GeoNetworkReader
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignOwnership(List<Long> toTransferIds, Integer targetUserId, Integer targetGroupId) createGroup(String name, String description, String mail, Integer id) createUsers(String username, String password, User.Profile profile, Collection<Integer> groups) voiddeleteMetadata(long id) static GeoNetworkAdministrationget()static GeoNetworkAdministrationget(Configuration config) getAvailableOwnershipTransfer(Integer userId) org.opengis.metadata.MetadatagetById(long id) org.opengis.metadata.MetadatagetByIdAsRawString(String UUID) it.geosolutions.geonetwork.util.GNInsertConfigurationgetCurrentUserConfiguration(String category, String styleSheet) it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfoit.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfoit.geosolutions.geonetwork.util.GNInsertConfigurationgetUserConfiguration(String category, String styleSheet, ScopeConfiguration configuration, LoginLevel lvl) getUsers()longinsertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, File metadataFile) longinsertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, org.opengis.metadata.Metadata meta) longinsertAndPromoteMetadata(File requestFile) longinsertAndPromoteMetadata(org.opengis.metadata.Metadata meta) longinsertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, File metadataFile) longinsertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, org.opengis.metadata.Metadata meta) longinsertMetadata(File requestFile) longinsertMetadata(org.opengis.metadata.Metadata meta) voidlogin(LoginLevel lvl) voidlogout()it.geosolutions.geonetwork.util.GNSearchResponsequery(it.geosolutions.geonetwork.util.GNSearchRequest request) it.geosolutions.geonetwork.util.GNSearchResponsevoidregisterXMLAdapter(XMLAdapter adapter) voidsetPrivileges(long metadataId, it.geosolutions.geonetwork.util.GNPrivConfiguration cfg) voidtransferOwnership(Integer sourceUserId, Integer sourceGroupId, Integer targetUserId, Integer targetGroupId) voidupdateMetadata(long id, File metadataFile) voidupdateMetadata(long id, org.opengis.metadata.Metadata meta)
-
Method Details
-
get
- Throws:
Exception
-
get
public static GeoNetworkAdministration get(Configuration config) throws MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, AuthorizationException, MissingConfigurationException - Throws:
MissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionAuthorizationExceptionMissingConfigurationException
-
getConfiguration
- Specified by:
getConfigurationin interfaceGeoNetworkReader
-
login
public void login(LoginLevel lvl) throws AuthorizationException, MissingServiceEndpointException, MissingConfigurationException - Specified by:
loginin interfaceGeoNetworkReader- Throws:
AuthorizationExceptionMissingServiceEndpointExceptionMissingConfigurationException
-
logout
- Specified by:
logoutin interfaceGeoNetworkReader- Throws:
MissingServiceEndpointException
-
query
public it.geosolutions.geonetwork.util.GNSearchResponse query(it.geosolutions.geonetwork.util.GNSearchRequest request) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
queryin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
query
public it.geosolutions.geonetwork.util.GNSearchResponse query(File fileRequest) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
queryin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
getById
public org.opengis.metadata.Metadata getById(long id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, javax.xml.bind.JAXBException, MissingServiceEndpointException - Specified by:
getByIdin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointException
-
getById
public org.opengis.metadata.Metadata getById(String UUID) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, javax.xml.bind.JAXBException, MissingServiceEndpointException - Specified by:
getByIdin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointException
-
getByIdAsRawString
public String getByIdAsRawString(String UUID) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, javax.xml.bind.JAXBException, MissingServiceEndpointException - Specified by:
getByIdAsRawStringin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointException
-
setPrivileges
public void setPrivileges(long metadataId, it.geosolutions.geonetwork.util.GNPrivConfiguration cfg) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
setPrivilegesin interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
insertMetadata
public long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, File metadataFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, MissingConfigurationException, InvalidInsertConfigurationException, AuthorizationException - Specified by:
insertMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationException
-
insertMetadata
public long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, org.opengis.metadata.Metadata meta) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, IOException, javax.xml.bind.JAXBException, MissingServiceEndpointException, MissingConfigurationException, InvalidInsertConfigurationException, AuthorizationException - Specified by:
insertMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationException
-
insertMetadata
public long insertMetadata(File requestFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, MissingConfigurationException - Specified by:
insertMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationException
-
insertMetadata
public long insertMetadata(org.opengis.metadata.Metadata meta) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, IOException, javax.xml.bind.JAXBException, MissingServiceEndpointException, MissingConfigurationException - Specified by:
insertMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointExceptionMissingConfigurationException
-
insertAndPromoteMetadata
public long insertAndPromoteMetadata(File requestFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, MissingConfigurationException - Specified by:
insertAndPromoteMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationException
-
insertAndPromoteMetadata
public long insertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, File metadataFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, MissingConfigurationException, InvalidInsertConfigurationException, AuthorizationException - Specified by:
insertAndPromoteMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationException
-
insertAndPromoteMetadata
public long insertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration, org.opengis.metadata.Metadata meta) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, IOException, javax.xml.bind.JAXBException, MissingServiceEndpointException, MissingConfigurationException, InvalidInsertConfigurationException, AuthorizationException - Specified by:
insertAndPromoteMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationException
-
insertAndPromoteMetadata
public long insertAndPromoteMetadata(org.opengis.metadata.Metadata meta) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, IOException, javax.xml.bind.JAXBException, MissingServiceEndpointException, MissingConfigurationException - Specified by:
insertAndPromoteMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointExceptionMissingConfigurationException
-
getInfo
public it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfo getInfo(Long id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
getInfoin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
getInfo
public it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfo getInfo(String uuid) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
getInfoin interfaceGeoNetworkReader- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
updateMetadata
public void updateMetadata(long id, File metadataFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
updateMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
updateMetadata
public void updateMetadata(long id, org.opengis.metadata.Metadata meta) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, IOException, javax.xml.bind.JAXBException, MissingServiceEndpointException - Specified by:
updateMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionjavax.xml.bind.JAXBExceptionMissingServiceEndpointException
-
deleteMetadata
public void deleteMetadata(long id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
deleteMetadatain interfaceGeoNetworkPublisher- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
getCurrentUserConfiguration
public it.geosolutions.geonetwork.util.GNInsertConfiguration getCurrentUserConfiguration(String category, String styleSheet) throws AuthorizationException, GeoNetworkException - Specified by:
getCurrentUserConfigurationin interfaceGeoNetworkPublisher- Throws:
AuthorizationExceptionGeoNetworkException
-
getUserConfiguration
public it.geosolutions.geonetwork.util.GNInsertConfiguration getUserConfiguration(String category, String styleSheet, ScopeConfiguration configuration, LoginLevel lvl) throws AuthorizationException, GeoNetworkException -
createGroup
public Group createGroup(String name, String description, String mail, Integer id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
createGroupin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
getGroups
public Set<Group> getGroups() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException- Specified by:
getGroupsin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
getAvailableOwnershipTransfer
public String getAvailableOwnershipTransfer(Integer userId) throws it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException - Specified by:
getAvailableOwnershipTransferin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibException
-
getMetadataOwners
public String getMetadataOwners() throws it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException- Specified by:
getMetadataOwnersin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibException
-
getUsers
public Set<User> getUsers() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException- Specified by:
getUsersin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
createUsers
public User createUsers(String username, String password, User.Profile profile, Collection<Integer> groups) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException - Specified by:
createUsersin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointException
-
assignOwnership
public void assignOwnership(List<Long> toTransferIds, Integer targetUserId, Integer targetGroupId) throws AuthorizationException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException - Specified by:
assignOwnershipin interfaceGeoNetworkAdministration- Throws:
AuthorizationExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibException
-
transferOwnership
public void transferOwnership(Integer sourceUserId, Integer sourceGroupId, Integer targetUserId, Integer targetGroupId) throws it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException - Specified by:
transferOwnershipin interfaceGeoNetworkAdministration- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibException
-
registerXMLAdapter
- Specified by:
registerXMLAdapterin interfaceGeoNetworkPublisher
-