Examples of Generalization


Examples of OntoUML.Generalization

        if (result == null) result = caseNamedElement(formalAssociation);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case OntoUMLPackage.GENERALIZATION: {
        Generalization generalization = (Generalization)theEObject;
        T result = caseGeneralization(generalization);
        if (result == null) result = caseDirectedRelationship(generalization);
        if (result == null) result = caseNamedElement(generalization);
        if (result == null) result = caseRelationship(generalization);
        if (result == null) result = caseElement(generalization);
View Full Code Here

Examples of org.eclipse.uml2.Generalization

        for (final TreeIterator iterator = EcoreUtil.getRootContainer(classifier).eAllContents(); iterator.hasNext();)
        {
            final EObject object = (EObject)iterator.next();
            if (object instanceof Generalization)
            {
                final Generalization generalization = (Generalization)object;
                if (generalization.getGeneral().equals(classifier))
                {
                    specials.add(generalization.getSpecific());
                }
                iterator.prune();
            }
        }
        return specials;
View Full Code Here

Examples of org.eclipse.uml2.uml.Generalization

  }

  @Test
  public void testGenerateClassCheckedExceptionWithInheritance() {
    EList<Generalization> generalizations = new UniqueEList<Generalization>();
    Generalization generalization = mock(Generalization.class);
    Class clazzGeneralization = mock(Class.class);
    generalizations.add(generalization);
    when(generalization.getGeneral()).thenReturn(clazzGeneralization);
    when(clazzGeneralization.getQualifiedName()).thenReturn(
        "de::test::SuperCompanyException");
    when(clazz.getGeneralizations()).thenReturn(generalizations);

    AST ast = AST.newAST(AST.JLS3);
View Full Code Here

Examples of org.eclipse.uml2.uml.Generalization

  }

  @Test
  public void testGenerateClassUncheckedExceptionWithMultipleInheritance() {
    EList<Generalization> generalizations = new UniqueEList<Generalization>();
    Generalization generalization1 = mock(Generalization.class);
    Generalization generalization2 = mock(Generalization.class);
    Class clazzGeneralization1 = mock(Class.class);
    Class clazzGeneralization2 = mock(Class.class);
    generalizations.add(generalization1);
    generalizations.add(generalization2);
    when(generalization1.getGeneral()).thenReturn(clazzGeneralization1);
    when(clazzGeneralization1.getQualifiedName()).thenReturn(
        "de::test::SuperCompanyException");
    when(generalization2.getGeneral()).thenReturn(clazzGeneralization2);
    when(clazzGeneralization2.getQualifiedName()).thenReturn(
        "de::test::SuperDuperCompanyException");
    when(clazz.getGeneralizations()).thenReturn(generalizations);

    AST ast = AST.newAST(AST.JLS3);
View Full Code Here

Examples of org.eclipse.uml2.uml.Generalization

  }

  @Test
  public void testGenerateClassUncheckedExceptionWithInheritance() {
    EList<Generalization> generalizations = new UniqueEList<Generalization>();
    Generalization generalization = mock(Generalization.class);
    Class clazzGeneralization = mock(Class.class);
    generalizations.add(generalization);
    when(generalization.getGeneral()).thenReturn(clazzGeneralization);
    when(clazzGeneralization.getQualifiedName()).thenReturn(
        "de::test::SuperCompanyException");
    when(clazz.getGeneralizations()).thenReturn(generalizations);

    AST ast = AST.newAST(AST.JLS3);
View Full Code Here

Examples of org.eclipse.uml2.uml.Generalization

  @SuppressWarnings("unchecked")
  @Test
  public void testGenerateClassWithInheritance() {
    EList<Generalization> generalizations = new UniqueEList<Generalization>();
    Generalization generalization = mock(Generalization.class);
    Class clazzGeneralization = mock(Class.class);
    generalizations.add(generalization);
    when(generalization.getGeneral()).thenReturn(clazzGeneralization);
    when(clazzGeneralization.getQualifiedName()).thenReturn(
        "de::test::SuperCompany");
    when(clazz.getGeneralizations()).thenReturn(generalizations);

    AST ast = AST.newAST(AST.JLS3);
View Full Code Here

Examples of org.geotools.data.gen.info.Generalization

    public SimpleFeatureCollection getFeatures(Query query)
            throws IOException {

        SimpleFeatureSource fs = getFeatureSourceFor(query);
        Query newQuery = getProxyObject(query, fs);
        Generalization di = info.getGeneralizationForDistance(getRequestedDistance(query));
        if (di != null)
            logDistanceInfo(di);
        return new PreGeneralizedFeatureCollection(fs.getFeatures(newQuery), getSchema(),
                indexMapping.get(di == null ? 0.0 : di.getDistance()), info.getGeomPropertyName(),
                getBackendGeometryName(fs));
    }
View Full Code Here

Examples of org.geotools.data.gen.info.Generalization

        if (access instanceof DataStore) {
            FeatureReader<SimpleFeatureType, SimpleFeature> backendReader = ((DataStore) access)
                    .getFeatureReader(newQuery, transaction);
            String backendGeometryPropertyName = getBackendGeometryName(fs);

            Generalization di = info.getGeneralizationForDistance(getRequestedDistance(query));
            if (di != null)
                logDistanceInfo(di);

            return new PreGeneralizedFeatureReader(getSchema(), indexMapping.get(di == null ? 0.0
                    : di.getDistance()), backendReader, info.getGeomPropertyName(),
                    backendGeometryPropertyName);
        }
        return null;
    }
View Full Code Here

Examples of org.geotools.data.gen.info.Generalization

    private SimpleFeatureSource getFeatureSourceFor(
            Double requestedDistance) throws IOException {

        if (requestedDistance == null || requestedDistance == 0)
            return getBaseFeatureSource();
        Generalization di = info.getGeneralizationForDistance(requestedDistance);
        return getFeatureSourceFor(di);
    }
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.