Ruby: Classes
An article about classes and bananas
What is a class?
In Ruby, everything is an object, whether strings, hashes, arrays or numbers, and these objects are instances of classes.
“lovely bananas”.class => String Array.new.class => Array
Just like Ruby recognizes those String and Array classes, you can create your own classes that have access to shared methods as well.
When to use a class?
When you start solving larger problems organization is key. As long as you work with methods that are independent of each other you won’t need classes but, when you want the same method to be run on different objects without having to make several if/else or case statements, you can think about using a class. Basically, classes helps to create new objects. They define two thing: What an object is (attributes) and what the object can do (actions). So, let’s try to build a banana object with a class and see what we can do with it.
The Banana Class
For that you need a class structure, so first to create a class you have to use the keyword class
followed by the name of your class starting with a capital letter.
class Banana #methods and variables go here end
Wait… What happens if I want to create a banana and treat it like a real object and make it behave in some way in the ruby world? What happens if I need 500 instances of this banana that will do different things like being eaten or going to the thrash? How classes help me with that? And the answer is…
Class methods and instance variables
So, classes generally holds at least one method to be initialized with. Here, we’re going to define a single method called initialize that holds basic information about our banana.
 When you call that method, it creates a new instance of the class and then run the special method in the class called #initialize which will make the class ready to use.
That weird string <#Banana:0x007fd6d0832648>
is the position in the computer's memory that the banana object is stored in. If we want to define our banana a little better we have to pass some arguments into the intinialize method such as name days and color. Because I believe the default color of a banana is green it's possible to allocate banana default value green for the color argument.
class Banana def initialize(name, days, color="Green") @name = name @days = days @color = color # Default green! end end
Hence, if you pass variables when you create it with .new method, they will be available on #initialize method your banana would start by looking like something more "real".
p roger = Banana.new("Roger the Youth", 1) => #<Banana: @name="Roger the Youth", @days=1, @color="Green">
This banana starts to look at something but so far our class is not super useful. Maybe, we could add two methods, the first, taking no arguments and returning the days of our banana, and an other, taking days as integer in order to change our banana days?
class Banana def initialize(name, days, color="Green") @name = name @days = days @color = color # Default green! end def check_days @days end def change_days(days_as_integer) @days = days_as_integer end end roger = Banana.new("Roger the Youth", 1) p roger.check_days #=>1 p roger.change_days(2) #=>2
Getter and Setters
In fact, Ruby syntax provides a shorter way than those two methods to access and/or read and/or modify instance variables of a class, those are callet attr
. You have the choice between tree different getters, they are attr_reader
, attr_writer
and attr_accessor
. Their names are relatively transparents, one allows to read, one to write and one to do both. Most of the time you want to consider wisely which one to use in order to prevent data leaks. The code of previous example should be replace by something like:
class Banana attr_accessor :name, :days, :color def initialize(name, days, color="Green") @name = name @days = days @color = color # Default green! end end roger = Banana.new("Roger the Youth", 1) p roger.name #=>"Roger the Youth" p roger.days + 1 #=> 2 p roger.color #=> "Green"
Getter and setters can be used to manipulate objects of a same class and processing it through different methods. This is why classes also provides...
Instance Methods
If you want to give your banana some actions, give it a method. Since these methods get called on an individual instance of the Banana class, they're called Instance Methods. Here we will define a get_older
method that increments the age of my bananas by one day in order to know how old are the banana we have in our fridge and which one we should eat. (Hopefully, I care a lot about my banana's data, that's why I give them a name and keep track of their age and colors on a daily basis.)
class Banana @@starting_color = "Green" attr_accessor :name, :days, :color def initialize(name, days, color=@@starting_color) @name = name @days = days @color = color # Default green thanks to @@starting_color! end def get_older @days = @days + 1 if @days < 7 puts "I'm " + @@starting_color + " and " + @days.to_s + " days old! I'm too young to die!" elsif @days < 14 @color = "Yellow" puts "I'm " + @color + " and " + @days.to_s + " days old! I'm ready to die!" else @color = "Dark" puts "I'm " + @color + " and " + @days.to_s + " days old!  end end end roger = Banana.new("Roger the Youth", 1) bob = Banana.new("Bob the yellow", 7, "Yellow") jacques = Banana.new("Jacques the Rotten", 34, "Dark") p roger.get_older #=> "I'm Green and only 2 days old! I'm too young to die!" p bob.get_older #=> "I'm Yellow and 8 days old! I'm ready to die!" p jacques.get_older #=> "I'm Dark and 35 days old!
As you can see the output is different for each banana, because each of these objects are differents instances of the same banana class. Also, I noticed that it's time for Bob the Yellow to be eaten and for jacques the Rotten to go to the thrash. One last detail you may have noticed is the use of a @@starting_color
class variable with a value set to "Green" by default. This class variable is used in the method argument to replace the string expression "Green" previously but can also be used in any other method of our class.
More about classes
In brief: Classes are useful to use when you want to give methods to your data or have multiple instances of your data. Class methods have access to other class methods and class variables but don't have access to instance methods or instance variables. Instance methods can call other instance methods, instance variables, class methods, or class variables. For more informations about objects and classes see Official objects Ruby docs.
Posted Friday, October 16 — 2015


