public class Property extends Object
PropertyType
.
The components of a Property may themselves be Property
objects, allowing nested structures.PropertyType
,
PropertyArity
Constructor and Description |
---|
Property(String name,
PropertyType type,
Object value)
Creates a Property with arity SCALAR.
|
Property(String name,
PropertyType type,
PropertyArity arity,
Object value)
Creates a Property with a given name, type, arity and value.
|
Modifier and Type | Method and Description |
---|---|
PropertyArity |
getArity()
Returns the arity (type of structure) of this Property.
|
Property |
getByName(String name)
Return a property by its name, regardless of its position in the
structural hierarchy of properties.
|
String |
getName()
Returns the displayable name of this Property.
|
PropertyType |
getType()
Returns the type of this Property.
|
Object |
getValue()
Returns the Object which is the Property's value.
|
public Property(String name, PropertyType type, Object value)
name
- The displayable name of the propertytype
- The type of propertyvalue
- The value of the property. The type of the
parameter must agree with type
.public Property(String name, PropertyType type, PropertyArity arity, Object value)
name
- The displayable name of the property.type
- The type of property.arity
- The arity of the property.value
- The value of the property. If the arity is
SCALAR, the type of this parameter must agree
with type
. Otherwise, the arity
must agree with arity
, and its
components must agree with type
.public PropertyArity getArity()
public Property getByName(String name)
name
- Property namepublic String getName()
public PropertyType getType()
public Object getValue()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.