congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.deegree.protocol.csw
Code IndexAdd Tabnine to your IDE (free)

How to use org.deegree.protocol.csw

Best Java code snippets using org.deegree.protocol.csw (Showing top 20 results out of 315)

origin: deegree/deegree3

@Override
public boolean supportsOperation( CSWRequestType type ) {
  return CSWRequestType.GetRepositoryItem.equals( type ) ? false : true;
}
origin: deegree/deegree3

  @Override
  public boolean returnAsDC( URI outputSchema )
              throws MetadataStoreException {
    if ( outputSchema != null && outputSchema.equals( OutputSchema.determineOutputSchema( OutputSchema.ISO_19115 ) ) ) {
      return false;
    }
    return true;
  }
}
origin: deegree/deegree3

public static ResultType determineResultType( String typeString ) {
  ResultType resultType = null;
  typeString = typeString.toLowerCase();
  if ( typeString.equalsIgnoreCase( ResultType.hits.name() ) ) {
    resultType = ResultType.hits;
  } else if ( typeString.equalsIgnoreCase( ResultType.results.name() ) ) {
    resultType = ResultType.results;
  } else if ( typeString.equalsIgnoreCase( ResultType.validate.name() ) ) {
    resultType = ResultType.validate;
  }
  return resultType;
}
origin: deegree/deegree3

@Override
public boolean next()
            throws MetadataStoreException {
  try {
    return rs.next();
  } catch ( SQLException e ) {
    throw new MetadataStoreException( e.getMessage(), e );
  }
}
origin: deegree/deegree3

/**
 * The mandatory "resultType" attribute in the GetRecords operation is set to "hits".
 * 
 * @throws MetadataStoreException
 */
public int getRecordCount( final MetadataQuery query )
            throws MetadataStoreException {
  final String resultTypeName = "hits";
  LOG.debug( Messages.getMessage( "INFO_EXEC", "do " + resultTypeName + " on getRecords" ) );
  try {
    QueryService queryService = getReadOnlySqlService();
    return queryService.executeCounting( query, getConnection() );
  } catch ( Throwable t ) {
    LOG.debug( t.getMessage(), t );
    String msg = Messages.getMessage( "ERROR_REQUEST_TYPE", ResultType.results.name(), t.getMessage() );
    LOG.debug( msg );
    throw new MetadataStoreException( msg );
  } finally {
    // Don't close the ResultSet or PreparedStatement if no error occurs, the ResultSet is needed in the
    // ISOMetadataResultSet and both will be closed by
    // org.deegree.metadata.persistence.XMLMetadataResultSet#close().
  }
}
origin: deegree/deegree3

public EbrimGetCapabilitiesHandler( XMLStreamWriter writer, Set<Sections> sections,
                  ServiceIdentificationType identification, ServiceProviderType provider,
                  Version version, boolean isTransactionEnabled, URL extendedCapabilities ) {
  this.writer = writer;
  this.provider = provider;
  this.sections = sections;
  this.identification = identification;
  this.version = version;
  this.isTransactionEnabled = isTransactionEnabled;
  this.extendedCapabilities = extendedCapabilities;
  supportedOperations.add( CSWRequestType.GetCapabilities.name() );
  supportedOperations.add( CSWRequestType.DescribeRecord.name() );
  supportedOperations.add( CSWRequestType.GetRecords.name() );
  supportedOperations.add( CSWRequestType.GetRecordById.name() );
  supportedOperations.add( CSWRequestType.GetRepositoryItem.name() );
}
origin: deegree/deegree3

public static ReturnableElement determineReturnableElement( String returnableElement ) {
  ReturnableElement elementSetName = null;
  returnableElement = returnableElement.toLowerCase();
  if ( returnableElement.equalsIgnoreCase( ReturnableElement.brief.name() ) ) {
    elementSetName = ReturnableElement.brief;
  } else if ( returnableElement.equalsIgnoreCase( ReturnableElement.summary.name() ) ) {
    elementSetName = ReturnableElement.summary;
  } else if ( returnableElement.equalsIgnoreCase( ReturnableElement.full.name() ) ) {
    elementSetName = ReturnableElement.full;
  } else {
    elementSetName = ReturnableElement.summary;
  }
  return elementSetName;
}
origin: deegree/deegree3

private static void writeElementSetNameElement( GetRecords getRecords, XMLStreamWriter writer )
            throws XMLStreamException {
  writer.writeStartElement( CSW_202_PREFIX, "ElementSetName", CSW_202_NS );
  writer.writeCharacters( getRecords.getElementSetName().toString() );
  writer.writeEndElement();
}
origin: deegree/deegree3

protected MetadataResultSet<?> getRecordById( GetRecordById getRecBI, MetadataStore<?> store,
                       List<String> requestedIdList )
            throws OWSException {
  if ( store != null ) {
    try {
      return store.getRecordById( requestedIdList, getRecBI.getTypeNames() );
    } catch ( MetadataStoreException e ) {
      throw new OWSException( e.getMessage(), OWSException.NO_APPLICABLE_CODE );
    }
  }
  return null;
}
origin: deegree/deegree3

@Override
public URL getSchema( QName typeName ) {
  if ( OutputSchema.determineByTypeName( typeName ) == OutputSchema.DC ) {
    try {
      return new URL( CSWConstants.CSW_202_RECORD );
    } catch ( MalformedURLException e ) {
      LOG.info( "Could not resolve URL " + CSWConstants.CSW_202_RECORD );
    }
  }
  return null;
}
origin: deegree/deegree3