use Mouse Wheel to scroll down
(or use arrow keys)
and explore
Over the next few pages we will be exploring photographic "rules" and techniques and discussing their application to data visualisations in Tableau. While a lot of these maybe well known to those already familiar with data visualisation best practice I hope seeing them from the viewpoint of another art may help appreciate them in a new way. All of the photographs come from my own portfolio.
See my website for other examples of my photography and my Tableau Public Gallery for my own Tableau Visualisations.
This story board was built using the Tableau Javascript API and pagePiling JS Plugin.
What is it? Aspect ratio is the term used to describe the dimensions of an image by comparing the width to the height and expressing it in ratio form.
Why does it matter? The aspect ratio determines the subjects relationship with the edges of the image; it determines the amount of white space surrounding the image. Choosing the correct ratio in photography helps determine, say, the amount of sky in a landscape, or the amount of space around a portrait.
In photography, and data visualisation, the first decision we have to make around aspect ratio is often whether to orientate in landscape or portrait. However in data visualisation this is sometimes dictated for us, often by where the resulting image will be displayed - a blog for instance may have certain constraints around the widths of that can be shown.
Where we can choose, whether for photography or data visualisation, then two things may impact our choice of aspect ratio:
The amount of data - sometimes our subject is just too big to fit in one orientation;
The story we're trying to tell - e.g. tall buildings? The amount of sky can show isolation, and can be used in data visualisation to have similar effect, or to show relative sizes / outliers.
Image Example: Consider the image below, this dragonfly, a long slender beast, would have looked very different in a landscape orientation. Either the resulting image would have had two large chunks of useless background space either side, or the subject would need to be rotated at an unnatural angle. The vertical format shows off the full body without any wasted space in the resulting image.
Viz Example: With Data Visualisation the decisions are a little harder, particularly as decisions about individual worksheets then impact on general dashboard aspect ratio. For example in the visualisation over the page the vertical aspect ratios of the two components, the chart and text table, are dictated by firstly the labelling: horizontal text fits better on horizontal bars than on vertical bars (unless the bars are made very wide and then take up a lot of space), and secondly the space provided: more text can be fitted in a tall text table than a wide one. Together these two vertical components create a horizontal dashboard.
What is it? In photography we say good photographs, particularly within landscapes, lead the viewer into the image, be it through the lines within the image itself, which we call leading lines, or via shapes or sizes within the image that similarly guide the eye
Why does it matter? The human eye as it engages with a photo is a very fickle thing, it will wander across the image looking for a subject; this wandering is random at first, flitting across the image until it finds something of interest. Once it finds something it settles there momentarily, then starts to wander again. With lines, of linked objects if necessary, in a photograph you give the eye things to follow and draws them through the picture naturally, instead of letting the eye wander unsure of where to settle.
In a similar way observing the golden ratio can also help lead the eye through a photograph and create a natural experience for the viewer.
Viz Example: Our eyes look over the Viz over the page in similar way to the previous image, they sweep over the top chart, travel down the right hand side and arrive, as if by magic, at the exact point of interaction. Kelly has clearly thought a lot about the design of this visualisation and how the user will arrive at this point.
Tip: In designing visualisations take a minute to look at a visualisation from the point of view of a first time viewer, where will their eyes settle, where will the view guide them to. If that isn't where you want them then either change the "leads" through the viz, or at the very least add a help button or pointer to where they should be.
What is it? This is exactly what it says it is, removing extraneous clutter from the photograph or background, either by changing the viewing angle, or by changing the depth of field to blur the background. Sometimes this is also done in post-processing.
Why does it matter? Again this is all about what the eye does as it scans over an image, we don't want it distracted by elements that aren't related t the overall composition of the piece. Likewise as we translate this into data visualisation terms then we don't want "chart junk" to distract the viewer from the main analysis.
Viz Example: In the superb Viz over the page (sorry for the scroll bar) Steven removes any distractions and shows just the necessary information, with some filters. This leaves the eye free to take in the information offered.
Tip: Steven has also given the Viz "room to breathe"; by giving the Viz a less squashed-in feeling he creates a pleasant experience for the viewer.
Viz courtesy of Steven Carter of Monday Morning Viz - click here to see it in full on Tableau Public
What is it? Selective colour is a post-processing technique which highlights just one or a few colours, leaving the rest in monochrome. The use of selective colour can be a great technique to quickly create a great looking image, in the right circumstances. Highlighting only a certain colour can bring out the parts of the image you want the viewer to focus on.
Why does it matter? In Data visualisation we can use the same technique to draw the viewers eye to details we want them to focus on, and get them to leave other details in the background
Viz Example: In the Viz over the page Matt wants to draw attention to the outliers, so he uses selective colour to highlight only those over 2 s.d. drawing those to the viewers attention.
Tip: Steven has also given the Viz "room to breathe", by giving the Viz a less squashed-in feeling he creates a pleasant experience for the viewer
Viz courtesy of Matt Chambers (Sir Viz-a-lot) - click here to see it on Tableau Public
What is it? Our brains love patterns, we look for patterns everywhere, sometimes even where they don't exist. From a photographic point of view repeating patterns can make great photographs.
Why does it matter? In Data visualisation we can use repeating patterns in our visualisations to show similar trends, or outliers. Small multiples are very effective at showing this.
Viz Example: In this Viz I use small multiples to show how different words have changed usgafe, the pattern looks pleasing to the eye but all allows us to focus in on individual details and changes over time.
 Not sure about all these rules? Just break them, sometimes the best images are the ones that throw out the rule book.
Why does it matter? You should let your creativity be your guide, not be a slave to a rule book.
Thanks for reading. Please let me know your thoughts via Twitter.
Tweet


