org.apache.ivy.core.cache

## Class ArtifactOrigin

- java.lang.Object
- - org.apache.ivy.core.cache.ArtifactOrigin

    public class ArtifactOrigin
    extends java.lang.Object

This class contains information about the origin of an artifact.

See Also:
  `BasicResolver`, `ResolvedResource`

### Constructor Summary

Constructors
Constructor and Description
`ArtifactOrigin(Artifact artifact, boolean isLocal, java.lang.String location)` Create a new instance

### Method Summary

Methods
`boolean` `equals(java.lang.Object o)`
`Artifact` `getArtifact()` Return the artifact that this location is pointing at.
`java.lang.Long` `getLastChecked()` The last time the resource was checked to be up to date.
`java.lang.String` `getLocation()` Return the location of the resource (normally a url)
`int` `hashCode()`
`boolean` `isExists()`
`boolean` `isLocal()` Is this resource local to this host, i.e. is it on the file system?
`static boolean` `isUnknown(ArtifactOrigin artifact)`
`static boolean` `isUnknown(java.lang.String location)`
`void` `setExist(boolean exists)`
`void` `setLastChecked(java.lang.Long lastChecked)`
`void` `setLocation(java.lang.String location)`
`java.lang.String` `toString()`
`static ArtifactOrigin` `unkwnown(Artifact artifact)` ArtifactOrigin instance used when the origin is unknown.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ArtifactOrigin

    public ArtifactOrigin(Artifact artifact,
                  boolean isLocal,
                  java.lang.String location)

Create a new instance

Parameters:
  `artifact` - the artifact pointed by this location. Must not be `null`.
  `isLocal` - `boolean` value indicating if the resource is local (on the filesystem).
  `location` - the location of the resource (normally a url). Must not be `null`.

### Method Detail

#### unkwnown

    public static final ArtifactOrigin unkwnown(Artifact artifact)

ArtifactOrigin instance used when the origin is unknown.

#### isUnknown

    public static final boolean isUnknown(ArtifactOrigin artifact)

#### isUnknown

    public static final boolean isUnknown(java.lang.String location)

#### isLocal

    public boolean isLocal()

Is this resource local to this host, i.e. is it on the file system?

Returns:
  `boolean` value indicating if the resource is local.

#### getLocation

    public java.lang.String getLocation()

Return the location of the resource (normally a url)

Returns:
  the location of the resource

#### setLocation

    public void setLocation(java.lang.String location)

#### getArtifact

    public Artifact getArtifact()

Return the artifact that this location is pointing at.

Returns:
  the artifact that this location is pointing at.

#### getLastChecked

    public java.lang.Long getLastChecked()

The last time the resource was checked to be up to date. Maybe `null` if this information is not actually used by in some case.

Returns:

#### setLastChecked

    public void setLastChecked(java.lang.Long lastChecked)

#### isExists

    public boolean isExists()

#### setExist

    public void setExist(boolean exists)

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`