Interface Type

All Known Subinterfaces:
ComplexType, SimpleType
All Known Implementing Classes:
ComplexTypeGT, FilterComplexTypes.Arithmetic_OperatorsType, FilterComplexTypes.BinaryOperatorType, FilterComplexTypes.Comparison_OperatorsType, FilterComplexTypes.EmptyType, FilterComplexTypes.ExpressionType, FilterComplexTypes.Filter_CapabilitiesType, FilterComplexTypes.Function_NamesType, FilterComplexTypes.Function_NameType, FilterComplexTypes.FunctionsType, FilterComplexTypes.FunctionType, FilterComplexTypes.LiteralType, FilterComplexTypes.PropertyNameType, FilterComplexTypes.Scalar_CapabilitiesType, FilterComplexTypes.ServiceExceptionReportType, FilterComplexTypes.ServiceExceptionType, FilterComplexTypes.SortByType, FilterComplexTypes.SortOrderType, FilterComplexTypes.Spatial_CapabilitiesType, FilterComplexTypes.Spatial_OperatorsType, FilterOpsComplexTypes.BBOXType, FilterOpsComplexTypes.BinaryComparisonOpType, FilterOpsComplexTypes.BinaryLogicOpType, FilterOpsComplexTypes.BinarySpatialOpType, FilterOpsComplexTypes.ComparisonOpsType, FilterOpsComplexTypes.DistanceBufferType, FilterOpsComplexTypes.DistanceType, FilterOpsComplexTypes.FeatureIdType, FilterOpsComplexTypes.FilterType, FilterOpsComplexTypes.LogicOpsType, FilterOpsComplexTypes.LowerBoundaryType, FilterOpsComplexTypes.PropertyIsBetweenType, FilterOpsComplexTypes.PropertyIsLikeType, FilterOpsComplexTypes.PropertyIsNullType, FilterOpsComplexTypes.SpatialOpsType, FilterOpsComplexTypes.UnaryLogicOpType, FilterOpsComplexTypes.UpperBoundaryType, GMLComplexTypes.AbstractFeatureCollectionsBaseType, GMLComplexTypes.AbstractFeatureCollectionType, GMLComplexTypes.AbstractFeatureType, GMLComplexTypes.AbstractGeometryCollectionBaseType, GMLComplexTypes.AbstractGeometryType, GMLComplexTypes.BoundingShapeType, GMLComplexTypes.BoxType, GMLComplexTypes.CoordinatesType, GMLComplexTypes.CoordType, GMLComplexTypes.FeatureAssociationType, GMLComplexTypes.GeometryAssociationType, GMLComplexTypes.GeometryCollectionType, GMLComplexTypes.GeometryPropertyType, GMLComplexTypes.LinearRingMemberType, GMLComplexTypes.LinearRingType, GMLComplexTypes.LineStringMemberType, GMLComplexTypes.LineStringPropertyType, GMLComplexTypes.LineStringType, GMLComplexTypes.MultiGeometryPropertyType, GMLComplexTypes.MultiLineStringPropertyType, GMLComplexTypes.MultiLineStringType, GMLComplexTypes.MultiPointPropertyType, GMLComplexTypes.MultiPointType, GMLComplexTypes.MultiPolygonPropertyType, GMLComplexTypes.MultiPolygonType, GMLComplexTypes.PointMemberType, GMLComplexTypes.PointPropertyType, GMLComplexTypes.PointType, GMLComplexTypes.PolygonMemberType, GMLComplexTypes.PolygonPropertyType, GMLComplexTypes.PolygonType, ogcComplexType, ogcComplexTypes._FeatureInfoOutput, ogcComplexTypes._FeatureInfoSize, ogcComplexTypes._GetCapabilities, ogcComplexTypes._GetFeatureInfo, ogcComplexTypes._GetMap, ogcComplexTypes._Output, ogcComplexTypes._Size, ogcComplexTypes.VendorType, ogcSimpleType, ogcSimpleTypes.CapabilitiesSectionType, ogcSimpleTypes.ExceptionsType, ogcSimpleTypes.FormatType, ogcSimpleTypes.OWSType, SimpleTypeGT, sldComplexType, sldSimpleTypes._Service, WMSComplexTypes.__ExtendedCapabilitiesType, WMSComplexTypes._AttributionType, WMSComplexTypes._AuthorityURLType, WMSComplexTypes._BLANKType, WMSComplexTypes._BMPType, WMSComplexTypes._BoundingBoxType, WMSComplexTypes._CapabilityType, WMSComplexTypes._ContactAddressType, WMSComplexTypes._ContactInformationType, WMSComplexTypes._ContactPersonPrimaryType, WMSComplexTypes._CW_WKBType, WMSComplexTypes._DataURLType, WMSComplexTypes._DCPTypeType, WMSComplexTypes._DimensionType, WMSComplexTypes._EX_GeographicBoundingBoxType, WMSComplexTypes._ExceptionType, WMSComplexTypes._ExtentType, WMSComplexTypes._FeatureListURLType, WMSComplexTypes._FormatType, WMSComplexTypes._GeoTIFFType, WMSComplexTypes._GetType, WMSComplexTypes._GIFType, WMSComplexTypes._GML_1Type, WMSComplexTypes._GML_2Type, WMSComplexTypes._GML_3Type, WMSComplexTypes._HTTPType, WMSComplexTypes._IdentifierType, WMSComplexTypes._INIMAGEType, WMSComplexTypes._JPEGType, WMSComplexTypes._KeywordListType, WMSComplexTypes._KeywordsType, WMSComplexTypes._KeywordType, WMSComplexTypes._LatLonBoundingBoxType, WMSComplexTypes._LayerType, WMSComplexTypes._LegendURLType, WMSComplexTypes._LogoURLType, WMSComplexTypes._MetadataURLType, WMSComplexTypes._MIMEType, WMSComplexTypes._OnlineResourceType, WMSComplexTypes._PNGType, WMSComplexTypes._PostType, WMSComplexTypes._PPMType, WMSComplexTypes._RequestType, WMSComplexTypes._ScaleHintType, WMSComplexTypes._ServiceException, WMSComplexTypes._ServiceExceptionReport, WMSComplexTypes._ServiceType, WMSComplexTypes._StyleSheetURLType, WMSComplexTypes._StyleType, WMSComplexTypes._StyleURLType, WMSComplexTypes._SVGType, WMSComplexTypes._TIFFType, WMSComplexTypes._UserDefinedSymbolizationType, WMSComplexTypes._VendorSpecificCapabilitiesType, WMSComplexTypes._WBMPType, WMSComplexTypes._WebCGMType, WMSComplexTypes._WMS_CapabilitiesType, WMSComplexTypes._WMS_XMLType, WMSComplexTypes._WMT_MS_CapabilitiesType, WMSComplexTypes._WMTException, WMSDescribeLayerTypes._LayerDescription, WMSDescribeLayerTypes._Query, WMSDescribeLayerTypes.WMS_DescribeLayerResponse, XSISimpleTypes.AnyType, XSISimpleTypes.AnyURI, XSISimpleTypes.Base64Binary, XSISimpleTypes.Boolean, XSISimpleTypes.Byte, XSISimpleTypes.Date, XSISimpleTypes.DateTime, XSISimpleTypes.Decimal, XSISimpleTypes.Double, XSISimpleTypes.Duration, XSISimpleTypes.ENTITIES, XSISimpleTypes.ENTITY, XSISimpleTypes.Float, XSISimpleTypes.gDay, XSISimpleTypes.gMonth, XSISimpleTypes.gMonthDay, XSISimpleTypes.gYear, XSISimpleTypes.gYearMonth, XSISimpleTypes.HexBinary, XSISimpleTypes.ID, XSISimpleTypes.IDREF, XSISimpleTypes.IDREFS, XSISimpleTypes.Int, XSISimpleTypes.Integer, XSISimpleTypes.Language, XSISimpleTypes.Long, XSISimpleTypes.Name, XSISimpleTypes.NCName, XSISimpleTypes.NegativeInteger, XSISimpleTypes.NMTOKEN, XSISimpleTypes.NMTOKENS, XSISimpleTypes.NonNegativeInteger, XSISimpleTypes.NonPositiveInteger, XSISimpleTypes.NormalizedString, XSISimpleTypes.NOTATION, XSISimpleTypes.PositiveInteger, XSISimpleTypes.QName, XSISimpleTypes.Short, XSISimpleTypes.String, XSISimpleTypes.Time, XSISimpleTypes.Token, XSISimpleTypes.UnsignedByte, XSISimpleTypes.UnsignedInt, XSISimpleTypes.UnsignedLong, XSISimpleTypes.UnsignedShort, XSISimpleTypes.XSISimpleType

