Android Open Source - StudySpaces Room






From Project

Back to project page StudySpaces.

License

The source code is released under:

Apache License

If you think the Android project StudySpaces listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.pennstudyspaces.api;
/*from  w w  w.j  a  v  a2s. co m*/
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;

public class Room {
    private String name;
    private int id;
    private ArrayList<Availability> availabilities;
    private RoomKind parent;

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }

    public ArrayList<Availability> getAvailabilities() {
        return availabilities;
    }

    public RoomKind getParentRoomKind() {
        return this.parent;
    }

    private void setName(String name) {
        this.name = name;
    }

    private void setId(int id) {
        this.id = id;
    }

    private void setAvailabilities(Map<String, Object> availabilities)
            throws ParseException {
        this.availabilities = new ArrayList<Availability>();

        DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        for (String d : availabilities.keySet()) {
            Date date = format.parse(d);
            this.availabilities.add(new Availability(
                    date, (ArrayList) availabilities.get(d)));
        }
    }
    
    void setParentRoomKind(RoomKind parent) {
        this.parent = parent;
    }
}




Java Source Code List

com.pennstudyspaces.DataListAdapter.java
com.pennstudyspaces.MainActivityDead.java
com.pennstudyspaces.MainActivityTest.java
com.pennstudyspaces.MainActivity.java
com.pennstudyspaces.MyItemizedOverlay.java
com.pennstudyspaces.PrefsActivity.java
com.pennstudyspaces.RoomDetailsActivityTest.java
com.pennstudyspaces.RoomDetailsActivity.java
com.pennstudyspaces.SearchActivityTest.java
com.pennstudyspaces.SearchActivity.java
com.pennstudyspaces.StudySpacesApplication.java
com.pennstudyspaces.api.ApiRequest.java
com.pennstudyspaces.api.Availability.java
com.pennstudyspaces.api.Building.java
com.pennstudyspaces.api.DataDumpRequest.java
com.pennstudyspaces.api.JsonData.java
com.pennstudyspaces.api.ParamsRequest.java
com.pennstudyspaces.api.RoomKind.java
com.pennstudyspaces.api.Room.java
com.pennstudyspaces.api.StudySpacesData.java