Generates a minimal model from the user-supplied artifact information.

@return The generated model, never <code>null</code>.
511936
private Model generateModel()
    {
        Model model = new Model();

        model.setModelVersion( "4.0.0" );

        model.setGroupId( groupId );
        model.setArtifactId( artifactId );
        model.setVersion( version );
        model.setPackaging( packaging );

        model.setDescription( "POM was created from specialsource-maven-plugin" );

        return model;
    }
1134960
public PublishModel getPublishModel() {
        String value = getFieldValue(ConfigureNodeFields.publish_model);

        if (value == null)
            return null;
        else
            return PublishModel.valueOf(value);
    }
1336707
public Optional<Object> getDefaultValue() {
        Validate.notNull(parameter, "parameter must not be null!");
        if (parameter instanceof AbstractSerializableParameter) {
            AbstractSerializableParameter serializableParameter = (AbstractSerializableParameter) parameter;
            return Optional.ofNullable(serializableParameter.getDefaultValue());
        }
        return Optional.empty();
    }
1033915
public Entity<OrmDescriptor> getOrCreateEntity()
   {
      List<Node> nodeList = model.get("entity");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new EntityImpl<OrmDescriptor>(this, "entity", model, nodeList.get(0));
      }
      return createEntity();
   }
1091729
public Boolean getMinifyResources() {
        if(getDevelopment()) {
            return minifyResources != null ? minifyResources : false;
        } else {
            return minifyResources != null ? minifyResources : true;
        }
    }
203172
public com.google.appengine.v1.CreateVersionMethodOrBuilder getCreateVersionOrBuilder() {
    if (methodCase_ == 2) {
       return (com.google.appengine.v1.CreateVersionMethod) method_;
    }
    return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance();
  }
277203
public ArtifactName build() {
        String groupId = this.groupId;
        String artifactId = this.artifactId;
        String classifier = this.classifier;
        String packaging = this.packaging;
        String version = this.version;
        if (artifact != null && !artifact.isEmpty()) {
            final String[] artifactSegments = artifact.split(":");
            // groupId:artifactId:version[:packaging][:classifier].
            String value;
            switch (artifactSegments.length) {
                case 5:
                    value = artifactSegments[4].trim();
                    if (!value.isEmpty()) {
                        classifier = value;
                    }
                case 4:
                    value = artifactSegments[3].trim();
                    if (!value.isEmpty()) {
                        packaging = value;
                    }
                case 3:
                    value = artifactSegments[2].trim();
                    if (!value.isEmpty()) {
                        version = value;
                    }
                case 2:
                    value = artifactSegments[1].trim();
                    if (!value.isEmpty()) {
                        artifactId = value;
                    }
                case 1:
                    value = artifactSegments[0].trim();
                    if (!value.isEmpty()) {
                        groupId = value;
                    }
            }
        }
        return new ArtifactNameImpl(groupId, artifactId, classifier, packaging, version);
    }
918868
@NotNull
    public final ArtifactFactory<?> getFactory() {
        if (factory == null) {
            if (factoryClassName == null) {
                throw new IllegalStateException("Factory class name was not set: " + artifact);
            }
            if (context == null) {
                throw new IllegalStateException("Context class loader was not set: " + artifact);
            }
            final Object obj = Utils4J.createInstance(factoryClassName, context.getClassLoader());
            if (!ArtifactFactory.class.isAssignableFrom(obj.getClass())) {
                throw new IllegalStateException(
                        "Expected an object of type '" + ArtifactFactory.class.getName() + "', but was: " + obj.getClass());
            }
            factory = (ArtifactFactory<?>) obj;
            factory.init(this);
        }
        return factory;
    }
867758
@Override public IsolationForestModel createImpl() {
    IsolationForestV3.IsolationForestParametersV3 p = this.parameters;
    IsolationForestModel.IsolationForestParameters parms = p.createImpl();
    return new IsolationForestModel( model_id.key(), parms, new IsolationForestModel.IsolationForestOutput(null) );
  }
1006314
@Override
    public StmtIterator getMetadata()
    {
        final Model output = ModelFactory.createDefaultModel();
        addMetadata( output );
        return output.listStatements();
    }
727820
public Assignment model() {
    if (this.result == UNDEF)
      throw new IllegalStateException("Cannot get a model as long as the formula is not solved.  Call 'solve' first.");
    return this.result != UNSATISFIABLE ? this.createAssignment(this.solver.model()) : null;
  }
1084837
private Model initModel() {
        OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM, ModelFactory.createDefaultModel());
        try {
            schemaReader.read(m);
        } catch (RdfReaderException e) {
            log.error("Cannot load ontology: {} ", getSchema(), e);
        }
        return m;
    }
1082049
public Description build() {
        if (null == name) {
            throw new IllegalStateException("name is not set");
        }
        final String title1 = null != title ? title : name;
        final List<Property> properties1 = buildProperties();
        final Map<String, String> mapping1 = Collections.unmodifiableMap(mapping);
        final Map<String, String> mapping2 = Collections.unmodifiableMap(fwkmapping);
        final Map<String, String> metadata2 = Collections.unmodifiableMap(metadata);
        return new Description() {
            @Override
            public String getName() {
                return name;
            }

            @Override
            public String getTitle() {
                return title1;
            }

            @Override
            public String getDescription() {
                return description;
            }

            @Override
            public List<Property> getProperties() {
                return properties1;
            }

            @Override
            public Map<String, String> getPropertiesMapping() {
                return mapping1;
            }

            @Override
            public Map<String, String> getFwkPropertiesMapping() {
                return mapping2;
            }

            @Override
            public Map<String, String> getMetadata() {
                return metadata2;
            }

            @Override
            public String toString() {
                return "PropertyDescription{" +
                        "name = " + getName() + ", " +
                        "title = " + getTitle() + ", " +
                        "description = " + getDescription() + ", " +
                        "properties = " + getProperties() + ", " +
                        "mapping = " + getPropertiesMapping() +
                        "frameworkMapping = " + getFwkPropertiesMapping() +
                        "metadata = " + metadata2 +
                        "}";
            }
        };
    }
86093
public static TensorFactory getFactory() {
    return new TensorFactory() {
      @Override
      public TensorBuilder getBuilder(int[] dimNums, int[] dimSizes) {
        return new SparseTensorBuilder(dimNums, dimSizes);
      }
    };
  }
1080158
public File[] build() {
        MavenStrategyStage maven = Maven.configureResolver()
                .workOffline(offline)
                .resolve(artifactCoordinates);

        return applyTransitivity(maven).asFile();
    }
907864
public MavenInstallation getMaven() {
        for( MavenInstallation i : getDescriptor().getInstallations() ) {
            if(mavenName !=null && mavenName.equals(i.getName()))
                return i;
        }
        return null;
    }
46648
public static <T> Source<T> empty() {
        return new AbstractSource<T>() {
            @Override
            public T computeNext() {
                return endOfData();
            }
        };
    }