congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IBrowserFacade
Code IndexAdd Tabnine to your IDE (free)

How to use
IBrowserFacade
in
pl.edu.icm.yadda.service2.browse.facade

Best Java code snippets using pl.edu.icm.yadda.service2.browse.facade.IBrowserFacade (Showing top 20 results out of 315)

origin: pl.edu.icm.yadda/yadda-client-common

/** Performs count of the specific query results. */
protected int countQuery(Condition query, String relation) throws BrowseException {
  return browser.relation(relation).count(query);
}
origin: pl.edu.icm.yadda/yadda-aas2

protected Relation getDirectoryRelation() throws ServiceException {
  
  try {
    return browserFacade.relation(RELATION_NAME);
  } catch (NoSuchRelationException e) {
    try {
      return browserFacade.create(relationInfo);
    } catch (BrowseException e2) {
      throw new ServiceException(e2);
    }
  }
  
}    
origin: pl.edu.icm.yadda/yaddaweb-lite-core

  final Map<String, String[]> cachedFilterBy, final int rows, final String collapseOnField,
  final boolean countCollapseGroup, final String valueSeparator, final String expandOnField) {
final IBrowse indexBrowse = browserSearchFacade.forCollection(indexName);
origin: pl.edu.icm.yadda/yadda-client-common

@Override
public int countAllValues(Token token)
    throws CountingNotSupportedException, ServiceException {
  Fetcher f = browser.restoreFetcher(token.getCookie());
  int res = f.getEstimatedCount();
  if (res <= 0) {
    res = PagingServiceUtilities.countManually(this, token);
  }
  return res;
}
origin: pl.edu.icm.yadda/yadda-client-common

long start = System.currentTimeMillis();
Cookie c = token.getCookie();
Fetcher f = browser.restoreFetcher(c);
f.setPageSize(token.getPageSize());
int pn = token.getPageNumber();
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void finishProcess(final ProcessContext context) {
  try {
    browserFacade.relation(ElementView.ELEMENT_VIEW_NAME).setAggregatingEnabled(true, true);
        browserFacade.relation(ElementView.ELEMENT_VIEW_NAME).getInfo().getViews();
      if (views != null) {
        for (final AggregatingView view : views) {
          if (view.getMaterializationStrategy() != MaterializationStrategy.NONE) {
            browserFacade.relation(ElementView.ELEMENT_VIEW_NAME).aggregate(view.getUuid(), Query.fields("*"), false);
      ViewConstants.markAsReady(browserFacade.relation(ElementView.ELEMENT_VIEW_NAME));
      ViewConstants.markAsReady(browserFacade.relation(JournalView.JOURNAL_VIEW_NAME));
      ViewConstants.markAsReady(browserFacade.relation(PublisherView.PUBLISHER_VIEW_NAME));
      ViewConstants.markAsReady(browserFacade.relation(BookPublisherView.PUBLISHER_VIEW_NAME));
      ViewConstants.markAsReady(browserFacade.relation(InstitutionEntityView.VIEW_NAME));
origin: pl.edu.icm.yadda/yadda-analysis-impl

private synchronized Relation getDirtyRelation() {
  try {
    return browserFacade.relation(DIRTY_RELATION_NAME);
  } catch (NoSuchRelationException ex) {
    Field sourceField = new Field(DIRTY_RELATION_SOURCE_FIELD, Field.Type.STRING, false, true);
    try {
      return browserFacade.create(new RelationInfo(DIRTY_RELATION_NAME, sourceField));
    } catch (InvalidNameException ex1) {
      throw new IllegalArgumentException(ex1);
    }
  }
}
origin: pl.edu.icm.yadda/yaddaweb-lite-core

private void fillHierarchyUp(Set<String> ids, final Map<String, String> childParent,
    final Map<String, InfoEntry> elementInfo) {
  final IBrowse browse = browser.forCollection("index.hierarchy");
  final BrowseFormat browseFormat = BrowseFormat.request(HierarchyIndexFields.F_CHILD_ID,
      HierarchyIndexFields.F_PARENT_ID, HierarchyIndexFields.F_PARENT_NAME,
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void initProcess(final ProcessContext context) {
  try {
    if (context.containsKey(Constants.PARAM_DISABLE_AGGREGATIONS_DURING_REBUILD)) {
      browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME).setAggregatingEnabled(false, false);
    }
  } catch (final Exception e) {
    if (context != null) {
      context.getListener().notifyEvent("contributorViewGenerator.start", new String[]{}, EventResultCode.ERROR, StackTraceUtil.getStackTrace(e));
    }
    log.error("Exception starting processing", e);
  }
}
origin: pl.edu.icm.yadda/yadda-analysis-impl

private synchronized Relation getRefsRelation() {
  try {
    return browserFacade.relation(REFS_RELATION_NAME);
  } catch (NoSuchRelationException ex) {
    Field sourceField = new Field(REFS_RELATION_SOURCE_FIELD, Field.Type.STRING, false, true);
    Field positionField = new Field(REFS_RELATION_POSITION_FIELD, Field.Type.INTEGER, false, false);
    Field targetField = new Field(REFS_RELATION_TARGET_FIELD, Field.Type.STRING, false, true);
    try {
      return browserFacade.create(
          new RelationInfo(REFS_RELATION_NAME, sourceField, positionField, targetField));
    } catch (InvalidNameException ex1) {
      throw new IllegalArgumentException(ex1);
    }
  }
}
origin: pl.edu.icm.yadda/yaddaweb-lite-core

final IBrowse contributorBrowse = browserSearchFacade.forCollection(ContributorView.CONTRIBUTOR_INDEX_NAME);
origin: pl.edu.icm.yadda/bwmeta-import

browserFacade.relation(ElementView.ELEMENT_VIEW_NAME)
       .withPageSize(pageSize)
       .select(Query.fields(ElementView.FIELDS_IDX_EXT_ID)
origin: pl.edu.icm.yadda/yaddaweb-lite-core

@Override
public ContributorDTO getContributorWithRoles(final String id) {
  log.info("Browse Info: getContributorWithRoles({})", id);
  final IBrowse contributorBrowse = browserSearchFacade.forCollection(ContributorView.CONTRIBUTOR_INDEX_NAME);
  final String[] fields = new String[] { ContributorView.FIELD_CONTRIBUTOR_TITLE,
      ContributorView.FIELD_CONTRIBUTOR_FIRST_NAME, ContributorView.FIELD_CONTRIBUTOR_LAST_NAME,
      ContributorView.FIELD_CONTRIBUTOR_ID };
  final BrowseFormat format = BrowseFormat.request(fields).setFacet(ContributorView.FIELD_CONTRIBUTOR_ROLE)
      .setRows(1);
  final BrowseFilter filter = BrowseFilter.all(ContributorView.FIELD_CONTRIBUTOR_MD5, id);
  // .andAll(ContributorView.FIELD_TAG, requiredTag);
  final BrowseResults results = contributorBrowse.select(filter, format);
  if (results.getCount() < 1) {
    return null;
  }
  final BrowseResult result = results.getResults().get(0);
  final Map<String, Long> roleFacet = results.getFacet(ContributorView.FIELD_CONTRIBUTOR_ROLE);
  final ContributorDTO contributorDTO = new ContributorDTO();
  contributorDTO.setContributorMd5(id);
  contributorDTO.setContributorTitle(result.getFirstValue(ContributorView.FIELD_CONTRIBUTOR_TITLE));
  contributorDTO.setContributorFirstName(result.getFirstValue(ContributorView.FIELD_CONTRIBUTOR_FIRST_NAME));
  contributorDTO.setContributorLastName(result.getFirstValue(ContributorView.FIELD_CONTRIBUTOR_LAST_NAME));
  if (roleFacet != null) {
    contributorDTO.setRoles(roleFacet.keySet());
  }
  contributorDTO.setContributorId(result.getFirstValue(ContributorView.FIELD_CONTRIBUTOR_ID));
  return contributorDTO;
}
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void finishProcess(final ProcessContext context) {
  try {
    browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME).setAggregatingEnabled(true, true);
        browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME).getInfo().getViews();
      if (views != null) {
        for (final AggregatingView view : views) {
          if (view.getMaterializationStrategy() != MaterializationStrategy.NONE) {
            browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME).aggregate(view.getUuid(), Query.fields("*"), false);
      ViewConstants.markAsReady(browserFacade.relation(ContributorView.CONTRIBUTOR_VIEW_NAME));
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void finishProcess(final ProcessContext context) {
  try {
    browserFacade.relation(ElementPublisherView.ELEMENT_PUBLISHER_VIEW_NAME).setAggregatingEnabled(true, true);
          browserFacade.relation(ElementPublisherView.ELEMENT_PUBLISHER_VIEW_NAME).getInfo().getViews();
      if (views != null) {
        for (final AggregatingView view : views) {
          if (view.getMaterializationStrategy() != AggregatingView.MaterializationStrategy.NONE) {
            browserFacade.relation(ElementPublisherView.ELEMENT_PUBLISHER_VIEW_NAME).aggregate(view.getUuid(), Query.fields("*"), false);
      ViewConstants.markAsReady(browserFacade.relation(ElementPublisherView.ELEMENT_PUBLISHER_VIEW_NAME));
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void finishProcess(final ProcessContext context) {
  try {
    browserFacade.relation(SubscriberView.VIEW_NAME).setAggregatingEnabled(true, true);
        browserFacade.relation(SubscriberView.VIEW_NAME).getInfo().getViews();
      if (views != null) {
        for (final AggregatingView view : views) {
          if (view.getMaterializationStrategy() != MaterializationStrategy.NONE) {
            browserFacade.relation(SubscriberView.VIEW_NAME).aggregate(view.getUuid(), Query.fields("*"), false);
      ViewConstants.markAsReady(browserFacade.relation(SubscriberView.VIEW_NAME));
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void initProcess(final ProcessContext context) {
  try {
    if (context.containsKey(Constants.PARAM_DISABLE_AGGREGATIONS_DURING_REBUILD)) {
      browserFacade.relation(ElementPublisherView.ELEMENT_PUBLISHER_VIEW_NAME).setAggregatingEnabled(false, false);
    }
  } catch (final Exception e) {
    if (context != null) {
      context.getListener().notifyEvent("contributorViewGenerator.start", new String[]{}, EventResultCode.ERROR, StackTraceUtil.getStackTrace(e));
    }
    log.error("Exception starting processing", e);
  }
}
origin: pl.edu.icm.yadda/yaddaweb-lite-core

      "Wrong parameter! ExtIds is null or empty!");
long t = System.currentTimeMillis();
Relation rel = browserFacade.relation(ElementView.ELEMENT_VIEW_NAME, requiredTags)
              .withPageSize(pageSize);
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected void initProcess(final ProcessContext context) {
  try {
    if (context.containsKey(Constants.PARAM_DISABLE_AGGREGATIONS_DURING_REBUILD)) {
      browserFacade.relation(ElementView.ELEMENT_VIEW_NAME).setAggregatingEnabled(false, false);
    }
  } catch (final Exception e) {
    if (context.getListener() != null) {
      context.getListener().notifyEvent("elementViewGenerator.start", new String[]{}, EventResultCode.ERROR, StackTraceUtil.getStackTrace(e));
    }
    log.error("Exception starting processing", e);
  }
}
origin: pl.edu.icm.yadda/bwmeta-process

@Override
protected T doProcess(T data, Map<String, Serializable> context, IProcessListener listener, ProcessingStats stats)
    throws Exception {
  
  //initializer.drop();
  
  if (context.containsKey(Constants.PARAM_FORCE_RECREATE)) {
    initializer.forceInit();
  } else {
    initializer.prepare();    
  }        
  
  if (context.containsKey(Constants.PARAM_MARK_VIEWS_AS_READY)) {
    for (ICommand<RelationInfo> command : initializer.getCommands()) {
      String relationName = command.getCommand().getBaseName();
      Relation relation = browserFacade.relation(relationName);
      ViewConstants.markAsReady(relation);
    }
  }
      
  return data;
}

pl.edu.icm.yadda.service2.browse.facadeIBrowserFacade

Javadoc

Facade interface for simpler use of the request/response based IBrowser.

Most used methods

  • relation
    Returns a relation facade used to access a single named relation.
  • create
    Requests creation of a new relation.
  • forCollection
    Browser interface for given collection name.
  • restoreFetcher
    Restores the fetcher basing on the specified cookie

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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