Tabnine Logo
CSWConstants$ResultType
Code IndexAdd Tabnine to your IDE (free)

How to use
CSWConstants$ResultType
in
org.deegree.protocol.csw

Best Java code snippets using org.deegree.protocol.csw.CSWConstants$ResultType (Showing top 9 results out of 315)

origin: deegree/deegree3

} catch ( Throwable t ) {
  JDBCUtils.close( rs, stmt, conn, LOG );
  String msg = Messages.getMessage( "ERROR_REQUEST_TYPE", ResultType.results.name(), t.getMessage() );
  LOG.debug( msg );
  throw new MetadataStoreException( msg );
origin: deegree/deegree3

/**
 * Writes a {@link GetRecords} request as XML, valid to http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd.
 * 
 * @param getRecords
 *            never <code>null</code>
 * @param writer
 *            never <code>null</code>
 * @throws XMLStreamException
 * @throws UnknownCRSException
 * @throws TransformationException
 */
public static void export( GetRecords getRecords, XMLStreamWriter writer )
            throws XMLStreamException, UnknownCRSException, TransformationException {
  writer.writeStartDocument();
  writer.writeStartElement( CSW_202_PREFIX, "GetRecords", CSW_202_NS );
  writeNamespacesAndNamespaceDeclaration( getRecords, writer );
  writer.writeAttribute( "service", "CSW" );
  writer.writeAttribute( "version", VERSION_202_STRING );
  writer.writeAttribute( "outputSchema", getRecords.getOutputSchema() );
  writer.writeAttribute( "outputFormat", getRecords.getOutputFormat() );
  writer.writeAttribute( "resultType", getRecords.getResultType().toString() );
  writer.writeAttribute( "startPosition", Integer.toString( getRecords.getStartPosition() ) );
  writer.writeAttribute( "maxRecords", Integer.toString( getRecords.getMaxRecords() ) );
  writeDistributedSearch( getRecords, writer );
  writeQueryElementWithFilter( getRecords, writer );
}
origin: deegree/deegree3

} catch ( Throwable t ) {
  JDBCUtils.close( rs, preparedStatement, conn, LOG );
  String msg = Messages.getMessage( "ERROR_REQUEST_TYPE", ResultType.results.name(), t.getMessage() );
  LOG.debug( msg );
  throw new MetadataStoreException( msg );
origin: deegree/deegree3

String resultTypeStr = KVPUtils.getDefault( normalizedKVPParams, "RESULTTYPE", ResultType.hits.name() );
ResultType resultType = ResultType.determineResultType( resultTypeStr );
origin: deegree/deegree3

int counter = 0;
boolean isResultTypeHits = getRec.getResultType().name().equals( CSWConstants.ResultType.hits.name() ) ? true
                                                   : false;
origin: deegree/deegree3

String msg = Messages.getMessage( "ERROR_REQUEST_TYPE", ResultType.results.name(), e.getMessage() );
throw new MetadataStoreException( msg );
origin: deegree/deegree3

/**
 * Parses the {@link GetRecords} request on basis of CSW version 2.0.2
 * 
 * @param version
 *            that is requested, 2.0.2
 * @return {@link GetRecords}
 */
private GetRecords parse202( String defaultOutputFormat, String defaultOutputSchema ) {
  LOG.debug( rootElement.toString() );
  String resultTypeStr = getNodeAsString( rootElement, new XPath( "@resultType", nsContext ),
                      ResultType.hits.name() );
  OMElement holeRequest = getElement( rootElement, new XPath( ".", nsContext ) );
  ResultType resultType = ResultType.determineResultType( resultTypeStr );
  int maxRecords = getNodeAsInt( rootElement, new XPath( "@maxRecords", nsContext ), 10 );
  int startPosition = getNodeAsInt( rootElement, new XPath( "@startPosition", nsContext ), 1 );
  String outputFormat = getNodeAsString( rootElement, new XPath( "@outputFormat", nsContext ),
                      defaultOutputFormat );
  String requestId = getNodeAsString( rootElement, new XPath( "@requestId", nsContext ), null );
  String outputSchemaString = getNodeAsString( rootElement, new XPath( "@outputSchema", nsContext ),
                         defaultOutputSchema );
  URI outputSchema = URI.create( outputSchemaString );
  List<OMElement> getRecordsChildElements = getRequiredElements( rootElement, new XPath( "*", nsContext ) );
  return parseSubElements( holeRequest, resultType, maxRecords, startPosition, outputFormat, requestId,
               outputSchema, getRecordsChildElements );
}
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 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;
}
org.deegree.protocol.cswCSWConstants$ResultType

Javadoc

Specifies the mode of the response that is requested. The modes are:
  • hits (default)
  • results
  • validate

  • Most used methods

    • name
    • determineResultType
    • toString

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • startActivity (Activity)
    • scheduleAtFixedRate (Timer)
    • getResourceAsStream (ClassLoader)
    • Container (java.awt)
      A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
    • URL (java.net)
      A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
    • List (java.util)
      An ordered collection (also known as a sequence). The user of this interface has precise control ove
    • Stream (java.util.stream)
      A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
    • Annotation (javassist.bytecode.annotation)
      The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
    • ServletException (javax.servlet)
      Defines a general exception a servlet can throw when it encounters difficulty.
    • Top PhpStorm plugins
    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