|
gtsam
4.0.0
gtsam
|
Public Member Functions | |
| FixedLagSmoother (double smootherLag=0.0) | |
| default constructor | |
| virtual | ~FixedLagSmoother () |
| destructor | |
| virtual void | print (const std::string &s="FixedLagSmoother:\n", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
| Print the factor for debugging and testing (implementing Testable) | |
| virtual bool | equals (const FixedLagSmoother &rhs, double tol=1e-9) const |
| Check if two IncrementalFixedLagSmoother Objects are equal. | |
| double | smootherLag () const |
| read the current smoother lag | |
| double & | smootherLag () |
| write to the current smoother lag | |
| const KeyTimestampMap & | timestamps () const |
| Access the current set of timestamps associated with each variable. | |
| virtual Result | update (const NonlinearFactorGraph &newFactors=NonlinearFactorGraph(), const Values &newTheta=Values(), const KeyTimestampMap ×tamps=KeyTimestampMap(), const FastVector< size_t > &factorsToRemove=FastVector< size_t >())=0 |
| Add new factors, updating the solution and relinearizing as needed. More... | |
| virtual Values | calculateEstimate () const =0 |
| Compute an estimate from the incomplete linear delta computed during the last update. More... | |
Public Types | |
| typedef boost::shared_ptr< FixedLagSmoother > | shared_ptr |
| Typedef for a shared pointer to an Incremental Fixed-Lag Smoother. | |
| typedef std::map< Key, double > | KeyTimestampMap |
| Typedef for a Key-Timestamp map/database. | |
| typedef std::multimap< double, Key > | TimestampKeyMap |
Classes | |
| struct | Result |
| Meta information returned about the update. More... | |
Protected Member Functions | |
| void | updateKeyTimestampMap (const KeyTimestampMap &newTimestamps) |
| Update the Timestamps associated with the keys. | |
| void | eraseKeyTimestampMap (const KeyVector &keys) |
| Erase keys from the Key-Timestamps database. | |
| double | getCurrentTimestamp () const |
| Find the most recent timestamp of the system. | |
| KeyVector | findKeysBefore (double timestamp) const |
| Find all of the keys associated with timestamps before the provided time. | |
| KeyVector | findKeysAfter (double timestamp) const |
| Find all of the keys associated with timestamps before the provided time. | |
Protected Attributes | |
| double | smootherLag_ |
| The length of the smoother lag. More... | |
| TimestampKeyMap | timestampKeyMap_ |
| The current timestamp associated with each tracked key. | |
| KeyTimestampMap | keyTimestampMap_ |
|
pure virtual |
Compute an estimate from the incomplete linear delta computed during the last update.
This delta is incomplete because it was not updated below wildfire_threshold. If only a single variable is needed, it is faster to call calculateEstimate(const KEY&).
Implemented in gtsam::IncrementalFixedLagSmoother, and gtsam::BatchFixedLagSmoother.
|
pure virtual |
Add new factors, updating the solution and relinearizing as needed.
Implemented in gtsam::IncrementalFixedLagSmoother, and gtsam::BatchFixedLagSmoother.
|
protected |
The length of the smoother lag.
Any variable older than this amount will be marginalized out.


About
Status
Questions
Shots
Resources
Download
Guestbook
Summary
CVS
Hosted by:
Statistics:
Webalizer
StatCVS


These are directly fetched from the cloudflare API and might be a little inaccurate (from bots to vpns, etc).
Data is collected by a script which reads the last 30 days worth of data, daily.
We present the data from yesterday, as today isn't over and would show lower numbers compared to the rest!
This page is built from the code in athons/cfstats, which uses:
Check the code out if this sort of thing interests you, and feel free to submit patches to make improvements!


Search for your favourite: restaurant, museum, hotel, attractions
Accomodation
Perfect solution: hotel, apartment, hostel, guest houseTourist Attractions
Search for your favourite: restaurant, museum, hotel, attractionsRestaurants
You are hungry:chinese food, burgers, traditional foodEvents & Tickets
It's time to have fun:concerts, cinema, exhibitionsCoffee Shop
You must wake up:Starbucks, Filicori, Nescafe, LavazzaGouvernement
Must see:parliament building, district court, royal houseLatest news from London Blog
About London
London is the political, economic and cultural capital of Britain. You can visit the Queen's official residence at Buckingham Palace and tour the Houses of Parliament, historic home of the UK government.
London's world-class tourist attractions are renowned across the globe. Many of the most famous attractions are free to visit, for example Tate Modern, the National Gallery and the Victoria and Albert Museum.
History
London's history stretches back over thousands of years, and the city boasts four World Heritage Sites: the Palace of Westminster and Westminster Abbey, the Tower of London, Maritime Greenwich and the Royal Botanic Gardens, Kew.
Read more


{% extends "sentry/projects/manage.html" %} {% load crispy_forms_tags %} {% load i18n %} {% load sentry_helpers %} {% block title %}{% trans "Rate Limits" %} | {{ block.super }}{% endblock %} {% block inner %}
{% blocktrans %}With the nature of Sentry, sometimes the amount data collected can be overwhelming. You can set rate limits per-project to ensure that a single flood of errors won't affect other any other projects utilizing Sentry.{% endblocktrans %}
{% blocktrans %}Rate limits apply on a per-minute basis, which means that they rollover at the start of a new minute. When you attempt to send an event and the project is over it's quota, the client will receive an HTTP 429 (Too Many Requests) response.{% endblocktrans %}
{% blocktrans %}Note: The Sentry application is not configured to manage rate limits.{% endblocktrans %}
{% blocktrans %}Your team has {{ team_quota }} events per minute allocated collectively among projects.{% endblocktrans %}
{% blocktrans %}The Sentry system has {{ system_quota }} events per minute allocated collectively among projects.{% endblocktrans %}


We're sorry but rf-plotter doesn't work properly without JavaScript enabled. Please enable it to continue.


Delaw or Delow, Doreen Winifred ??
| Birth Name | Delaw or Delow, Doreen Winifred ?? |
| Gender | female |
| Age at Death | 82 years, 11 months, 2 days |
Narrative
SMH - ORAMS, Doreen - 25 March, 1917 - 27 February, 2000 - late of Charmhaven & formally of Tempe, adored wife of Lionel (Harry), loved mother of Wendie Bradley, Leslie Johnson & Kerry Orams, mother-in-law of John (dec) & Peter, grandmother of Scott, Rosalie, Meredith, Brett, Glenn & Corinne & Kim, great grandmother of eleven. Aged 82 years. Memories will last forever.
Rels & friends are warmly invited to attend Doreen's funeral service, to be held at the Hillside Chapel, Palmdale, at 1.45pm on Thursday, 2nd March, 2000.
Events
| Event | Date | Place | Description | Sources |
|---|---|---|---|---|
| Birth | 1917-03-25 | |||
|
|
||||
| Death | 2000-02-27 | Charmhaven NSW (82yrs) | ||
|
|
||||
| Burial | 2000-03-02 | Palmdale Crematorium | ||
|
|
Families
Family of Orams, Harold Lionel and Delaw or Delow, Doreen Winifred ?? |
||||||||||||||||
| Married | Husband | Orams, Harold Lionel ( * + 2005-08-09 ) | ||||||||||||||
|
||||||||||||||||
| Children |
| Name | Birth Date | Death Date |
|---|---|---|
| Orams, [Living] | ||
| Orams, [Living] | ||
| Orams, [Living] |
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 5087FB402EB5DA119522DB783FC4E7B68ACB |
Attributes
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 4F87FB402EB5DA119522DB783FC4E7B689BB |
Pedigree
-
- Delaw or Delow, Doreen Winifred ??


ZoomZoom
How may I help you?
We are able to help for you.
That's deep. Let me help.
Your personal Assistant
Get help with your daily life stuff.
Get help already


interface DiffItemCallback<Data>
Interface used for adapting DiffCallback to custom data type
Data
- The class adaping this interface
Author
Camerash
abstract fun hasSameRepresentation(item: Data): Boolean
Provides information on whether the two items looks the same when shown to users You should compare resources shown to users here |
|
abstract fun isIdentical(item: Data): Boolean
Provides information on whether the two items are identical at a data level You should compare IDs or item-specific variables here |


Cicero is a comprehensive and accurate database of US-based and international elected officials and legislative districts. Cicero enables you to match constituents with their representatives based on address-level data.
My Roles
Brand Design
UX Design
Visual Design
HTML Development
Process
Step 1: Evaluation
This project was a re-design of an existing website. I performed an information architecture review, interviewed customers, and came up with a new content strategy based on my discussions.
Challenges
Understanding the intricacies of the product and how it’s consumed.
Empathizing with non-technical users.
Takeaways
Many customers weren’t tech savy and assumed they were receiving a product with an interface, but in reality we were providing a means to access a database. ie API, data licensing, and services.
Step 2: Wireframes
For the wireframing process I worked closely with the product manager and copywriter to produce many rounds of wireframes at various levels of fidelity.
Challenges
Establishing a balance between the user journey, messaging, and shared understanding of the product.
How does one travel through the site?
Takeaways
Let the content tell the story.
Start broad, then iterate to work out the details.
Don’t jump into visual design too quickly.
Step 3: Brand Redesign
The Cicero brand was outdated and needed a refresh. I redesigned the logo and came up with a fresh new color pallet that still lended itself to the old brand people wer familiar with.
Challenges
Convincing the product owners it was time for a new modern look.
Convincing stake holders to alter the brand colors and add three new complimentary colors.
Takeaways
When re-designing a brand, it’s important to appreciate the past while striving to create a new exciting appearance.
Step 4: Visual Design
For the visual design, I chose to incorporate a flat color pallet and simple illustrations that could help non-technical users make sense of how to use the product.
Challenges
Understanding how to weave the brand colors, UI colors, and complimentary colors into a harmonious composition.
Designing illustrations that were simple, but provided information.
Takeaways
The three access points in the product (API, Licensing, Services) ended up taking on the complimentary colors to help tell the story. This informed the overall color pallet.
Step 5: HTML Prototype
After the wireframes and visual design were complete, I built the website using static HTML pages. The HTML was later incorporated into our CMS, Jekyl.
Challenges
Learning to use SVG elements in my HTML prototypes for the first time.
Sourcing a CMS that was lightweight, but also friendly for non technical users.
Takeaways
Building the static HTML pages for our developers helped speed up the time to launch.


public class Location
extends java.lang.Object
A location may be an "item"-based location isItem()
, in that the resource that is
identified is a Jazz item (derived from IItem
) and the namespace is under
control of the repository services. Within the item-based classification,
it may be "named" isNamed()
in that it uniquely uniquely identifies a Jazz resource,
is human-readable, mnemonic, and is suggestive of its use. The name need not
be stable over time - for example, a name may refer to the current or selected
version of a resource in some larger context. The name segment of the URI is chosen
based on specific annotations of the item it represents.
isItemPath()
. Typically this form of URI
is also mnemonic, but its pathname is more complex than a simple named item.
An "oid" or "unnamed" location isItemOid()
to a Jazz resource
provides a way of identifying a resource that is
stable over time and configurations. Typically these identifiers are not mnemonic
or suggestive of the resource, are not human-readable, and integrate
uuids
as segments of the identifier.
Locations may be "virtual" isVirtual()
in that the items that they
identify and the structure of the identifying URI are under control of the component
that claims the URI namespace and the resource to be identified. The need not
represent a repository component. Such locations are in the VIRTUAL_NS
namespace and are created via the virtualLocation(String, String[])
constructor. Virtual locations that are strongly typed to derivations of
IVirtual
can be created via pathLocation(IVirtualType, String, String[])
or collectionLocation(IVirtualType, String, String, String)
, but the
component has limited control over the virtual namespace.
Locations may also identify items that are content-based isContent()
.
A "collection" location is a location that may have members, suitable for
GET or POST.
A location may be "absolute"
in that it uniquely identifies the
resource on a network, or it might be "relative" in that the identifier, while
unique to its domain, does not identify the resource in the context of any
network, host, repository, or service.
All absolute locations contain a binding to a service. The binding may be
explicit or implicit. The service binding is the service context in which the
relative URI encapsulated by this location might be resolved if (e.g.)
an http GET were performed on the absolute URI for this location. Service
bindings are independent of relativeUris and repositoryUris - if a location
was constructed without a reference to a service, it is considered bound to
the "default" service - a late binding that is determined by the repository server
identified by the URI should (e.g.) an http GET ever be performed on the URI.
Note that a Location can be constructed from a URI that does not identify
a Jazz resource - such a location is neither item-based or virtual.
However, all accessors that are normally useful for introspecting
a Jazz URI that follows the norms of syntax described above will be of little
use in this case.
A note on equality - locations forward the responsibility of equality
interpretation to URI
.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONTENT_NS |
static java.lang.String |
DEFAULT_SERVICE_BINDING
The name of the default service name.
|
static java.lang.String |
DOT |
static java.lang.String |
DOTDOT |
static java.lang.String |
ITEM_COL_NS |
static java.lang.String |
ITEM_NAME_NS |
static java.lang.String |
ITEM_OID_NS |
static java.lang.String |
ITEM_PATH_NS |
static java.lang.String |
REPO_ITEM_COLLECTION_NS |
static java.lang.String |
REPO_ITEM_OID_NS |
static java.lang.String |
REPO_ITEM_PATH_NS |
static java.lang.String |
REPO_NAMED_ITEM_NS |
static java.lang.String |
REPO_NS |
static java.lang.String |
REPO_VIRTUAL_COLLECTION_NS |
static java.lang.String |
REPO_VIRTUAL_PATH_NS |
static java.lang.String |
RESOURCE_NS |
static java.lang.String |
SERVICE_BINDING_PREFIX
The beginning of the service binding/relative uri namespace.
|
static java.lang.String |
SLASH |
static java.lang.String |
VIRTUAL_COL_NS |
static java.lang.String |
VIRTUAL_NS |
static java.lang.String |
VIRTUAL_PATH_NS |
| Modifier | Constructor and Description |
|---|---|
protected |
Location() |
| Modifier and Type | Method and Description |
|---|---|
static Location |
collectionLocation(IItemType itemType,
java.lang.String repoUrl,
java.lang.String query,
java.lang.String serviceName)
Creates a location that identifies a collection of the
referenced
itemType . |
static Location |
collectionLocation(IVirtualType type,
java.lang.String repoUrl,
java.lang.String query,
java.lang.String serviceName)
Creates a location that identifies a collection of the
referenced virtual type.
|
static Location |
contentCollectionLocation(java.lang.String repoUrl,
java.lang.String serviceName)
Creates a location that identifies the collection of content.
|
static Location |
contentLocation(IContent content,
java.lang.String repoUri)
Creates a content location for the content referenced by
content , using the default service. |
static Location |
contentLocation(IContent content,
java.lang.String repoUrl,
java.lang.String serviceName)
Creates a content location for the content referenced by
content . |
boolean |
equals(java.lang.Object obj) |
IContent |
getContent()
Returns the content associated to this location.
|
IItemHandle |
getItemHandle()
Returns the item handle associated to this location.
|
java.lang.String |
getItemPath()
Returns the path identifier for this itemPath location.
|
IItemType |
getItemType()
Returns the item type associated to this location.
|
java.lang.String |
getNamedId()
Returns the named identifier for this named location.
|
java.lang.String |
getPath()
Returns the path identifier for this location.
|
java.lang.String |
getPropertyPath()
Returns that portion of the named location path that identifies a
property of a Jazz resource.
|
java.util.Map |
getQueryParms()
Returns a map of the query parameters that may have been associated to
this location when created.
|
java.lang.String |
getQueryString()
Returns the query string that this location may have been constructed with.
|
java.lang.String |
getRepoUri()
Returns the repository URI for the Jazz resource identified by this location,
as in "http://jazzdev:8080/jazz", or "http://jazzdev:8080/jazz/secure".
|
java.lang.String |
getServiceName()
Returns the service name that this location was constructed with.
|
IType |
getType()
Returns the type associated to this location.
|
java.lang.String |
getVirtualPath()
Returns the path identifier for this virtualPath location.
|
IVirtualType |
getVirtualType()
Returns the virtual type associated to this location.
|
int |
hashCode() |
boolean |
hasPropertyPath()
Returns whether or not this named location was created from a object
property, and so contains a named path to that property as part of the
location information.
|
boolean |
hasQueryParms()
Returns whether or not this location was constructed with query parameters.
|
boolean |
isAbsolute()
Returns whether or not this location contains an absolute identifier
to a Jazz resource on a network, including host and repository information,
or if constructed with a non-Jazz URI, whether or not the location was
constructed with a URI in which
URI.getScheme() is not null . |
boolean |
isContent()
Returns whether or not this location refers to a content resource.
|
boolean |
isContentCollection()
Returns whether or not this location refers to the content collection.
|
boolean |
isItem()
Returns whether or not this is a location to an item-based resource.
|
boolean |
isItemCollection()
Returns whether or not this location refers to a resource in the item
collection namespace.
|
boolean |
isItemOid()
Returns whether or not this location refers to an oid-based Jazz item resource.
|
boolean |
isItemPath()
Returns whether or not this location refers to a path-based
Jazz item resource.
|
boolean |
isNamed()
Returns whether or not this location refers to a named identifier to
a Jazz resource.
|
boolean |
isVirtual()
Returns whether or not this is a location to a virtual resource.
|
boolean |
isVirtualCollection()
Returns whether or not this location refers to a resource in the virtual
collection namespace.
|
boolean |
isVirtualPath()
Returns whether or not this location refers to a path-based
a Jazz virtual resource.
|
static Location |
itemLocation(IItemHandle item,
java.lang.String repoUrl)
Creates an OID location for the current state of the referenced
item . |
static Location |
itemLocation(IItemHandle item,
java.lang.String repoUrl,
java.lang.String query,
java.lang.String serviceName)
Creates an OID location for the current state of the referenced
item . |
static java.lang.String |
itemToNamedURI(IItem item,
java.lang.String query)
Creates a named, relative URI for the referenced
item . |
static Location |
location(Location loc,
java.lang.String repoUrl,
java.lang.String serviceName)
Creates a location from the specified
loc and (optional)
repoUrl and serviceName . |
static Location |
location(java.net.URI resource)
Creates a location from the specified
resource . |
static Location |
namedLocation(IItem item,
java.lang.String repoUrl)
Creates a named location from the specified
item and (optional)
repoUrl and serviceName . |
static Location |
namedLocation(IItem item,
java.lang.String repoUrl,
java.lang.String query,
java.lang.String serviceName)
Creates a named location from the specified
item and (optional)
repoUrl , query and |
static Location |
pathLocation(IItemType itemType,
java.lang.String repoUrl,
java.lang.String[] path)
Creates a path-based location from the specified
itemType ,
path , and (optional) repoUrl and serviceName . |
static Location |
pathLocation(IItemType itemType,
java.lang.String repoUrl,
java.lang.String[] path,
java.lang.String query,
java.lang.String serviceName)
Creates a path-based location from the specified
itemType ,
path , and optional repoUrl , query
and |
static Location |
pathLocation(IVirtualType virtualType,
java.lang.String repoUrl,
java.lang.String[] path)
Creates a path location from the specified
virtualType ,
path , and (optional) repoUrl and serviceName . |
static Location |
pathLocation(IVirtualType virtualType,
java.lang.String repoUrl,
java.lang.String[] path,
java.lang.String query,
java.lang.String serviceName)
Creates a location from the specified
virtualType ,
path , and optional repoUrl , query
and |
static Location |
serviceLocation(java.lang.String repoUri,
java.lang.Class clazz)
Creates a location identifing a repository service.
|
static Location |
serviceLocation(java.lang.String repoUri,
java.lang.Class clazz,
java.lang.String path,
java.lang.String query)
Creates a location that identifies a repository and a repository service.
|
static Location |
stateLocation(IItemHandle item,
java.lang.String repoUrl)
Creates an OID location for the state referenced by
item . |
static Location |
stateLocation(IItemHandle item,
java.lang.String repoUrl,
java.lang.String query,
java.lang.String serviceName)
Creates an OID location for the state referenced by
item . |
java.net.URI |
toAbsoluteUri()
Returns the absolute URI for the Jazz resource identified by this
location.
|
java.net.URI |
toBaseUri()
Returns the base URI for the Jazz resource identified by this location,
as in "http://jazzdev:8080/jazz/service/{default}", or
"http://jazzdev:8080/jazz/secure/service/com.ibm.team.repository.IFooService".
|
java.net.URI |
toRelativeUri()
Returns a relative URI for the Jazz resource identified by this
location.
|
java.lang.String |
toString() |
static Location |
virtualLocation(java.lang.String repoUrl,
java.lang.String[] path)
Creates a virtual path location from the specified
path ,
and (optional) repoUrl and serviceName . |
static Location |
virtualLocation(java.lang.String repoUrl,
java.lang.String[] path,
java.lang.String query,
java.lang.String serviceName)
Creates a virtual location from the specified
path ,
and optional repoUrl , query and |
public static final java.lang.String SLASH
public static final java.lang.String DOT
public static final java.lang.String DOTDOT
public static final java.lang.String RESOURCE_NS
public static final java.lang.String ITEM_NAME_NS
public static final java.lang.String ITEM_PATH_NS
public static final java.lang.String ITEM_COL_NS
public static final java.lang.String ITEM_OID_NS
public static final java.lang.String VIRTUAL_NS
public static final java.lang.String VIRTUAL_PATH_NS
public static final java.lang.String VIRTUAL_COL_NS
public static final java.lang.String CONTENT_NS
public static final java.lang.String REPO_NS
public static final java.lang.String REPO_NAMED_ITEM_NS
public static final java.lang.String REPO_ITEM_PATH_NS
public static final java.lang.String REPO_ITEM_COLLECTION_NS
public static final java.lang.String REPO_ITEM_OID_NS
public static final java.lang.String REPO_VIRTUAL_PATH_NS
public static final java.lang.String REPO_VIRTUAL_COLLECTION_NS
public static final java.lang.String SERVICE_BINDING_PREFIX
public static final java.lang.String DEFAULT_SERVICE_BINDING
While this constant is public, clients should not depend upon its value remaining constant - it is an implementation detail that is subject to change without notice.
getServiceName()
,
Constant Field Valuespublic static Location location(java.net.URI resource) throws TeamRepositoryException
resource
.
The resource should represent a syntactically correct reference to a Jazz
resource, as returned by toAbsoluteUri()
or
toRelativeUri()
. It may however be a URI to a non-Jazz
resource, in which case the various accessors that introspect Jazz URIs
will be of little use.resource
- A URI to a jazz resource. May be relative, absolute, named,
oid, collection, or non-Jazz based. Must not be null
.null
.TeamRepositoryException
public static Location location(Location loc, java.lang.String repoUrl, java.lang.String serviceName)
loc
and (optional)
repoUrl
and serviceName
.
If the referenced location contains information regarding the repository
from which it's sourced and a
repository has not been specified in the method signature, then the
location's service information is used to create an absolute location
to that item. If that origin information is absent, and a repository
has not been specified to this method, then a relative location to
the item is created. If a repository has been specified to this
method that information is used to create an absolute location to the item
regardless of what repository the item may reference.
Note that strictly speaking the referenced location may be to a
non-Jazz-based resource, in which case the additional parameters to
this method have no meaning.loc
- The location referencing a Jazz resource or non-Jazz
resource. Must not be null
.repo
- The optional repository qualifier. May be null
.
If non-null
, any repository information referenced by
loc
is ignored and an absolute location created referencing
this repository. The repository is not contacted.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location collectionLocation(IItemType itemType, java.lang.String repoUrl, java.lang.String query, java.lang.String serviceName)
itemType
.itemType
- The item type of the collection. Must not be null
.repo
- The optional repository qualifier. May be null
.
If non-null
, any repository information referenced by
loc
is ignored and an absolute location created referencing
this repository. The repository is not contacted.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the item.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location collectionLocation(IVirtualType type, java.lang.String repoUrl, java.lang.String query, java.lang.String serviceName)
type
- The virtual type of the collection. Must not be null
.repo
- The optional repository qualifier. May be null
.
If non-null
, any repository information referenced by
loc
is ignored and an absolute location created referencing
this repository. The repository is not contacted.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the item.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location serviceLocation(java.lang.String repoUri, java.lang.Class clazz, java.lang.String path, java.lang.String query)
repoUri
- The string representing the repository identifier,
as in "http://jazz.net/jazz". Must not be null
.clazz
- The class representing the repository service. Must
not be null
.path
- The path to be appended to the service. May be null
.query
- The query to be appended to the service. The query must be encoded. May be null
.null
.public static Location serviceLocation(java.lang.String repoUri, java.lang.Class clazz)
serviceLocation(String, Class, String, String)
where the
path and query are omitted.repoUri
- The string representing the repository identifier,
as in "http://jazz.net/jazz". Must not be null
.clazz
- The class representing the repository service. Must
not be null
.path
- The path to be appended to the service. May be null
.query
- The query to be appended to the service. May be null
.null
.public static Location namedLocation(IItem item, java.lang.String repoUrl, java.lang.String query, java.lang.String serviceName)
item
and (optional)
repoUrl
, query and serviceName
.
Items that can be identified by name are annotated as such with the
teamAttribute.id attribute - the property representing that name in
string format is retrieved and used as the unique name. It's
an error if such an attribution doesn't exist, or if the attribution
exists but the property value for that attributed property is not available
- an IllegalStateException
is thrown in those cases.
Any origin information that might be specified in the specified
item
(IItemHandle.getOrigin()
) is ignored when
constructing the location - repository information must be explicitly
specified in the repoUrl
argument.
item
- The item referenced by the location. Must not be null
.
Any origin information that may be referenced by the item (as in
IItemHandle.getOrigin()
is ignored when constructing the location.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net:9080/jazz". May be null
.
The repository is not contacted.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the item.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.java.lang.IllegalStateException
- Thrown if the referenced item has not
defined a naming identifier.public static Location namedLocation(IItem item, java.lang.String repoUrl)
item
and (optional)
repoUrl
and serviceName
.
This is a convenience method for namedLocation(IItem, String, String, String)
,
setting the query and service values to null
.
item
- The item referenced by the location. Must not be null
.
Any origin information that may be referenced by the item (as in
IItemHandle.getOrigin()
is ignored when constructing the location.repo
- The optional repository qualifier, in URI form, as in
"http://jazzdev.torolab.ibm.com:9080/jazz". May be null
.
The repository is not contacted.null
.java.lang.IllegalStateException
- Thrown if the referenced item has not
defined a naming identifier.public static Location pathLocation(IItemType itemType, java.lang.String repoUrl, java.lang.String[] path, java.lang.String query, java.lang.String serviceName)
itemType
,
path
, and optional repoUrl
, query
and serviceName
.
itemType
- The item type for this path-based location.
Must not be null
.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net:9080/jazz". May be null
.
The repository is not contacted.path
- The path identifying an item of the type itemType
.
The elements of the array can be considered as segments of a pathname
(e.g. separated by "/"), where the '0' element of the array
is the least significant part of the path (the base) while
the element mapping to path.length-1
is the most
significant part of the path (the leaf). For example, for a
path that identifies an itemType such as /PlanOfRecord/Iteration2,
path[0] contains "PlanOfRecord" and path[1] contains "Iteration2".
May be null
or empty.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the item.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location pathLocation(IItemType itemType, java.lang.String repoUrl, java.lang.String[] path)
itemType
,
path
, and (optional) repoUrl
and serviceName
.
This is a convenience method for
pathLocation(IItemType, String, String[], String, String)
,
setting the query and service values to null
.
itemType
- The item type for this path-based location.
Must not be null
.repo
- The optional repository qualifier, in URI form, as in
"http://jazzdev.torolab.ibm.com:9080/jazz". May be null
.
The repository is not contacted.path
- The path identifying an item of the type itemType
.
Must not be null
or empty. The elements of the array can
be considered as segments of a pathname (e.g. separated by
"/"), where the '0' element of the array
is the least significant part of the path (the base) while
the element mapping to path.length-1
is the most
significant part of the path (the leaf). For example, for a
path that identifies an itemType such as /PlanOfRecord/Iteration2,
path[0] contains "PlanOfRecord" and path[1] contains "Iteration2".null
.public static Location pathLocation(IVirtualType virtualType, java.lang.String repoUrl, java.lang.String[] path, java.lang.String query, java.lang.String serviceName)
virtualType
,
path
, and optional repoUrl
, query
and serviceName
.
virtualType
- The virtual type for this location.
Must not be null
.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net:9080/jazz". May be null
.
The repository is not contacted.path
- The path identifying a resource of the type virtualType
.
The elements of the array can be considered as segments of a pathname
(e.g. separated by "/"), where the '0' element of the array
is the least significant part of the path (the base) while
the element mapping to path.length-1
is the most
significant part of the path (the leaf). For example, for a
path that identifies an virtualType such as /Computation/FirstResults,
path[0] contains "Computation" and path[1] contains "FirstResults".
May be null
or empty.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the resource.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location virtualLocation(java.lang.String repoUrl, java.lang.String[] path, java.lang.String query, java.lang.String serviceName)
path
,
and optional repoUrl
, query and serviceName
.
This differs from {@link #pathLocation(IVirtualType, String, String[], String, String)
in that there is no obvious typing information specified that is recognizable/parseable
by this class.
repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net:9080/jazz". May be null
.
The repository is not contacted.path
- The path identifying a resource.
The elements of the array can be considered as segments of a pathname
(e.g. separated by "/"), where the '0' element of the array
is the least significant part of the path (the base) while
the element mapping to path.length-1
is the most
significant part of the path (the leaf). For example, for a
path that identifies an virtualType such as /Computation/FirstResults,
path[0] contains "Computation" and path[1] contains "FirstResults".
May be null
or empty.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the resource.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location pathLocation(IVirtualType virtualType, java.lang.String repoUrl, java.lang.String[] path)
virtualType
,
path
, and (optional) repoUrl
and serviceName
.
This is a convenience method for
{@link #virtualLocation(IVirtualType, String, String[], String, String),
setting the query and service values to null
.
virtualType
- The type for this path-based location.
Must not be null
.repo
- The optional repository qualifier, in URI form, as in
"http://jazzdev.torolab.ibm.com:9080/jazz". May be null
.
The repository is not contacted.path
- The path identifying a resource of the specified virtualType
.
Must not be null
or empty. The elements of the array can
be considered as segments of a pathname (e.g. separated by
"/"), where the '0' element of the array
is the least significant part of the path (the base) while
the element mapping to path.length-1
is the most
significant part of the path (the leaf). For example, for a
path that identifies an virtualType such as /Computation/FirstResults,
path[0] contains "Computation" and path[1] contains "FirstResults".null
.public static Location virtualLocation(java.lang.String repoUrl, java.lang.String[] path)
path
,
and (optional) repoUrl
and serviceName
.
This is a convenience method for
{@link #virtualLocation(String, String[], String, String),
setting the query and service values to null
.
repo
- The optional repository qualifier, in URI form, as in
"http://jazzdev.torolab.ibm.com:9080/jazz". May be null
.
The repository is not contacted.path
- The path identifying the resource.
Must not be null
or empty. The elements of the array can
be considered as segments of a pathname (e.g. separated by
"/"), where the '0' element of the array
is the least significant part of the path (the base) while
the element mapping to path.length-1
is the most
significant part of the path (the leaf). For example, for a
path that identifies a resource such as /Computation/FirstResults,
path[0] contains "Computation" and path[1] contains "FirstResults".null
.public static Location itemLocation(IItemHandle item, java.lang.String repoUrl, java.lang.String query, java.lang.String serviceName)
item
.
The returned location abstractly identifies the current state of the referenced item
in a stable form, the exact state of which is unknown until the item is
resolved.item
- The item referenced by the location. Must not be null
.
Any origin information that may be referenced by the item (as in
IItemHandle.getOrigin()
is ignored when constructing the location.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net:9080/jazz". May be null
.
The repository is not contacted.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the item.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service name is assumed.null
.public static Location itemLocation(IItemHandle item, java.lang.String repoUrl)
item
.
This is a convenience method for itemLocation(IItemHandle, String, String, String)
,
with the query and service parameters set to null
.item
- The item referenced by the location. Must not be null
.
Any origin information that may be referenced by the item (as in
IItemHandle.getOrigin()
is ignored when constructing the location.repo
- The optional repository qualifier, in URI form, as in
"http://jazzdev.torolab.ibm.com:9080/jazz". May be null
.
The repository is not contacted.null
.public static Location stateLocation(IItemHandle item, java.lang.String repoUrl, java.lang.String query, java.lang.String serviceName)
item
.
The returned location identifies the item state of the referenced item
in a stable form. If managed
, must refer to an
auditable
. Regardless of subtype, the item must
refer to a state.item
- The item referenced by the location. Must not be null
.
If the item is managed
it must be of type
auditable
. If IAuditable
or
IUnmanagedItem
, must contain a state identifier.
Any origin information that may be referenced by the item (as in
IItemHandle.getOrigin()
is ignored when constructing the location.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net:9080/jazz". May be null
.
The repository is not contacted.query
- A user-defined optional query string to associated to the location.
The information, if specified, is not used to locate the item.
The syntax of the query string must be suitable for use within the query
string portion of a URI, but should not contain any '? characters.
May be null
.serviceName
- The optional service to bind the resource identified by
this location to. May be null
. If non-null, the name
denotes the package-qualified class name of the interface defining the
service to bind to, or its registered short-name alias. If null
the default service is assumed.null
.java.lang.IllegalArgumentException
- Thrown if the referenced item does
not refer to an item state.public static Location stateLocation(IItemHandle item, java.lang.String repoUrl)
item
.
This is a convenience method for stateLocation(IItemHandle, String, String, String)
that defaults the query and service parameters to null
.item
- The item referenced by the location. Must not be null
.
If the item is managed
it must be of type
auditable
. If IAuditable
or
IUnmanagedItem
, must contain a state identifier.
Any origin information that may be referenced by the item (as in
IItemHandle.getOrigin()
is ignored when constructing the location.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net/jazz". May be null
.
The repository is not contacted.null
.java.lang.IllegalArgumentException
- Thrown if the referenced item does
not refer to an item state.public static Location contentCollectionLocation(java.lang.String repoUrl, java.lang.String serviceName)
repo
- The optional repository qualifier. May be null
.
this repository. The repository is not contacted.serviceName
- The optional service to bind the resource identified by this
location to. May be null
. If non-null, the
name denotes the package-qualified class name of the interface
defining the service to bind to, or its registered short-name
alias. If null
the default service name is
assumed.null
.public static Location contentLocation(IContent content, java.lang.String repoUrl, java.lang.String serviceName)
content
.content
- The content referenced by the location. Must not be
null
.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net/jazz". May be null
. The
repository is not contacted.serviceName
- The optional service to bind the resource identified by this
location to. May be null
. If non-null, the
name denotes the package-qualified class name of the interface
defining the service to bind to, or its registered short-name
alias. If null
the default service is assumed.null
.public static Location contentLocation(IContent content, java.lang.String repoUri)
content
, using the default service.content
- The content referenced by the location. Must not be
null
.repo
- The optional repository qualifier, in URI form, as in
"http://jazz.net/jazz". May be null
. The
repository is not contacted.null
.contentLocation(IContent, String, String)
public boolean isAbsolute()
URI.getScheme()
is not null
.true
if this location can absolutely identify
a Jazz resource on a network or if contains a URI scheme part; false
if it only contains repository-relative identification information or no scheme.public boolean isNamed()
getItemHandle()
== null
). Oid-based
locations always have item handles available.true
if this location refers to a named Jazz
resource identifier, false
if it does not.public boolean isItemPath()
getItemHandle()
== null
).true
if this location refers to a named Jazz
resource identifier, false
if it does not.public boolean isItemOid()
true
if this location refers to a oid-based Jazz
resource identifier, false
if it does not.public boolean isVirtualPath()
true
if this location refers to a named Jazz
virtual resource identifier, false
if it does not.public boolean isItemCollection()
getItemType()
yields a non-null value.true
if the location refers to an item collection namespace,
false
if it does not.public boolean isVirtualCollection()
getVirtualType()
yields a non-null value.true
if the location refers to a virtual collection namespace,
false
if it does not.public boolean isItem()
true
if item-based, false
if not.public boolean isVirtual()
true
if virtual-based, false
if not.public boolean isContentCollection()
true
if the location refers to the content
collection, false
if it does not.public boolean isContent()
true
if the location refers to a content resource,
false
if it does not.public java.lang.String getNamedId()
IContributor.getUserId()
method
yields the value "JohnDoe".null
.java.lang.IllegalStateException
- Thrown if this location is not named
(i.e. isNamed()
== false
.public java.lang.String getPath()
getItemPath()
is returned. If this is a virtual path
location, getVirtualPath()
is returned. Otherwise, an
IllegalStateException
is thrown.
This is a convenience routine for getItemPath()
and getVirtualPath()
.
null
.
Does not start with "slash" ("/") character. May be empty.java.lang.IllegalStateException
- Thrown if this location is not path-based.public java.lang.String getItemPath()
null
.
Does not start with "slash" ("/") character. May be empty.java.lang.IllegalStateException
- Thrown if this location is not path-based
(i.e. isItemPath()
== false
.public java.lang.String getVirtualPath()
null
.
Does not start with "slash" ("/") character. May be empty.java.lang.IllegalStateException
- Thrown if this location is not path-based
(i.e. isVirtualPath()
== false
.public boolean hasPropertyPath()
true
if the location contains an additional named
path to an object property, false
if it does not.public boolean hasQueryParms()
true
if constructed with query parameters,
false
if not.public java.util.Map getQueryParms()
null
.
Keys of the map are of type String
- values are of type String
[].public java.lang.String getQueryString()
null
.public java.lang.String getPropertyPath()
null
.public java.lang.String getServiceName()
null
. If an absolute location was constructed without an service
name, or if this location is relative, the empty string is returned.public java.net.URI toAbsoluteUri()
IllegalStateException
is thrown.null
.java.lang.IllegalStateException
- Thrown if this location was not
constructed with information to construct an absolute URI with, or
if unexpected errors constructing the URI.public java.net.URI toRelativeUri()
null
.
Relative URIs contain only the named or oid-based identifier for a
Jazz resource, without any repository or service qualifier. There is no
leading "/" character on this URI.java.lang.IllegalStateException
- Thrown on unexpected URI construction errors.public java.net.URI toBaseUri()
getRepoUri()
) appended
with the value of service. In other words, it is the value of the absolute URI
(toAbsoluteUri()
), minus the trailing relative URI portion
(toRelativeUri()
). The value of this method is suitable for
use with URI.resolve(URI)
as "this", with the argument the
value of toRelativeUri()
.
If this location contains no information from which to construct an
absolute URI (e.g. it was constructed with a string that without scheme
or authority, as in "/workitem/2348"), null
is returned.null
if
this Location is not absolute. The returned
string has a trailing slash.public java.lang.String getRepoUri()
If this location contains no information from which to construct an absolute URI (e.g. it was constructed with a string that without scheme or authority, as in "com.ibm.team.repository/itemName/Workitem/2348", the empty string is returned.
null
. If there
is a repository uri for this location, the returned value has no trailing slash.
If there is no base uri, the empty string is returned.public IItemHandle getItemHandle()
#createLocation(URI)
). In the case where the origin
wasn't set, clients assume this responsibility if required.null
if the location wasn't directly or indirectly constructed (or could not
be constructed) with item handle information. For example, a named
location (i.e. a location created from a named relative URI) never has
item handle information associated to it. If non-null, IItemHandle.getOrigin()
always evaluates to null
. If this location was constructed
with an item handle, the returned item handle is not guaranteed to
be reference equals with that constructing handle.public IType getType()
IType = getItemType() != null ? getItemType() : getVirtualType();
null
if this Location contains no recognizable type information.public IItemType getItemType()
null
if this Location contains no recognizable item type information.public IVirtualType getVirtualType()
null
if this Location contains no recognizable virtual typing information.public IContent getContent()
contentId
. Can be
null
if this Location contains no recognizable
content.public static java.lang.String itemToNamedURI(IItem item, java.lang.String query)
item
.item
- The item from which to create the URI. Must not be null
.
Must contain a property that has a namedIdentifier annotation, and the value
for that property must be non-null and not empty.query
- The optional query string. Should not start with
"?". May be null
.java.lang.IllegalArgumentException
- Thrown if the referenced item has
no namedIdentifier annotation, or the value is empty or null
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object


Number of records and 2005 night light level
|
| Dependent variable: |
| |
| Night light level in 2005 |
|
| Number of records during Ming and Qing | 0.134*** |
| (0.008) |
| |
| Constant | 4.055*** |
| (0.209) |
| |
|
| Observations | 1,232 |
| R2 | 0.199 |
| Adjusted R2 | 0.198 |
| Residual Std. Error | 6.710 (df = 1230) |
| F Statistic | 305.617*** (df = 1; 1230) |
|
| Note: | *p<0.1; **p<0.05; ***p<0.01 |


Tell players to open http://bit.ly/gdflw
There are 0 players in the current session (max is 4; 3 are required for the game to be interesting)
You can create a new session using the button below. After you click the button, players who visit or reload the page will be placed into the new session


Personal Details
Name :
Age:
Gender
Male
Female
Marital Status:
Married
Unmarried
Mobile Number:
Country:
Afganistan
Australia
Belgium
Canada
Finland
Germany
Holand
India
Japan
Korea
Malaysia
Netherland
Pakistan
Sri Lanka
USA
UK
n>5
State:
Locality/Area:
Pincode:
Annual income:
Enter '0' if Unemployed.
Percantage :
Job:
Health Check:
Prental Details:
Submit