Examples of clone()


Examples of org.apache.uima.resource.CustomResourceSpecifier.clone()

            u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_SERVICE);
           
        } else if (xmlizable instanceof CustomResourceSpecifier) {
            u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_CUSTOM_RESOURCE_SPECIFIER);
            CustomResourceSpecifier specifier = (CustomResourceSpecifier) xmlizable;
            u.cloneResourceSpecifier = specifier.clone();
            Parameter[] params = specifier.getParameters();
            Trace.err("CustomResourceSpecifier ResourceClassname=" + specifier.getResourceClassName()
                    + " Parameter size=" + params.length);
            for (int i=0; i<params.length; ++i) {
                Trace.err("Param name: " + params[i].getName() +
View Full Code Here

Examples of org.apache.uima.resource.URISpecifier.clone()

            u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_SERVICE);
           
        } else if (xmlizable instanceof CustomResourceSpecifier) {
            u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_CUSTOM_RESOURCE_SPECIFIER);
            CustomResourceSpecifier specifier = (CustomResourceSpecifier) xmlizable;
            u.cloneResourceSpecifier = specifier.clone();
            Parameter[] params = specifier.getParameters();
            Trace.err("CustomResourceSpecifier ResourceClassname=" + specifier.getResourceClassName()
                    + " Parameter size=" + params.length);
            for (int i=0; i<params.length; ++i) {
                Trace.err("Param name: " + params[i].getName() +
View Full Code Here

Examples of org.apache.uima.resource.metadata.AllowedValue.clone()

    AllowedValue av = UIMAFramework_impl.getResourceSpecifierFactory().createAllowedValue();
    allowedValueUpdate(av, dialog);
    addAllowedValue(localTd, av);

    if (!Utility.arrayContains(td.getAllowedValues(), av))
      addAllowedValue(td, (AllowedValue) av.clone());
    else
      refreshNeeded = true;

    // update the GUI
    if (refreshNeeded)
View Full Code Here

Examples of org.apache.uima.resource.metadata.ConfigurationParameter.clone()

  private void alterExistingConfigurationParameter(AddParameterDialog dialog,
          TreeItem existingTreeItem) {
    ConfigurationParameter existingCP = getCorrespondingModelParm(existingTreeItem);
    ConfigurationParameter previousCP = existingCP;
    previousCP = (ConfigurationParameter) previousCP.clone();
    fillModelParm(dialog, existingCP);
    fillParmItem(existingTreeItem, existingCP);

    // the following may have changed in an existing param spec, that could
    // affect the setting:
View Full Code Here

Examples of org.apache.uima.resource.metadata.ConfigurationParameterSettings.clone()

      ConfigurationParameterSettings cps2 = UIMAFramework.getResourceSpecifierFactory().createConfigurationParameterSettings();
      cps2.getSettingsForGroups().put("k1", new NameValuePair[] {new NameValuePair_impl("s1", "o1")});
      cps2.getSettingsForGroups().put("k2", new NameValuePair[] {new NameValuePair_impl("s2", "o2")});
     
      Assert.assertEquals(cps1, cps2);
      Assert.assertEquals(cps1, cps2.clone());
     
      cps2.getSettingsForGroups().put("k2", new NameValuePair[] {new NameValuePair_impl("s2", "ox2")});
      Assert.assertFalse(cps1.equals(cps2));
          
    } catch (RuntimeException e) {
View Full Code Here

Examples of org.apache.uima.resource.metadata.FsIndexCollection.clone()

  // indexes are checked and merged when the CAS is built
  protected boolean isValidImport(String title, String message) {

    FsIndexCollection savedIC = editor.getMergedFsIndexCollection();
    if (null != savedIC)
      savedIC = (FsIndexCollection) savedIC.clone();
    CAS savedCAS = editor.getCurrentView();
    try {
      editor.setMergedFsIndexCollection();
      editor.descriptorCAS.validate();
    } catch (ResourceInitializationException e) {
View Full Code Here

Examples of org.apache.uima.resource.metadata.ProcessingResourceMetaData.clone()

      // Normalize language codes. Need to do this since a wide variety of
      // spellings are acceptable according to ISO.
      normalizeIsoLangCodes(md);

      // clone this metadata and assign a UUID if not already present
      ResourceMetaData mdCopy = (ResourceMetaData) md.clone();

      if (mdCopy.getUUID() == null) {
        mdCopy.setUUID(UUIDGenerator.generate());
      }
      setMetaData(mdCopy);
View Full Code Here

Examples of org.apache.uima.resource.metadata.TypePriorities.clone()

    }
  }

  private void saveGoodVersionOfTypePriorities() {
    TypePriorities tp = getAeDescription().getAnalysisEngineMetaData().getTypePriorities();
    m_typePrioritiesBackup = (null == tp) ? null : (TypePriorities) tp.clone();
  }

  private boolean revertToLastValid(String msg, String msgDetails) {
    String[] buttonLabels = new String[2];
    buttonLabels[0] = Messages.getString("MultiPageEditor.revertToLastValid"); //$NON-NLS-1$
View Full Code Here

Examples of org.apache.uima.resource.metadata.TypePriorityList.clone()

    TypePriorities_impl clone = (TypePriorities_impl) super.clone();
    clone.mPriorityLists = new ArrayList<TypePriorityList>();
    Iterator<TypePriorityList> priListIter = mPriorityLists.iterator();
    while (priListIter.hasNext()) {
      TypePriorityList priList = priListIter.next();
      clone.addPriorityList((TypePriorityList) priList.clone());
    }

    return clone;
  }
View Full Code Here

Examples of org.apache.uima.resource.metadata.TypeSystemDescription.clone()

    AnalysisEngineDescription ae = (AnalysisEngineDescription) modelRoot.getAeDescription().clone();
    // speedup = replace typeSystem with resolved imports version
    if (ae.isPrimitive()) {
      TypeSystemDescription tsd = modelRoot.getMergedTypeSystemDescription();
      if (null != tsd)
        tsd = (TypeSystemDescription) tsd.clone();
      ae.getAnalysisEngineMetaData().setTypeSystem(tsd);
    }
    ae.getAnalysisEngineMetaData().setFsIndexCollection(modelRoot.getMergedFsIndexCollection());
    ae.getAnalysisEngineMetaData().setTypePriorities(modelRoot.getMergedTypePriorities());
    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.