org.eclipse.higgins.idas.impl
Class BasicProperty

Package class diagram package BasicProperty
java.lang.Object
  extended by org.eclipse.higgins.idas.impl.BasicProperty
All Implemented Interfaces:
IProperty
Direct Known Subclasses:
BasicMetadata

public class BasicProperty
extends Object
implements IProperty

Basic implementation of IProperty. TODO: Add comments. Specifically regarding the mutability of _value


Constructor Summary
BasicProperty(URI type)
           
BasicProperty(URI type, IPropertyValue value)
           
BasicProperty(URI type, Iterable<IPropertyValue> values)
           
BasicProperty(URI type, Vector<IPropertyValue> values)
           
 
Method Summary
 URI getType()
          Returns the type of this property as a URI.
 IPropertyValue getValue()
          Returns a single value for this iProperty.
 Iterable<IPropertyValue> getValues()
          Returns all values for this iProperty.
 void setValue(IPropertyValue value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicProperty

public BasicProperty(URI type)

BasicProperty

public BasicProperty(URI type,
                     IPropertyValue value)

BasicProperty

public BasicProperty(URI type,
                     Vector<IPropertyValue> values)

BasicProperty

public BasicProperty(URI type,
                     Iterable<IPropertyValue> values)
Method Detail

getType

public URI getType()
            throws IdASException
Description copied from interface: IProperty
Returns the type of this property as a URI.

From this URI, a consumer should be able to derive some kind of human-readable name (such as "age", "title", "employeeNumber", etc.).

A consumer may also be able to determine from this URI, the type or range of types of object(s) returned from IProperty.getValue() and IProperty.getValues().

These determinations may be made either by examining parts of the URI itself, or dereferencing it (or parts) to other sources of information.

Specified by:
getType in interface IProperty
Throws:
IdASException

getValue

public IPropertyValue getValue()
                        throws IdASException
Description copied from interface: IProperty
Returns a single value for this iProperty. In the case where this property has multiple values, the particular value returned is indeterminate.

Specified by:
getValue in interface IProperty
Throws:
IdASException

setValue

public void setValue(IPropertyValue value)
              throws IdASException
Specified by:
setValue in interface IProperty
Throws:
IdASException

getValues

public Iterable<IPropertyValue> getValues()
                                   throws IdASException
Description copied from interface: IProperty
Returns all values for this iProperty.

Specified by:
getValues in interface IProperty
Throws:
IdASException


Copyright © 2006 Novell Inc. All Rights Reserved.
This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors:
  Jim Sermersheim (Novell, Inc.) - initial API and implementation