public interface Type
This is a convinience interface to help speed up the code, allowing for any type definition to handled in a consistent manner, independant of whether it's nested or not.
Author:
dzwiers www.refractions.net
See Also:
  • Method Details

    • getValue

      Object getValue(Element element, ElementValue[] value, Attributes attrs, Map<String,Object> hints) throws SAXException, OperationNotSupportedException
      This method is intended to receive the child elements in the form of ElementValues (@see ElementValue). Recall that this is a pairing containing a reference to the type and the actual value (do not call .getValue on the types). This should return the real value (interpreted value) for this element based on it's children. Remember, this is a XML is a tree structure, so if you don't include some children, they are gone forever (so be careful when ignoring data).

      If the element had #CData (Nested Child Text), this will appear in the first slot, with a null Element.

      A SAXNotSupportedException should be thrown when the child's [inherited, default implementation of getValue(ElementValue[],Attributes)] method should be used.

      Returns:
      Object
      Throws:
      SAXException
      OperationNotSupportedException
      See Also:
    • getName

      String getName()
      This returns the XML Schema declaration name of this type (both complex and simple types have names ...)
    • getNamespace

      URI getNamespace()
      This is used for validation of an XML document, and represents the targetNamespace of that this type resides in.
    • getInstanceType

      Class getInstanceType()
      This will return the intended Java Class for this element type. For generic complex types this will be an object array. SimpleTypes will match as they are parsed, and custom extensions will also return the appropriate class value.
    • canEncode

      boolean canEncode(Element element, Object value, Map<String,Object> hints)
      Can I write this object out as element specified?
      Parameters:
      element - The element which may be used to represent the Object. This is included to allow for child definitions to include addition information where appropriate.
      value - An Object which may or may not be encodeable by this type. The value may also be null.
      Returns:
      True when the encode method can interpret the given element/value pair into valid xml.
      See Also:
      • Type#encode(Element, Object, Writer, Map)
    • encode

      void encode(Element element, Object value, PrintHandler output, Map<String,Object> hints) throws IOException, OperationNotSupportedException
      Encode value as element on the provided output.

      This is encoding because the PrintHandler does not have to go back to a stream.

      Parameters:
      element - The original element declaration to which we should encode.
      value - The Object to encode.
      output - This is where the output should be written to.
      hints - For providing additional context information to specific schemas.
      Throws:
      IOException - When there is an error with the Writer.
      OperationNotSupportedException - When this type cannot be encoded ... and wasn't checked first.
    • findChildElement

      Element findChildElement(String name)
      Convinience method used to search this type's children for the requested element by localName.
      Parameters:
      name - the element's localName to search for.