public ReturnableElement getElementSetName() {
  String reAsString = adapter.getNodeAsString( adapter.getRootElement(),
                         new XPath( "./rim:QueryExpression/csw:Query/csw:ElementSetName",
                              ns ), null );
  ReturnableElement re = ReturnableElement.summary;
  try {
    re = ReturnableElement.valueOf( reAsString );
  } catch ( Exception e ) {
    //
  }
  return re;
}
origin: deegree/deegree3

@Override
public void skip( int rows )
            throws MetadataStoreException {
  try {
    for ( int i = 0; i < rows; i++ ) {
      rs.next();
    }
  } catch ( SQLException e ) {
    throw new MetadataStoreException( e.getMessage(), e );
  }
}
origin: deegree/deegree3

@Override
public List<URL> getSchemaReferences( QName typeName ) {
  if ( OutputSchema.determineByTypeName( typeName ) == OutputSchema.DC ) {
    return Collections.singletonList( CommonCSWProfile.class.getResource( "/org/deegree/services/csw/exporthandling/dublinCore.xml" ) );
  } else if ( OutputSchema.determineByTypeName( typeName ) == OutputSchema.ISO_19115 ) {
    List<URL> schemas = new ArrayList<URL>();
    schemas.add( CommonCSWProfile.class.getResource( "/org/deegree/services/csw/exporthandling/iso_data.xml" ) );
    schemas.add( CommonCSWProfile.class.getResource( "/org/deegree/services/csw/exporthandling/iso_service.xml" ) );
    return schemas;
  }
  return null;
}
origin: deegree/deegree3

private void deleteFile( TransactionStatus status, File file )
            throws MetadataStoreException {
  boolean deleted = file.delete();
  LOG.debug( "File {} was " + ( deleted ? "successful" : "not" ) + " deleted", file );
  if ( !deleted )
    throw new MetadataStoreException( "Commit failed: could not " + status + " record at " + file );
}
origin: deegree/deegree3

@Override
public int getRemaining()
            throws MetadataStoreException {
  int i = 0;
  try {
    while ( rs.next() ) {
      i++;
    }
  } catch ( SQLException e ) {
    throw new MetadataStoreException( e.getMessage(), e );
  }
  return i;
}
origin: deegree/deegree3

@Override
public MetadataResultSet<ISORecord> getRecords( MetadataQuery query )
            throws MetadataStoreException {
  try {
    return storedIsoRecords.getRecords( query );
  } catch ( FilterEvaluationException e ) {
    throw new MetadataStoreException( e );
  }
}
origin: deegree/deegree3

public static URI determineOutputSchema( OutputSchema outputSchema )
            throws MetadataStoreException {
  URI schema = null;
  try {
    switch ( outputSchema ) {
    case DC:
      schema = new URI( CSWConstants.CSW_202_NS );
      break;
    case ISO_19115:
      schema = new URI( CSWConstants.GMD_NS );
      break;
    }
  } catch ( URISyntaxException e ) {
    throw new MetadataStoreException( e.getMessage() );
  }
  return schema;
}
origin: deegree/deegree3

private ServiceManagerProvider() throws MetadataStoreException {
  Iterator<ServiceManager> iter = ServiceLoader.load( ServiceManager.class ).iterator();
  while ( iter.hasNext() ) {
    if ( serviceManager != null ) {
      String msg = "It is not allowed to specify more than one service manager. Please check "
             + ServiceManager.class.getName();
      throw new MetadataStoreException( msg );
    }
    serviceManager = iter.next();
  }
  if ( serviceManager == null ) {
    serviceManager = new DefaultServiceManager();
  }
}
origin: deegree/deegree3

@Override
public void commit()
            throws MetadataStoreException {
  LOG.debug( "Performing commit of transaction." );
  try {
    conn.commit();
  } catch ( SQLException e ) {
    String msg = "Commit failed: " + e.getMessage();
    LOG.debug( msg );
    throw new MetadataStoreException( msg );
  } finally {
    JDBCUtils.close( conn );
  }
}
origin: deegree/deegree3

@Override
public int getRecordCount( MetadataQuery query )
            throws MetadataStoreException {
  try {
    List<ISORecord> records = storedIsoRecords.getRecords( query.getFilter() );
    return records.size();
  } catch ( FilterEvaluationException e ) {
    throw new MetadataStoreException( e );
  }
}
org.deegree.protocol.csw

Most used classes

  • MetadataStoreException
    Indicates an exception that occured in the metadata persistence layer.
  • CSWConstants$ResultType
    Specifies the mode of the response that is requested. The modes are: hits (default) results validat
  • CSWConstants$ReturnableElement
    Specifies the elements that should be returned in the response brief summary full
  • CSWConstants$CSWRequestType
    Operations that is the webservice capable of GetCapabilities DescribeRecord GetRecords GetRecordByI
  • CSWClient
    API-level client for accessing servers that implement the OpenGIS Catalogue Services Specification (
  • CSWConstants$ConstraintLanguage,
  • CSWConstants$OutputSchema,
  • CSWConstants$Sections,
  • CSWConstants$TransactionType,
  • CSWCapabilitiesAdapter,
  • GetRecords,
  • GetRecordsResponse$1,
  • GetRecordsResponse,
  • GetRecordsXMLEncoder,
  • TransactionXMLEncoder
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now