io.swagger.models.Model.getTitle()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中io.swagger.models.Model.getTitle()方法的一些代码示例,展示了Model.getTitle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getTitle()方法的具体详情如下:
包路径:io.swagger.models.Model
类名称:Model
方法名:getTitle

Model.getTitle介绍

暂无

代码示例

代码示例来源:origin: Swagger2Markup/swagger2markup

/**
 * Determines title for definition. If title is present, it is used, definitionName is returned otherwise.
 *
 * @param params      params object for this definition
 * @return Definition title - value from title tag if present, definitionName otherwise
 */
private String determineDefinitionTitle(Parameters params) {
  if (params.model.getTitle() != null) {
    return params.model.getTitle();
  } else {
    return params.definitionName;
  }
}

代码示例来源:origin: Swagger2Markup/swagger2markup

Map<String, Property> allProperties = new LinkedHashMap<>();
ObjectTypePolymorphism polymorphism = new ObjectTypePolymorphism(ObjectTypePolymorphism.Nature.NONE, null);
String name = model.getTitle();

代码示例来源:origin: stackoverflow.com

public boolean onMarkerClick (Marker marker) {
  Model hotelModel = markerMap.get(marker);
  if(hotelModel != null) {
    Log.d("test", "Hotel "+hotelModel.getTitle()+" is clicked"); 
  }
}

代码示例来源:origin: stackoverflow.com

lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

       Model model = (Model) parent.getItemAtPosition(position);
      Intent intent = new Intent(SearchActivity.this, Details.class);
      intent.putExtra(Title, model.getTitle());
      intent.putExtra("images", model.getThumbnailUrl());
      intent.putExtra(Rate, String.valueOf(model.getRating()));
      intent.putExtra(Genre, model.getGenre());

      startActivity(intent);
    }
  });
}

代码示例来源:origin: stackoverflow.com

public void addMarker(Model hotelModel) {

  if (null != googleMap) {
    Marker hotelMarker = MyMapFragment.this.googleMap.addMarker(new MarkerOptions()
            .position(new LatLng(hotelModel.getLat(), hotelModel.getLon()))
            .title(hotelModel.getTitle())
    );

    markerMap.add(hotelMarker, hotelModel);
  }
}

代码示例来源:origin: stackoverflow.com

@Override
 public View getView(int position, View convertView, ViewGroup parent) {
   ViewHolder holder;
   View rootView = convertView;
   if (rootView == null){
     LayoutInflater inflater = (LayoutInflater) context
         .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
     rootView = inflater.inflate(R.layout.list_item,parent,false);
     holder = new ViewHolder();
     holder.image = (ImageView)rootView.findViewById(R.id.imageUrl);
     holder.title = (TextView)rootView.findViewById(R.id.title);
     rootView.setTag(holder);
   }else {
     holder = (ViewHolder)rootView.getTag();
   }
   Model model = (Model) getItem(position);
   try {
     holder.title.setText(model.getTitle());
     //holder.image.setImageResource(Integer.parseInt(model.getImageUrl()));
     Picasso.with(context)
         .load(models.get(position).getImageUrl())
         .into(holder.image);
     holder.image.setAdjustViewBounds(true);
   }catch (Exception e){
     Log.e(LOG_TAG," Error here "+e);
   }
   return rootView;
 }

代码示例来源:origin: io.syndesis.server/server-connector-generator

private static String determineTitleOf(final String name, final Model schema) {
  final String title = schema.getTitle();
  if (title != null) {
    return title;
  }
  final String description = schema.getDescription();
  if (description != null) {
    return description;
  }
  final String reference = schema.getReference();
  if (reference != null) {
    return reference.replaceAll("^.*/", "");
  }
  return name;
}

代码示例来源:origin: io.syndesis.server/server-api-generator

private static String determineTitleOf(final String name, final Model schema) {
  final String title = schema.getTitle();
  if (title != null) {
    return title;
  }
  final String description = schema.getDescription();
  if (description != null) {
    return description;
  }
  final String reference = schema.getReference();
  if (reference != null) {
    return reference.replaceAll("^.*/", "");
  }
  return name;
}

代码示例来源:origin: io.syndesis/connector-generator

private static JsonNode createSchemaFromModel(final String specification, final Model schema) {
  if (schema instanceof ArrayModel) {
    final Property items = ((ArrayModel) schema).getItems();
    return createSchemaFromProperty(specification, items);
  } else if (schema instanceof ModelImpl) {
    return createSchemaFromModelImpl(schema);
  }
  final String title = Optional.ofNullable(schema.getTitle()).orElse(schema.getReference().replaceAll("^.*/", ""));
  return createSchemaFromReference(specification, title, schema.getReference());
}

代码示例来源:origin: io.syndesis.rest/rest-connector-generator

private static JsonNode createSchemaFromModel(final String specification, final Model schema) {
  if (schema instanceof ArrayModel) {
    final Property items = ((ArrayModel) schema).getItems();
    return createSchemaFromProperty(specification, items);
  } else if (schema instanceof ModelImpl) {
    return createSchemaFromModelImpl(schema);
  }
  final String title = Optional.ofNullable(schema.getTitle()).orElse(schema.getReference().replaceAll("^.*/", ""));
  return createSchemaFromReference(specification, title, schema.getReference());
}

代码示例来源:origin: stackoverflow.com

for (Model model : modelList) {
 model.getTitle();
 model.getDesc();
 model.getBackground();
 model.getProfile();
}

代码示例来源:origin: okta/okta-sdk-java

param.vendorExtensions.put("fromModel", cgProperty);
} else {
  System.err.println("Model '" + model.getTitle() + "' has no properties");

代码示例来源:origin: io.github.swagger2markup/swagger2markup

Map<String, Property> allProperties = new LinkedHashMap<>();
ObjectTypePolymorphism polymorphism = new ObjectTypePolymorphism(ObjectTypePolymorphism.Nature.NONE, null);
String name = model.getTitle();

代码示例来源:origin: io.swagger/swagger-models

ObjectProperty objectProperty = new ObjectProperty();
objectProperty.setDescription(model.getDescription());
objectProperty.setTitle(model.getTitle());
objectProperty.setExample(model.getExample());
ComposedModel cm = (ComposedModel) model;

相关文章